Metadata
| Status | done |
|---|---|
| Assigned | agent-103 |
| Agent identity | 3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3 |
| Created | 2026-04-26T20:00:02.875970513+00:00 |
| Started | 2026-04-26T20:06:04.403699900+00:00 |
| Completed | 2026-04-26T20:29:36.250808753+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.83 |
| └ hallucination rate | 0.38 |
| └ requirement coverage | 1.00 |
| └ semantic match | 1.00 |
| └ specificity match | 0.35 |
Description
Description
Bug A history:
- I fixed it directly: src/commands/service/mod.rs daemon-boot path now enumerates existing
.coordinator-N(now.chat-N) tasks from the graph instead of hardcoding 'spawn coordinator-0'. - The rename-dispatcher-daemon agent silently REVERTED it: now boot hardcodes 'spawn coordinator-0 with task .chat-0', which doesn't exist in any fresh init → restart-loop ghost forever.
- No test pinned the original fix → no signal when the regression landed.
This will keep happening for every fix that lacks a regression test.
Spec
-
Add tests in tests/integration_dispatch_boot.rs (new file) that lock the orphan-guard behavior:
- test_dispatcher_boot_no_chat_tasks_spawns_no_supervisor — fresh
wg init, dispatcher starts, no.chat-Ntask in graph → ZERO chat-supervisors spawned, zero failed-spawn restart loops in log - test_dispatcher_boot_enumerates_chat_tasks_from_graph —
.chat-3task exists → exactly one supervisor spawned with chat_id=3 - test_legacy_coordinator_prefix_loaded —
.coordinator-1legacy task in graph → loaded with one-time deprecation warning AND a supervisor spawned with chat_id=1
- test_dispatcher_boot_no_chat_tasks_spawns_no_supervisor — fresh
-
Restore the orphan-guard fix the rename agent dropped. Specifically:
- Boot enumerates
.chat-N(and legacy.coordinator-N) tasks from graph; no hardcoded 'always spawn coordinator-0' - subprocess_chat_loop pre-flight checks task exists before spawn; if not, log clear error and exit (don't restart-loop)
- Boot enumerates
-
Add the test invocation to wave-1-integration-smoke (or smoke-gate-real) so any future PR that reverts this gets caught at smoke time.
Validation
- All three test_dispatcher_boot_* tests written first and failing on current binary (they should fail because the rename agent restored the broken behavior)
- Restore the orphan-guard logic; tests pass
- cargo build + cargo test pass with no regressions
-
Manual: in this repo right now,
wg service stop && wg service start; daemon log contains NO 'Coordinator-0: spawning via wg spawn-task .chat-0' restart loop
Depends on
Required by
- (none)
Log
- 2026-04-26T20:00:02.870076660+00:00 Task paused
- 2026-04-26T20:00:45.995786605+00:00 Task published
- 2026-04-26T20:06:04.403705019+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T20:06:28.735997302+00:00 Starting work: read task spec, will inspect current daemon-boot code, then write failing tests, then restore orphan-guard fix
- 2026-04-26T20:22:59.084660593+00:00 All 3 spec tests + 5 supplementary tests passing in tests/integration_dispatch_boot.rs. Helper landed at workgraph::service::enumerate_chat_supervisors_from_graph; boot path enumerates from graph; subprocess pre-flight check exits cleanly on orphan.
- 2026-04-26T20:27:49.478878565+00:00 Validation: cargo build OK; cargo test --lib OK (1947 passed); cargo test --bin wg shows 2818 passed, 1 fail (provenance_full_lifecycle — confirmed pre-existing on baseline via git stash check); cargo test --test integration_dispatch_boot OK (8 passed including --include-ignored). Skipping the literal 'wg service stop && start' on the shared user repo — would stop the user's running coordinator and require cargo-install of uncommitted changes; the daemon_boot_no_chat_tasks_no_supervisor_in_log integration test programmatically asserts the same invariant.
- 2026-04-26T20:29:23.712099242+00:00 Committed: ca32f2212 — pushed to remote (wg/agent-103/regression-test-for)
- 2026-04-26T20:29:36.250817028+00:00 Task marked as done