fix(desktop): bind Side Conversation events to Host admission - #3716
fix(desktop): bind Side Conversation events to Host admission#3716Astro-Han wants to merge 25 commits into
Conversation
41aa14c to
f51928a
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed this head and found blocking issues.
[P2] Queued steer Stop retracts the queued turn but drops UI ownership of the still-running turn
use-quote-companion.ts:312-320,723-758 with runtime-host-session-execution-ipc-main.ts:816-840. When a Side Conversation owns active A and steered S is still queued, Stop retracts only S without interrupting A. The renderer restores A but abandonAdmission() clears turnInFlight, so later A deltas render while the Composer appears non-streaming.
[P2] Ordinary Desktop observation now requires a catalog preflight that may not recover
runtime-host-session-execution-ipc-main.ts:192-206 with preload.ts:1722-1775. If Host reconnect interrupts getSession before registry registration, no observation is registered and live events are lost until remount. Previously sessions:observe registered directly.
Additional standards note: UI changes should include before/after visual evidence per CONTRIBUTING.md:85.
Checks on 364dd1a96 are test: success but mergeable: dirty — needs rebase.
简体中文
存在两项状态机/观测阻断,需修复后再审。364dd1a to
b2c9946
Compare
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Derive admission observation from the Host-owned Session mode and keep ordinary Session streams unchanged. Remove the duplicate renderer send intent and tighten continuity decoding. Generated-by: Codex
Keep Session event listeners bound to the current validated Host target epoch instead of filtering replacement events through the original host identity. Generated-by: Codex
Reconcile buffered Host admission events when Stop outcome is unknown and bind successor/retraction fixtures to the actual submitted ticket. Generated-by: Codex
Follow replacement target epochs within the owning profile while rejecting same-named Session channels from other Hosts. Generated-by: Codex
Assert that replaying admission and text after an unknown Stop restores the real Host Turn streaming projection. Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
695ddfa to
e896f46
Compare
Summary
message_admissionfact; unrelated terminal, steering, and queue events never infer ownership.No durable message schema, settlement/recovery policy, CLI projection, or Desktop primary-conversation projection is changed.
Review follow-up
retractedevent instead of treating a successful Stop RPC as global idle. The still-running Turn remains owned and interruptible, and a second Stop can target it.message_admissionfact as successor admission; observation reseeding replays that fact while the in-flight queue entry remains authoritative.UserMessage; no renderer recovery state or new protocol field is needed.sessions:observeis registered as one reconnectable read operation, so Runtime Host replacement retries catalog preflight and observer registration together.turnInFlight=falseclosure.Behavior evidence
The production-shaped React hook + Workbar seam covers:
Protocol boundary
A full Host replacement can discard an old in-memory queued ticket before it reaches either an active Turn or a durable successor admission. Current Host facts can then prove neither
admittednorretracted; the existing submit contract intentionally reportsoutcome_unknown. This PR preserves that ticket instead of inventing cancellation. Tickets that reached an active Turn are recovered from the durable steering message. Fully settling the never-admitted queue-only case requires a prior Host protocol fact for the durable terminal disposition of a queued admission; it is outside this PR's storage/recovery scope.Verification
git diff --checkExact pushed head:
e896f4648, rebased onto currentorigin/main. Exact-head CI is green, including Desktop e2e, Runtime Host, Browser/Storybook smoke, alignment, and installed CLI candidate validation. Earlier pre-rebase runs reached 64/66 Desktop e2e tests before the slash-command menu DOM-stability assertion failed; the rebase removed that failure and the full five-test Slash menu spec also passes locally.AI use
Codex contributed the implementation, regression tests, verification, and adversarial/simplification review. No commit from Draft PR #3633 was cherry-picked or copied; its old branch/review was used only as failure evidence.