feat(workhub): persist Coordination conversation (Slice 3) - #3798
Conversation
Astro-Han
left a comment
There was a problem hiding this comment.
Update on 417784cad2:
[P2] Coordination turnId reuse across operations merges turns
workhub-coordination-coordinator.ts:194-205,241-264 allows answer and record to reuse the same caller-supplied turnId without sharing durable identity. Concurrent or sequential reuse appends two triplets for the same turn, which deriveTurnRecords merges.
Fix: reject cross-operation turnId conflicts before admission/append while preserving idempotent replay within the same operation.
Checks on 417784cad2 are test: failure (e2e workhub-reconstruction remains) — not green.
简体中文
存在跨操作 turnId 复用导致的合并错误。`answer` and `record` both take a caller-supplied `turnId`, and neither saw the other's durable claim. Reusing one identity appended a second triplet that `deriveTurnRecords` merged into a single Turn. Each operation now probes the other's claim under the Session admission it already holds: `record` reads the root admission ledger, and `answer` prepares its content inside the lease so a recorded summary is visible before anything is admitted. Replaying either operation with its own payload stays idempotent.
…script The conversation is now the Coordination Session transcript, so an ordinary Session contributes a status row and a routing target rather than a turn. Assert the empty conversation before routing; the durable turn after navigating away and back is unchanged.
417784c to
23d70d1
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Update on 23d70d1dbd:
GO — no P0-P3. Adds durable WorkHub Coordination via workhub.coordination.answer (ledger-owned Turn) and record (persistent triplet with idempotent matching); both gate via same admission lease to avoid cross-operation reuse. Hosted test: SUCCESS (32859138152).
简体中文
该头无阻断。|
LGTM. merging! |
Summary
Safety and boundaries
turn.startremains unavailable for the reserved Coordination Sessionworkhub-coordination-v1Verification
npm run typechecknpm run lintnpm run check:asf-headersThe follow-up test commit also updates three stale Runtime Host queue tests to use the typed request API introduced by #3784, which is required for the full workspace typecheck.
Tracking: #3492 (Slice 3)