Skip to content

fix(git-tidy): defer squash-integrated cleanup work - #299

Merged
jongio merged 1 commit into
mainfrom
jongio-squash-merge-cleanup-classification
Nov 18, 2026
Merged

jongio merged 1 commit into
mainfrom
jongio-squash-merge-cleanup-classification

Conversation

@jongio

@jongio jongio commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Return defer before the ahead/behind recommendation fallback when existing local-branch proof establishes exact integration.
  • Preserve all cleanup eligibility, ignored-content, active-work, last-copy, identity, protection, scope, and approval checks.
  • Add a synthetic integration regression covering blocked squash-integrated work in worktrees and all scopes, 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

  • Demonstrated the new regression failing before the policy change: actual update-rebase, expected defer.
  • 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.mjs and node --check skills/git-tidy/test/triage.integration.test.mjs: passed.
  • git diff --check: passed.
  • Scoped code, documentation, and light security review: no material findings. Shared policy owns both analyzed scopes; no separate UI/build surface is affected. The package has no lint or build script; syntax checks and focused deterministic tests cover the changed JavaScript.
  • No model-backed evals run.

Merge remains subject to separate final approval.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio
jongio requested a balanced review from Copilot November 18, 2026 16:49
@jongio
jongio merged commit 411a851 into main Nov 18, 2026
10 checks passed
@jongio
jongio deleted the jongio-squash-merge-cleanup-classification branch November 18, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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 worktrees and all scopes, 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

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