Skip to content

Plan 326: free-threaded CPython 3.14t staged support - #7

Open
dbowm91 wants to merge 6 commits into
mainfrom
feat/auto-20261116-7cc8b1dc
Open

dbowm91 wants to merge 6 commits into
mainfrom
feat/auto-20261116-7cc8b1dc

Conversation

@dbowm91

@dbowm91 dbowm91 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Plan 326 (staged free-threaded CPython 3.14t support) with the Plan 327 follow-up registration.

  • explicit #[pymodule(gil_used = false)] in the extension module
  • tunnel recv contention guard (RuntimeError) and one-shot bridge contract docs
  • tests/test_free_threaded.py: 8 contention/lifecycle tests, skipped on GIL builds
  • family-aware wheel matrix (13 required pairs on 10 platform tags), release-set validator, metadata gate, release workflow wiring
  • python-free-threaded CI lane plus a 3.14t compile gate
  • Beta documentation and classifier for cp314t on Linux x86_64 (glibc), macOS arm64, Windows x86_64 only

Local evidence (macOS arm64)

Check Result
eggserve-0.2.5-cp314-cp314t-macosx_11_0_arm64.whl 861 tests, OK on CPython 3.14.5t
eggserve-0.2.5-cp311-abi3-macosx_11_0_arm64.whl 861 tests, OK (skipped=8)
GIL crate cargo check / free-threaded compile gate pass
cargo clippy --workspace --all-targets -- -D warnings pass
cargo fmt --all -- --check pass
matrix validate + self-test, wheel-set self-test, metadata gate, workflow gate/self-test, topology pass

Named closure conditions for Plan 326 (conditionally closed)

  1. a green python-free-threaded CI job — this PR is the first run
  2. a three-target release aggregate containing the three -ft wheels — Plan 327 dispatches release.yml with publish_target: none

Not in scope

No publication, version bump, tag, GitHub Release, platform expansion, dependency change, or product-behavior change. cp311-abi3 keeps its tags, wheel count, and suite behavior.

CI Test added 6 commits November 23, 2026 22:15
Add a Beta cp314-cp314t wheel family for Linux x86_64 (glibc), macOS
arm64, and Windows x86_64 while keeping cp311-abi3 unchanged.

- declare #[pymodule(gil_used = false)] explicitly
- add the tunnel recv contention guard and one-shot bridge docs
- add tests/test_free_threaded.py (8 tests, skipped on GIL builds)
- make the wheel matrix, release-set validator, metadata gate, and
  release workflow family-aware (13 required pairs on 10 platform tags)
- add the python-free-threaded CI lane and compile gate
- document the Beta tier, classifier, and support boundaries

Local evidence: the cp314-cp314t wheel builds and the full 861-test
suite passes on CPython 3.14.5t (macOS arm64); the GIL wheel stays
cp311-abi3 with 861 tests passing (skipped=8); clippy, fmt, and every
packaging gate pass.

Plan 326 is conditionally closed: the named conditions are a green
python-free-threaded CI run and a three-target release aggregate.
Plan 327 (registered in this commit) obtains both, adds the soak
substitute for TSan, and makes the Beta/Stable decision.

Plans: 326, 327
Add scripts/soak-python-free-threaded.py as the documented substitute for a
TSan-instrumented CPython (no such interpreter is available, and Rust-only
TSan would not observe Python callback state). It drives the public
lowlevel surface on loopback across two server phases with concurrent
buffered POSTs, streamed responses with byte verification, one-shot body
and iterator races, tunnel recv contention, and client disconnects during
a slow stream, then writes one JSON record per run.

Three recorded runs on CPython 3.14.5t (macOS arm64), 400+ requests,
8 workers, 8 callbacks, 120 s each: 84769, 80411, and 82748 HTTP requests
with zero failures, 582/576/579 tunnel cycles, 592/585/590 disconnects,
handler peak exactly 8 (the permit bound), one thread at exit, and the GIL
still disabled. The script exits non-zero on any unexpected error, content
mismatch, invariant violation, GIL re-enable, or budget shortfall.

Records: plans/closure/python-facade/327-soak-{1,2,3}.json
The release metadata gate hard-coded the Beta classifier. Replace that with
one expected-tier constant, accept exactly one Free Threading classifier,
and require it to match the declared tier exactly when cp314t is a required
matrix family (and be absent otherwise). The new --self-test exercises both
the Beta and Stable configurations plus the mismatch, missing, duplicate,
and absent-family cases, so a promotion cannot leave pyproject, the docs,
and the gate out of sync.

Current declaration stays tier 2 (Beta); WP-E of Plan 327 flips the constant
together with pyproject and the docs if all promotion criteria hold.
Both macos-14 arm64 release jobs were cancelled one second after
assignment with runner_id 0, twice (attempts 1 and 2 of release run
45281528704), while the CI platform-compile macos-latest lane provisioned
in 45 s. Move the two arm64 matrix targets and the post-publish macOS
smoke to macos-latest. The platform tag stays pinned by
MACOSX_DEPLOYMENT_TARGET 11.0 and the matrix platform_tag, so no support
claim changes.

Manual platform-qualification.yml still targets macos-14; it is outside
this plan and is recorded as a residual finding.
Close Plan 326 now that both named conditions are observed: CI run
45277923657 is green with the python-free-threaded job (CPython 3.14.10t,
861 tests, GIL stays disabled), and release run 45283657891
(publish_target: none) reached a green 13-pair aggregate containing the
three cp314t wheels, with abi-proof 5/5 on CPython 3.11-3.15.

Record the Plan 327 promotion-gate evaluation: all four criteria are met.
Retain the Beta classifier because the plan makes promotion conditional on
the owner confirming that a no-publish aggregate satisfies the gate's
release leg, and that confirmation is not recorded. The closure enumerates
the exact two-file functional change plus the doc statements needed to flip
the tier once confirmed.

Also update the registry and roadmap: rows 326/327 closed, both milestone
statuses updated, next number stays 328.
The owner confirmed that a publish_target: none release aggregate satisfies
Plan 326's release leg, and all four gate criteria are met: the 13-pair
aggregate is green with the three cp314t wheels, abi-proof is 5/5 on
CPython 3.11-3.15, the contention soak passes three zero-error runs, and the
Plan 326 closure carries no medium-or-higher finding.

Promote the advertised tier on the same three targets only:

- pyproject classifier: Free Threading :: 3 - Stable
- metadata gate: EXPECTED_FREE_THREADING_TIER = 3 (exactly one classifier at
  the declared tier; --self-test covers both configurations)
- tier statements updated across toolchain-support, python-api,
  python-http-server-compatibility, python-packaging, release-contract,
  release-process, library-capability-matrix, SECURITY, CHANGELOG, and the
  eggserve-dev skill bullet
- Plan 327 closure and registry/roadmap record the confirmed decision

No runtime, API, dependency, wheel-tag, or platform change; the wheel set is
identical to the qualified aggregate.

This branch has not been deployed

No deployments
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