Skip to content

Keep account cloud outboxes visible and drainable - #153

Open
SunkenInTime wants to merge 8 commits into
codex/sync-durability-20260903-201913from
agent/account-outbox-trust-98296362
Open

Keep account cloud outboxes visible and drainable#153
SunkenInTime wants to merge 8 commits into
codex/sync-durability-20260903-201913from
agent/account-outbox-trust-98296362

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • drain eligible durable strategy operations for the signed-in account even when their strategies are closed, using the same claim, ACK, conflict, retry, and persistence path as the active editor
  • surface account-wide pending and attention state in the Cloud library and editor sync chip without exposing raw IDs or transport errors
  • route library, Settings, and auth-incident sign-out through one fail-closed flow that persists active intent first, identifies device-only work by strategy name, and closes the cloud editor only after explicit confirmation

Sync guarantees

  • background work never runs for another account, never auto-retries paused or rejected records, and yields the network lane to newly queued active-editor work
  • durable records are removed only by exact storage key and op ID; active edits that arrive during a background request are serialized and retained
  • a failed sign-out is not reported as success, and pending outboxes remain tied to the original account without deletion or relabeling

Verification

  • flutter test --no-pub (687 passed, 2 intentional skips)
  • focused sync/auth/UI suite (128 passed)
  • flutter analyze --no-pub (0 errors/warnings; 35 existing info lints)

Stack dependency

This PR targets #145's branch at bd402cc000cd58e3975fbca2a9fabfdc337f0d77. It merges the exact accepted #150 head e4b388b6f5966957676490301eb59c663bc400ca; #150 is stacked on #144. Merge order is therefore #144, #150, #145, then this PR (or rebase this PR after those dependencies land).

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 96fd045f-689b-4679-96ee-56156a54be07

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SunkenInTime

Copy link
Copy Markdown
Owner Author

@greptileai Please review current head 9f43cbf for cloud outbox durability, account isolation, active-editor concurrency, and fail-closed sign-out behavior.

@SunkenInTime
SunkenInTime force-pushed the agent/account-outbox-trust-98296362 branch from 9f43cbf to 327a862 Compare September 4, 2026 04:28
@SunkenInTime

Copy link
Copy Markdown
Owner Author

Addressed the current-head attention-control audit in 327a862. Active conflict recovery remains available while the popover also identifies attention elsewhere in the Cloud library. Focused 127/127, full Flutter 686 passed with 2 intentional skips, analyze clean.

@greptileai Please review the current head.

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change keeps eligible cloud work syncing after its editor closes, surfaces account-wide cloud work in the library and status chip, preserves explicit cloud-conflict choices, and routes sign-out through a retained-work check. Focused Flutter coverage verified account boundaries, serialized background and active syncing, exclusion of paused or rejected work from automatic retries, and sign-out blocking when active work is not durably retained.

Confidence Score: 5/5

The verified cloud-sync and sign-out paths are safe to merge.

The reviewed behaviors were exercised with the repository-local Flutter SDK: a cross-account background-drain scenario, a held-request concurrency race, paused and rejected no-auto-run behavior, and a sign-out comparison showing that non-durable active media removes the confirmation action. Relevant queue, coordinator, Settings, and authentication test coverage passed.

Files Needing Attention: No files need follow-up from the verified areas. The primary behavior remains concentrated in lib/providers/collab/strategy_op_queue_provider.dart and lib/services/cloud_sign_out_coordinator.dart.

T-Rex T-Rex Logs

What T-Rex did

  • The general contract validation confirms that candidate selection is scoped to the queue account and that the flush path verifies the authenticated user matches that account.
  • Active and background flushes share a network-busy guard; the held-request race test passed, and the focused strategy operation queue provider suite passed all 42 tests.
  • Rejected work remains durable authority until explicitly retried, and both background candidate filters include only queued and in-flight records; the dedicated paused/rejected no-auto-run test passed, and the focused global outbox and queue provider suite passed all 50 tests.
  • The coordinator returns without signing out when preparation fails and changing only the durability setting affects the confirmation flow; the full coordinator suite and supporting coverage passed.
  • Source evidence shows the active work waits for a background request, the background work blocks on network gating, and the test case involving account-scoped submission passed twice while the narrow queue suite completed all 42 tests.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (3): Last reviewed commit: "fix: surface and drain account cloud out..." | Re-trigger Greptile

@SunkenInTime
SunkenInTime force-pushed the agent/account-outbox-trust-98296362 branch from 327a862 to 5bf2fc5 Compare September 4, 2026 04:33
@SunkenInTime

Copy link
Copy Markdown
Owner Author

Addressed the Cloud-library visibility audit in 5bf2fc5. The account outbox banner now remains visible in owned and Shared With Me sections, while local and other-account work stay hidden. Full Flutter 687 passed with 2 intentional skips; focused shared/status coverage and analyze are clean.

@greptileai Please review the current head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant