Metadata
| Status | done |
|---|---|
| Assigned | agent-152 |
| Agent identity | 3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3 |
| Created | 2026-04-26T20:00:02.844607498+00:00 |
| Started | 2026-04-26T22:44:12.433650551+00:00 |
| Completed | 2026-04-26T23:19:55.833064576+00:00 |
| Tags | eval-scheduled |
| Tokens | 29712809 in / 85737 out |
Description
Description
Today, global [[llm_endpoints.endpoints]] entries with is_default = true cascade to every project. Local config can only shadow them by REDECLARING the same endpoint name with is_default = false — an obscure hack the user shouldn't need to know.
The user's recent symptom: global has openrouter as is_default, local wanted nothing routed through openrouter, but had no clean way to express that. Required a redeclare-with-is_default=false override.
Fix
Pick one of these two approaches (vote: A is simpler):
A. Inheritance is opt-in. Local config inherits NOTHING from global [[llm_endpoints.endpoints]] by default. Add an explicit knob: [llm_endpoints] inherit_global = true if the user wants the old behavior.
B. Local list FULLY replaces global. If local has any [[llm_endpoints.endpoints]] entry, global's are ignored entirely. If local has none, global's apply.
Either way, document the behavior prominently in config.toml comments and in docs/AGENT-SERVICE.md.
Add a wg config show --merged command that prints the effective merged config so the user can see what's actually in effect.
Validation
- Failing tests first: test_local_no_endpoints_does_not_inherit_global (or per chosen approach), test_inherit_global_knob_works, test_config_show_merged_displays_effective
- Implementation makes tests pass
- cargo build + cargo test pass with no regressions
- Manual: in this repo, remove the openrouter shadow override I added; assert global openrouter no longer leaks into local routing
Depends on
Required by
- (none)
Log
- 2026-04-26T20:00:02.842431104+00:00 Task paused
- 2026-04-26T20:00:45.979138628+00:00 Task published
- 2026-04-26T20:01:43.952792889+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T20:01:59.131726098+00:00 Starting work — approach A (inheritance opt-in)
- 2026-04-26T20:33:47.036059905+00:00 Worktree state was reset mid-session: my prior edits to config.rs/cli.rs/main.rs/config_cmd.rs/setup.rs/tests/* were all wiped, leaving only another agent's WIP for graph_watcher feature. Build broken because referenced graph_watcher.rs doesn't exist in this worktree. Redoing my work and committing incrementally to avoid re-loss.
- 2026-04-26T20:37:15.133910339+00:00 Restoring 3 contaminated files (service/mod.rs, commands/service/mod.rs, config.rs) which contain another agent's WIP that leaked into my worktree. These changes reference graph_watcher.rs which doesn't exist in this worktree, breaking the build. My own work was already lost to whatever caused this contamination. Will redo and commit incrementally.
- 2026-04-26T21:10:21.299015134+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T22:44:09.448086574+00:00 Task reset for retry from failed (attempt #2)
- 2026-04-26T22:44:12.433654248+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T22:44:43.968188956+00:00 Retry attempt #2 starting. Approach A (inheritance opt-in). Examining current config code structure.
- 2026-04-26T23:19:06.355858100+00:00 Implemented approach A (inherit_global opt-in). Live-tested wg config --merged: confirms global endpoints suppressed by default, restored when inherit_global=true. cargo build + cargo test pass; sole failure (provenance_full_lifecycle) is pre-existing on baseline (unrelated to this work).
- 2026-04-26T23:19:35.239794664+00:00 Committed: b8552ebad — pushed to remote
- 2026-04-26T23:19:55.833070828+00:00 Task marked as done