Repository navigation
fix(agent-pane): fence stale provider tail writes after sign-in (#33239) - #33405
Conversation
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
…ail-disk-remote # Conflicts: # webviews/bench/chat-switch.bench.ts
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-683d106d63dad2af065c
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3f3e509fd95c26d1106a
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3f3e509fd95c26d1106a
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
teamleaderleo
left a comment
There was a problem hiding this comment.
Review (claude-opus-5-5 medium): SHIP at ad12566
Review (subagent claude-opus-5-5 medium): SHIP at ad12566
Visual verdict: unchanged by this diff.
Verified both providers capture an immutable generation, all chat.tail write variants reject old generations, and fresh reads retain their current lifecycle guard. No blocking findings. Fleet compile remains the owner’s check.
Follow-ups: accepted surviving-pane cache-refill tradeoff and stronger legacy WebKit-callback behavior coverage are tracked in #33239 (comment).
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2513a79932be9840024d
|
Review (subagent claude-opus-5-5 medium): SHIP at d8b0cc8 Carried from the SHIP at ad12566 (review 5749196444). d8b0cc8 only merges the base twice (a848b28, then 864f4a3). Follow-ups: none new. |
|
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)
Shipped in:
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41619934635 at 092736d failed: cmux-next fleet Release compile. |
|
Found 1 test failure on Blacksmith runners: Failure
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
A pane that survives sign-out/sign-in can still hold the previous account’s JavaScript tail. Reject
chat.tailwrites from that old pane by capturing the cache generation when its provider is constructed. Both native transports carry the generation through their existing tail bridge. Fresh reads retain the current request-generation guard, and newly constructed providers cache normally.Closes #33239. Builds on merged #33155; #33207 separately clears the daemon’s disk copies. Retargeted to
feat-cmux-nextafter #33155 landed. The final base integration preserves the exact reviewed provider-fence patch and all intervening base changes. The minimal native comparison is boundary plumbing for the daemon-owned disk cache; it adds no persistence or render behavior.Leo requested: “the text shows up right on click but the actual thing loads a second later … but it’s just text / from folders / on your machine / you should be able to simply see the text rendered instantly wherever it is” and “even for remote things it should be fast”. This completes the sign-out isolation of those persisted tails. His request supersedes the former in-memory-only tail choice, recorded by the parent change’s design update.
Accepted tradeoff: surviving local panes keep live rendering, sending and fresh reads, but cannot refill the cross-tab host-memory cache until their provider is recreated. This avoids inferring account ownership from raw/qualified session IDs or optional peer metadata. Re-arming an existing pane requires a future fresh-attach handshake contract.
Validation at
d8b0cc8bf1b3ccfc7ba61e0703c0ec7fa5cd36ce: app compile passed in 95 seconds (fleet job6daef011e78ece5f3f4e8550); all 14ChatTailCacheTestspassed (fleet step7fd40b8688e2a3c3191acb75). Tests cover stale-provider write, forget and hover paths; new-provider writes; memory and disk reads from an old provider; and both native host routes. The test-only commit47f57993dbcf32dad219961deb1c06e11e2fab3cfailsoldProviderCannotRepostAfterSignInButCanStillReadon both stale-write and stale-hover replacement assertions (fleet step0c16842fa84e37f3aa882a5b). The tests run without a display.The base-only update and web-validation checks passed at the final head. The native-only patch does not route the webview suite. The independent Claude Opus 5.5 medium review passed at
ad125662e9adc8a3dc5609e9c2b0f908397c5aea; final-head review carry is pending. The patch against the updated base is byte-identical to that reviewed delta after removing only blob-ID index lines.Performance
Shared mock scene:
agent-pane.peer-copy/cold-long-chat-connectinginPeerCopyBanner.gallery.tsrenders the bounded tail of a long remote chat while its handshake remains pending. The parent early-tail rendering change owns its capture and switch measurements. This follow-up changes cache write acceptance only, with no visible UI state.🤖 Generated with Codex
Agent session: agent session