Repository navigation
Only Prism is implemented: a shrink-only ratchet - #5
Merged
Merged
Conversation
scripts/check-prism-ratchet.mjs is the ratchet of UOR-Foundation/template's audit-prism (first landed in UOR-Foundation/foundry#214), in plain Node like stitch's other checks. It counts non-Prism implementation (JS/TS, Rust, Python, shell, CSS, HTML, host Lean; non-blank, non-comment lines), measures it against the commit's first parent, and refuses a new non-Prism file and any net growth. src/layer1-uor/generated-model.js is the Prism model's output, which check-model refuses unless it is exactly generated, so it is not counted. The ratchet starts here: 20,474 lines in 101 files. It runs as its own workflow, ratchet.yml, with a depth-2 checkout so it can read the parent, and needs nothing installed. product/contracts.json lists the two new scripts and the workflow in its resource inventory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3LcnA6wEZHWvFUkLyK
Owner
Author
|
The Generated by Claude Code |
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
Why
Only Prism is ever implemented in the Prism ecosystem's repos. This is the same shrink-only ratchet that Foundry has (UOR-Foundation/foundry#214) and that the template is adding (UOR-Foundation/template#91). Here it's in plain Node, like stitch's other checks.
What
scripts/check-prism-ratchet.mjscounts non-Prism implementation: JS/TS, Rust, Python, shell, CSS, HTML and host Lean, non-blank and non-comment lines. It measures the tree against the commit's first parent and refuses a new non-Prism file or any net growth. A shallow clone that hides the parent fails.src/layer1-uor/generated-model.jsis the Prism model's output, andcheck-modelrefuses it unless it's exactly what the model generates, so it isn't counted.ratchet.yml, with a depth-2 checkout so it can read the parent and nothing installed. It doesn't touchpackage.jsonorprism.yml, which the facets bind, so no retained proof evidence goes stale.product/contracts.jsonlists the new files in its resource inventory.scripts/check-prism-ratchet-tests.mjsruns insidenpm test(5 tests).Planted defects
src/planted.jsgrew by 1 lines (20474 to 20475)src/prism-id.jsgrew by 1 lines; grown: src/prism-id.js +1npm test: 474 pass, 0 fail.Generated by Claude Code