Metadata
| Status | done |
|---|---|
| Assigned | agent-1338 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-05-01T14:51:51.936346967+00:00 |
| Started | 2026-05-01T14:53:42.132019428+00:00 |
| Completed | 2026-05-01T15:39:46.138466412+00:00 |
| Tags | fix,config,defaults,cleanup, eval-scheduled |
| Eval score | 0.91 |
| └ blocking impact | 0.93 |
| └ completeness | 0.95 |
| └ constraint fidelity | 0.10 |
| └ coordination overhead | 0.92 |
| └ correctness | 0.90 |
| └ downstream usability | 0.90 |
| └ efficiency | 0.85 |
| └ intent fidelity | 0.90 |
| └ style adherence | 0.92 |
Description
Description
A fresh wg init (claude-cli, codex-cli, local, nex-custom routes) writes an [openrouter] section into the config. The dispatcher's registry-refresh job then probes OpenRouter every ~30s; without an API key it errors continuously. User reports 25+ consecutive failures filling the daemon log with no operational impact — pure log spam.
User question 2026-05-01: 'should we remove it as a default part of the config?'
Answer: yes. [openrouter] should only be in the config when the user explicitly chose the openrouter route OR added it via wg endpoint add openrouter .... For users on claude / codex / nex routes, OpenRouter has no purpose.
Scope
Routes affected
wg init --route claude-cli— should NOT write [openrouter]wg init --route codex-cli— should NOT write [openrouter]wg init --route local— should NOT write [openrouter]wg init --route nex-custom— should NOT write [openrouter]wg init --route openrouter— should write [openrouter] (this is the openrouter route, of course)
Verify each route's dry-run output and remove the [openrouter] section from the routes that aren't openrouter.
Existing user configs
Per the user's 'skip back-compat ceremony' standing rule (memory: feedback_skip_backcompat_ceremony.md):
- For the user's local config: remove
[openrouter]directly as part of this task wg migrate configshould also recognize and offer to remove the section if no openrouter usage is detected (idempotent — running it on a config that already has it removed is a no-op)
Registry refresh side
Even when [openrouter] IS present (because the user wants it), the registry-refresh failure mode should be quieter:
- After N consecutive failures (e.g., 5), log ONCE and stop trying for ~1h (cooldown)
- On manual config reload OR API key set, retry immediately
This is a small backoff/circuit-breaker for the noisy log; matches the design-exponential-failure design (filed earlier today) for failure cycles.
Validation
-
Failing test:
wg init --route claude-cli --dry-runoutput does NOT contain[openrouter] - Same for codex-cli, local, nex-custom routes
-
wg init --route openrouter --dry-runDOES contain[openrouter](don't break the path that needs it) -
User's local config
/home/erik/workgraph/.wg/config.tomlhas[openrouter]section removed (this task does the surgery directly) -
wg migrate configrecognizes orphaned[openrouter]sections (no api key, no usage in profiles or endpoints) and offers to remove. Idempotent. - Registry refresh failure surfacing: cooldown after N failures (don't spam the log every poll)
- cargo build + cargo test pass
- cargo install --path . was run before claiming done
Depends on
Required by
- (none)
Log
- 2026-05-01T14:51:51.861073890+00:00 Task paused
- 2026-05-01T14:52:26.435706820+00:00 Task published
- 2026-05-01T14:53:37.171922781+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer matches implementation + testing requirements; Careful tradeoff suits config changes requiring exhaustive multi-route verification and idempotent migration logic.
- 2026-05-01T14:53:42.132024137+00:00 Spawned by coordinator --executor claude --model opus
- 2026-05-01T14:53:57.159889+00:00 Starting work — exploring config init code paths
- 2026-05-01T15:38:42.841252557+00:00 Validated: dry-run check across all 5 routes — only openrouter route emits [openrouter]
- 2026-05-01T15:38:49.798925219+00:00 Validated: wg migrate config detects + removes orphaned [openrouter], preserves it when in use, idempotent
- 2026-05-01T15:38:49.832492531+00:00 Added registry-refresh circuit breaker (5 failures → 1h cooldown). Logs first error + threshold trip event only — no more 25+ identical errors
- 2026-05-01T15:38:49.868849452+00:00 Tests: 5 new route presence/absence tests + 3 migrate idempotency tests + 2 circuit-breaker tests, all passing
- 2026-05-01T15:38:49.907334830+00:00 cargo build + cargo test --bin wg pass (3308 tests). 1 pre-existing lib failure (test_global_config_path) unrelated to this change
- 2026-05-01T15:38:49.966105244+00:00 cargo install --path . done — verified installed binary's dry-run output is correct
- 2026-05-01T15:39:37.571663657+00:00 Committed: 68a098f93 — pushed to remote
- 2026-05-01T15:39:46.138475649+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-05-01T15:43:27.357673480+00:00 PendingEval → Done (evaluator passed; downstream unblocks)