Skip to content

test(git): split worktree cases out of the Git binary compatibility test - #29357

Merged
nwparker merged 1 commit into
mainfrom
nwparker/split-git-binary-compat-test
Oct 16, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/split-git-binary-compat-test

Conversation

@nwparker

@nwparker nwparker commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​216 $\color{#cf222e}{\Huge{\mathbf{−}}}$​209
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​232 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​232

ELI5

The Git compatibility test file grew past the lint line limit (942 > 820), which fails Lint on main and blocks every PR. This moves its worktree tests into their own file. Pure move: same tests, same assertions, same order.

What Changed

The six worktree cases (worktree-list/rev-parse boundaries, branch-delete refusal, checkout progress records, locked prepared removal, prepared creation/finalization, retarget drift) move verbatim into src/shared/git-worktree-binary-compatibility.test-cases.ts, registered at the same spot inside the shared describe, following the existing git-resolution-…/git-repository-registration-… .test-cases.ts pattern. No user-facing change.

Why

The cases share one stateful repository and run in order, so a separate test file with its own setup would change what each case sees. Registering from the same describe keeps the exact repository, order and CI path (pr.yml's real-Git lane still runs src/shared/git-binary-compatibility.test.ts, and src/shared/git- already covers the new file in change-scope detection).

Linked Issue

N/A (maintainer, main lint fix)

Visual Proof

N/A, test-only move.

Testing

  • Ran the file against a real Git (2.55.0, --maxWorkers=1) before and after: same 32 tests, identical names and order, all pass.
  • oxlint, pnpm tc:node, pnpm run check:code-quality:changed pass.

Agent skill upstream boundary

  • Not applicable.

Checklist

  • This PR is small and focused
  • Self-reviewed for correctness
  • Cross-platform, SSH/remote impact: N/A

Pure move to bring the file under the max-lines limit; same cases in the same order.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e44e795e-678f-4109-a27e-e5a2a769a50e
📥 Commits

Reviewing files that changed from the base of the PR and between 69ff84d and d1347eb.

📒 Files selected for processing: 2
  • src/shared/git-binary-compatibility.test.ts
  • src/shared/git-worktree-binary-compatibility.test-cases.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The main Git compatibility test now registers worktree compatibility cases through an exported helper. The cases check Git-version support boundaries, stale-worktree output, branch-deletion refusal, worktree-add progress, locked and prepared worktree operations, and retarget-drift measurements.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d1347

The worktree compatibility tests retain their behavior after extraction; no identified issue prevents merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly describes the primary change: moving Git worktree compatibility cases into a separate test file.
Description check Passed The description is mostly complete. It explains the motivation, scope, implementation, testing, non-user-facing impact, and maintainer exception for the linked issue. Omitted sections such as Review a…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 6578f0b into main Oct 16, 2026
8 of 10 checks passed
brennanb2025 added a commit that referenced this pull request Oct 16, 2026
# Conflicts:
#	src/shared/git-binary-compatibility.test.ts
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.

1 participant