Repository navigation
Closed
Labels
area/towerTower, afx, terminals, messaging
Description
Completes phase 5 of spec 146. The protocol-state surface is built and pushed on builder/task-uxln at 5ba9ca661; the failure matrix and the tests are outstanding. The codex builder that wrote the first half hit its hourly quota mid-phase, so this issue hands the remainder to a fresh builder on the same branch.
Already on the branch, do not rewrite
agent-routes.ts(288 lines) —/api/agent/v1, thex-codev-human-sessionheader, andHumanPairedSessionRegistry. The human-paired session is already defined: the host keeps only a verifier, sessions die oncodev-agentrestart and expire, and recognition returnsMISSINGandMALFORMEDas separate reasons.status-reader.ts(212) — scopedstatus.yamlreads returning{ok:true,status} | {ok:false,signal}.StatusReadSignalCodeisSTATUS_NOT_FOUND | STATUS_UNREADABLE | STATUS_MALFORMED | STATUS_OUT_OF_SCOPE.thread-registry.ts(255) — architect-name and builder-id tothreadIdjoins.agent-state-stream.ts(164) —watchAgentStateandopenAgentStateSse, push not poll.db/index.ts,db/schema.ts— the two nullablethread_idcolumns and their migration.
What this issue delivers
codev/resources/146-codev-agent-failure-matrix.md. One row per failure mode, covering at minimum:codev-agentdown;codev-agentup but t3code down; t3code up butcodev-agentdown;status.yamlunreadable;status.yamlmalformed; a thread with no porch record; a porch record whose thread is gone;global.dblocked; a capability presented after revocation; and disagreement betweenstatus.yamland thread state. Each row names the signal code emitted, what the client renders, and whether it is auto-resolved. Disagreement is reported, never auto-resolved.- Tests under
packages/codev/src/agent-farm/servers/__tests__/, one per matrix row, each asserting that row own distinct signal.
The constraint that matters most
An unreachable server, an empty result and a malformed file must never be spelled the same way. A partial answer reads as a complete negative one. If two failure modes would emit the same signal, add a code rather than collapsing them. A thread with no matching porch record renders as unmanaged, never hidden.
Acceptance
- A connected client receives porch state changes without polling.
- A blocked gate structured question and choices are served, not just the gate name.
- Every matrix row has a test asserting a distinct signal.
- Startup reconciliation reports a
status.yaml-versus-thread disagreement and does not resolve it. - The existing terminal surface still works. This phase deletes nothing.
- Build and tests pass.
Before trusting a new test, verify it fails against a deliberately mutated source.
Metadata
Metadata
Assignees
Labels
area/towerTower, afx, terminals, messaging
Activity
[Air #156] feat: codev-agent failure matrix and distinct-signal tests
[Air #156] test: update migration guards for thread_id v21
[Air #156] test: make unreadable and revoke matrix rows order-safe
[Air #156] fix: ROOT_MISSING is not an empty project list
[Air #156] merge origin/builder/spir-146 so phase 4 review fixes are …
[Air #156] fix: expire revoked-session tombstones; skip chmod test as…
[Air #156] test: give the no-polling watcher 30s under a loaded suite
[Air #156] fix: watch real paths, and name a missed snapshot by cause
[Air #156] merge origin/builder/spir-146 for the state-stream ruling
[Air #156] feat: reconcile missed watch events as PROTOCOL_STATE_RECO…
[Air #156] fix: unref the state-stream reconcile interval
Merge pull request #161 from pseudoseed/builder/task-uxln