Skip to content

refactor(verbose): rename output.log → subprocess.log; -vv keeps Info on stderr - #2913

Merged
max-sixty merged 1 commit into
mainfrom
verbose-cleanup
May 26, 2026
Merged

refactor(verbose): rename output.log → subprocess.log; -vv keeps Info on stderr#2913
max-sixty merged 1 commit into
mainfrom
verbose-cleanup

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Motivation

The -v / -vv UX had three small issues that compounded:

  1. output.log is misnamed. It holds the uncapped raw stdout/stderr of every subprocess wt spawns — multi-MB possible (git log -p, patch-id pipelines, etc.). "output" reads as "stuff wt printed" — the small thing — when it's actually the big thing. Easy to misread.
  2. -vv went fully dark on stderr. PR refactor(log): route -vv log pipeline to trace.log instead of stderr #2892 moved the noisy debug pipeline to files at -vv; in the process, the stderr layer was disabled entirely. Users running -vv to see hook output (info-level, which -v shows on stderr) suddenly couldn't.
  3. -v help text was a 150-char one-liner packed into a parenthetical, and the surrounding docs leaned on a "stderr stays readable / log::* pipeline" framing that was Rust-jargon-flavored and implied stderr-quiet at -vv — which is no longer true after change Test CI fixes and improvements #2.

Change

  • Rename output.logsubprocess.log. Filename now matches content. OUTPUT static → SUBPROCESS, plus the related OutputMakeWriter / OutputFileFormat / build_output_layer symbol renames.
  • -vv keeps the Info baseline on stderr. build_stderr_layer no longer returns None at -vv; debug-level records still route to file layers only, so the terminal stays readable while info-level status (hook output, template variables, the Tracing to ... pointer) shows the same as at -v.
  • -v help text rewritten to describe both levels cleanly without a wall of detail.
  • docs/content/faq.md gets a "What does -v / -vv do?" section with a three-level table.
  • Docs cleanup: drop "stderr stays readable" / log::* jargon / "but not subprocess.log" negative framing from user-facing prose.

Notes for review

  • The only log::info! site in the codebase is commands/picker/mod.rs:389 (a single picker error message), so making -vv show info-level on stderr doesn't add meaningful noise.
  • test_vv_log_pipeline_silent_on_stderr is renamed to test_vv_debug_pipeline_silent_on_stderr — its assertions only check debug-level records stay out of stderr (they do); the old name implied the whole log::* pipeline was silent, which was never quite true (direct eprintln! always showed) and is less true now (info-level routes to stderr).
  • 67 of the 69 changed files are snapshot updates (help text and one diagnostic snapshot) and auto-synced doc/skill mirrors. git diff --stat -- 'tests/snapshots/*' 'docs/content/*' 'skills/worktrunk/reference/*' | tail -1 separates them.
  • CHANGELOG: not touched. The historical entry that introduced output.log (#2201) stays accurate for its release; this rename gets a new line in the next release.

Tests

3870 tests pass. Re-snapshotted all test_help_* snapshots, three step_alias snapshots that quote the global help, and the diagnostic file format snapshot.

This was written by Claude Code on behalf of max-sixty

… on stderr

output.log was misleadingly named: it's the uncapped raw stdout/stderr of every
subprocess wt spawns (multi-MB possible), not wt's own output. Rename to
subprocess.log so the filename matches the content. OUTPUT static, OutputMakeWriter,
OutputFileFormat, build_output_layer rename to match.

At -vv, the stderr layer now keeps the Info baseline instead of going fully dark —
debug-level records (commands, [wt-trace], bounded subprocess preview) still route
to trace.log only, so the terminal stays readable while -vv users see info-level
status (hook output, template variables) the same as at -v. The "stderr stays
readable / log::* pipeline" framing is dropped from docs since it implied -vv
made stderr silent.

Help text for -v rewritten as a single-line parenthetical describing both levels.
faq.md gets a new "What does -v / -vv do?" section laying out the three levels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@max-sixty
max-sixty merged commit 21e0b27 into main May 26, 2026
36 checks passed
@max-sixty
max-sixty deleted the verbose-cleanup branch May 26, 2026 18:55
@max-sixty max-sixty mentioned this pull request May 26, 2026
max-sixty added a commit that referenced this pull request May 26, 2026
v0.54.0.

`cargo semver-checks` reports 3 breaking library API changes
(`shell_exec::set_output_log_available` removed,
`SUBPROCESS_TERMINAL_TARGET` removed, `Deprecations::{pre_start,
post_start}` removed) — none of them intentional API, but they force
minor pre-1.0.

Headline user-visible changes:
- New rate-limit pace segment in the Claude Code statusline (#2899,
#2911).
- `wt step prune` streams removals and skips unapproved hooks instead of
prompting mid-scan; default `--min-age` raised 1h → 1d (#2908, #2910,
#2886).
- `-vv` no longer floods stderr — debug routes to `trace.log`, Info
stays on stderr; raw subprocess sink renamed `output.log` →
`subprocess.log`; `RUST_LOG` honored at every verbosity level (#2892,
#2901, #2913).
- Data-safety fixes across merge / remove / prune lifecycle (#2870).
- Legacy shell-wrapper deprecation warning (#2880).

Full CHANGELOG entry in this PR.
max-sixty added a commit that referenced this pull request May 27, 2026
… rename (#2919)

## Motivation

Follow-up cleanup surfaced after #2913 landed:

1. The `-vv` startup pointer listed `trace.log` and `subprocess.log` but
never mentioned `diagnostic.md`, even though the gist-creation hint at
exit points specifically at `diagnostic.md`. Users had no idea the
bundle existed until exit.
2. The Jinja template field `output_log_path` and a test local
`output_log` lagged behind the file rename in #2913 — values were
correct but names disagreed.
3. While reshaping the pointer, the "Tracing to ..." verb read awkwardly
("Writing to ..." is more natural for "files are being written here").

## Change

- `src/logging.rs:490` — `announce_trace_destination` now prints the
shared log directory once and lists all three files:

  ```
  ○ Writing to ~/.../wt/logs/ — trace.log, subprocess.log, diagnostic.md
  ```

(When `subprocess.log` failed to open: `… — trace.log, diagnostic.md
(subprocess.log unavailable)`.) `diagnostic.md` is named at startup even
though it's written at exit — by the time a user reads the pointer and
looks for files, all three are there.

- `src/diagnostic.rs` — `output_log_path` Jinja field + Rust local
renamed to `subprocess_log_path`. Dropped the trailing `— not inlined
because it can be multi-MB` clause from the template (matches the
principle from #2913's review: describe what's there, not what isn't).

- `tests/integration_tests/diagnostic.rs:315` — local `output_log` →
`subprocess_log`.

- Diagnostic snapshot re-accepted for the template wording change.

## Tests

3875 tests pass + lints + doctests. Pointer wording change is covered by
`test_vv_debug_pipeline_silent_on_stderr` and
`test_vv_pointer_handles_split_init`, both updated to assert "Writing
to".

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
max-sixty added a commit that referenced this pull request May 27, 2026
…pointer (#2924)

The 0.54.0 entry for #2913 quoted the `-vv` startup pointer as `Tracing
to …`, but #2919 (also in 0.54.0) renamed it to `Writing to …`. Fix the
entry to match the shipped behavior.

Caught by worktrunk-bot on #2919.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants