fix: reconcile CLI and Desktop messages by canonical identity - #3803
fix: reconcile CLI and Desktop messages by canonical identity#3803Astro-Han wants to merge 7 commits into
Conversation
Astro-Han
left a comment
There was a problem hiding this comment.
Update on bda2eccf2d:
[P2] busy-race fallback leaves ghost transient row
When renderer thinks idle but host is busy (another window/Bot/Goal continuation holds root), startTurn throws session_busy and falls back to submitMessage({messageId: renderer turnId}). Host then creates a new turnId for the turn while the durable message id stays as renderer turnId. The IPC returns host turnId without messageId, and renderer uses host id for optimistic row — never matches durable id → permanent duplicate (transient ghost).
Fix: return messageId on the turn_started branch and prefer it as transient key; add test for busy→turn_started path.
Note: PR is still draft; this review is preparatory and pending re-review after head stabilizes.
简体中文
busy 情况下回退导致重复行。Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
bda2ecc to
f5ff581
Compare
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Summary
Refs #3633
This is replacement PR 2 after #3721 and #3716 landed on
main.messageIdbefore ordinary send or Follow Up admission, render that LocalIntent immediately, and submit the same identity throughturn.message.submit.turn_started,steering,followup,outcome_unknown, andmessage_admission.retractedare Host facts; clients only project their presentation consequences.messageId. Definite rejection and exact retraction remove it; an unknown outcome preserves it for later transcript reconciliation.submitMessageadmission and exact-Turnsend. WorkHub and Side Conversation no longer inspect a widened ordinary-send result, while fix(desktop): bind Side Conversation events to Host admission #3716 retains its independent fork, Stop, event, and disposal authority.turn.start.steer/queueMessagefallback outcome, CLI delivery retry ownership, and obsolete fallback-only tests are removed.Before: optimistic rows and Host rows could have different identities, stale transcript replacement could erase or reorder the tail, and one Desktop send contract mixed ordinary admission with exact-Turn semantics. After: the submitted message is immediately visible once, stays at one timeline position, and changes only when the Host supplies canonical, definite-rejection, or exact-retraction evidence.
Verification
origin/mainate9d314fd8a15a906d1323c599a1bd300a312d174.@maka/core,@maka/storage,@maka/runtime,@maka/runtime-host,@maka/ui,@maka/desktopmain, andmaka-agent.outcome_unknown, exact retraction, sparse replacement ordering, Host-started attach, remount/reconnect queue echo, and cross-client follow-up identities.git diff --checkpassed. Repository-wide tests were not run locally; CI owns that coverage.Authority boundaries
AI use
Tool(s) and scope: Codex authored the implementation, tests, simplification audit, and PR text under human review. Claude was consulted for an independent architecture critique. Material commits retain
Generated-by: Codextrailers.Checklist
Does this PR entail a change in behavior?