[BUG] Full Python discovery retains incompatible host test state #137

Open
opened 2026-10-16 12:33:32 +02:00 by erikinkinen · 1 comment
Owner

Summary

Running every Python test module in one interpreter makes the result depend on
test order. Socket fixtures start and join host threads; the thread library's
retained native signal state then causes later process-owner tests to refuse
admission. That refusal is correct and must remain strict.

Reproduction

At Integration 64251db82ef8150ada5515feccab92354df2b3b8, prepare the original
native fixture source and tools, then run:

python3 -B -Werror -m unittest discover -s tests -p '*_test.py'

The full run also imports the Rust documentation tests without their required
CLI tool selections. Long temporary paths can exceed Unix socket address limits.
An archive fixture assumes its temporary directory is outside any Git worktree.

Expected and actual behavior

There should be one complete test command that supplies each module's required
tools and environment without borrowing native state from an earlier module.
Failed assertions should remain visible while later modules still run.

The original discovery run reports 31 failures and 62 errors across 1,655 tests.
Separately running affected modules identifies the host-state dependency and
the fixture setup problems. Resetting or ignoring foreign signal handlers would
weaken the process owner's admission policy and is not an acceptable fix.

Environment and identity

  • Integration: 64251db82ef8150ada5515feccab92354df2b3b8.
  • Linux host, Python 3.14, glibc, original native process-owner fixtures.
  • Host tests only; no guest execution or runtime authority change.

Evidence and prior checks

A diagnostic confirms that native admission passes before a joined thread and
refuses its retained native callback afterward. A fresh interpreter for each
module passes all 146 modules and 1,661 tests, including new isolation controls,
under the original 600-second total deadline. The CI integration and its exact
combined source still require their own checks.

Tracking

Related: implementation PR
and phase completion.

  • Add a complete runner with explicit tools and child environments.
  • Cover interpreter isolation, failure retention and the archive boundary.
  • Replace duplicate Python CI calls with the complete module sequence.
  • Pass the complete suite on the combined source.
  • Observe successful CI on the published source.
## Summary Running every Python test module in one interpreter makes the result depend on test order. Socket fixtures start and join host threads; the thread library's retained native signal state then causes later process-owner tests to refuse admission. That refusal is correct and must remain strict. ## Reproduction At Integration `64251db82ef8150ada5515feccab92354df2b3b8`, prepare the original native fixture source and tools, then run: ```sh python3 -B -Werror -m unittest discover -s tests -p '*_test.py' ``` The full run also imports the Rust documentation tests without their required CLI tool selections. Long temporary paths can exceed Unix socket address limits. An archive fixture assumes its temporary directory is outside any Git worktree. ## Expected and actual behavior There should be one complete test command that supplies each module's required tools and environment without borrowing native state from an earlier module. Failed assertions should remain visible while later modules still run. The original discovery run reports 31 failures and 62 errors across 1,655 tests. Separately running affected modules identifies the host-state dependency and the fixture setup problems. Resetting or ignoring foreign signal handlers would weaken the process owner's admission policy and is not an acceptable fix. ## Environment and identity - Integration: `64251db82ef8150ada5515feccab92354df2b3b8`. - Linux host, Python 3.14, glibc, original native process-owner fixtures. - Host tests only; no guest execution or runtime authority change. ## Evidence and prior checks A diagnostic confirms that native admission passes before a joined thread and refuses its retained native callback afterward. A fresh interpreter for each module passes all 146 modules and 1,661 tests, including new isolation controls, under the original 600-second total deadline. The CI integration and its exact combined source still require their own checks. ## Tracking Related: [implementation PR](https://git.erikinkinen.fi/erix/integration/pulls/12) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). - [x] Add a complete runner with explicit tools and child environments. - [x] Cover interpreter isolation, failure retention and the archive boundary. - [x] Replace duplicate Python CI calls with the complete module sequence. - [x] Pass the complete suite on the combined source. - [ ] Observe successful CI on the published source.
Author
Owner

94a19951 publishes the shared runner and replaces 91 separate Python test calls in CI. Its exact source passes all 146 modules and 1,663 tests under the original total deadline. The new controls cover interpreter isolation, explicit environments, continued execution after retired assertion failures, receipt failures and the archive boundary. Native signal admission stays strict.

The implementation and local-suite checklist items are complete. Published-source CI remains open.

`94a19951` publishes the shared runner and replaces 91 separate Python test calls in CI. Its exact source passes all 146 modules and 1,663 tests under the original total deadline. The new controls cover interpreter isolation, explicit environments, continued execution after retired assertion failures, receipt failures and the archive boundary. Native signal admission stays strict. The implementation and local-suite checklist items are complete. Published-source CI remains open.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:17 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/integration#137
No description provided.