Uh oh!
There was an error while loading. Please reload this page.
feat(workhub): add coordination session lifecycle - #3764
Conversation
Implement Slice 2 of apache#3492 on the existing Session substrate. Generated-by: Codex
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed this head and found blocking issues.
[P2] Default-Host switch while not ready leaves old generation active
Switching default Host to a reconnecting/unavailable Host does not increment the generation, so late results from the previous Host still pass checks and WorkHub continues using the old Host until the new one becomes ready — which may never happen.
[P2] Ordinary workspace relocation can permanently break Coordination identity
session.workspace.relocate can change the reserved maka_workhub_coordination cwd/projectId, after which the next resolve permanently fails with operation_conflict and the row is hidden with no repair path.
[P3] Write-only ref duplication
workHubCoordinationSessionIdRef is never read; state is the sole authority.
Checks on becd9f133e are test: success.
简体中文
存在两项身份/代次阻断与一项冗余。Generated-by: Codex
ARE404
commented
Aug 25, 2026
Addressed the review findings in
Exact-head CI is green, and the final Standards/Spec adversarial re-review has no findings. |
Astro-Han
left a comment
There was a problem hiding this comment.
Update on 35efcd6d9b:
No blocking issues. The prior generation/identity P2s are now closed: default-Host changes correctly invalidate the old generation, and the Coordination identity is protected across copy paths.
[P3] Copy reservation only protects the target, not the source
session-revision-coordinator.ts:179 checks only targetSessionId. A valid Coordination Session supplied as sourceSessionId can still be copied into an ordinary Session, exposing hidden messages. This is latent until Slice 3 writes transcripts, but should be rejected before admission.
Checks on 35efcd6d9b are test: success.
简体中文
该头无阻断,剩余 P3 为源侧拷贝保护。ARE404
commented
Aug 25, 2026
Self-review pass over this slice, graded by severity. Fixes for all seven follow in the next commit. P1 — correctness, must fix before merge1. 2. The copy reservation covers the target but not the source. P2 — should fix in this PR3. The Coordination workspace directory is only guaranteed at provisioning time. 4. A default Host that is not ready leaves WorkHub on an indefinite spinner. P3 — cleanups5. Every 6. 7. Unused import. |
…on both sides Review follow-ups on this slice. The Coordination workspace is derived from the Host state root, so treating its path as part of the identity stranded the one Session that no ordinary lifecycle operation may relocate or retire: a state directory restored under a different absolute path answered `operation_conflict` on every resolve, with no product path left to repair it. Identity is now the id/role pair alone, the durable path is relocated in place, and the workspace directory is ensured on reuse as well as on provisioning. The copy reservation covered the target identity but not the source, so the Coordination transcript could be lifted into an ordinary — and therefore executable — Session. Both halves of the reserved pair are refused as a copy source now. An unavailable default Host revoked WorkHub resolution without reporting a failure, leaving the surface on a loading state no retry could reopen, since the availability subscription only reopens a generation that failed. Connecting and reconnecting still hold that state; unavailable no longer does. Also: keep a failed model-authority read distinguishable from a missing default model, drop a duplicate header read inside one admission lease, and remove an unused test import.
ARE404
commented
Aug 25, 2026
Pushed P1-1 — Coordination workspace no longer acts as identity. P1-2 — the copy reservation now holds on both sides. P2-3 — the workspace directory is ensured on reuse. P2-4 — an unavailable default Host reports a failure. P3-5 — a P3-6 — P3-7 — unused import removed. Local: |
Astro-Han
left a comment
There was a problem hiding this comment.
Update on cd4b60ed86:
No blocking issues. The source-side copy guard now correctly rejects reserved source Sessions, and workspace/generation handling is sound.
Checks on cd4b60ed86 — code GO, no P0-P3.
简体中文
该头未发现阻断。Depth for the A-seat boundary review. Neither item was reachable; both were places where the closure depended on a caller remembering something. The id/role pairing was asserted in createStableSession() only, so the creators that share buildSessionHeader() — createSubagent() and createAgentGraphOperator() — did not inherit the invariant even though the header they build carries the same field. It moves into the builder, where every creator meets it. createStableSession() keeps its own assertion so a malformed request is still refused before a durable create claim is written. The metadata list role scope defaulted to the widest value, which made closure a property of each caller remembering to narrow it. The default is gone: list() now takes both the filter and the scope explicitly, and usage statistics — the one reader that took the default — states 'all', which is what a durable cost aggregate wants.
ARE404
commented
Aug 25, 2026
Both P3 depth items are in 1 — the id/role pairing moved into the header builder.
Regression extended: 2 — the metadata role scope has no default. Local: |
Astro-Han
left a comment
There was a problem hiding this comment.
Update on 9966f7ae7b:
No blocking issues. The delta makes Coordination identity/role pairing pre-claim and shared across Session creators, correct for preventing ordinary copies from capturing the reserved Session.
Checks on 9966f7ae7b are test: success.
简体中文
该头未发现阻断。Uh oh!
There was an error while loading. Please reload this page.
Summary
Refs #3492
Authority and deferred work
Session remains the only durable substrate: this adds no second WorkHub database, event store, lifecycle authority, or transcript copy. Each Runtime Host remains independent; cross-Host coordination is not supported.
Coordination transcript rendering and
answer_herebelong to Slice 3. Model dispositions, the deterministic Action Gate, bounded delegation links, and the deferred Work cardinality decision remain for later slices.UI evidence
Verification
npm run lintnpm run format:checkgit diff --checknpm run typechecknpm run build35efcd6d9, including Desktop e2e, browser smoke, Storybook, and installed CLI validationAI use
Tool(s) and scope: Codex implemented and tested the lifecycle, storage boundary, protocol, Desktop integration, review fixes, and Standards/Spec reviews.
Checklist
Does this PR entail a change in behavior?