Repository navigation
test(git-hooks): stop auto maintenance racing the installer test's tree snapshots - #9614
Conversation
…ee snapshots A fixture commit can spawn a detached `git maintenance --auto` whose .git/objects/maintenance.lock appears in one tree() read and not the next, failing "plan returns the remotes: entry and lefthook install, and writes nothing" (run 40069911482). Every git the test spawns now runs with maintenance.auto=false and gc.auto=0 through GIT_CONFIG_COUNT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed I found no security issues in this pull request. The only change is to the test fixture critical-findings: 0 |
|
claude-review reviewed No findings. I reviewed the single-file change to
|
No related issue: main-red flake fix, reported by a peer session from run https://github.com/melodic-software/claude-code-plugins/actions/runs/40069911482
Summary
lib/git-hooks/install.test.mjs"plan returns the remotes: entry and lefthook install, and writes nothing" failed on main at 033368d. The only difference between its before and after.gitsnapshots was.git/objects/maintenance.lock. Likely cause (UNVERIFIED): a detachedgit maintenance --autospawned by the fixture's seed commit was holding the lock during the first read and had released it by the second. This is a race in the test fixture, not a defect inplan.Fix
Every git the test spawns now runs with
maintenance.auto=falseandgc.auto=0, set throughGIT_CONFIG_COUNTnext to the existingGIT_CONFIG_GLOBAL/GIT_CONFIG_NOSYSTEMisolation. This removes the cause instead of teaching the snapshot to ignore lock files.Verification
bash lib/git-hooks/install.test.sh: 62 pass, 0 fail (git 2.53.0).Related
🤖 Generated with Claude Code