Skip to content

fix: preserve stdlib-only native protocol replay - #59

Merged
ShuhaoZhangTony merged 1 commit into
mainfrom
codex/ecpa-native-portable-stdlib-20261015
Oct 15, 2026
Merged

ShuhaoZhangTony merged 1 commit into
mainfrom
codex/ecpa-native-portable-stdlib-20261015

Conversation

@ShuhaoZhangTony

Copy link
Copy Markdown
Member

Overview

Restore stdlib-only codecs for the bounded native evidence protocol modules so independently archived proofs can be replayed across architectures with python -I -S. The source/type/header fixes from #58 remain intact.

Claims

  • Four protocol modules use stdlib base64/re without requiring architecture-specific fast-codec extensions.
  • The existing import checker's explicit allowed_files mechanism permits only three exact files for each import family. Neighboring modules, other import families, and pickle remain rejected; the hook still runs for every file.
  • Preserve all source SHA pins, typed proof/clock/receipt checks, protocol schemas, and nonformal classification. The Manager companion source-sync patch is prepared but has not been applied to its active experimental run.

Validation

  • python -m pytest --noconftest tests/tools/test_check_forbidden_imports.py -q -o addopts='': 10 passed, including actual isolated -I -S import of six canonical protocol modules with no pybase64/regex/torch/torch_npu imports.
  • Repository-configured mypy: six changed source/test/checker modules pass. Repository ruff, SPDX, forbidden-import and test-tethering checks pass.
  • The new regression test is wired into the existing Buildkite CPU Multimodal + Config job and its source dependencies.
  • A separate read-only import smoke check loads the proposed six exact Host sources under their Manager experimental module names with -I -S; no third-party modules are needed. This checks the proposed source route, not a completed new evidence replay or NPU experiment.

Details

The optimized imports added for source integration made the protocol depend on pybase64 and regex, which cannot be assumed inside the isolated, site-packages-free replayer. These are bounded diagnostic wire-format codecs shared with the independent consumer, not production inference fast paths. Explicit per-import file exceptions document that portability contract instead of excluding whole files/directories, disabling the hook, or hiding imports behind aliases.

This change only updates codecs and the corresponding checker/test wiring. It leaves observer byte identity 538320ca8d9808efaae666af40b73aa22a463bd2671981862110b33c23901326 unchanged; the other changed protocol source digests must still be frozen and verified afresh. Existing NPU/ND2 records retain their original source versions. A new wheel and fresh source-matching diagnostic/cohort are required before any new runtime qualification.

Duplication check: open #57 preserves the immutable old-lineage source tree, #53 covers accepted KV transfer descriptors, and #8 covers admission reservation. This is the specific stdlib replay compatibility fix on current merged main.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill.
  • AI assistance was used during the creation of this PR (Codex).
  • Design Fit: Bounded codec modules remain isolated; no model-runner changes.
  • Testing and Validation: Isolated real imports and negative import-policy counterexamples pass; no new hardware/model claim.
  • Code Quality and Style: Typed validation and headers retained; exceptions are explicit and limited to exact import/file pairs.
  • Pull Request Contents: Portability failure, source-sync boundary, reproduction and qualification limits are stated.

Keep bounded proof codecs independent of architecture-specific extensions. Use the existing explicit allowed_files mechanism for only the required base64/re imports; retain all other import checks, typed source validation and source headers. Test isolated protocol imports and deny neighboring files, import families and pickle; tether the test to the CPU job.

Co-authored-by: Codex <noreply@openai.com>
@ShuhaoZhangTony
ShuhaoZhangTony merged commit 47c8aa1 into main Oct 15, 2026
4 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