Skip to content

Use VM callbacks with AI recovery and full test coverage - #1

Merged
sunmodza merged 72 commits into
mainfrom
codex/python-compatibility
Sep 28, 2026
Merged

sunmodza merged 72 commits into
mainfrom
codex/python-compatibility

Conversation

@sunmodza

@sunmodza sunmodza commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Changes

  • Route simple annotated module assignments through patched CPython VM store callbacks by default. The same route adds statement checkpoints when AI recovery is configured.
  • Keep callback registrations tied to code object identity and their owning runtime, retain module type scopes for recovery, and avoid sharing registered VM code across runtimes.
  • Validate variadic parameter rebinding through native callbacks and keep callback shutdown safe.
  • Add regression tests for VM routing, recovery, typed yields, CLI state restoration, and version-specific type behavior.

Verification

  • Stock CPython 3.11.16, 3.12.14, 3.13.15, and 3.14.4: 584 tests pass on each version; line and branch coverage are both 100.00% on each version under scripts/coverage_summary.py.
  • Patched CPython 3.11.16–3.14.4: 584 tests pass on each version; native bridge and VM hook smoke tests pass.
  • Source distribution and wheel build successfully.

Scope

The native VM route covers simple annotated module assignments, including configured AI recovery. Typed yields and other typed source continue through the boundary compiler. Full behavioral equivalence with CPython remains outside this PR's claim; Aiython's annotation checks and AI recovery intentionally add behavior.

@sunmodza sunmodza changed the title Preserve class namespace behavior under Aiython instrumentation Use VM callbacks with AI recovery and full test coverage Sep 28, 2026
@sunmodza sunmodza closed this Sep 28, 2026
@sunmodza sunmodza reopened this Sep 28, 2026
@sunmodza
sunmodza marked this pull request as ready for review September 28, 2026 07:35
@sunmodza
sunmodza merged commit 2126096 into main Sep 28, 2026
29 checks passed
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