Repository navigation
test(dry-run): stop git background maintenance from racing the tree snapshot - #845
Merged
Merged
Conversation
jeff-r2026
self-requested a review
September 26, 2026 13:11
|
No findings. The tests-only classification is accurate, so the PR does not require a real-CLI/e2e record under the repository’s review rules. The documented test, type-check, and lint evidence is sufficient. The |
jeff-r2026
approved these changes
Sep 26, 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
dry-run-load-path.test.ts(#837) hashes the whole fixture tree, runs a--dry-runcommand, and asserts the tree is unchanged. It failed on macOS / Node 22 in CI run 36241761063 (PR #838). The only diff was this line:- "app/.git/objects/maintenance.lock": "e3b0c442…",Cause: the fixture's
git commitstarts a detachedgit maintenance run --auto, which takes.git/objects/maintenance.lock. The lock was there when the baseline was taken and gone when the second snapshot ran. The CLI wrote nothing. On local git 2.55 the lock exists straight aftergit commitin 20 of 20 fresh repos, and in 0 of 20 once the two configs below are set.The first change fixes the cause: nothing starts in the background. The second guards against any git process that still runs anyway. It skips only git's transient lock files, so a real write to
.git/config, hooks or refs still fails the test. No other test snapshots a tree that holds a real git repo.contribute.test.tsmocks git, and the doctor tests list tool directories.Refs #836.
Evidence
--dry-run on a fresh self-mode clone > roles set writes no file…, atdry-run-load-path.test.ts:161.After:
for i in $(seq 30); do npx vitest run src/__tests__/dry-run-load-path.test.ts || break; done: 30/30 passed.npx vitest run: 5122 passed, 1 skipped.npx tsc --noEmitis clean, andnpm run lintpasses with 0 warnings.app/.git/configand createsapp/.git/probe.lockbefore the command fails on theapp/.git/confighash. It does not reportprobe.lock.Tests only, so no real-CLI record (
CLAUDE.md).Merge Danger
Door: two-way
Blast Radius: none
Only one test file changes.