Skip to content

feat: prove portable execution across Python versions - #1

Closed
byte271 wants to merge 5 commits into
mainfrom
cross-python-runtime-v0.4
Closed

feat: prove portable execution across Python versions#1
byte271 wants to merge 5 commits into
mainfrom
cross-python-runtime-v0.4

Conversation

@byte271

@byte271 byte271 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What changed

This draft introduces an isolated cross-Python execution-image experiment without weakening the shipping exact-version restore path.

  • adds continuum-execution-abi-1.0 as an experimental compatibility contract
  • writes checksummed portable images with an explicit allowlist for CPython 3.12.13 and 3.13.14
  • keeps creator runtime/Python identity as provenance while allowing restore by a runtime implementing the same execution ABI
  • adds refusal tests for unknown Python versions and keeps the ordinary exact-version reader intentionally incompatible with the experimental capability
  • adds a two-job proof workflow: Linux x86_64 / CPython 3.12.13 source, then native macOS arm64 / CPython 3.13.14 target
  • retains image hashes, frame/graph evidence, exactly-once action evidence, and uninterrupted-control comparison

Why

The current image contract requires exact CPython 3.12.13 and the exact Continuum runtime version. That means even a compatible host runtime cannot restore an image after a Python or Continuum version change. The experiment tests whether Continuum's explicit semantic frames and IR can form a stable execution ABI instead of inheriting CPython bytecode-version coupling.

Proof gate

This PR must not be described as working until Cross-Python portable execution proof passes end to end. The required result is one byte-identical image moving from Linux x86_64 / Python 3.12.13 to macOS arm64 / Python 3.13.14, restoring four active logical frames, preserving shared references and a cycle, repeating zero completed actions, and matching an uninterrupted control.

Scope

This is deliberately a feasibility path beside the existing image reader. It does not change the public CLI, package version, shipping format claim, or existing exact-version compatibility rules. Promotion into a release requires the documented gate and a later integration pass.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b5500d0f-ab32-43b2-9b05-3dee6eebbd27

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

byte271 commented Jul 31, 2026

Copy link
Copy Markdown
Owner Author

First cross-Python proof passed

Actions run 30655561871 completed successfully.

  • source: native Linux x86_64, CPython 3.12.13
  • target: native macOS arm64, CPython 3.13.14
  • source job completed before the dependent target job
  • transferred image remained byte-identical: 915bd5f2602d6d3ae163fa698d0253ef67b1b643e4da315b5ea45fb58a2de814
  • four live logical frames restored: __module__ -> outer -> middle -> leaf
  • shared reference and reference cycle preserved
  • completed output actions repeated: 0
  • source + target output matched the uninterrupted control
  • combined/control output SHA-256: 57e199c47be9aa8fb3618745192790e7e303c2962947a8ee49a861d83d0beef9
  • all five portable-image acceptance/refusal tests passed under both Python versions

This proves the selected controlled workload and experimental reader. It is not yet a general cross-version support claim.

@byte271

byte271 commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Closing this draft as superseded.

The execution-ABI work this PR prototypes shipped through #2 and #3 instead. main is now at 39cc64f carrying Execution ABI 1.0, container FORMAT_VERSION 0.2 with a 0.1 legacy path, IR 0.4, and two-sided admissibility gating on abi.VERIFIED_PYTHON_VERSIONS / abi.VERIFIED_PLATFORMS — a superset of what is proposed here.

Evaluated against current main rather than the main it was branched from, this branch is no longer a candidate to merge:

  • It does not merge cleanly as a change; it reintroduces a parallel implementation of ~1,090 lines alongside the one already shipped.
  • Applied on top of current main it does not pass: 318 tests, 4 failures and 5 errors. All five errors are KeyError: 'target_compatibility' from portable_image.py:136, which still assumes the format-0.1 manifest shape that feat: productionize the cross-Python Execution ABI (0.4.0a1) #2 replaced.
  • Its own targeted repeats (windows-2025) check on this PR is red.

None of that is a defect in the experiment — it answered its question, and the answer is in main. The branch cross-python-runtime-v0.4 (fc145a5) is being left in place rather than deleted, so the history stays reachable.

@byte271 byte271 closed this Aug 1, 2026
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