Repository navigation
tests: guard xdist collection determinism (Part of #6255) - #6257
Merged
Merged
Conversation
…6255 The windows 3.11 full-suite part died on "Different tests were collected" because a zip probe id carried a wall-clock timestamp (fixed in #6252). Pin that helper's bytes against the clock and fail any parametrize argument that calls a clock/random/uuid/tmp/pid API. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 23, 2026 15:53
squid-protocol
enabled auto-merge (squash)
October 23, 2026 15:53
This was referenced Oct 24, 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.
Part of #6255 (not
Closes: the issue closes itself when the gate next succeeds on main).Diagnosis. Run 39975956333 (main @ 97a8a40): only the windows-latest / 3.11 part failed, with 3 xdist collection errors ("Different tests were collected between gw2 and gwN"). Cause:
test_checkpoint_extensions_need_a_model_headerids embedded raw zip bytes whose DOS timestamp was "now". Real defect, not an infra flake. Already fixed on main by #6252 (_zippinsdate_time), which landed after the failing run.This PR (regression guard).
tests/core_engine/test_collection_determinism_6255.py:slice4._zipbytes are identical under a shifted clock.tests/**/test_*.py: noparametrizeargument may call a clock/random/uuid/tempfile/pid API.Class sweep. Other zip builders (
test_model_magic.py) build lazily with explicit stringids=;test_galaxyscope.pyonly patchesZipFile. No other instance found.Gates. plain
pytestfrom /tmp passes (2 tests, 1.5 s);ruff formatclean;tests/tools/audit_check.pyall clear. No engine files touched, no golden bless.Cross-repo. None.
Lessons for agents
parametrizevalue whose repr ends up in the test id (raw bytes) must be deterministic across processes, or xdist aborts collection on that worker; give lazily-built payloads explicitids=.🤖 Generated with Claude Code