Skip to content

Refuse a --basetemp the candidate payload would sweep up - #417

Merged
max-sixty merged 2 commits into
mainfrom
ui-touch-ups
Sep 7, 2026
Merged

max-sixty merged 2 commits into
mainfrom
ui-touch-ups

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

shipped_payload() asks git for ls-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 --basetemp inside the checkout turns every fixture page a run writes into candidate payload, so install_payload() copies a tree full of temporary pages and the boundary fails about the tree rather than about the flag that filled it. pytest_configure in tests/interact_support.py now 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/basetemp passes and pkg-basetemp does 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_cleanup writes a .lock inside each numbered directory it creates, and ensure_deletable refuses any candidate whose lock is younger than LOCK_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 the keep=3 window: 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_payload collects 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.md gains the rule beside the shipped_payload paragraph that explains it.

The repository's one other --basetemp, in test_a_run_ends_only_the_servers_it_started, is a nested run's, pointed under the outer test's tmp_path so the outer test can assert on what it left. It is outside the checkout and the guard passes it.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits September 7, 2026 14:01
`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]>
@max-sixty
max-sixty merged commit a874bb2 into main Sep 7, 2026
7 checks passed
@max-sixty
max-sixty deleted the ui-touch-ups branch September 7, 2026 21:43
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.

2 participants