Skip to content

feat(workhub): persist Coordination conversation (Slice 3) - #3798

Merged
Astro-Han merged 3 commits into
apache:mainfrom
ARE404:codex/workhub-persistent-conversation
Aug 25, 2026
Merged

feat(workhub): persist Coordination conversation (Slice 3)#3798
Astro-Han merged 3 commits into
apache:mainfrom
ARE404:codex/workhub-persistent-conversation

Conversation

@ARE404

@ARE404 ARE404 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render the WorkHub conversation from the durable Coordination Session transcript while keeping ordinary Sessions as read-only status and routing targets
  • add a dedicated, tool-free WorkHub answer authority and persist model Q&A without creating ordinary Sessions
  • durably record clarifications and routing summaries with idempotent recovery across navigation and Runtime Host restarts
  • migrate the Slice 2 Coordination Session to a fixed zero-tool execution profile and fail closed on identity or profile drift

Safety and boundaries

  • ordinary turn.start remains unavailable for the reserved Coordination Session
  • WorkHub execution requires the exact reserved id and role, fixed modes, and workhub-coordination-v1
  • the Coordination profile exposes zero tools and disables memory extraction
  • transcript reads are bounded and fail open; summary persistence failures do not cause duplicate ordinary Session admission

Verification

  • npm run typecheck
  • npm run lint
  • npm run check:asf-headers
  • Runtime Host WorkHub, protocol, profile, and authority tests
  • storage root-admission restart test
  • desktop WorkHub controller, transcript, and surface tests

The 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)

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 复用导致的合并错误。

ARE404 added 3 commits August 25, 2026 22:13
`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.
@ARE404
ARE404 force-pushed the codex/workhub-persistent-conversation branch from 417784c to 23d70d1 Compare August 25, 2026 14:22

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

简体中文该头无阻断。

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — 23d70d1, no P0-P3, hosted test SUCCESS.

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM. merging!

@Astro-Han
Astro-Han merged commit edb0379 into apache:main Aug 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants