Skip to content

The prov guest: turn records checked against W3C PROV-CONSTRAINTS - #168

Merged
github-actions[bot] merged 9 commits into
mainfrom
claude/project-thread-85vrxq
Nov 16, 2026
Merged

github-actions[bot] merged 9 commits into
mainfrom
claude/project-thread-85vrxq

Conversation

@afflom

@afflom afflom commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Requested by Alex · project thread

What this adds

A LexLean guest, prov (site/prov/guest.mjs, module app/src/PrismProv.lex.tex), that judges a PROV-N document against W3C's Constraints of the PROV Data Model (Recommendation 30 April 2013). It is the check the chat's turn records have to pass.

  • Request: check, a newline, a PROV-N document (at most 4096 bytes).
  • Answer: valid; invalid and the numbers of the constraints that do not hold; malformed when the text is not PROV-N; unjudged when normalization would pass the guest's bounds (4,000 statements or 30,000 existential variables in one instance). unjudged is not a verdict.
  • It reads PROV-N, applies Inferences 5 to 21 to a fixed point, the uniqueness constraints 22 to 29 by unification, the ordering constraints 30 to 49 with strict cycles, typing 50 and impossibility 51 to 56, each bundle on its own.

The oracle

W3C's own PROV-N cases for the constraints (166 files, 99 PASS and 67 FAIL), listed by the working group's test page. Every source is pinned by SHA-256 in app/specs/prov/spec.json and kept at app/specs/standards/texts/<sha256>, so no gate fetches.

  • All 166 verdicts match.
  • The cases are the guests' acceptance vectors, byte for byte. One guest build holds about 110 vectors, so prov carries the valid cases and prov-invalid (the same module, the same wasm bytes) the invalid ones. Four cases W3C serves as two pairs of identical files are two vectors.

What the suite does and does not show

Each numbered rule was switched off in the checker in turn, to see which cases notice (shown in the spec).

  • Shown enforced, 14 rules: Inference 19 and Constraints 23 to 29, 42, 45, 52, 54, 55, 56. These are enforcedBy in ST-01.
  • Not shown, 42 rules: Definitions 1 to 4, Inferences 5 to 18, 20, 21, Constraints 22, 30 to 41, 43, 44, 46 to 51, 53. They are implemented, but no W3C case's verdict turns on them, so they are ST-01 debt and the oracle's gaps says why. They are not claimed as verified.
  • No case has a repeated bundle identifier, and PROV-N itself is registered without an inventory yet (unpinned).

Mechanics

  • generators/prov (LexLean, generator provrules) reads the Recommendation's 56 numbered definitions, inferences and constraints into test/standards/generated/w3c-prov-constraints.jsonl.
  • The guests are app/specs/guests/prov/prov.json and prov-invalid.json with their locks, and generators/guests/steps/prov.json writes the pin site/prov/guest.mjs (the layout of One file per guest; the train runs the browser acceptances and says why it waits #164).
  • No hand-written file is added: HW-01 reports none added or grown since main.
  • Run here: HW-01, ST-01 (with --base origin/main), GN-01, GU-01, PT-01, RZ-01, and the conformance suites guests, generators, privacy, standards, oracle.

Bounds

Made-up documents at the 4096-byte limit were used for capacity only, never as evidence of conformance: every shape tried is answered, the heaviest in about 10 seconds and 400 MB before answering unjudged. W3C's cases each take a few milliseconds and under 2 MB.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh

…es and inventory generator (work in progress)

The LexLean module PrismProv judges a PROV-N document against W3C
PROV-CONSTRAINTS; W3C's 166 PROV-N cases are pinned and kept, and are the
acceptance vectors of the guests prov and prov-invalid. The guests' wasm,
the generator program's binary and the standards register follow.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh
The guests prov and prov-invalid (one module, app/src/PrismProv.lex.tex) carry
W3C's 166 PROV-N constraint cases as acceptance vectors: the 99 valid ones and
the 67 invalid ones, since one guest build holds about 110 vectors. The request
is check, a newline and a PROV-N document; the answer is valid, invalid and the
constraint numbers, malformed, or unjudged past the guest's bounds.

generators/prov reads the Recommendation's 56 numbered definitions, inferences
and constraints into ST-01. The suite shows 14 of them enforced (a case's
verdict changes when the rule is switched off); the other 42 are debt, and the
oracle's gaps say why. PROV-N is registered without an inventory yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh
…-85vrxq

# Conflicts:
#	app/specs/guests/lock.json
@afflom afflom self-assigned this Nov 16, 2026
@github-actions

Copy link
Copy Markdown
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

@afflom
afflom marked this pull request as draft November 16, 2026 04:35

afflom commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

page / gates failed on one test of 281: test/product/start.test.mjs (QR-05), "opening again took 3195 ms to show the newest message, over the budget of 3000 ms". The other 279 passed.

This change does not touch what that test times: no page module loads the prov guest yet, and the diff adds only the model, its specs, pinned texts and a generator. #164's description records the timing budgets failing on main since #145 and #161. I have not re-run the job: this pull request is a draft until #164 merges, and the push that then merges main and moves the guest entries into the per-guest files runs the gates again. If QR-05 is still over budget on that run I will look at it there.


Generated by Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh
@afflom
afflom marked this pull request as ready for review November 16, 2026 06:26
@github-actions

Copy link
Copy Markdown
Contributor

Merge train: 1b37ac7: not merged, because it conflicts with main (0f9d804) and the pull requests the train takes before it. Fix it on this branch (merge main first) and the train tests it again.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Merge train: 0a4fffb: not merged, because it conflicts with main (7815f8e) and the pull requests the train takes before it. Fix it on this branch (merge main first) and the train tests it again.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Merge train: b5521ca: not merged, because it conflicts with main (e8a7ee4) and the pull requests the train takes before it. Fix it on this branch (merge main first) and the train tests it again.


Generated by Claude Code

Keeps the prov guest entries beside main's new parts, standards and
oracle records; the oracle gap for prov now points at the debt file so
the person generator's request stays inside its bound.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh

afflom commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

page / gates failed on 7777c31 in one suite only: test/router/labels.test.mjs, "QR-03 labeling-ms-per-100: 268 is above 250". That is a time measurement of the router's labelling on the runner. This PR changes nothing the test reads (router, reader, card or corpus), and the other 235 tests pass, the prov guest's among them. The fix for the QR-03 and QR-05 timing failures is in #179; once that is on main I will merge main here and the gates run again.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Merge train: 7777c31: not merged, because its check "page / gates" ended failure on this head, so it is not green; push to this branch to run it again. Fix it on this branch (merge main first) and the train tests it again.


Generated by Claude Code

Keeps the prov parts entries beside the EMMA records main gained.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh
With the oracle sources in their own files the prov gap carries its full
text again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N1XfPZYedNcr3hPNh
@github-actions
github-actions Bot merged commit 211a7ff into main Nov 16, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Live: this change is on the published page, as main fe7ec040132bcad07dcfafb0fa4dc2b07cd86c78.

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

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