Repository navigation
fix: preserve stdlib-only native protocol replay - #59
Merged
Merged
Conversation
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>
7 of 52 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
base64/rewithout requiring architecture-specific fast-codec extensions.allowed_filesmechanism 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.Validation
python -m pytest --noconftest tests/tools/test_check_forbidden_imports.py -q -o addopts='': 10 passed, including actual isolated-I -Simport of six canonical protocol modules with no pybase64/regex/torch/torch_npu imports.-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
pybase64andregex, 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
538320ca8d9808efaae666af40b73aa22a463bd2671981862110b33c23901326unchanged; 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
/pr-checklistskill.