Repository navigation
Refuse a --basetemp the candidate payload would sweep up - #417
Merged
Merged
Conversation
`shipped_payload` asks git for the tracked tree plus what is untracked and unignored, which is what lets the install boundary exercise a change before it is staged. It also means a `--basetemp` inside the checkout turns every fixture page the run writes into candidate payload, so the boundary fails about a tree full of temporary pages rather than about the flag that put them there. `pytest_configure` now refuses one up front, allowing a path git ignores because git's answer rather than the path's depth is what decides. The flag was being reached for on the belief that a concurrent sibling suite can rotate a live run's basetemp away. It cannot: pytest writes a `.lock` in the numbered directory it is using and skips a locked candidate when it prunes, with a three-day timeout. Measured by holding one run open for forty seconds while five siblings started and finished, well past the `keep=3` window — every live directory survived. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 7, 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.
shipped_payload()asks git forls-files --cached --others --exclude-standard, so the candidate payload is the tracked tree plus whatever is untracked and unignored. That is the point of it — a file a change has written but not yet added is payload a host would copy, which is what lets the install boundary exercise a change before it is staged. It also means a--basetempinside the checkout turns every fixture page a run writes into candidate payload, soinstall_payload()copies a tree full of temporary pages and the boundary fails about the tree rather than about the flag that filled it.pytest_configureintests/interact_support.pynow refuses one up front, sitting directly above the function whose contract is its whole reason. An ignored path is allowed, because git's answer rather than the path's depth is what decides:.tmp/basetemppasses andpkg-basetempdoes not.The flag was being reached for on the belief that a concurrent sibling suite can rotate a live run's basetemp away, and it cannot.
make_numbered_dir_with_cleanupwrites a.lockinside each numbered directory it creates, andensure_deletablerefuses any candidate whose lock is younger thanLOCK_TIMEOUT— three days. Pruning is by count and by lock. Measured by holding one run open for forty seconds while five siblings started and finished, pushing the numbers well past thekeep=3window: every live directory survived, and only the finished ones went. So the belief had cost a real failure — a startup-note test that read the checkout's path, repaired in #408 — and bought nothing.test_a_run_keeps_its_temporary_tree_out_of_the_candidate_payloadcollects one node id under a basetemp inside the checkout and one outside it. The refusal happens at configure time, so collection alone asks for it, and the outside path is the control saying what is refused is where the basetemp points rather than the flag itself. Put the bug back by taking the hook out of the way and it fails on the first of those.tests/CLAUDE.mdgains the rule beside theshipped_payloadparagraph that explains it.The repository's one other
--basetemp, intest_a_run_ends_only_the_servers_it_started, is a nested run's, pointed under the outer test'stmp_pathso the outer test can assert on what it left. It is outside the checkout and the guard passes it.