Repository navigation
test(core): isolate containment tests from concurrent runs and load - #254
Merged
Merged
Conversation
Give scope ids that name a shared cgroup directory a per-run suffix, so two concurrent runs never share one pickforge-<id> scope. Create the fresh scope of the creation test from inside a private parent cgroup, so a concurrent prune cannot remove it before it is inspected. Give the kill sweep after a zero term deadline the default kill deadline and check that it sent SIGKILL. Limit the single-empty test's scans to its fixture, so an unrelated process caught mid-exec cannot change the reason. Check that the classification cases never re-read the fixture's environment, which fails when the zombie or completed environment filter is removed. Refs #250
Refusal and confirmation cases gave each sweep 200 or 300 ms, but their outcome needs two empty scans of all of /proc first. Under pinned load a scan outlasts that, and the reason becomes the missing empty scans. Share the 2000/1000 ms budget the classification cases already use. Refs #250
This was referenced Oct 6, 2026
A concurrent creator's prune could remove the probe scope from the shared delegated cgroup before its cgroup.kill check. The file then treated a delegated host as marker-only. Probe through the create worker inside a private parent instead, and drop an assertion the exact path check implies.
…orge/pickforge into fix/250-containment-test-isolation
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.
The containment tests now hold up under load and when two runs share the host. Every scope ID in the shared delegated cgroup gets a per-run suffix. "always produces a usable scope" creates its scope from a worker inside a private parent cgroup, so concurrent pruning cannot remove it. Sweeps whose result needs two empty /proc scans get a 2000/1000 ms budget, and the kill-sweep test now also checks that only SIGKILL was sent. The single-empty test scans only its fixture and checks that exactly two scans ran. The zombie and completed-environment cases now check how often the fixture's environ is read, so they fail without their filters. Product code is unchanged.
While working on this I found that fixed IDs let two runs hold scopes for the same cgroup directory. A process that joins between the member check and the
cgroup.killwrite is killed even if it carries another token. That is harmless while real IDs are random, and it is filed as #258.Closes #250
250/item1-pruner-*.log250/final-pinned-churn.log250/item2-single-empty-foreign-midexec-proof.log250/final-concurrent-summary.logreadMidExecIdentitydeleted in turn250/final-mutation-*.logEvidence lives in
~/Artifacts/pickforge-kickoff-2026-10-06/on the dev host. The QA pass was skipped because this is a test-only change with nothing to drive.