Repository navigation
fix(git-tidy): defer squash-integrated cleanup work - #299
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The integrated-branch defer path can block review of unique stashed files and incorrectly describe complete evidence as incomplete.
2 open issues
What changed in this PR
Updates git-tidy’s recommendation policy to defer already-integrated local branch work when cleanup is blocked, rather than recommend a rebase based on ahead/behind counts. The change affects classification, not cleanup execution.
Changes:
- Add an integration-proof check before the ahead/behind fallback.
- Cover blocked squash-integrated work in
worktreesandallscopes, plus a reverted-integration case. - Document the intended deferral behavior and unchanged cleanup safeguards.
| File | Description |
|---|---|
skills/git-tidy/test/triage.integration.test.mjs |
Adds regression coverage for blocked and reverted squash integration. |
skills/git-tidy/scripts/lib/triage-policy.mjs |
Adds the integrated-local-branch deferral path. |
skills/git-tidy/references/evidence-model.md |
Documents the recommendation contract without granting cleanup approval. |
Review effort: Balanced
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
deferbefore the ahead/behind recommendation fallback when existing local-branch proof establishes exact integration.worktreesandallscopes, plus a reverted-integration negative case; document the recommendation contract.This PR changes classification only. It does not remove any worktree, branch, or ignored content.
Validation
update-rebase, expecteddefer.node --test --test-concurrency=1 --experimental-test-coverage --test-coverage-include="**/triage-policy.mjs" --test-name-pattern="squash|ignored-only linked|exact duplicate stash|branch proof uses merge-base|work-bearing local scope records live PR|main and linked dirty worktrees" skills/git-tidy/test/triage.integration.test.mjs: 11 passed, 0 failed; policy coverage 91.25% lines and 83.54% branches.node --check skills/git-tidy/scripts/lib/triage-policy.mjsandnode --check skills/git-tidy/test/triage.integration.test.mjs: passed.git diff --check: passed.Merge remains subject to separate final approval.