Skip to content

Fix: Make the TypedPython develop CI deterministic - #211

Merged
b-re-w merged 1 commit into
developfrom
feat/tp-ci-fixes
Oct 17, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/tp-ci-fixes

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 17, 2026

Copy link
Copy Markdown
Member

The develop runs after #205 and #209 failed (typedpython.yml). Three causes, none a product defect:

  1. test_importgate.py::test_clean_module_imports_and_is_cached_by_content (ubuntu, also on the Fix: An ArrayParam function that can run user code stays interpreted (#203) #205 run):
    • The test rewrote the module with content of the same length within one second. CPython's .pyc check compares the source mtime in whole seconds and its size, so the import ran the stale bytecode.
    • The gate itself re-checked the file: the call count was 2.
    • The rewrite now has a different length.
  2. test_threadsanitizer_reports_nothing_on_the_extension (ubuntu): 6 reports.
    • The interpreter is not instrumented, so TSan also reports races between two accesses inside CPython.
    • The test now counts only reports with a frame of the extension or the runtime header.
    • test_threadsanitizer_sees_a_plain_epoch still passes with the filter, so a real race in our code is still reported.
  3. test_mutant_without_the_dict_critical_section_is_caught (macOS): the mutant was not caught on the CI runner.
    • Both race-mutant tests depend on a race actually firing, which is not deterministic on a shared runner.
    • They are now marked race_mutant and excluded from CI (-m "not measurement and not race_mutant"). They still run locally.
    • The concurrency tests on the real build stay in CI.

Verification (local, 3.15.0rc1 free-threaded): test_free_threaded.py and test_importgate.py: 32 passed, including both race mutants and both TSan tests.

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.

1 participant