Repository navigation
Snapshot part in the app: canonical bytes, address and patch, held to their oracles - #158
Merged
Merged
Conversation
… their oracles app/src/PrismSnapshot.lex.tex is the Prism's snapshot part, assembled from the modules generators/snapshot already proves: RFC 8785 canonical bytes, the UOR digest address (sha256: and the FIPS 180-4 SHA-256 of those bytes), and the RFC 6902 patch from one state to the next. Its guest "snapshot" answers canonical, address, apply and sha256. Its 94 acceptance vectors (app/specs/snapshot/spec.json) are written by a new generators/snapshot step, snapshotvectors, from the oracles: the 17 RFC 6902 Appendix A cases of json-patch-tests, the 6 inputs of the RFC 8785 author's test data (canonical and address), and the 65 NIST CAVP ShortMsg messages. GN-01 holds the file; GU-01 holds the wasm. ST-01: RFC 8785, RFC 6902 and RFC 6901 are pinned and measured (13 of 27, 5 of 18, 0 of 3 enforced, each claim naming the oracle vector that holds it; the rest is debt). FIPS 180-4 is registered, unpinned until an extractor reads NIST's PDF. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3Q2QJSrxDiN12Nqa8A
Contributor
|
Merge train notice: the merge train merges this pull request once it is green on current main; don't enable auto-merge. Generated by Claude Code |
…extractor Main replaced tools/standards/extract/bcp14.py with generators/bcp14. RFC 8785, 6902 and 6901 get their steps there and their inventories name the generated files; the requirement ids are unchanged (27, 18, 3). The guests spec and lock keep main's new guests and add snapshot. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3Q2QJSrxDiN12Nqa8A
… registers Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3Q2QJSrxDiN12Nqa8A
Contributor
|
Live: this change is on the published page, as main The publish job opened the published page in a fresh Chromium and its live checks passed (PG-01, PD-01, PD-02): https://github.com/afflom/me/actions/runs/43977249372 |
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
What
Slices 1 to 3 proved the snapshot standards as generators. This slice moves them into the Prism itself, as a part the page can call.
app/src/PrismSnapshot.lex.texis the snapshot part. It is assembled mechanically from the modulesgenerators/snapshotalready proves (GenPatch, GenJcs, Sha256), without the archive harness.snapshot(app/specs/guests/snapshot/snapshot.json,site/snapshot/guest.mjs, pinned wasm) answers four requests. The first line names the operation and the rest is its body.canonical: the RFC 8785 bytes of a JSON state, ornot I-JSON.address:sha256:and the FIPS 180-4 SHA-256 of those bytes (the UORu:digest).apply:[document, patch]gives the patched state in canonical form, orthe patch does not apply(RFC 6902, all or nothing).sha256: a NIST CAVPLenandMsgpair gives itsMDline.app/specs/snapshot/spec.json) are not written by hand. A new step ofgenerators/snapshot,snapshotvectors(moduleGenVec), writes them from the oracles underapp/specs/oracle/:applyvectors: every case of json-patch-testsspec_tests.json(RFC 6902 Appendix A).canonicaland 6addressvectors: every input of the RFC 8785 author's test data.sha256vectors: every message of NIST CAVPSHA256ShortMsg.rsp.app/specs/standards/register/rfc{8785,6902,6901}.json):app/src/Sha256module from the nervous-system work, and this part will then import that module. NIST's CAVP vectors hold the SHA-256 here meanwhile.generators/snapshot's dispatch is split in two definitions. One long chain hit the code generator's recursion depth in the native build.Evidence
lexlean verifyandprismpm buildpass for the guest: all 94 vectors run against the built wasm. A second build from the committed source gave the same wasm, byte for byte (041b56c0…9768).lexlean verifypasses on 12 modules ofgenerators/snapshotandprismpm buildpasses its vectors.opmembers) the generator keeps the oracle's bytes, where Python's parser drops the duplicate. The generator's is the faithful one.french.json: not its canonical output).spec.json: GU-01 refused (snapshot: its modules, vectors or limits changed since it was built).cargo test -p repo-conformance(all suites),tools/generators/run.shand--check,tools/guests/gen.py check(36 current),tools/standards/gate.py --check --base origin/main,tools/handwritten/gate.py --check(none added or grown) andxtask audit-pii.Not in this slice
generators/snapshot. They become enforced once those cases are also guest vectors, which is next.state:Contextandstate:Transitionrecords, PROV lineage, and one SCXML macrostep in giving one snapshot out.🤖 Generated with Claude Code
https://claude.ai/code/session_013Asa3Q2QJSrxDiN12Nqa8A