Skip to content

PrismMessage: all 461 tests of the Unicode MessageFormat 2 suite - #167

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

github-actions[bot] merged 4 commits into
mainfrom
claude/project-thread-ugoxb1

Conversation

@afflom

@afflom afflom commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Requested by Alex · project thread

Builds on #159 (its branch is merged in here) and takes the message formatter from 326 to all 461 tests of the Unicode MessageFormat 2.0 suite at LDML 48.2 (unicode-org/message-format-wg 7f142fb).

What changed

  • app/src/PrismMessage.lex.tex: :number, :integer, :offset, :percent, :currency, :date, :time, :datetime, plural and ordinal selection, exact-key matching, the bad-variant-key and bad-option checks, and Normalization Form C for names and keys.
  • Data comes from pinned sources only, compiled into the module as byte tables: Unicode CLDR 48.0.0 (plural and ordinal rules read as CLDR writes them, number symbols and patterns, currency digits and symbols, Gregorian names and patterns, time zone formats) for en and fr, and the Unicode Character Database 17.0.0 for NFC. app/specs/message/spec.json data pins every source file and every table by SHA-256.
  • Guests: one wasm, three vector sets (message syntax.json, message-rules the other files, message-functions the files under functions/), because one build holds about 25 KB of vectors. The debt list is gone. The format and parts verbs keep their request and answer shape; a request may now also carry timeZone.
  • ST-01: the specification text and the 16 suite files are vendored at their pinned hashes (app/specs/standards/texts, app/specs/message/upstream). A new LexLean generator mftests in generators/standards (GenMessage) writes one requirement per test into test/standards/generated/unicode-messageformat-2/. The register entry is no longer unpinned: 461 requirements, 461 enforced, 0 debt.

Checked

  • All three guest builds in the locked SDK pass their acceptance vectors and give the same wasm; the suite run through that wasm: 461 of 461.
  • Cross-checks outside the suite: Unicode's NormalizationTest.txt (100,170 checks, none bad), CLDR's own plural samples for every locale (7,111, none bad), number and date text against ICU 78 / CLDR 48.
  • Local gates: realize, ST-01, parts, product, GU-01 (21 current), GN-01, HW-01 (no hand-written file added or grown), site/router/router.test.mjs.

Scope notes

  • Locales served: en and fr; any other locale is served as en. Dates are Gregorian; a time zone is UTC or a fixed offset. Number options follow ECMA-402's digit options, which the specification points to.
  • The engine source is still emitted from the small typed language kept in the project's files, as in Chat sentences as Unicode MessageFormat 2, formatted by a guest held to Unicode's test suite #159. Moving that emitter and the CLDR/UCD table derivation into generators/ as LexLean programs is the next slice; until then the table hashes in the spec are the record of what was compiled in.

Generated by Claude Code

Number, integer, offset, percent, currency, date, time and datetime
functions, plural selection read from CLDR's rules, and NFC for names
and keys, from tables compiled out of CLDR 48 and UCD 17 (pinned in
app/specs/message/spec.json). The suite is vendored and a LexLean
generator writes its ST-01 inventory.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3NQUJ3moEXQ4ggBqiP
…to claude/project-thread-ugoxb1

# Conflicts:
#	app/specs/guests/spec.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 check: QR-05 (test/product/start.test.mjs), restart took 3,194 ms against a 3,000 ms budget in the second pass. The first pass of the same run, on the same bytes, took 2,562 ms.

What I traced: the only thing this PR adds to page start is a larger message guest (374 KB, was 111 KB), which site/router/answer.mjs opens at import. Measured in Node, opening it takes about 4 ms for either wasm and a format call takes 0.15 ms for either, so the guest does not account for a 600 ms swing. Other runs in the same hour measured 2,011 to 2,514 ms for this check, so the runner's spread alone is about 500 ms against a budget with little room.

No re-run requested: this PR is a draft until #164 merges, and the merge of main that follows runs every check again.


Generated by Claude Code

@afflom
afflom marked this pull request as ready for review November 16, 2026 06:25
@github-actions
github-actions Bot merged commit d8d530b 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