Metadata
| Status | done |
|---|---|
| Assigned | agent-898 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-28T00:54:48.582438629+00:00 |
| Started | 2026-04-28T00:55:29.876241321+00:00 |
| Completed | 2026-04-28T01:23:43.522706601+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.78 |
| └ blocking impact | 0.80 |
| └ completeness | 0.80 |
| └ constraint fidelity | 0.70 |
| └ coordination overhead | 0.80 |
| └ correctness | 0.75 |
| └ downstream usability | 0.75 |
| └ efficiency | 0.75 |
| └ intent fidelity | 0.71 |
| └ style adherence | 0.80 |
Description
Description
Source: /home/erik/workgraph/bug-dispatcher-poll-interval-too-slow.md (filed 2026-04-27 from a ~/poietic session). After this task lands, delete that markdown file.
Current dispatcher polls every 60s (was 30s when bug was filed; got worse). User decides 'is this thing on?' at ~3s and loses confidence at ~10s. Every wg publish / wg unclaim / wg service resume currently produces 0–60s of dead-air before agents spawn. There is no correctness reason for the long interval — ready-task scan + spawn is cheap, idle ticks are near-free.
Two-part fix (both, not either-or)
Part 1 — lower the default poll_interval to 5s. Sweet spot from the bug report: fast enough that newly-added tasks visibly start working 'right away', slow enough that idle polling stays trivial. Locate where the default is shipped (wg config init, wg setup, or hard-coded fallback) and change ALL of them. Existing user configs are out of scope — only the default for new installs.
Part 2 — explicit kick signal. Add an IPC kick (e.g. IpcRequest::KickDispatcher or similar) and call it from:
wg publish(after state mutation succeeds)wg unclaim(after state mutation succeeds)wg service resume(right after resuming)wg addwhen the task is published immediately (not draft)
Kick = 'wake up and run one tick now, regardless of timer'. The periodic poll stays as the safety net for missed wakeups. If daemon is offline, kick is a no-op (don't error).
Out of scope (do NOT do)
- Full event-driven rewrite (Option B from the bug report). Stays as a separate task if we want it later.
- Changing existing user configs / migration. Just the default.
- The reset-doesn't-unclaim bug — that's a separate task.
Validation
-
Failing test first: spin up a daemon at the new 5s default,
wg add+ publish a task, assert agent spawns within 2s (uses kick path) — NOT 5s (which would be the polled path) -
Failing test first: with daemon running,
wg unclaim <task>triggers a kick → next tick happens within 1s instead of waiting for the next 5s boundary - Failing test: kick when daemon is offline is a no-op (no error to user)
-
Default
poll_intervalis 5 (or whatever was chosen) in:wg config initoutput,wg setupoutput, and the hard-coded fallback when no config exists - cargo build + cargo test pass with no regressions
-
Live smoke: fresh
wg init,wg service start,wg addsomething, time-to-spawn observed <2s -
Live smoke:
wg statusshows the new poll value (poll=5snotpoll=60s) -
Delete
/home/erik/workgraph/bug-dispatcher-poll-interval-too-slow.mdafter merge (it's untracked, justrm)
Depends on
Required by
- (none)
Log
- 2026-04-28T00:54:48.574342106+00:00 Task paused
- 2026-04-28T00:55:08.876739800+00:00 Task published
- 2026-04-28T00:55:28.887764990+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer is the only programmer agent available with proven performance (0.73 score, 155 tasks); task requires careful implementation of timing-critical IPC + daemon state changes with integration testing.
- 2026-04-28T00:55:29.876244166+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-28T00:55:39.973286755+00:00 Starting work — orienting on dispatcher poll interval and IPC kick
- 2026-04-28T01:21:53.738527126+00:00 Committed: f21fb3956 — pushed to remote
- 2026-04-28T01:21:53.771881331+00:00 Validated: poll_interval default lowered to 5s; KickDispatcher IPC bypasses settling delay; live smoke confirmed (poll=5s, KickDispatcher logged + tick fires immediately); offline-kick is silent no-op; smoke scenario dispatcher_kick_bypasses_settling_delay added
- 2026-04-28T01:23:36.591531313+00:00 Merged origin/main (sibling agent-899 added reset_clears_claim scenario); both new scenarios coexist in manifest
- 2026-04-28T01:23:43.522709997+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-28T01:26:22.347844794+00:00 PendingEval → Done (evaluator passed; downstream unblocks)