test(structex): unique basename for gti receipt test to fix full-tree collection#8492
Merged
Conversation
… collection tests/gti/test_receipt.py (added by #7877) and the pre-existing tests/heterogeneity/test_receipt.py shared a basename with no package __init__.py in either dir, so pytest's default prepend-import full-tree collection raised "import file mismatch", breaking `pytest tests/ -m smoke` (the mission smoke gate). Rename the gti file to a unique basename so the two modules no longer collide. Pure git mv; no test-body change. Validation (fresh origin/main worktree): python3 -m pytest --collect-only tests/ -q rc=2 -> rc=0 (0 errors) PYTEST_BIN="python3 -m pytest" scripts/test_tiers.sh smoke rc=0 (138 passed) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
Aragora Code ReviewAdvisory-only review. No issues found. |
Collaborator
Author
Claude independent model reviewReviewer: claude (anthropic) — independent adversarial model review via the Aragora Claude reviewer, grounded on the exact PR head. Verdict: PASS
No blocking issues. Suggest a follow-up to add dogfood: yes |
Collaborator
Author
Grok independent model reviewReviewer: grok (xai) — independent adversarial model review via Grok Build CLI harness, grounded on the exact PR head. Reviewing the rename for references, pytest discovery, and collision risks.
dogfood: yes |
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.
What & why (HEALTH-5 #8262 — unblocks p2-docs scrutiny)
tests/gti/test_receipt.py(added by #7877, 2026-06-15) and the pre-existingtests/heterogeneity/test_receipt.pyshare a basename, and neither directoryhas a package
__init__.py. Under pytest's defaultprependimport mode,full-tree collection (
pytest tests/, used by the smoke tierscripts/test_tiers.sh smoke=pytest tests/ -m smoke) imports both as thetop-level module
test_receiptand raisesimport file mismatch, so themission smoke gate is RED on
origin/main.Sibling dirs
tests/gauntlet/andtests/review/(alsotest_receipt.py)already have
__init__.pyand do not collide. The preferred__init__.pyfixis path-frozen: open PR #8460 already adds both
tests/gti/__init__.pyandtests/heterogeneity/__init__.py(currently BLOCKED onaragora-merge-quorum),and PR #8382 renames the heterogeneity side but is Tier-4 (parked for operator).
This PR takes the equivalent, path-freeze-clean route: rename the gti file to a
unique basename. Pure
git mv, no test-body change.Validation (fresh origin/main worktree)
python3 -m pytest --collect-only tests/ -q→ rc=2,import file mismatch, 1 collection error.python3 -m pytest --collect-only tests/ -q→ rc=0, 228930 collected, 0 errors.AWS_…=/dev/null make test-smoke→ rc=0 (Smoke tests passed).PYTEST_BIN="python3 -m pytest" bash scripts/test_tiers.sh smoke→ rc=0, 138 passed (matches clean-main baseline).make lint→ rc=0.Risk
Tier 0 (tests-only rename). No test bodies change. No CI/workflow/script
references the gti path (only
tests/gauntlet/test_receipt.pyis referenced, inscripts/ci_core_suites.sh, which is untouched). Composes cleanly with #8460 /#8382 if either later lands (disjoint files).