Metadata
| Status | done |
|---|---|
| Assigned | agent-745 |
| Agent identity | 02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7 |
| Model | pi:zai:glm-5.2 |
| Created | 2026-07-13T15:26:29.622609723+00:00 |
| Started | 2026-07-25T14:18:11.213929190+00:00 |
| Completed | 2026-07-25T15:23:55.294343872+00:00 |
| Tokens | 31534005 in / 79749 out |
Description
Problem
Users see long deprecation text interleaved with TUI graph rows and content, e.g. deprecated; wg now derives the handler from the model spec.... This is independent of slow/async filesystem work. Config::load and Config::load_merged currently emit diagnostics directly with eprintln! on every load. TUI refreshes, daemon/config consumers, smoke commands, and worker raw streams can therefore repeat the same paragraph and corrupt the terminal presentation. The explicit-execution smoke intentionally loads a legacy config multiple times, making the issue easy to reproduce.
Objective
Make configuration loading side-effect-free with respect to terminal output. Collect structured diagnostics during load and emit them only at appropriate user-facing command boundaries, deduplicated by source/key/value/config fingerprint. TUI and service paths must never print raw migration warnings into the alternate screen or on every refresh/tick.
Required behavior
- Remove unconditional warning
eprintln!calls from reusable config-load paths (Config::load,load_merged, normalization helpers, and equivalents). - Return/collect structured diagnostics separately from configuration data, without losing actionable migration information.
- CLI commands may emit each diagnostic once per invocation where relevant;
wg config lint/migration surfaces remain complete and copy-pasteable. - Long-running daemon emission is at most once per changed config fingerprint and never once per tick/load; prefer status/health state over log spam.
- TUI displays at most a compact, deduplicated config-health indicator/toast with details available on demand. Never write raw warning paragraphs directly to the terminal while the alternate screen is active.
- Worker/smoke tests that intentionally exercise legacy config capture and assert diagnostics instead of leaking them into unrelated agent output.
- Preserve diagnostics for truly explicit legacy keys; clean configs remain silent.
Validation
- Repeated config load (100x) produces no direct stderr side effects.
- Repeated CLI command/config loads emit at most one copy of each diagnostic per invocation.
- Daemon repeated ticks and hot reload without config changes do not grow warning logs.
- TUI scripted render with a legacy config contains no warning text interleaved with graph rows; compact health feedback is stable.
- Config change can surface one new diagnostic and clearing the key clears health state.
- Explicit execution-selection smoke captures expected migration text and emits no terminal spam.
- Existing config lint/migrate and handler-first tests pass.
-
cargo fmt --check, clippy, relevant/full tests, andcargo install --path . --lockedpass; commit all changes.
Depends on
Required by
- (none)
Log
- 2026-07-13T16:21:24.026131988+00:00 Lightweight assignment: agent=Careful Programmer (02e87968), exec_mode=full, context_scope=full, reason=Careful Programmer is the available high-performing implementation agent and this cross-cutting config, daemon, TUI, and test refactor requires correctness-focused full access.
- 2026-07-13T16:21:25.001806340+00:00 Spawned by coordinator --executor codex --model gpt-5.6-sol
- 2026-07-13T16:21:37.353812594+00:00 Starting implementation: tracing config-load warning side effects and user-facing emission boundaries
- 2026-07-13T16:27:12.884508257+00:00 Implemented side-effect-free ConfigLoad diagnostics API for local/global/merged/source-aware loads; existing loaders now discard structured findings instead of printing
- 2026-07-13T16:42:10.965043729+00:00 Validated targeted structured-diagnostic tests, handler-first/deprecation tests, explicit_execution_selection smoke, and live tui_config_deprecation_health smoke (including daemon tick/reload log check)
- 2026-07-13T17:25:02.494296871+00:00 Agent exited without wg done — entering failed-pending-eval for rescue evaluation
- 2026-07-13T17:25:19.997853198+00:00 FailedPendingEval → Failed (eval rejected: score=0.63 < threshold=0.70)
- 2026-07-25T09:16:26.495254927+00:00 Reset by `wg recover` — reason: mass failure on gpt-5.6-sol/minimax; shifting all to zai glm-5.2 per current profile
- 2026-07-25T14:18:11.493959265+00:00 Spawned by coordinator --executor pi --model zai:glm-5.2 --isolation required-worktree
- 2026-07-25T14:18:28.597651614+00:00 Starting: investigating config-load diagnostic side effects (eprintln! spam)
- 2026-07-25T15:22:37.874711815+00:00 Validated: load paths side-effect-free (Config::load/load_merged/load_with_sources/load_or_default/load_global/load_merged_for_planned_profile collect into Config.load_diagnostics, no eprintln); CLI emits once at wg status/wg config --show (deduped); daemon logs once at startup; clean configs silent.
- 2026-07-25T15:22:39.887298939+00:00 Validated: cargo build + fmt --check clean; clippy no errors; 229 config tests + integration_handler_stdout_pristine pass; owned smoke config_load_no_stderr_spam PASS (daemon log 19->1 deprecation copies, at-most-once per CLI invocation, lint surface preserved, clean-config silent).
- 2026-07-25T15:22:39.922441826+00:00 Committed: 84de0d28 — pushed to remote; cargo install --path . --locked done.
- 2026-07-25T15:23:55.294346352+00:00 Task marked as done