Repository navigation
#241 AU-14: locate finds the environment the structural parser opens - #287
Conversation
…ce holds (#241) A source's module is the environment the structural parser opens. The case sweeps every committed source the parser reads and compares what locate finds with what the parser opens, then plants a tooling and a core module whose strings quote the semantic and tooling markers, with and without their end markers, and one whose body holds an unescaped end marker. On release/v0.5 it fails at the first plant: the tooling module quoting the semantic begin marker is found as no module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
locate read a module by text search: for each kind in the order semantic, tooling, core, the first begin marker in the text and the last end marker. A tooling or core module whose strings quote an earlier kind's marker was found as that kind or as no module, so the SDK refused it, the identity of the embedded tree took its notation bytes silently, fmt left it in another layout (and fmt --check passed it), and CoreModule::from_source refused it. It now walks the control atoms as the scanner reads them, where the escape of a backslash is one atom, takes the first environment after the lexlean envelope, and ends the body at the first end control, which must close it: the module the parser opens. Every committed source classifies as before. The case's expected data form now starts after the opening marker, and its check that the core notation quotes a two-marker string escapes every backslash; neither was reached before the first plant failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…241) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RP-11 reads the capability table's AU-01..AU-13 range against the register's last AU ID, which AU-14 now is, and the count sentence against the register size. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Pushed fe5d927 (README only): the capability table range is now |
|
Maintainer: read, and in the Generated by Claude Code |
|
Maintainer review of
The push: a CHANGELOG Unreleased bullet for AU-14/#241 ending "Register 444", the line's convention (see the #244 entry). A doc line on Generated by Claude Code |
|
Maintainer: merged into Generated by Claude Code |
…robe; the probe's target add runs behind .github/retry.sh Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both sides added at the CHANGELOG Unreleased top and the VERIFICATION end; both are kept in the order the line landed them. The register is 445 with AU-14 (#241): README count, SPEC.md §31 total (regenerated), CHANGELOG. The AU-14/#241 Unreleased bullet that #287 lacked is added, ending Register 444, before this change's bullet, which ends Register 445. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…runtime-bounds CHANGELOG and VERIFICATION keep both sides, the line first. README and the PF-24 entry count 445 registered IDs (AU-14 landed on the line). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e-116-overflow-bound CHANGELOG keeps both sides, the line first; VERIFICATION auto-merged. README counts 448 registered IDs (AU-14 and RP-17 landed on the line); SPEC.md takes the line and is regenerated by validate-model --write. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fixes #241 on the v0.5 line.
lexlean::surface::module::locatefound a module by text search: for each kind in the order semantic, tooling, core, it took the first\begin{<kind>}and the last\end{<kind>}. It now finds the module the structural parser opens. It walks the control atoms the way the scanner reads them, where the escape\\is one atom. It takes the first environment after\begin{lexlean}and ends the body at the first\endcontrol, which must close that environment. A marker that a string quotes (\\begin{semanticmodule}in the notation) is therefore never a module's marker.Row (R3)
AU-14(build, suiteauthoring, sections §17.21, §21.2, §24.8). It is added inspec/src/IdsAU.lex.tex, with a §17.21 bullet inChapter17.SPEC.md,model/ids.tomlandCONFORMANCE.mdare regenerated, and the register now has 444 rows.Scenario and case
The
@AU-14 @buildscenario is infeatures/suites/authoring.feature. Theconformance_au_14case does three things:.lex.texthe structural parser reads, it checks thatlocatefinds the kind, body and data range the parser opens. Thespec/chapters are in this set: they are semantic modules that quote the tooling and core markers.tests/tooling/corewith a string quoting the semantic begin marker, or both semantic markers). Three are core modules (theAU-10small module with a string node quoting the semantic begin marker, both semantic markers, or both tooling markers). Each must read throughsdk::read_moduleandmodule_kindas its own kind. Each must contribute its data form throughidentity_bytes, with the expected bytes built from the parser's range, not fromlocate. Each must havefmtrestore its canonical notation from another layout. The tooling plants are linked withwith_tooling. The core plants go through the engine, wherefmt --checkmust giveLLL1003, andCoreModule::from_sourcemust decode them.\end{semanticmodule}in a core body. The parser must refuse it withLLP2003, andlocatemust find no module.Commit 3497787 (row, scenario, case) fails on the unfixed
locateat the first plant:Callers exercised
These are probe results on
release/v0.52959a4d, before and after the fix. Full table inVERIFICATION.md.surface/identity.rs:35fmt.rs:1050fmt --checkpasses itfmt --checkisLLL1003ir/core.rs:747a native core source holds exactly one core payloadsdk::read_modulecalculus/rust/scaffold.rs:481lexlean check/fmt --checkon an adapter copyLLT4013LLT4013(the CLI refuses tooling outside the embedded projects)The old and the fixed
locateagree on every one of the 881 committed sources, of which 819 hold a module.Plants (VERIFICATION.md)
Each plant is one edit of the fixed
locate, undone before the next, and each turnsconformance_au_14red:spec/src/Chapter16.lex.tex.Run locally (WSL, Linux x86-64)
cargo fmt --all -- --checkpassed.cargo xtask validate-modelpassed.cargo xtask validate-spec-linkspassed with 444 rows.cargo xtask check-test-inventorypassed.cargo clippy -p lexlean -p repo-conformance --all-targets --all-features -- -D warningspassed.cargo test -p lexlean --libpassed 211 tests.conformance_au_01toconformance_au_14passed all 14.bddmeta-gate passed 5 tests.The rest of
just vvwas not run locally.The fix commit also corrects two assertions of the case's own: the expected data form now starts after the opening marker, and the two-marker quote check escapes every backslash. Neither is reached before the red line above.
🤖 Generated with Claude Code