Skip to content

Only Prism is implemented: a shrink-only ratchet - #5

Merged
afflom merged 1 commit into
mainfrom
claude/project-thread-54i4ck
Nov 15, 2026
Merged

afflom merged 1 commit into
mainfrom
claude/project-thread-54i4ck

Conversation

@afflom

@afflom afflom commented Nov 15, 2026

Copy link
Copy Markdown
Owner

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.mjs counts 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.js is the Prism model's output, and check-model refuses it unless it's exactly what the model generates, so it isn't counted.
  • The ratchet starts at the commit that installs it. That's this PR: 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 nothing installed. It doesn't touch package.json or prism.yml, which the facets bind, so no retained proof evidence goes stale. product/contracts.json lists the new files in its resource inventory.
  • scripts/check-prism-ratchet-tests.mjs runs inside npm test (5 tests).

Planted defects

Defect Result
a new src/planted.js rejected: new non-Prism file, grew by 1 lines (20474 to 20475)
one line added to src/prism-id.js rejected: grew by 1 lines; grown: src/prism-id.js +1

npm test: 474 pass, 0 fail.


Generated by Claude Code

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

afflom commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

The model job fails here with PP5007: application-lean timed out about 10 minutes into "Verify exact canonical source, Lean proofs and Prism artifact". The same step fails the same way on main at 68a9222 (run 43637510412), and the last two main runs are both red there. This PR changes no app/ source, so the failure isn't from this PR. ratchet, runtime and browser all pass.


Generated by Claude Code

@afflom
afflom merged commit 1607d53 into main Nov 15, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants