Skip to content

Studio tests: test-support's git turns off auto-maintenance, one process fewer per commit (#823) - #832

Merged
danielrispler merged 2 commits into
mainfrom
test-support-git-maintenance
Nov 28, 2026
Merged

danielrispler merged 2 commits into
mainfrom
test-support-git-maintenance

Conversation

@danielrispler

Copy link
Copy Markdown
Owner

Closes #823. Its unmet criterion, at most 120 maintenance starts, moved to #831.

Summary

 studio_test_support::git(dir, args)
   git -c user.name=Studio -c user.email=studio@example.com
+      -c maintenance.auto=false -c gc.auto=0
       <args>

These are the same two flags the hook's git passes (hook/src/lib.rs:649, #141). A commit through the tests' helper no longer starts a detached git maintenance run --auto. A new test, test-support/tests/git.rs, checks this.

Evidence

The new test: a_commit_through_the_tests_git_starts_no_auto_maintenance

GIT_TRACE=<file>; git(repo, commit --allow-empty)
assert trace has "commit", has no "maintenance"
  • Before: FAIL. The trace held start_command: …/git maintenance run --auto --quiet --detach.
  • After: PASS.

maintenance run starts during cargo nextest run --locked --workspace, counted with GIT_TRACE=<file> and grep -c 'start_command: .*maintenance run':

maintenance starts git commit calls
Before (origin/main's lib.rs) 1025 881
After 272 881

The ticket expected at most 120 after; 272 is over that. A GIT_TRACE2_EVENT run splits the 272 by the process that started each one:

  • 104 from git-receive-pack on the tests' bare origin.git. 87 of those pushes come through this helper, but its -c doesn't reach the receiving side.
  • 100 from test-local helpers' commits. Some of those helpers also use user.name=Studio, against the ticket's claim that this helper is the only one.
  • 58 from fetches and 10 from merges.

The ticket kept these out of scope ("Nothing else changes"), so they moved to #831.

Checks: npm run check passed.

Correctness pass

A reviewer traced callers and ran the affected tests. It found no problems:

  • Nothing depends on auto gc: turn_trees's explicit git gc --prune=now still works, 18 of 18 passed.
  • No caller reads config --list or config --get output.
  • The unsafe set_var is sound: the file holds one test, and the fake ctor starts no threads.
  • back_a_law and map_draft passed, 48 of 48.

Outside review

skipped: no risk match

Merge Danger

Door: two-way

Blast Radius: tests

Only the tests' git helper changes. The studio's own code and stored data are untouched.

🤖 Generated with Claude Code

danielrispler and others added 2 commits November 28, 2026 19:03
…ess fewer per commit (#823)

studio_test_support::git passes -c maintenance.auto=false -c gc.auto=0, as the
hook's git does (#141), so a commit through it no longer starts a detached
`git maintenance run --auto`. A test in test-support checks a commit's GIT_TRACE
for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce test's message (#823)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danielrispler
danielrispler merged commit 0000ff6 into main Nov 28, 2026
2 checks passed
@danielrispler
danielrispler deleted the test-support-git-maintenance branch November 28, 2026 17:14
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.

Studio tests: test-support's git turns off auto-maintenance, one process fewer per commit (#803)

1 participant