From 9eb1554bf5f8c8a2e85584a5979b4aacbcc046e0 Mon Sep 17 00:00:00 2001 From: humuhumu33 Date: Tue, 10 Nov 2026 01:17:16 +0000 Subject: [PATCH 1/3] BS-30: the oracle of the terminal output, behind doc-hidden public functions cli.rs's own print_human_diagnostics is reached through the new doc-hidden public human_diagnostics_text, and wants_json and named_command become public and doc-hidden, unchanged, so that the bootstrap differential of BS-30 can call them. cli.rs is outside the compiler-semantics identity. Co-Authored-By: Claude Opus 5.5 --- crates/lexlean/src/cli.rs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/crates/lexlean/src/cli.rs b/crates/lexlean/src/cli.rs index 13de99c0ed..d68338dc15 100644 --- a/crates/lexlean/src/cli.rs +++ b/crates/lexlean/src/cli.rs @@ -286,6 +286,21 @@ fn palette(mode: ColorMode) -> &'static Palette { } } +/// The human diagnostic text of a failure as `run` writes it to stderr +/// (§20.6), with color or without; the oracle of the bootstrap's `BS-30`. +#[doc(hidden)] +#[must_use] +pub fn human_diagnostics_text(error: &LexLeanError, color: bool) -> String { + let mut out: Vec = Vec::new(); + let colors = if color { + &Palette::COLOR + } else { + &Palette::PLAIN + }; + print_human_diagnostics(&mut out, error, colors); + String::from_utf8(out).unwrap_or_default() +} + fn print_human_diagnostics(stderr: &mut dyn Write, error: &LexLeanError, colors: &Palette) { for diagnostic in &error.diagnostics { let _ = write!( @@ -369,7 +384,9 @@ pub fn explain_text(requested: &str) -> Option { /// Pre-scan argv for `--diagnostic-format json` (§20.6), so even a usage /// error is reported inside the one JSON result object. -fn wants_json(arguments: &[String]) -> bool { +#[doc(hidden)] +#[must_use] +pub fn wants_json(arguments: &[String]) -> bool { let mut previous: Option<&str> = None; for argument in arguments.iter().skip(1) { if argument == "--diagnostic-format=json" { @@ -385,7 +402,9 @@ fn wants_json(arguments: &[String]) -> bool { /// The subcommand named on argv, when any, for the JSON `command` field /// of a usage failure. -fn named_command(arguments: &[String]) -> &'static str { +#[doc(hidden)] +#[must_use] +pub fn named_command(arguments: &[String]) -> &'static str { arguments .iter() .skip(1) From 8fcfd49a90326d359f3b6945490c75aee28f774a Mon Sep 17 00:00:00 2001 From: humuhumu33 Date: Tue, 10 Nov 2026 01:17:16 +0000 Subject: [PATCH 2/3] BS-30: the register row, scenario, and case of the terminal output of diagnostics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The second slice of the driver as source (#274), on BS-29: the row (register 479 -> 480, 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_30, which holds CliOutput.humanDiagnostics, wantsJson, and namedCommand to cli::human_diagnostics_text, wants_json, and named_command on hand-built diagnostics and arguments, on the negative fixtures' committed diagnostics and commands, and on seeded ones, with 15 planted defects each named by its vector. VERIFICATION.md records the first run: the evaluator agrees on 817, 515, and 512 runs, rustc on 4,244, and every plant is detected. Co-Authored-By: Claude Opus 5.5 --- .github/bdd-parts.json | 3 + .github/vv-rows.json | 9 + CHANGELOG.md | 6 + CONFORMANCE.md | 1 + README.md | 4 +- SPEC.md | 23 +- VERIFICATION.md | 45 + crates/conformance/src/cases/bootstrap.rs | 2 + .../src/cases/bootstrap/cli_output.rs | 821 ++++++++++++++++++ crates/conformance/src/cases/repository.rs | 2 +- crates/conformance/tests/conformance.rs | 5 + features/suites/bootstrap.feature | 7 + model/ids.toml | 6 + xtask/src/spec_links.rs | 4 +- 14 files changed, 932 insertions(+), 6 deletions(-) create mode 100644 crates/conformance/src/cases/bootstrap/cli_output.rs diff --git a/.github/bdd-parts.json b/.github/bdd-parts.json index 08bc809e24..9b837f3aa0 100644 --- a/.github/bdd-parts.json +++ b/.github/bdd-parts.json @@ -25,6 +25,9 @@ "bootstrap-lower": [ "BS-07" ], + "bootstrap-cli-output": [ + "BS-30" + ], "bootstrap-diagnostics": [ "BS-29" ], diff --git a/.github/vv-rows.json b/.github/vv-rows.json index 8894ded0be..67891fe027 100644 --- a/.github/vv-rows.json +++ b/.github/vv-rows.json @@ -62,6 +62,15 @@ "memory_kib": "", "hints": "" }, + { + "part": "bdd-bootstrap-cli-output", + "recipes": "bdd", + "examples_part": "", + "bdd_part": "bootstrap-cli-output", + "width": "", + "memory_kib": "", + "hints": "" + }, { "part": "bdd-bootstrap-diagnostics", "recipes": "bdd", diff --git a/CHANGELOG.md b/CHANGELOG.md index de529de076..ff20201fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ workspace carried at those versions without a tag. ## Unreleased +- The human diagnostic output and the argument pre-scans of the command line as + language-1.2 source (SPEC.md §17.23, §20.6, §23, `BS-30`, #274; no new + diagnostic code, no change to the language-1.2 identity). `humanDiagnostics`, + `wantsJson`, and `namedCommand` of `CliOutput` return what + `cli::human_diagnostics_text`, `wants_json`, and `named_command` return; none + admits `recursion`. The register is 480 IDs. - The canonical diagnostic and the failure it makes as language-1.2 source (SPEC.md §17.23, §20.1, §24.5, `BS-29`, #274; no new diagnostic code, no change to the language-1.2 identity). `diagnosticText`, `sortDiagnostics`, and diff --git a/CONFORMANCE.md b/CONFORMANCE.md index 7b2335db78..2f6775efcc 100644 --- a/CONFORMANCE.md +++ b/CONFORMANCE.md @@ -78,6 +78,7 @@ the error registry does not sanction (R5, `ERRORS.md`). | `BS-16` | `build` | The GNAF request validation of SPEC.md §17.15 (`gnaf::validate`, with `universe_size`) is language-1.2 source in the `bootstrap/` project: `validateRequest` of `GnafValidate` is a production root eligible for `rust-std` with exactly its declared effects, over the projection of a request that validation reads (the length of the domain, the machine, the carrier's kind with each plan's preparations and the thresholds, the completeness evidence, the objective, the claim's class, and the scope) as first-order data, and returns the first violated rule in the model's order as the oracle's `serde_json` bytes, or nothing; on every host, its rendered `rust-std` package under the pinned rustc agrees with the Rust oracle `gnaf::validate` on the acceptance and on the rejection, to the byte, on the committed requests of `compiler/gnaf/`, the requests the committed certificate fixtures name, hand-built requests that reach each rejection, and seeded mutants of the committed requests; on the normative host, the root's lowered program under the calculus evaluator agrees with the oracle on the same corpus, each planted defect in the source is detected, and the certified package the production export publishes for the project is the committed one; loading a request (`gnaf::load`), the universe identity, the answer, and certification are outside the claim. | | `BS-20` | `build` | The canonical LaTeX of a tooling module of SPEC.md §17.20 (`backend::tooling::render_latex`: the fixed document frame and, for each declaration in order, its title, its kind, and the lines the Lean printer of the same file spells for its types, signatures, and terms, every line escaped by `tex_escape`) is language-1.2 source in the `bootstrap/` project: `renderToolingLatex` of `ToolingLatex`, over the tooling module as first-order data with each list carried as a chain of its own `Nil` and `Cons` constructors and with the typings the checker infers as an argument, writing through the standard library's `Buffer` with an explicit capacity, is a production root eligible for `rust-std` with exactly its declared effects; its rendered `rust-std` package under the pinned rustc and its lowered program under the calculus evaluator agree with the Rust oracle on the text, to the byte, and on the refusal of a write past the capacity, on the committed tooling modules (whose committed `.tex` is equal to the text), on hand-built modules that reach every declaration, type, signature, and term form and every byte class of the escaper, and on seeded mutants, every planted defect is detected, and the certified package the production export publishes for the project is the committed one; the checker, the decoder of the module, and the source map of the emitted pieces stay in the host. | | `BS-29` | `build` | The canonical diagnostic of SPEC.md §20.1 and the failure it makes under §24.5 (`Diagnostic::to_json`, written as `to_canonical_string` writes it: the code, the message, the primary span, the labels, the notes, the help and the causes, with the constant severity and spec, in canonical JSON; `diagnostic::sort_canonical`: diagnostics in the order of their path, byte start, code, and message, stable; and `LexLeanError::from_diagnostics` with `bounded`: the failure class of a set of diagnostics as its exit code, the most severe of their codes' classes, and the diagnostics the failure reports under `limits.max_diagnostics`, the first of them in canonical order and the `LLS8002` diagnostic that names the cap) is language-1.2 source in the `bootstrap/` project, as three production roots of `Diagnostics`: `diagnosticText`, `sortDiagnostics`, and `reportDiagnostics`, each eligible for `rust-std` with exactly its declared effects, none of them `recursion`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics, which reach every class of failure and both sides of the cap, on every committed expected diagnostic of the negative fixtures, written, sorted, and reported under four caps, and on seeded sets of diagnostics; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the rendering of a diagnostic for a terminal and the producer-set details of §24.5 are outside the claim. | +| `BS-30` | `build` | The human diagnostic output and the argument pre-scans of the command line of SPEC.md §20.6 and §23 (`cli::human_diagnostics_text`: the diagnostics of a failure as the command line writes them to stderr, each as its code and message, its primary location, and its labels, notes, help, and causes, one to a line, with the SGR colors of the palette or without; `cli::wants_json`: whether the arguments after the program ask for the JSON mode, in either spelling of `--diagnostic-format json`; and `cli::named_command`: the first argument after the program that names a command, or the empty text) is language-1.2 source in the `bootstrap/` project, as three production roots of `CliOutput` over the canonical diagnostic of `BS-29`: `humanDiagnostics`, `wantsJson`, and `namedCommand`, each eligible for `rust-std` with exactly its declared effect, `allocation`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics and arguments, which reach every part of a diagnostic in both modes of color and both outcomes of the scan, on the committed expected diagnostics and commands of the negative fixtures, and on seeded diagnostics and arguments; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the parsing of the arguments, the choice of color for a terminal, and the JSON command result are outside the claim. | ## calculus diff --git a/README.md b/README.md index 62b5622fc4..77994200db 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ just vv # the complete normative acceptance gate (SPEC.md §9.2) just release # vv, then the §30 release criterion; refused until 1.0.0 ``` -All 479 registered conformance IDs have their named tests; `just vv` checks them with the pinned toolchain installed. +All 480 registered conformance IDs have their named tests; `just vv` checks them with the pinned toolchain installed. The differential against the independent generator `lean4-prod` (SPEC.md §17.19, `OR-01`..`OR-08`) acquires it at its pinned commit: from the checkout `LEXLEAN_ORACLE_DIR` names, or by fetching the commit with `git` into the Cargo target directory (`LEXLEAN_ORACLE_CACHE` overrides), and builds it with the pinned Lean and Rust toolchains. It is validation evidence only and no input to any identity. An oracle that cannot be acquired, is not the pinned files, or fails is unavailable: that fails the gate on Linux x86-64 and is printed as `NOT VALIDATED` elsewhere, and is never reported as agreement. @@ -197,7 +197,7 @@ Every row is validated by `just vv`; the IDs link the claim to its register row, | The language-1.2 authoring notation: a readable `.lex.tex` text for a semantic module, in bijection with its canonical JSON, whose every position and variant is read from the schema, with readable forms for types and terms and a generic form for every other value, formatted canonically by `fmt` failing closed, the only form in which a language-1.2 source of the product is written (the data form is refused under language 1.2, and `lexlean::sdk` is the explicit conversion), the same for the compiler-tooling modules in the generic notation, with no compiler-semantics ID that depends on which form an embedded module is written in, with no product source owned by a generator but five named records, read and written by programs only through the authoring API (`lexlean::sdk`), and, for a native core module, a readable program over the shared table of kernel terms whose numbering is the order of its text | `AU-01`..`AU-13` | `build` | | The runtime of generated Lean as native modules: the portable, collection, model, and reasoning runtimes of language 1.2 are LexLean source that every generated module imports, migrated losslessly and audited against their exact axioms, the released runtime text of languages 1.0 and 1.1 is frozen data equal to their released output, and no other Lean runtime text remains in the compiler but the decoder of core module 2 | `RT-01`..`RT-04` | `build` | | The standard library: language-1.2 source beside the compiler whose members are certified production roots, each validated against its oracle by a seeded differential of its evaluator and rustc realizations; bytes and text over `Bytes`, an output buffer of a given capacity written in order; decimal and hexadecimal; the byte order and stable sorts over it; canonical JSON reading and writing; maps and sets over byte keys; SHA-256 against FIPS 180-4, the NIST CAVP vectors, and the `sha2` crate; and the `std-models` and `std-reasoning` source packages, generic over types, whose laws are kernel-checked theorems and whose application is the `helpdesk` example | `SL-01`, `SL-02`, `SL-03`, `SL-04`, `SL-05`, `SL-09`, `SL-10`, `SL-11`, `SL-13`, `SL-14` | `build` | -| The bootstrap project: the compiler's own components as language-1.2 source compiled by LexLean's production pipeline to certified Rust packages, the exact axiom-output parser and its closed Lean-name check, the primitive scanner of §12.2, the preservation lexer and token audit, the target calculus's checker, the Rust crate validator, the Rust printer, the runtime syntax validator, the failure typing and the types of the Rust lowering, its last-use moves, its literal values and its terms, the package renderer, the GNAF request validation, the LaTeX of a tooling module, and the canonical diagnostic, each held to the Rust it replaces (the stage-0 oracle) by the committed vectors and a seeded differential of its evaluator and rustc realizations, with planted defects detected and the production export committed | `BS-01`..`BS-29` | `build` | +| The bootstrap project: the compiler's own components as language-1.2 source compiled by LexLean's production pipeline to certified Rust packages, the exact axiom-output parser and its closed Lean-name check, the primitive scanner of §12.2, the preservation lexer and token audit, the target calculus's checker, the Rust crate validator, the Rust printer, the runtime syntax validator, the failure typing and the types of the Rust lowering, its last-use moves, its literal values and its terms, the package renderer, the GNAF request validation, the LaTeX of a tooling module, the canonical diagnostic, and its terminal output, each held to the Rust it replaces (the stage-0 oracle) by the committed vectors and a seeded differential of its evaluator and rustc realizations, with planted defects detected and the production export committed | `BS-01`..`BS-30` | `build` | | Source packages: a language-1.2 project imports the modules of a locked, content-addressed package of its workspace: `[[source_package]]` and `lexlean-workspace.toml`, the pins in `lexlean.lock` recomputed by every command, imports closed at link, no re-export of a package's production roots, and the package's modules replayed by the importer's `verify` with their origin in the records | `PK-01`..`PK-05` | `build` | | The literal `nat-add-zero` example, the Lean-verified feature examples, and the complete negative fixture suite | `EX-01`..`EX-09` | `build` | | Language-1.2 text components: tokenizers and their round-trip laws, with the laws carried as one native core module the generated modules import rather than authored Lean text | `LM-01`, `LM-02`, `LM-03`, `LM-13` | `build` | diff --git a/SPEC.md b/SPEC.md index 35586e6b86..dc411b1703 100644 --- a/SPEC.md +++ b/SPEC.md @@ -8745,6 +8745,26 @@ big-endian, the code, which is seven bytes, and the message, with the standard l first diagnostics up to the cap and appends the `LLS8002` diagnostic, whose class then counts. None of the three admits `recursion`. Rendering a diagnostic for a terminal stays in the host. +The human diagnostic output and the argument pre-scans of the command line (§20.6, §23) are the +second component of the driver as source (`BS-30`, issue 274), the module `CliOutput` over the +canonical diagnostic of `BS-29`, with three production roots for `rust-std`: + +| Root | Takes | Returns | Oracle | +| --- | --- | --- | --- | +| `LexLeanBoot.CliOutput.humanDiagnostics` | diagnostics and whether to color | the text written to stderr | `cli::human_diagnostics_text` | +| `LexLeanBoot.CliOutput.wantsJson` | the arguments | whether they ask for the JSON mode | `cli::wants_json` | +| `LexLeanBoot.CliOutput.namedCommand` | the arguments | the first command they name | `cli::named_command` | + +`humanDiagnostics` writes each diagnostic as `error[CODE]: message`, its primary location as +`path:line:column` after an arrow, and its labels, notes, help, and causes one to a line, with the +four SGR sequences of the palette around the parts the oracle colors, or none. `wantsJson` scans +the arguments after the program for `--diagnostic-format=json`, or `--diagnostic-format` followed +by `json`, before the arguments are parsed, so that a usage failure is reported in the JSON mode; +`namedCommand` finds the first argument after the program that is one of the ten commands of +§23.4. None of the three admits `recursion`. Parsing the arguments, choosing color for a terminal, +and the JSON command result stay in the host. The oracle is the code of `cli.rs` behind three +doc-hidden public functions, a change outside the compiler-semantics identity. + ## 18. Lean backend ### 18.1 Output contract @@ -11667,6 +11687,7 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte | `BS-16` | `bootstrap` | The GNAF request validation of SPEC.md §17.15 (`gnaf::validate`, with `universe_size`) is language-1.2 source in the `bootstrap/` project: `validateRequest` of `GnafValidate` is a production root eligible for `rust-std` with exactly its declared effects, over the projection of a request that validation reads (the length of the domain, the machine, the carrier's kind with each plan's preparations and the thresholds, the completeness evidence, the objective, the claim's class, and the scope) as first-order data, and returns the first violated rule in the model's order as the oracle's `serde_json` bytes, or nothing; on every host, its rendered `rust-std` package under the pinned rustc agrees with the Rust oracle `gnaf::validate` on the acceptance and on the rejection, to the byte, on the committed requests of `compiler/gnaf/`, the requests the committed certificate fixtures name, hand-built requests that reach each rejection, and seeded mutants of the committed requests; on the normative host, the root's lowered program under the calculus evaluator agrees with the oracle on the same corpus, each planted defect in the source is detected, and the certified package the production export publishes for the project is the committed one; loading a request (`gnaf::load`), the universe identity, the answer, and certification are outside the claim. | §17.15, §17.23 | | `BS-20` | `bootstrap` | The canonical LaTeX of a tooling module of SPEC.md §17.20 (`backend::tooling::render_latex`: the fixed document frame and, for each declaration in order, its title, its kind, and the lines the Lean printer of the same file spells for its types, signatures, and terms, every line escaped by `tex_escape`) is language-1.2 source in the `bootstrap/` project: `renderToolingLatex` of `ToolingLatex`, over the tooling module as first-order data with each list carried as a chain of its own `Nil` and `Cons` constructors and with the typings the checker infers as an argument, writing through the standard library's `Buffer` with an explicit capacity, is a production root eligible for `rust-std` with exactly its declared effects; its rendered `rust-std` package under the pinned rustc and its lowered program under the calculus evaluator agree with the Rust oracle on the text, to the byte, and on the refusal of a write past the capacity, on the committed tooling modules (whose committed `.tex` is equal to the text), on hand-built modules that reach every declaration, type, signature, and term form and every byte class of the escaper, and on seeded mutants, every planted defect is detected, and the certified package the production export publishes for the project is the committed one; the checker, the decoder of the module, and the source map of the emitted pieces stay in the host. | §17.20, §17.23 | | `BS-29` | `bootstrap` | The canonical diagnostic of SPEC.md §20.1 and the failure it makes under §24.5 (`Diagnostic::to_json`, written as `to_canonical_string` writes it: the code, the message, the primary span, the labels, the notes, the help and the causes, with the constant severity and spec, in canonical JSON; `diagnostic::sort_canonical`: diagnostics in the order of their path, byte start, code, and message, stable; and `LexLeanError::from_diagnostics` with `bounded`: the failure class of a set of diagnostics as its exit code, the most severe of their codes' classes, and the diagnostics the failure reports under `limits.max_diagnostics`, the first of them in canonical order and the `LLS8002` diagnostic that names the cap) is language-1.2 source in the `bootstrap/` project, as three production roots of `Diagnostics`: `diagnosticText`, `sortDiagnostics`, and `reportDiagnostics`, each eligible for `rust-std` with exactly its declared effects, none of them `recursion`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics, which reach every class of failure and both sides of the cap, on every committed expected diagnostic of the negative fixtures, written, sorted, and reported under four caps, and on seeded sets of diagnostics; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the rendering of a diagnostic for a terminal and the producer-set details of §24.5 are outside the claim. | §17.23, §20.1, §24.5 | +| `BS-30` | `bootstrap` | The human diagnostic output and the argument pre-scans of the command line of SPEC.md §20.6 and §23 (`cli::human_diagnostics_text`: the diagnostics of a failure as the command line writes them to stderr, each as its code and message, its primary location, and its labels, notes, help, and causes, one to a line, with the SGR colors of the palette or without; `cli::wants_json`: whether the arguments after the program ask for the JSON mode, in either spelling of `--diagnostic-format json`; and `cli::named_command`: the first argument after the program that names a command, or the empty text) is language-1.2 source in the `bootstrap/` project, as three production roots of `CliOutput` over the canonical diagnostic of `BS-29`: `humanDiagnostics`, `wantsJson`, and `namedCommand`, each eligible for `rust-std` with exactly its declared effect, `allocation`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics and arguments, which reach every part of a diagnostic in both modes of color and both outcomes of the scan, on the committed expected diagnostics and commands of the negative fixtures, and on seeded diagnostics and arguments; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the parsing of the arguments, the choice of color for a terminal, and the JSON command result are outside the claim. | §17.23, §20.6, §23 | | `PK-01` | `packages` | A language-1.2 project that declares a source package by its identifier, version, kind `path`, and the member directory a `lexlean-workspace.toml` lists locks it by the tree digest of its manifest and source files, its manifest digest, its version, its module prefix, and its own packages, and the configuration and the lock read back to the bytes written; a project without a source package keeps its bytes, and a package of another kind, a source package in another language, a changed byte or version (LLC0105), an undeclared package (LLC0106), a module prefix claimed twice (LLC0107), a project or a package outside the workspace (LLC0108), a path that escapes it, and a symlink (LLS8001) are each refused with the named code. | §10.5, §11.1, §25.1 | | `PK-02` | `packages` | A module of a project imports only modules of its own project and modules of the packages the project declares, and a module of a package only modules of itself and of the packages its own manifest declares: a package module is a module of the importing project under its own module prefix, a module of a package the project does not declare fails with LLR3009, and an import cycle through a package fails with LLR3003. | §10.5, §15.1 | | `PK-03` | `packages` | An importing project builds and verifies under the pinned Lean offline, and its package modules are generated, elaborated, replayed with `leanchecker`, and audited for their exact axioms under the package's module prefix with the package as their origin in the records; the source ID of the project changes with the pins, and no file of the package is written by `fmt`, `build`, or `verify`. | §10.5, §21.3, §22 | @@ -11683,7 +11704,7 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte | `LM-09` | `language-models` | No prompt is code: no member of the closed language maps `string` or `bytes` to a function, a term, or source — every operation of the primitive registry that takes a `string` or `bytes` operand is classified by the audit with a data result, the registry's schema enumeration and the production registry's primitive rows equal one another and equal that classified set, and the text declarations of `lexlean/semantic-module/2` state no `string`-typed member, so a prompt reaches a model only as the tokens `encodeText` makes of it; a planted operation or text member of that shape is caught by the audit with its name. | §17.12 | | `LM-13` | `language-models` | The text laws a tokenizer elaborates through are LexLean source and not authored text: the module that states them is one language-1.2 native core module of the embedded `language/text-1.2` project, the project holds no file of Lean source, no independently authored Lean file anywhere in the release tree declares the `LexLeanText` namespace or lies under its module root, and the one-time migration input is absent; the registry lists only that module, the declarations and their exact axiom policies are read from its native data, which the compiler embeds and hashes into the language-1.2 semantics, and a module that declares a text component imports the generated module rather than splicing any Lean text. | §17.10, §17.12 | -**Total required capability IDs:** 479. +**Total required capability IDs:** 480. No row may be downgraded to `some-true` or `open`. Upstream Lean facts are ledger/authority rows, not substitutions for these build behaviors. diff --git a/VERIFICATION.md b/VERIFICATION.md index 2e79a6069f..b2bd6232d7 100644 --- a/VERIFICATION.md +++ b/VERIFICATION.md @@ -11048,6 +11048,51 @@ committed exports`, as each bootstrap member did before its regeneration, which produces the three packages. The branch is based on `release/v0.4` and stacks on nothing. +### the terminal output of diagnostics and the argument pre-scans are source (BS-30) + +`BS-30` holds the three production roots of `LexLeanBoot.CliOutput` +(`bootstrap/src/CliOutput.lex.tex`) to the code of `cli.rs`: +`humanDiagnostics` to `cli::human_diagnostics_text`, the text the command line +writes to stderr for a failure in the human mode, with the four SGR sequences of +the palette or none; `wantsJson` to `cli::wants_json`, the scan for +`--diagnostic-format json` in either spelling before the arguments are parsed; +and `namedCommand` to `cli::named_command`, the first argument after the program +that names one of the ten commands. The module reads the diagnostic of `BS-29` +and each root admits exactly `allocation`. The oracle is `cli.rs`'s own code: +`print_human_diagnostics` behind the doc-hidden public `human_diagnostics_text`, +and `wants_json` and `named_command` made public and doc-hidden; `cli.rs` is +outside the compiler-semantics identity, so no identity moves. The case holds +the roots to the oracle on hand-built diagnostics with every part in both modes +of color, a span over two lines, and two diagnostics in their order; on argument +lists that reach both outcomes of the scan, the program named like the flag and +like a command, and the last command of the table; on the 303 negative fixtures' +committed diagnostics, in both modes, and their commands' arguments; and on +seeded diagnostics and arguments. Each planted defect names the one vector that +catches it, and the case asserts that the site of each plant occurs once. The +row's statement carries no counts. + +Measured with the compiler binary of this tree, on a copy of the project whose +only entrypoint is `CliOutput`: `lexlean check`, `lexlean build`, and `lexlean +verify` pass, and the eligibility report gives each root exactly `allocation`. +The register agrees with the §31 table on 480 IDs, by the same parse +`validate-spec-links` makes. + +The case was first compiled and run on the normative host on `BS-29` over +`release/v0.4` at `4318b17b8` (`cargo test -p repo-conformance --test +conformance -- conformance_bs_30`, 105 s). Its corpus is 32 named vectors (11 +human, 12 scanned, 9 named), the 303 fixtures, and 200 and 1,000 seeded runs of +each root. The evaluator agrees with the oracle on 817 human texts, 515 scans, +and 512 named commands, the rendered packages under the pinned rustc on 4,244 +runs, and each of the 15 planted defects is detected by its own vector. The +first runs found no fault of the module: the roots were first declared with +`overflow`, which the eligibility report showed none of them realizes (now +`allocation` alone); the plant of the end line was tried on spans whose lines +agree (now `a span over two lines`); and two plants were rewritten so that the +planted source parses and stays within the root's effects. The case then stops at +the stack-bound step, `bootstrap/human_diagnostics is no package of the +committed exports`, as each bootstrap member did before its regeneration, which +produces the three packages. The branch is stacked on `BS-29` and lands after it. + ## The `bdd` recipe as the parts of one run (Issue #131) With UOR Atlas verified as the parts of one run, the `rest` leg became the diff --git a/crates/conformance/src/cases/bootstrap.rs b/crates/conformance/src/cases/bootstrap.rs index c731a5873c..6890deacc9 100644 --- a/crates/conformance/src/cases/bootstrap.rs +++ b/crates/conformance/src/cases/bootstrap.rs @@ -21,6 +21,7 @@ use crate::rust_harness::{self, Calls}; use crate::rust_packages; use crate::support::{self, P}; +mod cli_output; mod diagnostics; mod gnaf_validate; mod runtime_validate; @@ -2459,6 +2460,7 @@ fn case(id: &str) { // §17.23, §17.20: the canonical LaTeX of a tooling module. "BS-20" => tooling_latex::case(), "BS-29" => diagnostics::case(), + "BS-30" => cli_output::case(), other => panic!("no bootstrap case is wired for {other}"), } } diff --git a/crates/conformance/src/cases/bootstrap/cli_output.rs b/crates/conformance/src/cases/bootstrap/cli_output.rs new file mode 100644 index 0000000000..018f5afbf5 --- /dev/null +++ b/crates/conformance/src/cases/bootstrap/cli_output.rs @@ -0,0 +1,821 @@ +//! `BS-30` (SPEC.md §17.23, §20.6, §23): the human diagnostic output and the +//! argument pre-scans of the command line as language-1.2 source, +//! `LexLeanBoot.CliOutput`, held to the byte to `lexlean::cli:: +//! {human_diagnostics_text, wants_json, named_command}`. +//! +//! `humanDiagnostics` writes the diagnostics of a failure as the command line +//! writes them to stderr, with the SGR colors or without; `wantsJson` finds +//! `--diagnostic-format json` in any of its two spellings before the arguments +//! are parsed, so a usage error is reported in the JSON mode; `namedCommand` +//! finds the first argument that names a command, for the `command` field of a +//! usage failure. The diagnostics are the sort of `BS-29`. +//! +//! Each planted defect names the one vector that catches it. + +use std::collections::{BTreeMap, BTreeSet}; + +use lexlean::calculus::Value; +use lexlean::cli::{human_diagnostics_text, named_command, wants_json}; +use lexlean::diagnostic::{Diagnostic, DiagnosticCode, Label, Note, Span}; +use lexlean::{ErrorClass, LexLeanError}; +use serde_json::Value as Json2; + +use super::rust_validate::{eligibility_of, rustc_differential}; +use super::{list, nat_val, option, text, Run, Seeded}; +use crate::production_export as harness; +use crate::support::{self, repo_root}; + +const MODULE: &str = "LexLeanBoot.CliOutput"; +const ROOTS: [(&str, &[&str]); 3] = [ + ("humanDiagnostics", &["allocation"]), + ("wantsJson", &["allocation"]), + ("namedCommand", &["allocation"]), +]; + +/// The most a part of a certificate of a root may be, as the row states. +const CERTIFICATE_BUDGET: u64 = 3_145_728; +/// Seeded runs of each root under the evaluator, and under rustc. +const EVALUATOR_SEEDED: usize = 200; +const RUSTC_SEEDED: usize = 1_000; + +// ------------------------------------------------------------- the encoders + +fn code(text: &str) -> DiagnosticCode { + let leaked: &'static str = Box::leak(text.to_owned().into_boxed_str()); + DiagnosticCode::from_validated(DiagnosticCode::validate(leaked)) +} + +fn enc_span(span: &Span) -> Value { + Value::Adt { + constructor: 0, + fields: vec![ + text(&span.path), + nat_val(span.byte_start), + nat_val(span.byte_end), + nat_val(span.line_start), + nat_val(span.column_start), + nat_val(span.line_end), + nat_val(span.column_end), + ], + } +} + +fn enc(diagnostic: &Diagnostic) -> Value { + Value::Adt { + constructor: 0, + fields: vec![ + text(diagnostic.code.as_str()), + text(&diagnostic.message), + option(diagnostic.primary.as_ref().map(enc_span)), + list( + diagnostic + .labels + .iter() + .map(|label| Value::Adt { + constructor: 0, + fields: vec![text(&label.message), enc_span(&label.span)], + }) + .collect(), + ), + list( + diagnostic + .notes + .iter() + .map(|note| Value::Adt { + constructor: 0, + fields: vec![ + text(¬e.message), + option(note.span.as_ref().map(enc_span)), + ], + }) + .collect(), + ), + list(diagnostic.help.iter().map(|item| text(item)).collect()), + list(diagnostic.causes.iter().map(|item| text(item)).collect()), + ], + } +} + +/// The failure that carries `diagnostics` in the given order. +fn failure(diagnostics: &[Diagnostic]) -> LexLeanError { + LexLeanError { + class: ErrorClass::Language, + diagnostics: diagnostics.to_vec(), + source: None, + } +} + +fn human_run(diagnostics: &[Diagnostic], color: bool) -> Run { + ( + vec![ + list(diagnostics.iter().map(enc).collect()), + Value::Bool { value: color }, + ], + serde_json::to_value(text(&human_diagnostics_text(&failure(diagnostics), color))) + .expect("a value is JSON"), + ) +} + +fn arguments_value(arguments: &[String]) -> Value { + list(arguments.iter().map(|argument| text(argument)).collect()) +} + +fn json_run(arguments: &[String]) -> Run { + ( + vec![arguments_value(arguments)], + serde_json::to_value(Value::Bool { + value: wants_json(arguments), + }) + .expect("a value is JSON"), + ) +} + +fn command_run(arguments: &[String]) -> Run { + ( + vec![arguments_value(arguments)], + serde_json::to_value(text(named_command(arguments))).expect("a value is JSON"), + ) +} + +// ------------------------------------------------------------------ corpora + +fn span_of(json: &Json2) -> Span { + let n = |key: &str| usize::try_from(json[key].as_u64().expect("a count")).expect("usize"); + Span { + path: json["path"].as_str().expect("a path").to_owned(), + byte_start: n("byte_start"), + byte_end: n("byte_end"), + line_start: n("line_start"), + column_start: n("column_start"), + line_end: n("line_end"), + column_end: n("column_end"), + } +} + +fn strings_of(json: &Json2) -> Vec { + json.as_array() + .expect("an array") + .iter() + .map(|item| item.as_str().expect("a string").to_owned()) + .collect() +} + +fn diagnostic_of(json: &Json2) -> Diagnostic { + let mut diagnostic = Diagnostic::new( + code(json["code"].as_str().expect("a code")), + json["message"].as_str().expect("a message"), + ); + if let Some(primary) = json.get("primary") { + diagnostic.primary = Some(span_of(primary)); + } + for label in json["labels"].as_array().expect("labels") { + diagnostic.labels.push(Label { + message: label["message"].as_str().expect("a message").to_owned(), + span: span_of(&label["span"]), + }); + } + for note in json["notes"].as_array().expect("notes") { + diagnostic.notes.push(Note { + message: note["message"].as_str().expect("a message").to_owned(), + span: note.get("span").map(span_of), + }); + } + diagnostic.help = strings_of(&json["help"]); + diagnostic.causes = strings_of(&json["causes"]); + diagnostic +} + +/// The committed expected diagnostics of every negative fixture, and the +/// arguments of its command. +fn committed() -> Vec<(Vec, Vec)> { + let root = repo_root().join("tests/negative"); + let mut names: Vec = std::fs::read_dir(root.as_std_path()) + .expect("the negative fixtures") + .flatten() + .map(|entry| entry.file_name().to_string_lossy().into_owned()) + .collect(); + names.sort(); + let mut out = Vec::new(); + for name in names { + let expected = root.join(&name).join("expected"); + let Ok(bytes) = std::fs::read(expected.join("diagnostics.json").as_std_path()) else { + continue; + }; + let json: Json2 = serde_json::from_slice(&bytes).expect("diagnostics JSON"); + let diagnostics = json + .as_array() + .expect("an array") + .iter() + .map(diagnostic_of) + .collect(); + let command: Json2 = std::fs::read(expected.join("command.json").as_std_path()) + .ok() + .and_then(|bytes| serde_json::from_slice(&bytes).ok()) + .unwrap_or(Json2::Null); + let mut arguments = vec!["lexlean".to_owned()]; + if let Some(argv) = command["argv"].as_array() { + arguments = argv + .iter() + .filter_map(|item| item.as_str().map(str::to_owned)) + .collect(); + } + out.push((diagnostics, arguments)); + } + out +} + +// ------------------------------------------------------------------ vectors + +fn at(path: &str, line: usize, column: usize) -> Span { + Span { + path: path.to_owned(), + byte_start: 0, + byte_end: 1, + line_start: line, + column_start: column, + line_end: line, + column_end: column + 1, + } +} + +fn d(code_text: &str, message: &str) -> Diagnostic { + Diagnostic::new(code(code_text), message) +} + +fn argv(items: &[&str]) -> Vec { + items.iter().map(|item| (*item).to_owned()).collect() +} + +enum Subject { + Human(Vec, bool), + Json(Vec), + Command(Vec), +} + +struct Vector { + label: String, + subject: Subject, +} + +impl Vector { + fn root(&self) -> usize { + match self.subject { + Subject::Human(..) => 0, + Subject::Json(_) => 1, + Subject::Command(_) => 2, + } + } + + fn run(&self) -> Run { + match &self.subject { + Subject::Human(items, color) => human_run(items, *color), + Subject::Json(arguments) => json_run(arguments), + Subject::Command(arguments) => command_run(arguments), + } + } +} + +#[allow(clippy::too_many_lines)] +fn named() -> Vec { + let mut out: Vec = Vec::new(); + let mut add = |label: &str, subject: Subject| { + out.push(Vector { + label: label.to_owned(), + subject, + }); + }; + let everything = || { + d("LLT4001", "phase link: m") + .with_span(at("src/Main.lex.tex", 5, 1)) + .with_label("here", at("src/A.lex.tex", 2, 7)) + .with_note("a note") + .with_located_note("a located note", at("b", 1, 1)) + .with_help("help me") + .with_cause("because") + }; + add("no diagnostics", Subject::Human(Vec::new(), false)); + add( + "an unlocated diagnostic", + Subject::Human(vec![d("LLC0102", "stale lock")], false), + ); + add( + "a located diagnostic", + Subject::Human( + vec![d("LLT4001", "m").with_span(at("src/Main.lex.tex", 11, 3))], + false, + ), + ); + add("every part", Subject::Human(vec![everything()], false)); + add( + "a span over two lines", + Subject::Human( + vec![d("LLT4001", "m").with_span(Span { + path: "f".to_owned(), + byte_start: 0, + byte_end: 9, + line_start: 2, + column_start: 3, + line_end: 9, + column_end: 4, + })], + false, + ), + ); + add( + "every part in color", + Subject::Human(vec![everything()], true), + ); + add( + "an unlocated diagnostic in color", + Subject::Human(vec![d("LLI9001", "internal")], true), + ); + add( + "two labels", + Subject::Human( + vec![d("LLP2001", "m") + .with_label("first", at("x", 1, 2)) + .with_label("second", at("y", 3, 4))], + false, + ), + ); + add( + "two diagnostics in their order", + Subject::Human(vec![d("LLT4002", "second"), d("LLT4001", "first")], false), + ); + add( + "a message with a newline", + Subject::Human(vec![d("LLT4001", "one\ntwo")], false), + ); + add( + "help and causes in order", + Subject::Human( + vec![d("LLV7005", "m") + .with_help("h1") + .with_help("h2") + .with_cause("c1") + .with_cause("c2")], + false, + ), + ); + // The JSON pre-scan. + for (label, items) in [ + ("no arguments", vec![]), + ("the program alone", vec!["lexlean"]), + ( + "the joined spelling", + vec!["lexlean", "check", "--diagnostic-format=json"], + ), + ( + "the separate spelling", + vec!["lexlean", "--diagnostic-format", "json", "check"], + ), + ( + "the human mode", + vec!["lexlean", "--diagnostic-format", "human"], + ), + ("json without the flag", vec!["lexlean", "json"]), + ( + "the flag at the end", + vec!["lexlean", "check", "--diagnostic-format"], + ), + ( + "the program named like the flag", + vec!["--diagnostic-format=json"], + ), + ( + "the program before json", + vec!["--diagnostic-format", "json"], + ), + ( + "the flag twice", + vec![ + "lexlean", + "--diagnostic-format", + "--diagnostic-format", + "json", + ], + ), + ( + "a word between", + vec!["lexlean", "--diagnostic-format", "x", "json"], + ), + ( + "another joined value", + vec!["lexlean", "--diagnostic-format=human"], + ), + ] { + add(label, Subject::Json(argv(&items))); + } + // The named command. + for (label, items) in [ + ("no command", vec!["lexlean", "--version"]), + ("a command", vec!["lexlean", "check", "--all"]), + ( + "the first of two commands", + vec!["lexlean", "build", "check"], + ), + ( + "a command after flags", + vec!["lexlean", "--project", "p", "fmt"], + ), + ("the program named like a command", vec!["check", "--all"]), + ("a word like a command", vec!["lexlean", "checks"]), + ("every command", vec!["lexlean", "production"]), + ( + "the last command of the table", + vec!["lexlean", "explain", "LLT4001"], + ), + ("no arguments for a command", vec![]), + ] { + add(label, Subject::Command(argv(&items))); + } + out +} + +// ------------------------------------------------------------------- seeded + +const WORDS: &[&str] = &[ + "lexlean", + "check", + "build", + "init", + "lock", + "verify", + "fmt", + "migrate", + "clean", + "explain", + "production", + "--diagnostic-format", + "--diagnostic-format=json", + "--diagnostic-format=human", + "json", + "human", + "--all", + "--project", + "x", +]; + +fn drawn_arguments(seeded: &mut Seeded) -> Vec { + let count = seeded.below(6); + (0..count) + .map(|_| (*seeded.pick(WORDS)).to_owned()) + .collect() +} + +fn seeded_runs(count: usize, sets: &[Vec], seed: u64) -> [Vec; 3] { + let mut seeded = Seeded(seed); + let mut out: [Vec; 3] = [Vec::new(), Vec::new(), Vec::new()]; + for _ in 0..count { + let mut joined: Vec = Vec::new(); + for _ in 0..seeded.below(4) { + joined.extend(seeded.pick(sets).iter().cloned()); + } + out[0].push(human_run(&joined, seeded.chance(50))); + let arguments = drawn_arguments(&mut seeded); + out[1].push(json_run(&arguments)); + out[2].push(command_run(&arguments)); + } + out +} + +// ------------------------------------------------------------------- plants + +struct Plant { + label: &'static str, + root: usize, + site: &'static str, + replacement: &'static str, + vector: &'static str, +} + +const PLANTS: &[Plant] = &[ + Plant { + label: "the bold red is plain red", + root: 0, + site: "boldRed := 0x1b5b313b33316d", + replacement: "boldRed := 0x1b5b33316d", + vector: "an unlocated diagnostic in color", + }, + Plant { + label: "color is always off", + root: 0, + site: "(if color then (record Palette", + replacement: "(if false then (record Palette", + vector: "every part in color", + }, + Plant { + label: "the location gives the end line", + root: 0, + site: "(LexLeanStd.Numeral::decimal (project span lineStart))", + replacement: "(LexLeanStd.Numeral::decimal (project span lineEnd))", + vector: "a span over two lines", + }, + Plant { + label: "the arrow has no indent", + root: 0, + site: "(cat 0x0a (lit \" \"))", + replacement: "0x0a", + vector: "a located diagnostic", + }, + Plant { + label: "a diagnostic does not end its line", + root: 0, + site: "(cat head located) 0x0a)", + replacement: "(cat head located) 0x)", + vector: "two diagnostics in their order", + }, + Plant { + label: "notes are written last first", + root: 0, + site: "(cons (project item message) acc)", + replacement: "(prim append acc (cons (project item message) (nil Bytes)) : (List Bytes))", + vector: "every part", + }, + Plant { + label: "a cause is written as help", + root: 0, + site: "(lit \" cause: \")", + replacement: "(lit \" help: \")", + vector: "help and causes in order", + }, + Plant { + label: "a label has no location", + root: 0, + site: "(lit \" (\")) (place (project item span))) (cat (lit \")\") 0x0a))", + replacement: "(lit \" (\")) 0x) (cat (lit \")\") 0x0a))", + vector: "two labels", + }, + Plant { + label: "the joined spelling is not seen", + root: 1, + site: "(if (prim equal argument (lit \"--diagnostic-format=json\") : Bool) then", + replacement: "(if false then", + vector: "the joined spelling", + }, + Plant { + label: "any value after the flag is json", + root: 1, + site: "then (prim equal argument (lit \"json\") : Bool) else false)", + replacement: "then true else false)", + vector: "the human mode", + }, + Plant { + label: "the program is scanned", + root: 1, + site: "(false, (ctor Option.none [Bytes])) (afterFirst arguments)", + replacement: "(false, (ctor Option.none [Bytes])) arguments", + vector: "the program named like the flag", + }, + Plant { + label: "json counts anywhere", + root: 1, + site: "| Option.none => (false, (ctor Option.some [Bytes] argument))))),", + replacement: "| Option.none => ((prim equal argument (lit \"json\") : Bool), (ctor Option.some [Bytes] argument))))),", + vector: "the program before json", + }, + Plant { + label: "the last command is named", + root: 2, + site: "| Option.some known => found\n", + replacement: "| Option.some known => (if (isCommand argument) then (ctor Option.some [Bytes] argument) else found)\n", + vector: "the first of two commands", + }, + Plant { + label: "the program is a command", + root: 2, + site: "(ctor Option.none [Bytes]) (afterFirst arguments) : (Option Bytes))", + replacement: "(ctor Option.none [Bytes]) arguments : (Option Bytes))", + vector: "the program named like a command", + }, + Plant { + label: "the table ends before explain", + root: 2, + site: "(cons (lit \"explain\") (cons (lit \"production\") (nil Bytes)))", + replacement: "(cons (lit \"production\") (nil Bytes))", + vector: "the last command of the table", + }, +]; + +fn plants(vectors: &[Vector]) { + let mut missed = Vec::new(); + for plant in PLANTS { + let vector = vectors + .iter() + .find(|vector| vector.label == plant.vector) + .unwrap_or_else(|| panic!("{}: no vector `{}`", plant.label, plant.vector)); + assert_eq!( + vector.root(), + plant.root, + "{}: the vector is a run of the root planted", + plant.label + ); + let planted = support::P::bootstrap(); + let source = planted.read_raw("src/CliOutput.lex.tex"); + assert_eq!( + source.matches(plant.site).count(), + 1, + "{}: the plant site occurs once", + plant.label + ); + planted.write( + "src/CliOutput.lex.tex", + &source.replacen(plant.site, plant.replacement, 1), + ); + let checked = support::checked_project(&planted); + let low = super::lower(&checked, &planted, MODULE, ROOTS[plant.root].0); + match super::evaluate(&low, &[vector.run()], 1).first() { + Some(first) => eprintln!( + "BS-30: plant detected: {}: {}", + plant.label, + first.chars().take(160).collect::() + ), + None => missed.push(plant.label), + } + } + assert!( + missed.is_empty(), + "planted defects their own vector does not detect: {missed:?}" + ); +} + +fn export(lowered: &BTreeMap<&str, super::Lowered>) { + let exported = harness::exported("bootstrap"); + let bundle = exported.bundle(); + let mut realized = 0usize; + for exported_root in &exported.output.result.roots { + let Some((member, low)) = exported_root + .root + .strip_prefix(&format!("{MODULE}.")) + .and_then(|member| lowered.get(member).map(|low| (member, low))) + else { + continue; + }; + let largest = exported_root + .outputs + .iter() + .flat_map(|output| &output.certification.certificates) + .map(|certificate| certificate.file.byte_length) + .max() + .expect("a certificate"); + eprintln!( + "BS-30: {}: largest certificate part {largest} bytes", + exported_root.root + ); + assert!( + largest <= CERTIFICATE_BUDGET, + "{}: a certificate part of {largest} bytes is beyond {CERTIFICATE_BUDGET}", + exported_root.root + ); + for output in &exported_root.outputs { + let package: Json2 = serde_json::from_slice( + &std::fs::read( + bundle + .join(&output.package.directory) + .join("package.json") + .as_std_path(), + ) + .expect("package.json"), + ) + .expect("package JSON"); + assert_eq!( + package["program"], + serde_json::to_value(&low.program).expect("a program is JSON"), + "{member}: the exported package realizes the program the differential ran" + ); + realized += 1; + } + } + assert_eq!(realized, ROOTS.len(), "one certified package per root"); + let packages = harness::tree(&bundle.join("packages")); + let committed_packages = harness::tree(&harness::fixture_dir("bootstrap").join("packages")); + assert_eq!( + packages.keys().collect::>(), + committed_packages.keys().collect::>(), + "the exported package files are the committed ones" + ); + for (relative, content) in &packages { + assert!( + committed_packages.get(relative) == Some(content), + "packages/{relative} differs from the committed package" + ); + } +} + +#[allow(clippy::too_many_lines)] +pub(super) fn case() { + let started = std::time::Instant::now(); + let project = support::P::bootstrap(); + let checked_units = project.check_ok(); + assert!( + checked_units.units.contains_key("CliOutput") + && checked_units.units.contains_key("Diagnostics"), + "CliOutput and Diagnostics are linked modules of the project" + ); + eligibility_of(&project, "CliOutput", MODULE, &ROOTS); + + let vectors = named(); + let labels: BTreeSet<&str> = vectors.iter().map(|vector| vector.label.as_str()).collect(); + assert_eq!(labels.len(), vectors.len(), "each vector has its own label"); + let mut runs: [Vec; 3] = [Vec::new(), Vec::new(), Vec::new()]; + for vector in &vectors { + runs[vector.root()].push(vector.run()); + } + let json_outcomes: BTreeSet = vectors + .iter() + .filter_map(|vector| match &vector.subject { + Subject::Json(arguments) => Some(wants_json(arguments)), + _ => None, + }) + .collect(); + assert_eq!( + json_outcomes.len(), + 2, + "the vectors reach both outcomes of the scan" + ); + + // The committed diagnostics of each fixture, in both modes, and the + // arguments of each fixture's command. + let fixtures = committed(); + let mut corpus: [Vec; 3] = [Vec::new(), Vec::new(), Vec::new()]; + let mut sets: Vec> = Vec::new(); + for (diagnostics, arguments) in &fixtures { + corpus[0].push(human_run(diagnostics, false)); + corpus[0].push(human_run(diagnostics, true)); + corpus[1].push(json_run(arguments)); + corpus[2].push(command_run(arguments)); + sets.push(diagnostics.clone()); + } + let normative = support::normative_host(); + let (evaluator_seeded, rustc_seeded) = if normative { + ( + seeded_runs(EVALUATOR_SEEDED, &sets, 0x0B55_0030), + seeded_runs(RUSTC_SEEDED, &sets, 0x0B55_1030), + ) + } else { + ( + [Vec::new(), Vec::new(), Vec::new()], + [Vec::new(), Vec::new(), Vec::new()], + ) + }; + eprintln!( + "BS-30: {} vectors ({} human, {} scanned, {} named), {} fixtures, {} and {} seeded runs of each root ({:?})", + vectors.len(), + runs[0].len(), + runs[1].len(), + runs[2].len(), + fixtures.len(), + EVALUATOR_SEEDED, + RUSTC_SEEDED, + started.elapsed() + ); + + let checked = support::checked_project(&project); + let lowered: BTreeMap<&str, super::Lowered> = ROOTS + .iter() + .map(|(root, _)| (*root, super::lower(&checked, &project, MODULE, root))) + .collect(); + if normative { + for (index, (root, _)) in ROOTS.iter().enumerate() { + let mut all_runs: Vec = runs[index].clone(); + all_runs.extend(corpus[index].iter().cloned()); + all_runs.extend(evaluator_seeded[index].iter().cloned()); + let disagreements = super::evaluate(&lowered[root], &all_runs, 5); + assert!( + disagreements.is_empty(), + "{root} and the Rust oracle disagree: {disagreements:?}" + ); + eprintln!( + "BS-30: {root}: the evaluator agrees on {} runs ({:?})", + all_runs.len(), + started.elapsed() + ); + } + plants(&vectors); + } else { + eprintln!("BS-30: platform-bound host: the evaluator, the seeded runs, and the planted defects run on the normative host"); + } + + let mut compiled: [Vec; 3] = [Vec::new(), Vec::new(), Vec::new()]; + for index in 0..3 { + compiled[index].extend(runs[index].iter().cloned()); + compiled[index].extend(corpus[index].iter().cloned()); + compiled[index].extend(rustc_seeded[index].iter().cloned()); + } + let total = rustc_differential( + "BS-30", + &[ + (ROOTS[0].0, &lowered[ROOTS[0].0], compiled[0].as_slice()), + (ROOTS[1].0, &lowered[ROOTS[1].0], compiled[1].as_slice()), + (ROOTS[2].0, &lowered[ROOTS[2].0], compiled[2].as_slice()), + ], + "oracle", + ); + eprintln!("BS-30: {total} rustc runs agree ({:?})", started.elapsed()); + + if !support::lean_backed("BS-30") { + return; + } + export(&lowered); + eprintln!("BS-30: passed in {:?}", started.elapsed()); +} diff --git a/crates/conformance/src/cases/repository.rs b/crates/conformance/src/cases/repository.rs index aaab4a220b..f1757cfc23 100644 --- a/crates/conformance/src/cases/repository.rs +++ b/crates/conformance/src/cases/repository.rs @@ -873,7 +873,7 @@ pub(crate) fn run(id: &str) { let model = repo_model::Model::load(&root.join("model").into_std_path_buf()) .expect("the model loads"); let table = spec_table(); - assert_eq!(table.len(), 479, "§31 has 479 rows"); + assert_eq!(table.len(), 480, "§31 has 480 rows"); assert_eq!(model.ids.id.len(), table.len(), "register row count"); for ((spec_id, spec_suite, spec_statement), row) in table.iter().zip(model.ids.id.iter()) diff --git a/crates/conformance/tests/conformance.rs b/crates/conformance/tests/conformance.rs index c82d99b5eb..3828b0db11 100644 --- a/crates/conformance/tests/conformance.rs +++ b/crates/conformance/tests/conformance.rs @@ -2325,6 +2325,11 @@ fn conformance_bs_29() { repo_conformance::cases::run("BS-29"); } +#[test] +fn conformance_bs_30() { + repo_conformance::cases::run("BS-30"); +} + #[test] fn conformance_pk_01() { repo_conformance::cases::run("PK-01"); diff --git a/features/suites/bootstrap.feature b/features/suites/bootstrap.feature index ea2c5b7356..198a6cb907 100644 --- a/features/suites/bootstrap.feature +++ b/features/suites/bootstrap.feature @@ -126,3 +126,10 @@ Feature: bootstrap When the project is checked and built, and the lowered program and the rendered package of each root are run on those diagnostics Then each root is eligible for rust-std with exactly its declared effects, no certificate part is beyond 3,145,728 bytes, and the three roots equal `to_json`, `sort_canonical`, and `bounded` on every run And every planted defect is detected by its own vector, and the exported packages are byte-identical to the committed packages and realize the programs the differential ran + + @BS-30 @build + Scenario: The human diagnostic output and the argument pre-scans of the command line of SPEC.md §20.6 and §23 (`cli::human_diagnostics_text`: the diagnostics of a failure as the command line writes them to stderr, each as its code and message, its primary location, and its labels, notes, help, and causes, one to a line, with the SGR colors of the palette or without; `cli::wants_json`: whether the arguments after the program ask for the JSON mode, in either spelling of `--diagnostic-format json`; and `cli::named_command`: the first argument after the program that names a command, or the empty text) is language-1.2 source in the `bootstrap/` project, as three production roots of `CliOutput` over the canonical diagnostic of `BS-29`: `humanDiagnostics`, `wantsJson`, and `namedCommand`, each eligible for `rust-std` with exactly its declared effect, `allocation`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics and arguments, which reach every part of a diagnostic in both modes of color and both outcomes of the scan, on the committed expected diagnostics and commands of the negative fixtures, and on seeded diagnostics and arguments; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the parsing of the arguments, the choice of color for a terminal, and the JSON command result are outside the claim. + Given the committed `bootstrap` project, hand-built diagnostics and arguments, the committed expected diagnostics and commands of the negative fixtures, and seeded diagnostics and arguments + When the project is checked and built, and the lowered program and the rendered package of each root are run on those diagnostics and arguments + Then each root is eligible for rust-std with exactly its declared effects, no certificate part is beyond 3,145,728 bytes, and the three roots equal `human_diagnostics_text`, `wants_json`, and `named_command` on every run + And every planted defect is detected by its own vector, and the exported packages are byte-identical to the committed packages and realize the programs the differential ran diff --git a/model/ids.toml b/model/ids.toml index a8a138c480..604e5a8d46 100644 --- a/model/ids.toml +++ b/model/ids.toml @@ -2792,6 +2792,12 @@ level = "build" suite = "bootstrap" statement = "The canonical diagnostic of SPEC.md §20.1 and the failure it makes under §24.5 (`Diagnostic::to_json`, written as `to_canonical_string` writes it: the code, the message, the primary span, the labels, the notes, the help and the causes, with the constant severity and spec, in canonical JSON; `diagnostic::sort_canonical`: diagnostics in the order of their path, byte start, code, and message, stable; and `LexLeanError::from_diagnostics` with `bounded`: the failure class of a set of diagnostics as its exit code, the most severe of their codes' classes, and the diagnostics the failure reports under `limits.max_diagnostics`, the first of them in canonical order and the `LLS8002` diagnostic that names the cap) is language-1.2 source in the `bootstrap/` project, as three production roots of `Diagnostics`: `diagnosticText`, `sortDiagnostics`, and `reportDiagnostics`, each eligible for `rust-std` with exactly its declared effects, none of them `recursion`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics, which reach every class of failure and both sides of the cap, on every committed expected diagnostic of the negative fixtures, written, sorted, and reported under four caps, and on seeded sets of diagnostics; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the rendering of a diagnostic for a terminal and the producer-set details of §24.5 are outside the claim." +[[id]] +id = "BS-30" +level = "build" +suite = "bootstrap" +statement = "The human diagnostic output and the argument pre-scans of the command line of SPEC.md §20.6 and §23 (`cli::human_diagnostics_text`: the diagnostics of a failure as the command line writes them to stderr, each as its code and message, its primary location, and its labels, notes, help, and causes, one to a line, with the SGR colors of the palette or without; `cli::wants_json`: whether the arguments after the program ask for the JSON mode, in either spelling of `--diagnostic-format json`; and `cli::named_command`: the first argument after the program that names a command, or the empty text) is language-1.2 source in the `bootstrap/` project, as three production roots of `CliOutput` over the canonical diagnostic of `BS-29`: `humanDiagnostics`, `wantsJson`, and `namedCommand`, each eligible for `rust-std` with exactly its declared effect, `allocation`, and each with no part of its certificate beyond 3,145,728 bytes; their rendered `rust-std` packages under the pinned rustc, and on the normative host their lowered programs under the calculus evaluator, agree with the oracle to the byte on the hand-built diagnostics and arguments, which reach every part of a diagnostic in both modes of color and both outcomes of the scan, on the committed expected diagnostics and commands of the negative fixtures, and on seeded diagnostics and arguments; each planted defect in the source is detected by the one vector it names, and the certified packages the production export publishes for the project are the committed ones; the parsing of the arguments, the choice of color for a terminal, and the JSON command result are outside the claim." + [[id]] id = "PK-01" level = "build" diff --git a/xtask/src/spec_links.rs b/xtask/src/spec_links.rs index 962afcafd8..ec77840783 100644 --- a/xtask/src/spec_links.rs +++ b/xtask/src/spec_links.rs @@ -61,8 +61,8 @@ fn parse_table(spec: &str) -> Result, Fail> { pub fn validate(root: &Path) -> Result<(), Fail> { let spec = std::fs::read_to_string(root.join("SPEC.md"))?; let rows = parse_table(&spec)?; - if rows.len() != 479 { - return Err(format!("RP-07: the §31 table has {} rows, not 479", rows.len()).into()); + if rows.len() != 480 { + return Err(format!("RP-07: the §31 table has {} rows, not 480", rows.len()).into()); } // The prose total under the table is part of the contract a reader // relies on; a row added without it would leave §31 contradicting itself. From 3467fb3847d8f5a4a47e9d890b8857e92f5c35ca Mon Sep 17 00:00:00 2001 From: humuhumu33 Date: Tue, 10 Nov 2026 01:17:16 +0000 Subject: [PATCH 3/3] BS-30: the terminal output of diagnostics, CliOutput bootstrap/src/CliOutput.lex.tex over Diagnostics: humanDiagnostics writes a failure's diagnostics as the command line writes them to stderr, with the SGR palette or without; wantsJson and namedCommand scan the arguments after the program. Lean verifies the module and each root is eligible with exactly allocation. The entrypoint, the lock, the three export roots, and the project README follow. Co-Authored-By: Claude Opus 5.5 --- bootstrap/README.md | 3 + bootstrap/lexlean.lock | 2 +- bootstrap/lexlean.toml | 2 +- bootstrap/src/CliOutput.lex.tex | 151 +++++++++++++++++++ tests/production-export/bootstrap/roots.json | 24 +++ 5 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 bootstrap/src/CliOutput.lex.tex diff --git a/bootstrap/README.md b/bootstrap/README.md index ee8e88778d..2e8f6fb36b 100644 --- a/bootstrap/README.md +++ b/bootstrap/README.md @@ -21,3 +21,6 @@ writes the rejection of a GNAF request through it. `src/Diagnostics.lex.tex` (SPEC.md §17.23, `BS-29`) imports the standard library's `Json`, `Numeral`, `Order`, and `Text`: it writes, sorts, and caps the canonical diagnostic. + +`src/CliOutput.lex.tex` (SPEC.md §17.23, `BS-30`) imports `Diagnostics` (`BS-29`), whose +diagnostic it writes for a terminal, and the standard library's `Numeral` and `Order`. diff --git a/bootstrap/lexlean.lock b/bootstrap/lexlean.lock index 594cd1a20e..a61d03ee22 100644 --- a/bootstrap/lexlean.lock +++ b/bootstrap/lexlean.lock @@ -1,7 +1,7 @@ spec = "lexlean/lock/2" language = "1.2" compiler_semantics = "635a25acb886587f8777525e778092e9599d1f2df26da59403ee39e9e299151a" -project_config_sha256 = "5276014c3c1a79b31474efbe4b25238cf5f9acfc9a4792505f584610c2ba7607" +project_config_sha256 = "2be663a6b1e0f4e72ecf1cff969140bb5078ba360f8fc46a1e606194c83b87a8" lean_toolchain = "leanprover/lean4:v4.32.1" [[workspace_file]] diff --git a/bootstrap/lexlean.toml b/bootstrap/lexlean.toml index 7bcaa26128..0da2c0d76d 100644 --- a/bootstrap/lexlean.toml +++ b/bootstrap/lexlean.toml @@ -3,7 +3,7 @@ name = "bootstrap" language = "1.2" module_prefix = "LexLeanBoot" source_roots = ["src"] -entrypoints = ["src/AxiomOutput.lex.tex", "src/CalculusCheck.lex.tex", "src/Diagnostics.lex.tex", "src/GnafValidate.lex.tex", "src/PrimitiveScan.lex.tex", "src/RuntimeValidate.lex.tex", "src/RustAssemble.lex.tex", "src/RustAst.lex.tex", "src/RustBodies.lex.tex", "src/RustLoops.lex.tex", "src/RustLower.lex.tex", "src/RustMoves.lex.tex", "src/RustPackage.lex.tex", "src/RustPrint.lex.tex", "src/RustSucceed.lex.tex", "src/RustTerms.lex.tex", "src/RustValidate.lex.tex", "src/TokenAudit.lex.tex", "src/ToolingAst.lex.tex", "src/ToolingLatex.lex.tex"] +entrypoints = ["src/AxiomOutput.lex.tex", "src/CalculusCheck.lex.tex", "src/CliOutput.lex.tex", "src/Diagnostics.lex.tex", "src/GnafValidate.lex.tex", "src/PrimitiveScan.lex.tex", "src/RuntimeValidate.lex.tex", "src/RustAssemble.lex.tex", "src/RustAst.lex.tex", "src/RustBodies.lex.tex", "src/RustLoops.lex.tex", "src/RustLower.lex.tex", "src/RustMoves.lex.tex", "src/RustPackage.lex.tex", "src/RustPrint.lex.tex", "src/RustSucceed.lex.tex", "src/RustTerms.lex.tex", "src/RustValidate.lex.tex", "src/TokenAudit.lex.tex", "src/ToolingAst.lex.tex", "src/ToolingLatex.lex.tex"] build_root = ".lexlean" lockfile = "lexlean.lock" lean_workspace = "." diff --git a/bootstrap/src/CliOutput.lex.tex b/bootstrap/src/CliOutput.lex.tex new file mode 100644 index 0000000000..3e98cece01 --- /dev/null +++ b/bootstrap/src/CliOutput.lex.tex @@ -0,0 +1,151 @@ +\begin{lexlean}{CliOutput} +\useglossary{lexlean.std.nat@1.2.0} +\importmodule{Diagnostics} +\importmodule{LexLeanStd.Numeral} +\importmodule{LexLeanStd.Order} +\title{Natural number addition} +\begin{semanticmodule} +structure{ + name: Palette, + type_parameters: [], + parameters: [], + fields: [ + {name: boldRed, type: Bytes}, + {name: bold, type: Bytes}, + {name: cyan, type: Bytes}, + {name: reset, type: Bytes} + ] +} + +definition{ + name: lit, + parameters: [literal : String], + result: Bytes, + body: (prim utf8_encode literal : Bytes), + executable: true +} + +definition{ + name: cat, + parameters: [left : Bytes, right : Bytes], + result: Bytes, + body: (prim append left right : Bytes), + executable: true +} + +definition{ + name: paletteOf, + parameters: [color : Bool], + result: Palette, + body: (if color then (record Palette {boldRed := 0x1b5b313b33316d, bold := 0x1b5b316d, cyan := 0x1b5b33366d, reset := 0x1b5b306d}) else (record Palette {boldRed := 0x, bold := 0x, cyan := 0x, reset := 0x})), + executable: true +} + +definition{ + name: place, + parameters: [span : Diagnostics::Span], + result: Bytes, + body: (cat (cat (cat (cat (project span path) (lit ":")) (LexLeanStd.Numeral::decimal (project span lineStart))) (lit ":")) (LexLeanStd.Numeral::decimal (project span columnStart))), + executable: true +} + +definition{ + name: lines, + parameters: [prefix : Bytes, items : (List Bytes)], + result: Bytes, + body: (prim list_fold (fun [prefix] (acc : Bytes) (item : Bytes) => (cat acc (cat (cat prefix item) 0x0a))) 0x items : Bytes), + executable: true +} + +definition{ + name: labelLines, + parameters: [items : (List Diagnostics::Label)], + result: Bytes, + body: (prim list_fold (fun (acc : Bytes) (item : Diagnostics::Label) => (cat acc (cat (cat (cat (cat (lit " label: ") (project item message)) (lit " (")) (place (project item span))) (cat (lit ")") 0x0a)))) 0x items : Bytes), + executable: true +} + +definition{ + name: noteMessages, + parameters: [items : (List Diagnostics::Note)], + result: (List Bytes), + body: (LexLeanStd.Order::reverseList [Bytes] (prim list_fold (fun (acc : (List Bytes)) (item : Diagnostics::Note) => (cons (project item message) acc)) (nil Bytes) items : (List Bytes))), + executable: true +} + +definition{ + name: humanOne, + parameters: [colors : Palette, given : Diagnostics::Diagnostic], + result: Bytes, + body: (let head : Bytes := (cat (cat (cat (cat (cat (cat (cat (project colors boldRed) (lit "error")) (project colors reset)) (lit "[")) (project given code)) (lit "]: ")) (cat (project colors bold) (project given message))) (project colors reset)); (let located : Bytes := (match (project given primary) + | Option.some span => (cat (cat (cat (cat (cat 0x0a (lit " ")) (project colors cyan)) (lit "-->")) (project colors reset)) (cat (lit " ") (place span))) + | Option.none => 0x); (cat (cat (cat (cat (cat (cat head located) 0x0a) (labelLines (project given labels))) (lines (lit " note: ") (noteMessages (project given notes)))) (lines (lit " help: ") (project given help))) (lines (lit " cause: ") (project given causes))))), + executable: true +} + +definition{ + name: humanDiagnostics, + parameters: [items : (List Diagnostics::Diagnostic), color : Bool], + result: Bytes, + body: (let colors : Palette := (paletteOf color); (prim list_fold (fun [colors] (acc : Bytes) (item : Diagnostics::Diagnostic) => (cat acc (humanOne colors item))) 0x items : Bytes)), + executable: true, + production: {effects: [allocation], targets: [rust-std]} +} + +definition{ + name: jsonStep, + parameters: [state : (Bool * (Option Bytes)), argument : Bytes], + result: (Bool * (Option Bytes)), + body: (if (first state) then state else (if (prim equal argument (lit "--diagnostic-format=json") : Bool) then (true, (ctor Option.some [Bytes] argument)) else (match (second state) + | Option.some previous => (if (if (prim equal previous (lit "--diagnostic-format") : Bool) then (prim equal argument (lit "json") : Bool) else false) then (true, (ctor Option.some [Bytes] argument)) else (false, (ctor Option.some [Bytes] argument))) + | Option.none => (false, (ctor Option.some [Bytes] argument))))), + executable: true +} + +definition{ + name: afterFirst, + parameters: [arguments : (List Bytes)], + result: (List Bytes), + body: (match arguments | List.nil => (nil Bytes) | List.cons program rest => rest), + executable: true +} + +definition{ + name: wantsJson, + parameters: [arguments : (List Bytes)], + result: Bool, + body: (first (prim list_fold (fun (state : (Bool * (Option Bytes))) (argument : Bytes) => (jsonStep state argument)) (false, (ctor Option.none [Bytes])) (afterFirst arguments) : (Bool * (Option Bytes)))), + executable: true, + production: {effects: [allocation], targets: [rust-std]} +} + +definition{ + name: commandNames, + parameters: [], + result: (List Bytes), + body: (cons (lit "init") (cons (lit "lock") (cons (lit "check") (cons (lit "build") (cons (lit "verify") (cons (lit "fmt") (cons (lit "migrate") (cons (lit "clean") (cons (lit "explain") (cons (lit "production") (nil Bytes))))))))))), + executable: true +} + +definition{ + name: isCommand, + parameters: [argument : Bytes], + result: Bool, + body: (prim list_fold (fun [argument] (found : Bool) (known : Bytes) => (if found then true else (prim equal argument known : Bool))) false (commandNames) : Bool), + executable: true +} + +definition{ + name: namedCommand, + parameters: [arguments : (List Bytes)], + result: Bytes, + body: (match (prim list_fold (fun (found : (Option Bytes)) (argument : Bytes) => (match found + | Option.some known => found + | Option.none => (if (isCommand argument) then (ctor Option.some [Bytes] argument) else (ctor Option.none [Bytes])))) (ctor Option.none [Bytes]) (afterFirst arguments) : (Option Bytes)) + | Option.some known => known + | Option.none => 0x), + executable: true, + production: {effects: [allocation], targets: [rust-std]} +} +\end{semanticmodule} +\end{lexlean} diff --git a/tests/production-export/bootstrap/roots.json b/tests/production-export/bootstrap/roots.json index 3211e9c799..5099330400 100644 --- a/tests/production-export/bootstrap/roots.json +++ b/tests/production-export/bootstrap/roots.json @@ -96,6 +96,14 @@ ], "version": "1.0.0" }, + { + "name": "human_diagnostics", + "root": "LexLeanBoot.CliOutput.humanDiagnostics", + "targets": [ + "rust-std" + ], + "version": "1.0.0" + }, { "name": "is_closed_lean_name", "root": "LexLeanBoot.AxiomOutput.isClosedLeanName", @@ -152,6 +160,14 @@ ], "version": "1.0.0" }, + { + "name": "named_command", + "root": "LexLeanBoot.CliOutput.namedCommand", + "targets": [ + "rust-std" + ], + "version": "1.0.0" + }, { "name": "parse_audit_output", "root": "LexLeanBoot.AxiomOutput.parseAuditOutput", @@ -271,6 +287,14 @@ "rust-std" ], "version": "1.0.0" + }, + { + "name": "wants_json", + "root": "LexLeanBoot.CliOutput.wantsJson", + "targets": [ + "rust-std" + ], + "version": "1.0.0" } ] }