Skip to content

feat(gate): Pyodide differential parity gate (Phase 2)#8

Merged
luisleo526 merged 9 commits into
mainfrom
feat/pyodide-gate
Jun 16, 2026
Merged

feat(gate): Pyodide differential parity gate (Phase 2)#8
luisleo526 merged 9 commits into
mainfrom
feat/pyodide-gate

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Summary

Phase 2 of the Pyodide-target conformance flow (spec: docs/superpowers/specs/2026-06-16-pyodide-conformance-flow-design.md, §4/§6). Adds a CI gate that runs the transpiler inside real wasm32 Pyodide and proves it behaves identically to native CPython on both branches:

  • success ⇒ success, byte-identical C++
  • failure ⇒ the same failure — same verdict, error, diagnostics, and unexpected-exception type/message

over a 275-fixture corpus (260 valid strategies + 15 failure families). Locally: gate:full → PARITY OK over 275; canary selftest 8/8 in ~0.1s.

Pieces

  • PYODIDE_TARGET (314.0.0) — single source of truth; Python/Emscripten derived from Pyodide's lock at gate time.
  • First Node tooling in the repo (package.json: pyodide + tar).
  • gate/glue.py (canonical glue, runtime-equivalent to the app worker), gate/oracle.py (native, one process, captures unexpected exceptions), gate/compare.mjs (pure comparator), gate/run-gate.mjs (pack → Pyodide → compare → release.json), gate/selftest.mjs (canary).
  • tests/gate-corpus/{ok,err}/ corpus.
  • .github/workflows/gate.yml — dispatch + nightly + gate-file PRs. PYTHONHASHSEED=0; pinned action SHAs.

Deliberate deferrals (Phase 3)

  • Release-blocking wiring (gate as a needs: of release) — Phase 3 with npm delivery. The gate generates release.json here; it does not block tags yet.
  • Glue dedup (ship one glue from the npm package).

Test plan

  • gate.yml runs green on this PR (clean runner, native Python 3.14 oracle vs wasm32 Pyodide).
  • Local: gate:full PARITY OK over 275; gate:selftest 8/8; existing pytest suite unaffected.

🤖 Generated with Claude Code

@luisleo526 luisleo526 merged commit 2c085a6 into main Jun 16, 2026
9 checks passed
@luisleo526 luisleo526 deleted the feat/pyodide-gate branch June 16, 2026 02:37
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