Skip to content

feat(server): the board lead hands QA to a seat conversation that files receipts - #196

Merged
polymaniadeveloper-hub merged 11 commits into
masterfrom
feat/board-lead-seat-handoffs
Nov 24, 2026
Merged

polymaniadeveloper-hub merged 11 commits into
masterfrom
feat/board-lead-seat-handoffs

Conversation

@polymaniadeveloper-hub

@polymaniadeveloper-hub polymaniadeveloper-hub commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

This is the T3 half of slice 3 and the server half of slice 4, QA stage only. It covers BOARD-REVAMP-UI-SPEC.md section 6a, "QA receipts" and "Seat hand-offs", and is PR A of the A/B/C split.

Draft. It merges only after the engine PR that adds the QA hold. Two field names are provisional until the engine pins them in the spec amendment:

  • handoffs:["qa"] on the claim body (C1)
  • handoffHold {run, stage} on the lanes card (C3)

Problem

The engine can now record seat attestations, stage hand-offs and QA receipts. T3 had no client for any of them, so a board task's lead could not hand QA to a seat conversation, and a QA seat could not file receipts.

What changed

  • delivery_qa_receipt (MCP): an attested QA seat thread files one receipt per acceptance item. The server, never the model, fills in the run, seat, seatThread (copied verbatim from council, inferred only on older engines) and the acceptance hash (sha256, first 16 hex characters). Engine refusals are decided by code:
    • independence: do not retry; the lead needs a seat on a different model.
    • Hash drift: returns the current numbered items.
    • invalid-field: names the rejected field.
    • moved, refused and not-found each get a plain message.
  • delivery_seat_handoff {stage:"qa", seat?, again?} (MCP): only the task's linked lead thread can call it.
    • It picks a launchable qa gate seat and launches it with delegateTask, using a durable request namespace so a retry recovers the same child.
    • It attests the model and harness T3 actually launched, then files the hand-off.
    • A coded refusal cancels the launched seat. A lost answer re-reads the engine and recovers the hand-off, and never cancels.
    • After the completion wake it settles: delivered, or a fallback with reason no-receipts or seat-failed.
    • A settled hand-off is returned on retry. Only again: true files QA anew.
  • Opt-in and notice: the task claim asks the engine to hold QA for the lead. When a held QA stage has no hand-off, the lead thread gets one notice per run and stage, deduped by message id. The lead still does the handing.
  • Provider resolution: the harness-to-provider rule is now one helper (seatProvider.ts), shared by BoardTaskThreads, NativeBuildExecution and the hand-off.
  • Seat writes: they go to the engine one at a time, because of the approval-key throttle.

T3 pieces reused: the delegateTask and taskStatus subagent path (so seats show in the relationships panel), the native-build request-namespace pattern, boardThreadAct with its key and coded refusals, boardTaskOfMarker lineage, and the slice 5 message dispatch path.

Out of scope:

  • Review and build hand-offs; build will ride /api/native-builds.
  • The web panel (PR B).
  • The slice 4b model pick and lead swap (PR C).

Agent context budget

The mcpToolListJsonBytes budget goes from 62636 to 63387 (+751). Claude system text and Codex context are unchanged. Two necessary new tools account for it.

What was trimmed to get there:

  • The new tool descriptions were cut to one sentence each.
  • Two redundant sentences came off the fork-only delivery_native_build_step description ("Read-only flows stay legacy. No caller-supplied results."). Its schema already takes no results.
  • The evidence-ref regex and the seat TrimmedNonEmptyString check were dropped from the input schemas. The engine validates both and refuses them by field.
  • The acceptanceIndex description was shortened.

Before the trim the tools added +900 bytes. The again input then added a little back. This needs the agent-context-increase label.

QA findings (Kimi K3.1 Pro, independent review, after a canary turn)

Verdict: pass with fixes. All three findings are fixed in 418a420, with tests.

  1. Blocking. A hand-off the engine had committed, but whose answer was lost, cancelled the launched seat, and the retry then settled it as seat-failed. Now only a coded refusal cancels. An unknown outcome re-reads the engine and recovers the hand-off, or returns a retryable error.
  2. Blocking. A settle whose answer was lost made the retry launch a second child and re-file QA, which re-opened a delivered gate. Now a settled hand-off is returned as it stands, and filing again needs an explicit again.
  3. Should-fix. The independence refusal suggested seats that cannot be launched. It now lists only launchable alternatives.

Kimi also checked authority, the server-computed receipt fields and hash, coded refusal handling, notice idempotency and the provider-resolution refactor against the engine sources, and found no further problems.

Verification

  • Focused tests: SeatHandoffs 17/17 (Kimi's run on the head before the fixes), plus BoardTaskThreads, NativeBuildExecution and boardThreadMarker 29/29, and the orchestrator toolkit integration test 4/4. CI's server test shards cover the later commits.
  • vp run typecheck is clean locally in apps/server, packages/contracts and packages/client-runtime. CI's "Build and Typecheck" stops with no diagnostics (25 of 29 tasks pass, and the apps never start), and that is being reproduced on another host. See the thread.
  • Pre-commit fmt, lint and knip pass.
  • The model eval that applies is evals/mcp-tool-use. It needs an API key, so it was not run.

🤖 Generated with Claude Code

Model: Claude Opus 5.5 (lead) with Codex gpt-6.2-sol (builder) and Kimi K3.1 Pro (QA), in Claude Code under T3 Code.

Tevin2119 and others added 7 commits November 23, 2026 16:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…les it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nce when QA waits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kimi QA findings: a hand-off the engine took is recovered instead of
cancelled when its answer is lost, a settled hand-off is returned on
retry unless the lead asks again, and the independence refusal names
only seats that can be launched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@polymaniadeveloper-hub polymaniadeveloper-hub added the agent-context-increase Accept growth in agent context size label Nov 23, 2026
Tevin2119 and others added 3 commits November 23, 2026 17:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f tool passes its whole input

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read QA holds from the engine card and notify the lead for each entry. Settle by filing ID and recover from the engine's receipt and stale-filing refusals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@polymaniadeveloper-hub
polymaniadeveloper-hub marked this pull request as ready for review November 24, 2026 07:42
@polymaniadeveloper-hub
polymaniadeveloper-hub merged commit ef7ed51 into master Nov 24, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Accept growth in agent context size

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants