Repository navigation
Consolidate -vv notifications onto diagnostic.md, led by the performance profile - #3329
Conversation
A -vv run already embedded the performance profile inside diagnostic.md, but only ever framed it as a bug-report artifact. Write it standalone to .git/wt/logs/profile.txt (the same render, ready to cat), announce it on its own line ahead of the diagnostic, and add a hint pointing at the live `wt config state logs profile` view. profile.txt joins the startup "Writing to:" pointer and the `wt config state logs` listing. Also raise the report's row limits — slowest calls 8→20, cache offenders 3→10 — so the profile shows more of where time went. The limits are shared by profile.txt, diagnostic.md, and `wt config state logs profile`; the slowest cap also widens --format=json. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Remove the standalone profile.txt — nothing read it (wt config state logs
profile re-renders from trace.jsonl) — and make diagnostic.md the single
human-facing doc, led by the performance profile (promoted to the top,
expanded by default).
Collapse the -vv stderr to two lines: a one-line startup pointer to the log
directory, and an end-of-run line naming what was captured ("Logs,
performance profile, and diagnostics saved @ diagnostic.md") plus the raw
companions the bundle doesn't inline (trace.jsonl, subprocess.log).
The profile keeps the wider tables (20 slowest, 10 cache offenders).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
Clean, well-tested refactor — the profile-render move into collect, the template reordering, and the split-init handling (.path() → None → .flatten() drops the failed sink) all hold up. Two minor, non-blocking notes:
CHANGELOG — profile.txt never shipped in a release. The standalone profile.txt was added in the first commit of this PR (a13426f) and removed in the second (490ed22); no release ever contained it. "The standalone profile.txt is gone" reads as removing a file users had, when a reader upgrading from a release never saw one. Inline suggestion rephrases to describe the end state without implying prior existence. (The (was 8) / (was 3) limit notes are accurate — those were the values on main.)
Dropped split-init end-block assertion (optional). test_vv_pointer_handles_split_init used to assert subprocess.log was not surfaced as a live path when its sink fails to open. That concern moved from the startup pointer to the new end-of-run companion listing in write_if_verbose, but the rewritten test only checks the startup pointer + trace.log. The corrupted-subprocess.log fixture is still set up, so the end-of-run branch (companions == [trace.jsonl], subprocess.log dropped) could be pinned cheaply by adding to that test:
assert!(
stderr.contains("wt/logs/trace.jsonl") && !stderr.contains("wt/logs/subprocess.log"),
"end block should list the surviving companion and omit the failed subprocess.log: {stderr}"
);The production code is already correct here — this only re-establishes the coverage the old assertion gave.
…rage - CHANGELOG: profile.txt never shipped in a release (added then removed within this PR), so describe the end state rather than implying users had a file. - test_vv_pointer_handles_split_init: re-pin the "a failed subprocess.log sink is dropped from the end-of-run companion list" coverage the rewrite lost. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Release v0.65.0. Version bump plus the 0.65.0 changelog section. **User-facing changes in this release:** - **Picker `alt-x` flashes why a worktree wasn't removed** (#3336, #3350) — the keep/failure reason now appears in the picker header instead of only draining to stderr on exit. - **`-vv` diagnostics consolidate on `diagnostic.md`, led by the performance profile** (#3329). This entry's bullet was previously misfiled under the already-released `0.63.0` section (the PR merged after `0.64.0` was tagged); this release moves it into `0.65.0`, where the change actually ships, and drops a misleading "removed `profile.txt`" clause for a file that never existed. - **`wt remove` preserves your subdirectory position** (#3344, closes #3343, thanks @caillou for reporting). **Also included:** a fix to the release skill's reporter-finding grep — `sort -un` on `#`-prefixed lines collapsed the whole issue-reference list to a single entry (every line sorts as numeric 0), which nearly dropped @caillou's credit. Now sorts on the numeric field after `#`. The nightly cross-platform suite (full-tests linux/macos/windows, feature-powerset, release-target, nix-flake, minimal-versions) passed green on the cut-from tip before this PR was opened. > _This was written by Claude Code on behalf of max_ --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
worktrunk 0.65.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 - **Picker `alt-x` flashes why a worktree wasn't removed**: When `alt-x` in the `wt switch` picker keeps a row instead of removing it, the reason now flashes in the picker header for a beat, rather than only draining to stderr after you quit — so the "why" is visible while the row is still in front of you. It covers both the by-design keeps (the current worktree; an unmerged branch-only row shows `○ Kept <branch> — branch is unmerged`) and genuine removal failures (a dirty, locked, or main worktree, shown as an error). The full diagnostic still drains on exit. The `--prs` loading marker now also matches the picker's other in-flight placeholders (`↳ Loading open PRs…`). ([#3336](max-sixty/worktrunk#3336), [#3350](max-sixty/worktrunk#3350)) - **`-vv` diagnostics consolidate on `diagnostic.md`, led by the performance profile**: A `-vv` run now opens with a one-line pointer to the log directory (`○ Verbose logging to .git/wt/logs/`) and closes by naming what it captured — `○ Logs, performance profile, and diagnostics saved @ diagnostic.md` — with the raw `trace.jsonl` / `subprocess.log` companions listed beneath and the `gh gist create` bug-report hint. `diagnostic.md` now leads with the performance profile, expanded by default and promoted above the environment / worktree / config dumps; that profile reports the 20 slowest calls (was 8) and 10 same-context redundant-command offenders (was 3). The profile lives in the `diagnostic.md` bundle, and `wt config state logs profile` re-renders it live from `trace.jsonl`. ([#3329](max-sixty/worktrunk#3329)) ### Fixed - **`wt remove` preserves your subdirectory position**: Removing a worktree from a subdirectory (e.g. `apps/gateway/`) now lands you in the equivalent subdirectory of the destination worktree rather than at its root — matching how `wt switch` already behaves, and falling back to the root when that subdirectory doesn't exist there. `wt merge` lands through the same handler, so it gains the same behavior. ([#3344](max-sixty/worktrunk#3344), closes [#3343](max-sixty/worktrunk#3343), thanks @caillou for reporting) ## Install worktrunk 0.65.0 ### Install prebuilt binaries via shell script ```sh curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.65.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.65.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.65.0 | File | Platform | Checksum | |--------|----------|----------| | [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.65.0/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.65.0/worktrunk-aarch64-apple-darwin.tar.xz.sha256) | | [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.65.0/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.65.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.65.0/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.65.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.65.0/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.65.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.65.0/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.65.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.65.0">https://github.com/max-sixty/worktrunk/releases/tag/v0.65.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!13428
-vvruns write log files to.git/wt/logs/. Previously the stderr output was noisy — a 5-path startup gutter, then the performance profile and the diagnostic bundle each announced separately at exit, withprofile.txt/diagnostic.mdnamed twice. This consolidates it.What changed
One doc to read.
diagnostic.mdis now the single human-facing report, and it leads with the performance profile (<details open>, promoted above the environment / worktree / config dumps) instead of burying it fifth. The standaloneprofile.txtis removed — nothing read it (wt config state logs profilere-renders live fromtrace.jsonl), and its content already lives in the bundle.Two stderr lines, both
○. A-vvrun now opens with a one-line pointer to the log directory and closes by naming what it captured:The two files listed beneath are the raw companions the bundle doesn't inline —
trace.jsonl(machine source) andsubprocess.log(uncapped bodies).trace.log(inlined, truncated) and the profile (inlined verbatim) are omitted to avoid double-listing.More rows. The profile now reports the 20 slowest calls (was 8) and 10 same-context redundant-command offenders (was 3).
Testing
Integration tests in
tests/integration_tests/diagnostic.rscover both stderr blocks, the file set written at-vv, and thatdiagnostic.mdleads with the profile. Verified against realwt -vv listoutput; full pre-merge gate green (4301 tests).