docs: TODO deferred merge-stats split and squash-preview coverage - #3563
Merged
Conversation
Records two follow-ups from PR #3549 (the stale-local-ref fix) as inline TODOs rather than a separate tracking issue: splitting the merge success line's commit count into carried-vs-own commits, and adding a snapshot test for `wt step squash --dry-run`/`--show-prompt` in the stale-upstream topology. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
worktrunk-bot
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from #3549 (the stale-local-ref fix, fixing #3519), recorded as inline TODOs rather than a separate tracking issue:
src/commands/worktree/push.rs:MergeContext::prepare'scommit_countmixes carried fast-forwarded upstream commits with the branch's own squash commit when the target was behind its upstream, so the merge success line ("Merged to main (N commits, ...)") overstates the branch's own contribution. Splitting it needs a carried-count threaded throughMergeContext— deferred as cosmetic.src/commands/step/squash.rs:preview_squash(backing--dry-run/--show-prompt) shares the upstream-measured base withhandle_squash, but only the mutating path has a test asserting it (test_step_squash_measures_against_upstream_when_local_main_stale). A snapshot test pinning the preview output in the same stale topology would close this gap.No behavior changes — comments only.
Test plan
cargo checkcargo clippy --all-targetscargo fmt --check🤖 Generated with Claude Code