Skip to content

refactor(verbose): -vv pointer names diagnostic.md; finish output_log rename - #2919

Merged
max-sixty merged 2 commits into
mainfrom
vv-pointer-polish
May 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
vv-pointer-polish

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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 refactor(verbose): rename output.log → subprocess.log; -vv keeps Info on stderr #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 refactor(verbose): rename output.log → subprocess.log; -vv keeps Info on stderr #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

…utput_log_path

Follow-up cleanup from #2913:

- The `-vv` startup pointer previously listed `trace.log` and the raw
  `subprocess.log` but never mentioned `diagnostic.md`, even though
  it's the bug-report bundle the gist hint points at on exit. Reshape
  the pointer to print the shared log directory once and list all
  three files: "Writing to <dir>/ — trace.log, subprocess.log,
  diagnostic.md". The "Writing to" verb replaces "Tracing to", which
  read awkwardly.
- `src/diagnostic.rs`: rename the `output_log_path` minijinja field
  and matching Rust local to `subprocess_log_path` so the name
  matches the file. Drop the trailing "— not inlined because it can
  be multi-MB" clause from the template; just name what's there.
- `tests/integration_tests/diagnostic.rs:315`: rename local
  `output_log` to `subprocess_log` to match the file.
- Re-accept the diagnostic snapshot for the template change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tight follow-up — the rename is now consistent and the startup pointer correctly previews diagnostic.md ahead of its exit-time write.

One out-of-diff observation: the 0.54.0 entry for #2913 quotes the pointer as `Tracing to …` (CHANGELOG.md:15), but after this PR a -vv user sees Writing to … — same release, so the changelog wording is now stale. Happy to push a one-line fix if you'd like.

trace.log is always built as `log_dir.join("trace.log")` in
`log_files::try_create`, so `trace_path.parent()` is structurally
guaranteed Some. The let-else arm added in the previous commit was
dead, surfaced as a codecov/patch miss. Replace with `.expect()`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@max-sixty
max-sixty merged commit 45b4df3 into main May 27, 2026
34 checks passed
@max-sixty
max-sixty deleted the vv-pointer-polish branch May 27, 2026 03:14
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>
@max-sixty max-sixty mentioned this pull request May 30, 2026
max-sixty added a commit that referenced this pull request May 30, 2026
v0.55.0.

`cargo semver-checks` reports breaking library API changes (9 inherent methods removed from `Repository` / `ShellConfig` by the dead-code cut-overs in #2931 — `is_ancestor`, `same_commit`, `has_added_changes`, `trees_match`, `head_tree_matches_branch`, `has_merge_conflicts`, `has_merge_conflicts_by_tree`, `merge_integration_probe`, `is_posix`). None are intentional public API, but they force a minor bump pre-1.0.

Headline user-visible changes:
- `wt switch` accepts forge PR/MR URLs anywhere `pr:N` / `mr:N` works (#2898, thanks @thiagowfx for the request).
- Claude Code plugin keeps unmerged branches during worktree cleanup — the `WorktreeRemove` hook drops `-D` (#2940, thanks @jbeda for reporting).
- `wt list` and `wt step prune` degrade gracefully on unborn worktrees (#2937, thanks @nedtwigg for reporting).
- `-vv` startup pointer now names `diagnostic.md` (#2919).
- Doc-site and `--help` prose cleanup (#2922, #2925); internal cut-over of duplicated/dead code paths (#2931, #2932, #2934).

Full CHANGELOG entry in this PR.

> _This was written by Claude Code on behalf of max_
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
worktrunk 0.55.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Release Notes

### Improved

- **`wt switch` accepts forge PR/MR URLs**: `wt switch https://github.com/owner/repo/pull/123` now resolves the same way as `wt switch pr:123`, and the URL form works anywhere a `pr:N` / `mr:N` shortcut does (positional argument and `--base`). Detection is shape-based, not host-based — any `http(s)://` URL whose path contains `/pull/N`, `/pulls/N`, `/-/merge_requests/N`, or `/pullrequest/N` matches, covering GitHub (including Enterprise), GitLab, Gitea, and Azure DevOps, including self-hosted instances. ([#2898](max-sixty/worktrunk#2898), thanks @thiagowfx for the request)

- **`-vv` startup pointer names `diagnostic.md`**: The `-vv` pointer now lists the shared log directory once with all three files it will contain — `trace.log`, `subprocess.log`, and `diagnostic.md` — so the diagnostic bundle is discoverable at startup rather than only when the gist hint fires at exit. The pointer verb reads `Writing to …` instead of `Tracing to …`. ([#2919](max-sixty/worktrunk#2919))

### Fixed

- **Claude Code plugin keeps unmerged branches during worktree cleanup**: The plugin's `WorktreeRemove` hook passed `-D` (`--force-delete`) to `wt remove`, which removes a branch even when it carries commits that aren't merged or pushed. The hook now uses the default removal: a merged or integrated branch is removed cleanly, while one with unmerged commits is kept, with a `wt remove -D <branch>` hint for deleting it deliberately. ([#2940](max-sixty/worktrunk#2940), thanks @jbeda for reporting)

- **`wt list` and `wt step prune` degrade gracefully on unborn worktrees**: A linked worktree created with `git worktree add --orphan` sits on an unborn branch whose `HEAD` is the null OID. `wt list` used to show `working-tree-diff (fatal: ambiguous argument 'HEAD')` and a merge-tree error in its columns, and `wt step prune` aborted its entire scan with `fatal: Needed a single revision`, blocking pruning of every other worktree. Both now treat an unborn worktree as having no commits: `wt list` renders `·` for the commit-dependent columns, and `wt step prune` skips it (as it does locked worktrees) and continues. ([#2937](max-sixty/worktrunk#2937), thanks @nedtwigg for reporting)

### Documentation

- **Doc-site and `--help` prose cleanup**: A writing-prose pass across the FAQ, config, list, remove, Claude Code, hook, LLM-commits, and Tips & Patterns pages (some via `--help` text in `after_long_help`). ([#2922](max-sixty/worktrunk#2922), [#2925](max-sixty/worktrunk#2925))

### Internal

- **Collapsed duplicated code paths and removed dead code left by completed cut-overs**: A net reduction across the shell, git, and command layers. ([#2931](max-sixty/worktrunk#2931), [#2932](max-sixty/worktrunk#2932), [#2934](max-sixty/worktrunk#2934))

## Install worktrunk 0.55.0

### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-installer.sh | sh && wt config shell install
```

### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-installer.ps1 | iex"; git-wt config shell install
```

### Install prebuilt binaries via Homebrew

```sh
brew install worktrunk && wt config shell install
```

## Download worktrunk 0.55.0

|  File  | Platform | Checksum |
|--------|----------|----------|
| [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-aarch64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-x86_64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-pc-windows-msvc.zip](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-x86_64-pc-windows-msvc.zip.sha256) |
| [worktrunk-aarch64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-aarch64-unknown-linux-musl.tar.xz.sha256) |
| [worktrunk-x86_64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.55.0/worktrunk-x86_64-unknown-linux-musl.tar.xz.sha256) |



### Install via Cargo

```sh
cargo install worktrunk && wt config shell install
```

### Install via Winget (Windows)

```sh
winget install max-sixty.worktrunk && git-wt config shell install
```

### Install via AUR (Arch Linux)

```sh
paru worktrunk-bin && wt config shell install
```
</pre>
  <p>View the full release notes at <a href="https://github.com/max-sixty/worktrunk/releases/tag/v0.55.0">https://github.com/max-sixty/worktrunk/releases/tag/v0.55.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!9819
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