Skip to content

BS-22, BS-23, BS-24: the lexer, layout algebra, and generic notation as language-1.2 source (#269) - #451

Merged
humuhumu33 merged 24 commits into
release/v0.4from
claude/issue-269-surface-notation
Nov 10, 2026
Merged

humuhumu33 merged 24 commits into
release/v0.4from
claude/issue-269-surface-notation

Conversation

@humuhumu33

Copy link
Copy Markdown
Contributor

Part of #269: the next three slices of the front end as language-1.2 source, regenerated together and landing as one:

Row Module Roots Oracle
BS-22 SurfaceLex lexText, quoteText surface::lex
BS-23 SurfaceDoc renderDoc surface::doc::render
BS-24 SurfaceGeneric parseGeneric, printGeneric surface::generic::{parse, print}

It supersedes #416, #417, and #418, which were stacked on each other and could only be regenerated together: each member's export, records and counts depend on the packages of the ones below it. Based on #395 (BS-21), whose regenerated head this branch merges, so the diff is these three members only.

Evidence

Measured on the normative host (WSL Ubuntu, Rust 1.97.1, Lean 4.32.1), on BS-21 over release/v0.4 after SL-13:

Case Passed whole, stack measured Evaluator Planted defects
conformance_bs_22 1,847 s 1,829 lexes and 1,363 quotes agree, rustc 5,740 46 of 46
conformance_bs_23 2,378 s 1,807 runs agree, rustc 6,555 21 of 21
conformance_bs_24 1,894 s 1,080 reads and 607 prints agree 32 of 32

The first runs found and fixed: a source defect in BS-24 (the printer's rank table spelt axioms as axoims), and plants in BS-22, BS-23, and BS-24 whose vectors never reached them. VERIFICATION.md records each.

Regeneration

One regeneration at verify width 1 on the combined tree: the production export (2,893 s), the three cases above, the build oracles, and the bootstrap verify records (8,074 s; UOR Atlas skipped on this host as before). printGeneric admits recursion, and its stack row (bootstrap/print_generic, 1,376,256 bytes debug) is in tests/stack-bounds.json. The five new packages move the counts of BS-05 to BS-08 and BS-13 to BS-15 from BS-21's tree (300 -> 305 manifests): 20 constants, written in one pass by the count writer of #442, which placed every number. BS-11, BS-12, and every mutant draw are unchanged.

Gates at the head

cargo fmt --check, validate-model (482 IDs), validate-spec-links (482 rows), the 17 RP cases, the locks current, and the nine bootstrap count parts under LEXLEAN_COUNTS=fast with nothing moved. The nine parts run whole on CI.

Closes #423, closes #424, closes #425 (the BS-22, BS-23, BS-24 delivery slices). #269 remains open.

🤖 Generated with Claude Code

humuhumu33 and others added 20 commits November 3, 2026 11:29
The row is the second slice of #269: `surface::lex::{lex, quote}` as
language-1.2 source. The case fails until the module is an entrypoint of the
project; the source follows. The row's statement carries no counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`lexText` and `quoteText` scan by loops under `iterate_until` and join the
pieces of a string once, so neither recurses and a string costs its length.
White space is `AxiomOutput.whiteLength`, which BS-01 holds to the oracle's
`char::is_whitespace`. The module is an entrypoint and the two roots are
exported; the lock is this tree's, and the regeneration replaces it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The row is the third slice of #269: `surface::doc::render` as language-1.2
source. The case fails until the module is an entrypoint of the project; the
source follows. The row's statement carries no counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`renderDoc` keeps the oracle's two stacks as lists and pops one node at a time
under loops bounded by the number of nodes. A concatenation is a chain of
cells, so putting its parts on a stack is two items and nothing recurses over a
document. The module is an entrypoint and the root is exported; the lock is this
tree's, and the regeneration replaces it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
BS-22 stacks on BS-21. The conflicts keep that tree with this member's own
edits applied over it: the SurfaceLex entrypoint and module, the register
at 480 IDs (SPEC.md, the README, the RP-07 check and its case), the
README's bootstrap row through BS-22, the CHANGELOG entry, and the BS-22
subsection of VERIFICATION.md after BS-21's. The lock and CONFORMANCE.md
are the tree's and are rewritten next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es it

The first run of conformance_bs_22 (293 s, on BS-21 and SL-13): every
differential agrees (1,828 lexText and 1,362 quoteText runs under the
evaluator, 5,738 under the pinned rustc), and 45 of the 46 plants were
detected. "the space is a control character" changes the check of
scanStep, which meets a byte only where a piece of a string starts; a
run of plain bytes is read by rawStep under its own bound, so the plant's
vector "a b" never reached it. The plant's vector is now a string that
starts with a space, " a"; the lexer is unchanged. All 46 are detected,
and the case stops at the stack-bound step until the regeneration
commits bootstrap/lex_text and bootstrap/quote_text. VERIFICATION.md
says so in place of "the case has not run".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BS-23 stacks on BS-22. The conflicts keep that tree with this member's own
edits applied over it: the SurfaceDoc entrypoint and module, the register
at 481 IDs (SPEC.md, the README, the RP-07 check and its case), the
README's bootstrap row through BS-23, and the CHANGELOG entry. The lock
and CONFORMANCE.md are the tree's and are rewritten next.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…h them

The first run of conformance_bs_23 (705 s, on BS-22, BS-21 and SL-13):
the evaluator agrees on 1,807 runs and the rendered package under rustc on
6,555, and 18 of the 21 plants were detected. The three missed were each
the vector's fault, not the layout's: the delete plant was tried at the
group's exact width, where one column less still fits (now one column
short); the past-the-width plant on a group with visible content, which
fails to fit either way (now a group of one soft break, whose flat form
takes no column); and the fuel plant on a concatenation, whose parts the
node budget counts twice (now a single text, one node and one step). All
21 are detected, and the case stops at the stack-bound step until the
regeneration commits bootstrap/render_doc. VERIFICATION.md says so in
place of "the case has not run".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The row is the fourth slice of #269: `surface::generic::{parse, print}` as
language-1.2 source over the standard library's Json. It is stacked on BS-22,
BS-23, and the members SL-11, SL-12, and SL-14. The case fails until the module
is an entrypoint of the project; the source follows. The statement carries no
counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`parseGeneric` lexes with lexText and reads the tokens with an explicit stack of
frames, so it admits no recursion; the object's members are sorted when it
closes. `printGeneric` builds the document by the structural recursion the
standard library's writer uses and lays it out with renderDoc. The module is an
entrypoint and the roots are exported; the lock is this tree's, and the
regeneration replaces it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`SOURCE` was never used, and the lint of the first draft refused it as dead
code. It was the only error of that step, so the case compiles.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…o BS-24

BS-24 stacks on BS-23. The conflicts keep that tree with this member's own
edits applied over it: the SurfaceGeneric entrypoint and module, the register
at 482 IDs (SPEC.md, the README, the RP-07 check and its case), the
README's bootstrap row through BS-24, and the CHANGELOG entry. The lock
and CONFORMANCE.md are the tree's and are rewritten next.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the merge

The bootstrap lock follows the SurfaceGeneric entrypoint, CONFORMANCE.md is
written from the model with the BS-24 row, and the three places that named
the standard library's Json reader `SL-12` name it `SL-13`, as #415 renamed
it (`SL-12` stays Host's reservation).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…'s vector

The first run of conformance_bs_24 (259 s, on BS-23, BS-22, BS-21 and SL-13):
the evaluator agrees with the oracle on 1,080 reads and 607 prints, and 31 of
the 32 plants were detected. Two faults. The printer's rank table spelt the
key `axioms` as `axoims` (0x61786f696d73), so a seeded object printed it
after an unranked key where the oracle prints it before; the literal is now
0x6178696f6d73. The plant `a tag need not be a name` named `a b`, two bare
words that never reach the test of bareness; it now names `a word of digits
and a letter` (`1a`), which the oracle refuses and the planted reader admits.
All 32 are detected, and the case stops at the stack-bound step until the
regeneration commits bootstrap/parse_generic. VERIFICATION.md says so in
place of "the case has not run".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… of print_generic

`cargo xtask check-production-export --write` at verify width 1 (2,893 s) on
BS-24 over BS-23, BS-22, BS-21, and SL-13: the bootstrap export gains the
parse_generic and print_generic packages, every package records the merged
tree's digests, and the lock follows. conformance_bs_24 then passed whole
with LEXLEAN_MEASURE_STACK=all (1,894 s), which measured the row of
bootstrap/print_generic in tests/stack-bounds.json (PD-08).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cargo xtask check-golden --write` on the regenerated export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`LEXLEAN_EXAMPLES_PART=without:uor-atlas cargo xtask verify-examples
--write` at width 1 (8,074 s); the UOR Atlas example is skipped on this host,
as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…S-13 to BS-15

The committed export gains six packages (those of BS-21 to BS-24 on this
tree), so the committed manifests, packages, programs and crates each grow by
six and the corpora the cases draw from them follow: 20 constants in seven
cases, their §31 rows, register statements and scenarios, and the §17.23
prose that repeats them. Measured under LEXLEAN_COUNTS=fast with the count
writer of #442 applied and removed again; the writer placed every number.
BS-11, BS-12 and every mutant draw are unchanged. VERIFICATION.md carries
the landing's table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BS-22, BS-23, and BS-24 were regenerated together on a tree that holds
BS-21's source byte for byte, so this tree's export, build oracles, verify
records, lock, stack bounds and counts are a superset of BS-21's and are
kept; the rows, statements, scenarios and §17.23 prose carry the counts of
the six front-end packages. VERIFICATION.md keeps BS-21's count section, and
the section of BS-22 to BS-24 counts from BS-21's tree (300 -> 305). The
records of BS-21 to BS-24 now say each case passed whole on its regenerated
tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
humuhumu33 added a commit that referenced this pull request Nov 9, 2026
BS-27 stacks on the combined landing of BS-22, BS-23, and BS-24 (#451), whose
export, records and counts it takes; the merge is clean. The bootstrap lock
follows the SurfaceTooling entrypoint on the merged tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@afflom afflom mentioned this pull request Nov 9, 2026

@afflom afflom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bounded static review of exact head c074339, stacked on #395 at 8b9715b. Two count descriptions need reconciliation with this head’s factories:

  • P2 — BS-15: rust_package.rs constructs (324 + 182 + 2000) + (305 + 137 + 305) = 3253 normative rustc runs. The BS-15 statement/scenario and mirrors in model/ids.toml, features/suites/bootstrap.feature, SPEC §31 and CONFORMANCE still state 3190. Please update the authoritative descriptions and official projections while retaining all cases. The earlier #395 target of 3238 is specific to that parent; this head has advanced further.
  • P2 — BS-07: SPEC’s prose near line 8420 states 1392 vectors while the same sentence now says 356 per root. The four roots and rust_lower.rs factory imply 4 × 356 = 1424. Please reconcile that prose with the current factory; #395’s earlier 1404 target is likewise parent-specific.

All five new package inventories are present, so this review does not carry forward a missing-products finding. Package presence, effect rows and named-case wiring were checked statically; the author’s runtime durations and full product/certificate closure were not independently re-executed here. Implementation and qualification remain with the existing owner; this is not final acceptance or broad #269 completion.

@humuhumu33
humuhumu33 changed the base branch from claude/issue-269-frontend-grammar to release/v0.4 November 10, 2026 05:20

afflom commented Nov 10, 2026

Copy link
Copy Markdown
Member

@humuhumu33 Coordinating the next release/v0.4 candidate: #395 landed at c66f83d two minutes before #459 finished its full 50-job qualification. #459 is therefore being reconciled onto the new accepted source before its next gate; it retains the test-only BS-15 optimization and complete existing coverage. The observed Linux BS-15 duration fell from 10,304.13 to 6,090.03 seconds on its earlier qualified tree.

Please coordinate the next landing order with #459 so we do not invalidate another long final-tree run. We are preserving your #451 work and not starting duplicate parser/regeneration work. Stacking the next refresh on the reconciled #459 candidate, or qualifying after its landing, would carry the optimization forward without competing candidate waves. I will link the reconciled head here once source review is complete. #405 remains the accepted-history forward lane; this unmerged feature is not being imported into it.

humuhumu33 and others added 4 commits November 10, 2026 10:55
The conflicts are generated bootstrap files only, taken from the line and
regenerated in the commits that follow. The three surface parts join the
Intel print lane that #450 requires of every BDD part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cargo xtask check-production-export --write` at verify width 1 on the merge
of release/v0.4 at c66f83d (BS-21 over #394), which re-issues every package
of the bootstrap project; the lock follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cargo xtask check-golden --write` on the regenerated export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-21 landed

`LEXLEAN_EXAMPLES_PART=without:uor-atlas cargo xtask verify-examples
--write` at width 1; the UOR Atlas example is skipped on this host, as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

afflom commented Nov 10, 2026

Copy link
Copy Markdown
Member

Qualification coordination for new head 441338a: live GitHub shows both PR-event CI42827654603 and manual-dispatch CI42827628679 running the full matrix on this same head, created ten seconds apart. They are separate runs and their jobs must not be combined for acceptance. The PR-event run is the candidate qualification record I am tracking; please account for the concurrent manual run when deciding whether further CI work is necessary. I have not canceled, rerun or dispatched either run.

The actual c66f base plus 441338a synthetic merge 2e4c70d has the same c0148ddd tree as the head. I am checking the prior count findings against this updated source. Existing #459 landing-order coordination6759909869 still applies: #459 remains unmerged and fully qualified on c66f, so please coordinate accepted landing order before either candidate invalidates the other’s base. No competing source or regeneration work is being started.

@afflom afflom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two prior P2 count findings persist at exact head 441338a on actual c66f:

  • BS-15: rust_package.rs is unchanged from reviewed c074. It constructs (324 + 182 + 2000) + (305 + 137 + 305) = 3253 normative rustc runs, while model/ids.toml, features/suites/bootstrap.feature, SPEC §31 and CONFORMANCE still say 3190. Please reconcile the authoritative descriptions and official projections without removing cases. Parent #395’s 3238 is not the count of this head.
  • BS-07: rust_lower.rs has 356 vectors across four rustc legs, totaling 1424. SPEC near line8428 still says “1,392 vectors (356 per root...)”. Please reconcile the prose with this factory; parent #395’s 1404 is likewise a different tree.

The accepted c66f Intel workflow is retained, with the three surface parts added to its print lane. The merge history retains actual c66f and the GitHub synthetic merge tree equals the head tree c0148ddd. This bounded source review does not establish full generated-product closure or final qualification. New PR-event CI42827654603 and manual CI42827628679 remain separate; completed jobs must not be aggregated between them. No regeneration or runtime evidence was repeated. Existing owner retains implementation/qualification; #269 stays open and #423/#424/#425 are not yet closed.

@humuhumu33
humuhumu33 merged commit 700196c into release/v0.4 Nov 10, 2026
109 checks passed

afflom commented Nov 10, 2026

Copy link
Copy Markdown
Member

Post-landing readback: GitHub records an external merge at 16:59:07 UTC as 700196c. Its ordered parents are actual c66f83d + final head441338a; its c0148ddd tree equals the reviewed head and tested synthetic2e4c70da.

Independent terminal CI review confirms PR-event42827654603 attempt1 completed all54 jobs and600 steps successfully, including same-run honesty, all Atlas work/join, supported hosts and the Intel construction/lanes/receipt aggregate. Exact-head reproducibility42827654327 also passed. The separate manual42827628679 is excluded from these counts; no canceled jobs or other runs were aggregated, and no gate was repeated.

This records actual landing and CI evidence, not resolution of source review5843508086: BS-15 still claims3190 versus factory3253, and BS-07 prose still claims1392 versus1424. No final source clearance was submitted before this external merge. Full-body delivery review leaves #423/#424/#425 open pending the remaining acceptance disposition; broad #269 remains open. Existing owner retains the corrections. #459 now needs current-base reconciliation review before landing, and #405 remains the existing owner’s actual-history forward lane.

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