Skip to content

Read what is said to the Prism as W3C EMMA 1.0: checker, writer and reader - #162

Merged
github-actions[bot] merged 8 commits into
mainfrom
claude/project-thread-pza9mc
Nov 16, 2026
Merged

github-actions[bot] merged 8 commits into
mainfrom
claude/project-thread-pza9mc

Conversation

@afflom

@afflom afflom commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Requested by Alex · project thread

The input side of the chat redesign: every prompt or gesture is to be one W3C EMMA 1.0 document. This PR lands the guest that checks, writes and reads such documents. Nothing on the page calls it yet; the chat thread wires the composer to it.

What it adds

  • app/src/PrismEmma.lex.tex, a LexLean guest built by PrismPM (site/emma/guest/emma.wasm, loader site/emma/guest.mjs). Three requests, each a verb, a line end and a body:
    • check and a document: malformed, or conforms / violates <assertion ids>, then ; and the assertions whose features the document shows.
    • input and lines: the EMMA document those lines describe. The writer runs the checker on its own output, so the answer is the document, invalid (lines not in the grammar) or refused <report>.
    • read and a document: its lines, other when it is not a document of the writer's shape, or malformed.
  • The lines: ns <uri>, stage <id> (an interpretation in emma:derivation), best <id>, choice <id> (emma:one-of), set <annotation> <value>, from <id> [composite] (emma:derived-from), field <name> <text> with set and attr <name> <value> lines on it, literal <text>.
  • The oracle, pinned by SHA-256 in app/specs/emma/spec.json: the Recommendation of 10 February 2009, its schema, and the Implementation Report Plan.
  • ST-01 for w3c-emma-1.0: the plan's 67 assertions are read from W3C's own table by a LexLean generator (GenEmma in generators/standards) into test/standards/generated/w3c-emma-1.0.json. 63 are enforced, 4 are debt.

How it is held

The plan publishes assertions but no test documents, so the acceptance vectors are the Recommendation's own examples: all 69 <pre> blocks that open emma:emma, byte for byte. PrismPM runs them when it builds the guest and GU-01 holds the pinned wasm to them.

  • check: 62 conform; 4 are not well-formed as W3C publishes them (14, 27, 65, 77); 2 elide lattice arcs with ... and break 603, 604 and 609 as written (17, 18); 1 elides its interpretation and breaks 910 (1).
  • read, input: 28 of the documents already have the writer's shape. Each is read into lines, written again from those lines, read back to the same lines, and checked to the same verdict. The other 41 answer other or malformed.
  • No Recommendation document of the writer's shape carries a plain attribute on a payload element, so no vector holds the attr line. It exists for ISO 24617-2 dialogue acts, and the chat thread's oracle documents are to hold it.

PrismPM compiles a guest's vectors within a fixed 600 s, so the vectors are eight sets over the same module (emma, emma-annotations, emma-read, emma-input, emma-written, emma-written-check, emma-other, emma-other-annotations). All eight builds give the same wasm, which every entry pins.

Each expected answer was also reached outside the guest by a conforming XML parser (expat) reading the same bytes. During development the guest and that reference also agreed on altered copies of the examples; those are not kept and are not what the PR is verified on.

Debt (4 of 67)

  • 606: epsilon arcs carry no content other than emma:info; nothing in a document distinguishes a broken one.
  • 2510: emma:dialog-turn appears only in example 65, which is not well-formed as published, so no vector shows it.
  • 2600 and 2601: annotations holding across emma:one-of members and along emma:derived-from. Inheritance is read for emma:medium and emma:mode only.

Gates run locally

ST-01 against main, GU-01, GN-01, parts, and just fmt-check model template-check lint test in the locked SDK all pass on the head commit. HW-01 passed in CI on the first commit; the second adds only LexLean source, model records and built outputs.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Asa3PY5iLzL1dgBV4ok1H

app/src/PrismEmma.lex.tex reads one EMMA document ("check", a line end, the
document) as namespace-aware XML and answers "malformed", or "conforms" or
"violates" with the Implementation Report Plan assertions it breaks, then the
assertions whose features it shows.

The plan publishes no test documents, so the guest's acceptance vectors are
the Recommendation's own: all 69 <pre> blocks that open emma:emma, byte for
byte, in two sets over one wasm (PrismPM compiles a guest's vectors within a
fixed time). Four are not well-formed as published, two elide lattice arcs
and one elides its interpretation; they are answered as such.

ST-01 measures w3c-emma-1.0 from the plan's own table, read by a LexLean
generator (GenEmma, generators/standards): 67 assertions, 63 enforced by the
guest's vectors, 4 debt (606, 2510, 2600, 2601).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PY5iLzL1dgBV4ok1H
@afflom afflom self-assigned this Nov 15, 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

The emma guest gains two requests beside 'check'. 'input' and lines
answers the W3C EMMA 1.0 document they describe, and runs the checker on
it first: a document that would break an assertion is refused with the
checker's report. 'read' and a document answers the lines of a document
of the writer's shape, or 'other'.

Vectors are the Recommendation's own: the 28 documents that already have
the writer's shape are read, written again from their lines, read back
and checked; the rest answer 'other' or 'malformed'. They are held in
six further sets over the one module, all pinning the same wasm.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PY5iLzL1dgBV4ok1H
@afflom afflom changed the title Read what is said to the Prism as W3C EMMA 1.0: the checker guest Read what is said to the Prism as W3C EMMA 1.0: checker, writer and reader Nov 15, 2026

afflom commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

page / gates is red for a reason outside this diff. tools/oracle/gen.py line 122 downloads each pinned oracle source live, and one of the hosts now answers the runner HTTP Error 403: Forbidden.

  • Attempt on a9c611a at 23:19Z: HW-01's oracle producer ran clean, then 25 minutes later the same download failed inside test/handwritten/gate.test.mjs and test/oracle/read.test.mjs (3 of 280 tests).
  • The one re-run at 00:02Z: the same 403, this time already in the HW-01 step.

This PR does not touch tools/oracle/, app/specs/oracle/ or either test. Everything else on the head commit passed: acceptance, headless acceptance, devcontainer replay, the proof build, PV-01, Lighthouse, the window size classes and FR-03.

The lasting fix is to read the pinned oracle texts from the repository instead of the network, as #136 did for the standards texts. That belongs to the gates work, which I have told. No further re-run from here until that lands or the host recovers.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Merge train: 4c99ad5: not merged, because it conflicts with main (388fefa) 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

…and guests side by side

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

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

Copy link
Copy Markdown
Contributor

Merge train: b9bad80: not merged, because the fast gates or the browser acceptances refuse it merged with main (0f9d804) and the pull requests the train takes before it; see run 43828238501. Fix it on this branch (merge main first) and the train tests it again.


Generated by Claude Code

generators/standards is shared by every standards thread and collided on
each merge. GenEmma now builds as generators/emma, with the few helpers
it took from GenWcag and GenIrp under its own names.

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

Copy link
Copy Markdown
Contributor

Merge train: c94125d: not merged, because its check "page / gates" ended cancelled 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

@github-actions

Copy link
Copy Markdown
Contributor

Merge train: b6b09c2: not merged, because it conflicts with main (dfbb311) 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

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PY5iLzL1dgBV4ok1H
@github-actions
github-actions Bot merged commit da96880 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 a507f8268a8fbf91964130677f068e468f1705f1.

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/43919204957

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