Repository navigation
refactor(prismpm): Rust module cuts for contracts, canonical, advisory and reference syntax (Part of #448) - #626
Merged
Merged
Conversation
…yntax to their module owners (Part of #448) Each contract's semantic check now runs in the module that owns its meaning. CanonicalDocument keeps the schema table and closed-shape checks in errors and refuses an owner-checked id unless the owner's own check is supplied, so no caller can hold a document whose checks did not run. - contracts.rs: OWNER_CHECKED table, parse_owned/from_value_owned; owner checks in sdk, acceptance, oci, library_build, library_verification and the new model_contract; contract_owners routes by id. - holo/canonical.rs keeps the value codec; encode_canonical and decode_canonical move to holo/model_document.rs. - SDK advisory disposition moves from supply_chain to sdk/advisory.rs (verify); OCI reference syntax moves from oci to reference.rs (verify). - modules.toml: 15 -> 3 pending, contracts and workbench leave the legacy cycle. Emitter digest and ct-02/tm-01 model digest rebound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
…format gate (Part of #448) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
Member
Author
|
Two checks are red on 5c8631c, and this PR causes both:
Generated by Claude Code |
…per digest (Part of #448) authority.rs is the hashed wrapper source of six oracles, and the reference syntax import changed it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
…s id (Part of #448) Applied from golden-refresh run 43167050013 for 5c8631c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
…oller import change (Part of #448) controller/mod.rs now imports encode_canonical from holo::model_document; the pin is the sha256 of the formatted file (e95ddbac). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
…(Part of #448) From native-source-review run 43171961132 on 5e83583. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
afflom
pushed a commit
that referenced
this pull request
Nov 12, 2026
This was referenced Nov 12, 2026
Merged
This was referenced Nov 13, 2026
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.
Requested by Alex · project thread
Part of #448 (prism.errors) and #449 (prism.verify), Rust side. v0.5 workstream WS6.
Why
model/modules.tomlheld 15 pending forbidden edges. Twelve of them came fromerrorsandverifycalling up intoimages:contracts.rsran every contract's semantic check by callingacceptance,exporter,holo::library,holo::validate,oci,release_verificationandsdk;holo/canonical.rsvalidated model documents;sdk.rsre-exported the advisory disposition fromsupply_chain; andauthority/sdkread OCI references throughoci. docs/proposals/440-nine-modules.md asks that each check move to its owner without letting anyone hold a document whose checks did not run.What
contracts.rskeeps the schema table and the closed-shape and ordering checks. A newOWNER_CHECKEDtable names the module that owns each of 19 contracts (SDK locks /2 /3, lock update /2 and migration, production acceptance, conformance result, browser export and publication receipts, native-library evidence, model documents /2 to /7).CanonicalDocument::parse/from_valuerefuse those ids with PP9001, andparse_owned/from_value_ownedrefuse a check from any module other than the registered owner. So the guarantee is the same as before: a document of one of these ids exists only after its owner's check ran.contract_from_value/parse_contract:sdk,acceptance,oci,library_build,library_verification, and a newmodel_contract.rs(images; it lives outsideholosoholodoes not join a cycle withcontracts).contract_owners.rs(client) routes any id to its owner for callers that hold only an id, and a test proves every owner-checked id reaches its owner.holo/canonical.rskeeps only the value codec (encode_value,decode_value,content_id).encode_canonical/decode_canonicalmove toholo/model_document.rs.validate_advisory_coverage,validate_sdk_security_dispositionand their types) moves fromsupply_chain.rstosdk/advisory.rs(verify).supply_chainre-exports it.validate_reference,digest_hex) moves fromoci.rstoreference.rs(verify).ocire-exports it.CanonicalDocumentnow call the owner, so anis_err()assertion cannot pass on the PP9001 refusal by accident (I scanned the whole tree: no plain call with an owner-checked id is left). The browser-export receipt test moved fromcontractstooci::browser_export.cargo xtask check-modules: 15 → 3 pending, andcontractsandworkbenchleavelegacy_cycle(19 → 17), as the proposal predicted. Remaining: the two "process helpers move to verify" rows (ProcessRecordcarries anexporterfield, so that cut needs its own change) and WS5'sauth.mjs→attest.mjsrow, which feat(prism-code): trust decisions in verify, signing in auth (Part of #449) #623 removes.Emitter inputs
holo/canonical.rsandholo/model_document.rsare emitter inputs andcontroller/mod.rs's import changed, so:model/emitter-inputs.tomldigest rebound, the ct-02/tm-01applicationModelDigestrebound, and a golden refresh is dispatched for this branch. I'll import the patch and the native records before merging.Test
cargo clippy -p prismpm -p repo-conformance -p xtask --all-targets -- -D warningsclean;cargo fmtclean.cargo xtask check-modules,validate-model(including the emitter-input audit) pass;check-fixturespasses ct-02, and tm-01 needslake, which this container lacks.cargo test -p prismpm: 803 pass. Every failure needslake,node, Docker orPRISMPM_TEST_SDK_IMAGE, none of which are installed here; none involves an owner check. CI runs the full suite.Breaking
prismpm::holo::canonical::{encode_canonical, decode_canonical}moved, and plainCanonicalDocumentparsing of the 19 owner-checked ids is refused. Both are in CHANGELOG.md.Generated by Claude Code