Metadata
| Status | in-progress ‖ paused |
|---|---|
| Assigned | agent-15 |
| Agent identity | 02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7 |
| Created | 2026-08-06T05:24:56.966097290+00:00 |
| Started | 2026-08-06T11:59:21.356850820+00:00 |
| Tags | bug, autonomy, assignment, quality-pass, lifecycle |
| Tokens | 25236204 in / 47345 out |
Description
Objective
Fix the two production defects that stranded the published pi-compaction-recovery WCC with zero ready tasks and no agents:
- Publish-time
.assign-*inline tasks successfully ranwg assign <parent> --autoand mutated the parent assignment, then their wrapper called ordinarywg doneand failed withError: missing completion candidate. The reconciler eventually made these system plumbing prerequisites Failed, permanently blocking already-assigned source tasks. System assignment completion must use an authoritative, idempotent plumbing transition compatible with the universal completion valve; it must not masquerade as an unevidenced Land candidate. - The required
.quality-pass-*task was created specifically to inspect/edit six sibling task records, but its worker capability allowed only current-task show and denied cross-task show/edit (cross_task_refused/operation_refused). Either issue a narrowly bounded WCC quality-review capability or move the quality action to an authority that can perform exactly that batch review. Do not grant unrestricted graph mutation to ordinary workers.
Operator decision: restore the documented worker coordination surface
The previous attempt-scoped broker incorrectly conflated authority over another task's active runtime/terminal receipts with ordinary graph coordination. Every normal WG worker must be able to use the documented coordination commands through the broker: cross-task wg show/context, wg ready/status/list, wg add/edit/publish, dependency operations, and task messaging needed for visible decomposition and quality review. Remove the generic cross_task_refused and catch-all operation_refused behavior for these commands. Keep only real lifecycle and ownership fences: a worker may not impersonate another attempt's terminal receipt, seize another active owner/worktree, bypass completion review, or perform operator/service administration.
Incident extension: false death and observer retention
The same unattended batch exposed a third coupled autonomy defect. Generated workers run heartbeat-watch through worker_cli; a single worker-IPC response failure terminates that helper permanently. After the configured five minutes, triage marks a verified-live wrapper Dead. Its fallback calls the Claude raw-stream translator on Pi NDJSON, so fresh Pi activity does not protect the attempt. This happened to agent-8 while its Pi process was actively producing output and left 28 modified files in a revoked split-brain attempt. In addition, pi-stream-observe --follow-pid remained after the followed Pi child exited, retaining terminal Done/Failed/settled wrappers and repeatedly processing 400–700 MB raw streams. The daemon also repeatedly reports can only flatten structs and maps (got a sequence) because IpcResponse flattens arbitrary JSON values; worker list/read coordination responses can therefore commit a mutation but return no response.
Fix these as part of the same control-plane repair: transient heartbeat IPC failures retry while the exact supervised process identity and guard remain valid; Pi raw-stream liveness is parsed incrementally with the Pi schema; a verified-live, freshly progressing attempt cannot be terminalized solely for a stale heartbeat; observer follow mode exits promptly after consuming EOF for a dead followed PID; and IPC responses serialize object, array, scalar, and null data without flatten errors. Preserve fail-closed behavior for true PID loss/reuse, stale process+stream, revoked attempts, and terminal receipts.
Also make a published batch surface a loud actionable diagnostic when system plumbing fails; it must not sit indefinitely at No tasks ready with all user tasks transitively blocked. Preserve the rule that genuine failed source attempts remain visible and require explicit retry—this fix is for idempotent system plumbing and predeclared quality-review scope, not hidden semantic retries.
Incident evidence:
.assign-implement-wg-pi-compaction-kick,.assign-audit-wg-pi-compaction-continuation-seams, and.assign-reproduce-pi-threshold-compaction-stalloutput logs show successful parent assignment followed byError: missing completion candidate..quality-pass-pi-compaction-recoverylogs show all required siblingwg showcalls denied and FLIP rejecting a no-op Land candidate.- Downstream tasks required manual
wg rm-deprepair on 2026-08-06; preserve this evidence.
Validation
- RED-first unit/integration tests reproduce successful inline assignment followed by completion-candidate failure and prove the fixed plumbing task reaches Done exactly once while the assigned parent becomes dispatchable.
- RED-first tests prove ordinary workers and quality passes can inspect and coordinate across the graph using the documented WG command surface; only terminal/runtime ownership, completion bypass, secret, and service-administration operations remain denied.
- Crash/restart tests around parent assignment and plumbing completion converge without duplicate assignment, Failed prerequisite, or hidden semantic retry.
- A failed semantic source task is still not automatically retried or unblocked.
-
Add a grow-only installed-binary smoke scenario owned by
fix-autonomous-batch-plumbing: create/publish a quality-gated fan-out batch through the real service, require the quality pass and assignment plumbing to complete, and observe downstream workers launch without operator commands. This is the actual human flow, not direct helper calls. - Status/why-blocked exposes a loud repair action if any system prerequisite genuinely cannot converge; zero-ready silence is not the only signal.
-
A normal spawned worker successfully runs cross-task
wg show, creates/edits/publishes a visible follow-up task, and performs dependency/message coordination through typed broker operations; unrelated task terminal/runtime mutation and completion bypass remain refused. -
wg agent-guideand broker tests agree on the supported worker command surface; no documented worker workflow is rejected by a blanket current-task check. - RED-first tests inject a transient heartbeat IPC response failure and prove the exact live worker keeps heartbeating; fresh Pi-native stream progress prevents false reaping, while genuine PID loss/reuse still terminalizes once.
-
A Pi child that emits terminal/compaction/settled events and exits cannot leave
pi-stream-observe, the wrapper, or worktree observer retained; large raw streams are consumed incrementally rather than reparsed from byte zero. -
IPC response tests cover array/scalar/null payloads and eliminate
can only flatten structs and mapswithout losing the stable worker response contract. -
cargo fmt,cargo fmt --check,cargo clippy, focused/full tests,cargo install --path . --locked, and owned smoke pass.
Depends on
Required by
Log
- 2026-08-06T05:24:56.870276336+00:00 Task paused
- 2026-08-06T05:24:57.182345411+00:00 Task published
- 2026-08-06T05:24:57.438284908+00:00 Reconciliation: stale-claim cleared (was Open, agent: 02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7)
- 2026-08-06T05:25:05.139301485+00:00 Lightweight assignment: agent=Careful Programmer (02e87968), exec_mode=full, context_scope=full, reason=The Careful Programmer is the only available and best-fit agent for this correctness-critical WG lifecycle, capability-scoping, diagnostics, crash-recovery, and end-to-end implementation task.
- 2026-08-06T05:25:06.300050706+00:00 Spawned by coordinator --executor pi --model openai-codex:gpt-5.6-sol --isolation required-worktree
- 2026-08-06T05:25:33.259052616+00:00 Starting implementation; initial inbox/quickstart requests were refused because the coordinator service did not respond / worker-control denies graph-authority commands. Proceeding with repository investigation.
- 2026-08-06T05:25:53.543625789+00:00 Operator tightened scope after incident review: restore the full documented WG coordination command surface for normal workers; retain only terminal/runtime ownership and administrative fences.
- 2026-08-06T06:13:11.808881219+00:00 Task fenced for retry from in-progress (attempt #1) — waiting for exact owner release — reason: Retry in place after false heartbeat-timeout reap; preserve 28-file WIP and replace revoked attempt
- 2026-08-06T06:13:44.443705659+00:00 Spawned by coordinator --executor pi --model openai-codex:gpt-5.6-sol --isolation required-worktree
- 2026-08-06T06:13:47.317622710+00:00 Incident extension: false heartbeat-timeout reap of live agent-8, Pi raw-stream liveness parser mismatch, retained stream observers, and flattened array IPC responses added to required repair.
- 2026-08-06T06:14:33.710692306+00:00 Resuming prior WIP: inspecting autonomous plumbing, worker broker scope, diagnostics, and smoke changes before validation
- 2026-08-06T06:42:35.418837330+00:00 Architectural acceptance clarified: shared fault model and cross-seam installed-binary fault injection required; point fixes alone are insufficient.
- 2026-08-06T07:29:04.309521590+00:00 Implemented typed Plumbing/Plumbed completion and restart reconciliation; restored broad typed worker graph coordination with runtime/terminal/admin fences; updated agent guide and real-daemon smokes. Focused unit tests and both broker/autonomous human-flow smokes pass.
- 2026-08-06T07:54:33.261390171+00:00 Added false provider classification regression: arbitrary tool-result text 'daemon may be overloaded' caused a successful Pi result to be failed as provider-overloaded; restrict classification to structured provider signals.
- 2026-08-06T07:56:28.318854009+00:00 Committed 7ce753d1. Validation: fmt/fmt-check/diff-check clean; cargo clippy succeeds (baseline warnings); 64 IPC tests pass; plumbing/query/guide/resume/status focused tests pass; cargo install --path . --locked succeeds; both installed-binary real-daemon smokes pass. Full suite exercised 3.1k+/3.8k+ tests but retains unrelated environment/baseline failures in profile/model/recover/TUI tests.
- 2026-08-06T07:58:36.570373603+00:00 Selected immutable completion candidate; prior review receipts invalidated
- 2026-08-06T07:59:27.467606271+00:00 Manifest b3:9c3d826df56b12d19ba7d557d07f08a174178885d5ad11c2349c5ba17293efdb review outcome: FlipRejected
- 2026-08-06T07:59:29.939115799+00:00 Completion submission IPC timed out after 30s; checking durable review state before exact retry.
- 2026-08-06T07:59:49.022266947+00:00 Selected immutable completion candidate; prior review receipts invalidated
- 2026-08-06T08:00:09.844864922+00:00 Manifest b3:9c3d826df56b12d19ba7d557d07f08a174178885d5ad11c2349c5ba17293efdb review outcome: FlipRejected
- 2026-08-06T08:03:09.330723394+00:00 Selected immutable completion candidate; prior review receipts invalidated
- 2026-08-06T08:03:48.104968013+00:00 Manifest b3:7d71e37e87d62737024a79eb06c7f300a907940f2923fbcdc329620a6125136b review outcome: FlipRejected
- 2026-08-06T08:35:47.909224480+00:00 Closed the incident-extension acceptance after FLIP feedback: brokered heartbeat now retries transient response loss under shared PID/start-ticks+pipe-guard identity; triage recognizes bounded Pi-native tail progress without letting it override PID loss/reuse; Pi and worktree observers share exact process identity and exit after terminal EOF; arbitrary successful tool prose cannot poison provider health; IPC responses round-trip object/array/scalar/null. Added focused tests and installed Pi observer smoke ownership.
- 2026-08-06T08:37:04.698955810+00:00 Selected immutable completion candidate; prior review receipts invalidated
- 2026-08-06T08:37:39.434756564+00:00 Manifest b3:0d19175dff7fad4db4e607c2942fa01748d4035d013eb4769edd59e882469500 review outcome: FlipRejected
- 2026-08-06T08:41:25.487573281+00:00 Selected immutable completion candidate; prior review receipts invalidated
- 2026-08-06T08:42:03.685676180+00:00 Manifest b3:0d19175dff7fad4db4e607c2942fa01748d4035d013eb4769edd59e882469500 review outcome: FlipRejected
- 2026-08-06T09:25:52.548539455+00:00 Release-blocking visibility regression: candidate wrote unknown plumbing/plumbed enum values into 45 records, making the N-1 service/TUI unable to load the whole graph. Emergency wire-compatible migration applied; mixed-version graph readability is now mandatory.
- 2026-08-06T09:26:49.480454720+00:00 Emergency assignment records finalized as old-wire land/landed so N-1 readiness remains satisfied; semantic plumbing identity must come from typed presentation/origin/receipt, not a new wire enum.
- 2026-08-06T11:59:18.392338709+00:00 Task fenced for retry from in-progress (attempt #2) — waiting for exact owner release — reason: Recovered exact worktree after stopping incompatible mixed-version writer; wire-compatible fix e5b1ffae validated by focused tests and installed autonomous smoke
- 2026-08-06T11:59:21.666134117+00:00 Spawned by coordinator --executor pi --model openai-codex:gpt-5.6-sol --isolation required-worktree
- 2026-08-06T11:59:52.984911501+00:00 Resuming exact recovered worktree at e5b1ffae; reviewing mixed-version wire-compatibility amendment and prior validation before final full gate.
- 2026-08-06T12:21:18.927883446+00:00 Added and committed 30806415: frozen N-1 enum reader plus installed mixed-version flow keeps a byte-distinct N daemon/TUI alive across N+1 assignment plumbing and proves tagged/untagged primary visibility. Focused regression and extended real-service smoke pass; proceeding through full fmt/clippy/test/install/smoke gate.
- 2026-08-06T12:47:30.521356752+00:00 Task paused