Repository navigation
feat(prism-code): LexLean keeps its verification processes, and apps share their foundation modules - #713
Open
humuhumu33 wants to merge 4 commits into
Open
feat(prism-code): LexLean keeps its verification processes, and apps share their foundation modules#713humuhumu33 wants to merge 4 commits into
humuhumu33 wants to merge 4 commits into
Conversation
…gain A proof in the SDK image is now two runs. The first locks, formats and checks the model and has LexLean name it (lexlean build --all prints its build ID). The second is lexlean verify, which runs only when this machine has no admitted record of that model. The record verify publishes is kept in ~/.prism/kappa by content address, under a derivation key over the SDK image, the build ID and the Lake workspace. It stands in for verify only when reuseAdmits allows it, the rule Lean proves for every stored result: the same key, image and build, and files that re-derive to their labels. Its own attestation must name this build and say verified. Only a verify that exited 0 is kept. A reused record is put back where verify publishes one, and the answer says it was reused. Measured in the SDK image: the payment app 83.1 s, then 6.6 s unchanged and 19.1 s as the same model in a new project; the stateful seats app 70.8 s, then 6.0 s and 16.3 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rified again" This reverts commit d1f8be8.
…he volume Every container with the per-image cache volume at /tmp gets LEXLEAN_VERIFY_STORE=/tmp/lexlean-verify-store, LexLean's process store (SPEC 22.13, lexlean#558). It reuses elaborations, replays and audit members by the content identity of their module and imports, the executable and the toolchain, judges each stored record as its stage does, and publishes the same bytes with or without it. A verdict is never reused. A container with a tmpfs gets no store, since it would be written and never read. A LexLean without the store ignores the variable. The fast-verified-builds proposal gets an addendum: what compounds across apps, measured on 11 apps, why the foundation modules do not yet, and the design of reuse across machines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r foundation modules An app's module prefix and Lake package were Prism<App>, so two apps wrote the same foundation modules under different names and Lake files that named different packages. LexLean's process store (SPEC 22.13) keys a process by its module's name and text and by the Lake files around it, so nothing two apps verified would have matched, not even the LexLean runtime. Every app now has the prefix Prism. Two apps' lakefile.toml, lake-manifest.json and foundation modules are the same bytes, and each app's own modules keep their own names (Prism.PaymentRequestApproved, Prism.DinnerSeats). Proved in the SDK image, the payment and seats apps compiled both foundation modules to the same .olean bytes. The rendered models' layout was checked again with lexlean fmt --check --all in the image: all canonical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
The first step toward Prism SDK proofs that compound across builds, kept within the line
docs/proposals/fast-verified-builds.mddraws: processes and artifacts are reused by content address, and a verdict never is.The first version of this PR skipped
lexlean verifyand reused the verified record of an unchanged model. That carried a verdict across runs, which the proposal's non-goals and #69 rule out, so it is reverted here (3689e6d).What it does
/tmpgetsLEXLEAN_VERIFY_STORE=/tmp/lexlean-verify-store. That is LexLean's process store, SPEC 22.13 in Production build: parallel certificates, a process store by content identity, certificates named by their root's program lexlean#558:/tmpgets no store, since it would be written and never read.fast-verified-builds.mdcovering:module_prefix, and a module's name is part of its content identity), and the fix below;.oleanin its own kernel), trust, privacy, and refusing poisoned records.One module prefix for every app (8eabde4)
Each app's module prefix and Lake package used to be
Prism<App>. So two apps wrote the same foundation modules under different names, and Lake files that named different packages. SPEC 22.13 keys a process by its module's name and text and by the Lake files around it, so nothing two apps verified would have matched, not even the LexLean runtime.module_prefix = "Prism"and a Lake package of that name. Two apps'lakefile.toml,lake-manifest.jsonand foundation modules are the same bytes. Each app's own modules keep their own names:Prism.PaymentRequestApproved,Prism.DinnerSeats.Prism.Foundation.BytesandPrism.Foundation.View.Text.V1.Modelto the same.oleanbytes, as they already did for the runtime.Prism.<App>.dispatch.lexlean fmt --check --allin the image found all three pinned specs canonical, andjourney-template.test.mjsrecords the new digests.shared-foundation.test.mjs.Measured (the addendum has the tables)
Of one 54 s verify, 53% is the LexLean runtime, whose
.oleanbytes are the same in every app. That is what the store pays once per image and machine. #558 measured a warm run at 12 s against 387 s cold.Verification
host.test.mjs: with the cache volume, the store is named on the volume.hostandclitests pass (31).journey,journey-templateandshared-foundationpass (30). In the full local suite the only failure beyondmain's 54 was the layout digests, now re-checked and recorded.just vv.🤖 Generated with Claude Code