Repository navigation
cmux NEXT incognito: withdraw a Feed item whose workspace moved into an incognito window during the send - #31316
Conversation
…ring the send is withdrawn (#31309) Red: the driver checks the window only before feed.adopt, so the adopt that raced the move commits and the item stays in the Feed and pushes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-afa4d1219370df72d7ba
…to window during the send (#31309) The driver checked the item's window only before feed.adopt. An unlisted normal workspace can be placed into an incognito window while the adopt is in flight; the adopt then commits and the item stays in the Feed and pushes. Re-check after the adopt and withdraw (feed.adopt.cancel, then the daemon step); a committed adopt's cloud copy is archived, which clears its pending push, before the daemon records the move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-afa4d1219370df72d7ba
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 044769a; does not block Shipped in:
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41357380659 at 888bf01 failed: cmux-next generated files. |
|
Owned by an agent session · session |
|
Review (subagent, claude-opus-5-5 medium): SHIP at 17c9fec The re-check after the adopt uses the same rule as the check before it ( Fleet runs: red at 6a6b1fa ( Follow-ups: filed as an issue (archive is not a delete, and a zero-delay push may already be out; archiving now also covers closed or gone workspaces; skip the archive when installID is nil and refusals other than stop codes; a timeout for the test's continuation). |
|
Found 7 test failures on Blacksmith runners: Failures
|
|
Review (next-review patch-id; carried): SHIP at b72cc42 The independent SHIP at 17c9fec carries to this head: the PR's own change ( |
…heir packages (#31456) The arch ratchet refused feat-cmux-next's tip with [app_lines] CmuxNextApp +282 against the last green arch tip cf0a547. This moves logic that holds no app state out of CmuxNextApp, behavior-neutral, and leaves the wiring in the App: - #31033 (spare page adopts an existing chat) to CmuxNextAgentPane: the adoption decision (AgentPaneSpareAdoption), the spare's readiness (AgentPaneSpareReadiness, AgentPaneModel.servesExistingChat), the refusal reason (AgentPaneModel.spareRefusal), the trace outcome (AgentPaneSpareOutcome), the pool's slot (AgentPaneSpareSlot) and refill policy (AgentPaneSpareRefill). - #30002 (Cloud chat repick) to CmuxNextAgentPane, next to AgentPaneCloudStart and AgentPaneCloudRepick: the started-chat record (AgentPaneCloudStarted) and the picked-machine match (AgentPaneCloudRepick.machineID(in:)). - #31363: CommandHistory exposes its TerminalCommandSuggestionStore (CmuxNextHistory) instead of four forwarding methods. - #31316: the feed handoff driver and its wire shape (FeedHandoffDriver, FeedHandoffWire) to CmuxNextAgentPane/Approvals, next to FeedHandoffPolicy, which it already depends on. The pure tests move with their code (AgentPaneSpareAdoptionTests, AgentPaneCloudStartTests). No new package edge. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #31309. Follow-up from the adjudication on #31235 (#31235 (comment)).
Problem.
FeedHandoffDriver.adoptchecked that an item's workspace or terminal is a normal window's only before it sentfeed.adopt. A normal workspace that no window lists can be placed into an incognito window (reveal,openWindow(incognito: true);WindowRegistry.crossesIncognitotreats an unlisted workspace as crossing nothing). If that happens while the adopt is in flight, the adopt commits and the item stays in the Feed and pushes to the iPhone, although its workspace is now an incognito window's.Change. After the adopt returns (or an idempotency conflict confirms an earlier commit), the driver re-checks
policy().frozenContent(for:). When the item is no longer a normal window's, it withdraws it with the existing pair:feed.adopt.cancel, then the daemon step. A committed adopt answerscancelled: false, sowithdrawnow archives the cloud copy (feed.archive, which also clears itspush_due_at) beforefeed-local-handoff-done. An archive that fails leaves the itemhanding_off, and the next pass withdraws it again (same idempotency keys). The same archive applies to a frozen item from a crashed run whose adopt had committed.Limit. A push whose delay was zero may already have gone out by the time the reply arrives; archiving cannot recall it. Nothing else of the item stays in the Feed.
Tests. Two commits: the first adds
anItemWhoseWorkspaceMovesIntoAnIncognitoWindowDuringTheSendIsWithdrawn(red: onlyfeed.adoptis sent), the second the fix. Run on the fleet withcmux-ci run ... package-test-lane.sh suite Packages/macOS/CmuxNext IncognitoFeedHandoffTests.Spec: leo-workspace
design/spaces.md"Incognito".Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes a race in
FeedHandoffDriverwhere an item's workspace could move into an incognito window while itsfeed.adoptwas in flight, leaving the item in the Feed and pushing it to the iPhone.The driver now re-checks the window after the adopt commits and withdraws the item with
feed.adopt.cancelfollowed by the daemon step. A committed adopt answerscancelled: false, so the cloud copy is archived first, which also clears its pending push; a failed archive leaves the item handing off and the next pass withdraws it again. Zero-delay pushes may already have gone out before the reply arrives and cannot be recalled. Adds a regression test for the race.Written for commit b72cc42. Summary will update on new commits.