Repository navigation
BS-29: the canonical diagnostic as language-1.2 source (first slice of the driver, #274) - #455
Closed
humuhumu33 wants to merge 3 commits into
Closed
humuhumu33 wants to merge 3 commits into
humuhumu33 wants to merge 3 commits into
Conversation
The first slice of the driver as source (#274): the row (register 478 -> 479, the §31 table, the RP-07 check and its case), the scenario, the §17.23 prose, the CHANGELOG entry, the README's claim, the CI part, and the case, conformance_bs_29, which holds Diagnostics.diagnosticText, sortDiagnostics, and reportDiagnostics to Diagnostic::to_json, sort_canonical, and LexLeanError::from_diagnostics(..).bounded(..) on hand-built diagnostics that reach every class of failure and both sides of the cap, on the 306 committed expected diagnostics of the negative fixtures, and on seeded sets, with 23 planted defects each named by its vector. VERIFICATION.md records the first run: the evaluator agrees on 472 texts, 513 sorts, and 1,422 reports, rustc on 4,641 runs, and every plant is detected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bootstrap/src/Diagnostics.lex.tex: diagnosticText writes the canonical JSON of a diagnostic with the standard library's escaper; sortDiagnostics sorts by an order-preserving byte key with the stable sortByKey; reportDiagnostics gives the failure's exit code and caps the diagnostics with LLS8002. Lean verifies the module and each root is eligible with exactly allocation and overflow. The entrypoint, the lock, the three export roots, and the project README follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row's sections cell named §17.21, where the notation is; the diagnostic is §20.1 and the failure it makes §24.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Landed in #480 (merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #274: the canonical diagnostic and the failure it makes (
BS-29,diagnostic.rsanderror.rs) as language-1.2 source, with rootsdiagnosticText,sortDiagnostics, andreportDiagnosticsofDiagnostics. It is the first slice of the driver, and it stacks on nothing: the branch isrelease/v0.4after #394, and the module imports only the standard library.Design
diagnosticTextwrites the canonical JSON ofDiagnostic::to_jsonasto_canonical_stringdoes: members in the order of their keys, strings through the standard library'sescapeString, counts in decimal.sortDiagnosticssorts assort_canonicaldoes, by a byte key whose order is the oracle's tuple order (the path with each nul byte doubled and ended by two nul bytes, the byte start in eight bytes big-endian, the seven bytes of the code, the message), with the stablesortByKey.reportDiagnosticsisLexLeanError::from_diagnostics(..).bounded(..): the exit code of the most severe class of the codes, and past the cap the first diagnostics and theLLS8002diagnostic, whose class then counts. None of the three admitsrecursion.Evidence
Measured on the normative host on
release/v0.4at4318b17b8:Lean verifies the module, and the eligibility report gives each root exactly
allocationandoverflow. The first run found one fault of the module, which VERIFICATION.md records: the keyed list was built in reverse before the stable sort, so diagnostics with equal keys came out reversed. A plant now holds it.Gates at the head
cargo fmt --check,validate-model(479 IDs),validate-spec-links(479 rows), clippy on the workspace with-D warnings, and the 17 RP cases pass.CI is expected red until the regeneration
The three packages are not committed, so
conformance_bs_29stops at the stack-bound step after the differentials above have agreed. The regeneration owes them, the lock, the bootstrapexpected/records, and the recount of the bootstrap count cases.🤖 Generated with Claude Code