Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
17aea02
fix(snapshot): canonicalize structured values without a redundant dep…
afflom Nov 3, 2026
d0969f4
test(bootstrap): avoid discarded BS-15 full-library runs
afflom Nov 10, 2026
5088c0f
style(bootstrap): apply pinned rustfmt to assembly regression
afflom Nov 10, 2026
a342e22
Merge accepted BS-21 release base into BS-15 efficiency candidate
afflom Nov 10, 2026
614c978
docs: proposal for contracts on code LexLean did not generate (extern…
humuhumu33 Nov 12, 2026
513ea15
verify: every part names its toolchain by address
humuhumu33 Nov 12, 2026
78aa77f
Merge remote-tracking branch 'origin/release/v0.4' into uor/toolchain…
humuhumu33 Nov 12, 2026
3f0096f
ci: the bootstrap export's custody names executable addresses
humuhumu33 Nov 12, 2026
34c3ccd
Merge remote-tracking branch 'origin/release/v0.4' into uor/toolchain…
humuhumu33 Nov 12, 2026
041b7ab
lexlean: build_identity is an internal module (CL-13)
humuhumu33 Nov 12, 2026
68061c8
Merge remote-tracking branch 'origin/release/v0.4' into uor/toolchain…
humuhumu33 Nov 13, 2026
afe6c67
Merge branch 'release/v0.4' into dot/457-bs15-render-materialization
afflom Nov 13, 2026
491cb33
fix(canonical-json): compare duplicate keys after escape decoding
maurathat Nov 13, 2026
a49071f
docs(proposals): address review 5875193015 on external contracts
claude Nov 13, 2026
29be144
docs(proposals): fold verification-memo (#508) into this docs carrier…
claude Nov 13, 2026
c5efb24
Merge release/v0.4 (6a02d2c7d5) into uor/toolchain-addresses
humuhumu33 Nov 13, 2026
f8854bf
Merge pull request #459 from UOR-Foundation/dot/457-bs15-render-mater…
afflom Nov 14, 2026
65bfb48
model-write: regenerate CONFORMANCE.md for VR-23's new statement
humuhumu33 Nov 14, 2026
11f16b8
Merge pull request #498 from UOR-Foundation/uor/toolchain-addresses
humuhumu33 Nov 14, 2026
69de740
Merge pull request #492 from UOR-Foundation/docs/proposal-external-co…
afflom Nov 14, 2026
8d52665
Merge origin/release/v0.4 into fix/canonical-json-escaped-dup-keys
claude Nov 14, 2026
508542a
Merge origin/release/v0.4 into codex/snapshot-canonical-depth
claude Nov 14, 2026
f6e9af7
ci: the Intel host tests accept the repository's renamed spelling
claude Nov 14, 2026
e1e0354
ci: drop the committed Python bytecode and ignore it
claude Nov 14, 2026
f309afb
Merge pull request #520 from UOR-Foundation/fix/canonical-json-escape…
afflom Nov 14, 2026
6b1e573
Merge pull request #533 from UOR-Foundation/fix/intel-repo-name-case
afflom Nov 14, 2026
d444c23
Merge origin/release/v0.4 (#520, #533) into codex/snapshot-canonical-…
claude Nov 14, 2026
0a9891e
Merge pull request #431 from UOR-Foundation/codex/snapshot-canonical-…
afflom Nov 14, 2026
89fb21e
Merge release/v0.4 into release/v0.5
claude Nov 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec/.lexlean/
# and make `cargo package` read a dirty working directory.
/release/

# Python bytecode the CI helper scripts' unit tests leave beside them.
__pycache__/
*.pyc

# Editor and OS noise.
.DS_Store
*.swp
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ and Unreleased holds what has landed since.

## Unreleased

- release/v0.4 is merged forward again, from `6a02d2c7` to its head: #431, #459, #492, #498,
#520 and #533. v0.4's §9.4, §22.11 and `VR-23` text is written into the modules of `spec/`.
The build script's address of the `rustc` that built the crate (#498) is hashed with the
certified `Sha256` package, compiled by that `rustc` into a hasher in `OUT_DIR`, so the
shipped crate still declares no `sha2` (`SL-05`, R6).
- release/v0.4 is merged forward into release/v0.5 (#404, #405). Both lines had registered
`PF-24` and `SM-38` for different claims; the released maintenance line keeps its numbers
(`PF-24` decision regions, `SM-38` declaration IDs) and the v0.5 claims move unchanged to
Expand Down Expand Up @@ -289,6 +294,27 @@ and Unreleased holds what has landed since.

## Unreleased

- Canonical JSON refuses duplicate keys that differ only in their escapes (SPEC.md §21.7,
`AR-11`, #475). The duplicate check compared each key as written, so `{"a":1,"\u0061":2}`
passed it and `Json::parse` returned `{"a":2}`, dropping the first member; keys are now
compared after escape decoding. Equal keys in distinct objects stay admitted, and no valid
canonical document is affected.
- Every part of a verification names its toolchain by address (SPEC.md
§22.11, §9.4). A shard writes `toolchain.json` (`lexlean/verify-toolchain/1`)
beside its output: the SHA-256 of the `lean`, `lake`, and `leanchecker` its
preflight hashed, of the running `lexlean`, and the address of the `rustc`
that compiled it (its executable and `rustc_driver` library, which the build
script hashes). A part that reads another refuses it (`LLI9001`, naming the
part, the tool, and both addresses) unless all five equal its own. A record
names only the executable it ran, so a part that ran another `lake`,
`lexlean`, or `rustc` was accepted before. `VR-23` plants another `lake`
address in a shard's output, and on unix a join whose own `lake` differs by
one byte. The bootstrap export's custody record becomes
`lexlean/ci-bootstrap-export/2`: it also names the SHA-256 of the pinned
`lake`, `lean`, and `leanchecker` and the address of the `rustc` that built
the exporting binary, and a leg whose own differ refuses the export (`RP-14`
plants another `leanchecker` and another `rustc`). Published directories,
attestations, and `expected/verify` are unchanged.
- Releases and regeneration need no hand steps (SPEC.md §9.4). `regenerate.yml`
gains the job `deliver`: when the regenerated commit heads one open pull
request of this repository, the patch is committed on it, pushed to the pull
Expand Down
2 changes: 1 addition & 1 deletion CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `VR-20` | `build` | The verifier process width is an operational resource profile selected only by the environment, defaulting to 1 and refusing any malformed value with LLV7017, and it enters no lock, identity, or verified artifact. |
| `VR-21` | `build` | A multi-module project whose imports form nontrivial frontiers verifies at width 1 and at a larger width to byte-identical verified directories and the same attestation identity, observed axiom sets, and policy rows, and no completion order orders a record or changes which failure is reported. |
| `VR-22` | `build` | Performance telemetry is written only to the CI evidence directory the environment names, a verification with telemetry on publishes byte-identical artifacts to one without, and telemetry planted in a verified artifact fails the gate. |
| `VR-23` | `build` | A project verified as the parts of one run, each shard running the processes its plan names with the oleans of the shards it needs and the join reading every shard's records, publishes a verified directory byte-identical to the whole verification's with the same attestation identity, and a shard whose plan leaves a module without its imports, a join missing a record, or a join reading a record of an executable other than its own, is refused. |
| `VR-23` | `build` | A project verified as the parts of one run, each shard running the processes its plan names with the oleans of the shards it needs and the join reading every shard's records, publishes a verified directory byte-identical to the whole verification's with the same attestation identity, and a shard whose plan leaves a module without its imports, a join missing a record, a join reading a record of an executable other than its own, or a part that ran a toolchain other than its own, is refused. |

## Cited authorities

Expand Down
8 changes: 4 additions & 4 deletions SPEC.md

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions VERIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,62 @@ Outside `vv`:

## Falsifiability records

### semantic snapshot nesting can fail

Before the correction for #430, the focused
`artifact::snapshot::tests` library filter ran two cases: existing shallow
snapshot bytes passed, while serializing a 160-level linked value panicked
at `snapshot.rs` with `recursion limit exceeded`. The snapshot DTO had
already been constructed; its redundant byte parse imposed serde_json's
raw-reader nesting limit on that structured value.

Snapshot serialization now converts its structured value directly into the
canonical JSON domain. The checks excluding null and non-integer numbers
remain shared with raw parsing; raw parsing still checks duplicate keys.
The deep regression round-trips the complete snapshot and its content digest,
and the shallow regression compares exact bytes with the previous recipe.
All 221 LexLean library tests pass on release/v0.4 with ordinary test stacks.
This is library evidence, not a complete `vv` or consuming-app attestation.


Each gate below was made to fail by planting a defect, running the gate's command, recording the failure, and removing the defect. The observed lines are verbatim gate output (paths abbreviated to the repository root). `cargo xtask release-check` requires a `### <gate> can fail` record for every gate and audit named in `repo_model::release::GATES`.

### BS-15 render corpus materialization

Issue #457 changes only the construction of the two render vectors in
`crates/conformance/src/cases/bootstrap/rust_package.rs`. The previous code
encoded every full-library render, filtered the evaluator vector, then
replaced the large native inputs with their existing 4,096-byte prefixes.
The discarded full runs were inputs to neither differential. The direct
assembler retains the same order: accepted manifests, shaped inputs, then
seeded render mutants. At or below 16,384 bytes it uses the unchanged run and
expected files in both vectors; above that boundary it constructs only the
same native prefix and recipe outcome. The complete-library recipe assertion
against `package::package` in `accepted` is unchanged.

The construction change alters no corpus generation, seed, count, negative
fixture, planted defect, native comparison, certificate limit, export check,
host condition, timeout, or compiler-semantics input. On the original
`cf76090d` base, the native render vector contains 735 runs and the evaluator
vector 241; 494 full-library argument encodings that neither vector consumed
are no longer materialized. After accepted `BS-21` (#395, `c66f83d`) adds its
package, the same construction retains 737 native renders and 241 evaluator
renders, avoiding 496 unused full-library encodings. These are work-count
deductions, not measured CI speedups; the accepted member's corpus and count
changes are retained.

The library unit regression `render_corpora_preserve_inputs_and_outcomes`
compares both vectors with the previous assembler on both profiles, distinct
supplied package outcomes, recipe outcomes, and libraries of 0, 4,096,
16,383, 16,384, 16,385 and 32,768 bytes. Local validation in the authoring
environment passed whitespace checks and an independent assembly model:
24 evaluator and 36 native results were identical in order and bytes across
27 empty/mixed collection cases, and changes to the boundary, prefix and
supplied-outcome routing were detected. That model does not execute Rust or
the package renderer. Rust formatting, Clippy, the library regression and the
complete release gate were not run locally because the environment has no
Rust toolchain; they remain required acceptance evidence on the final tree.

### Intel host partition custody and complete evidence

The three non-Intel auxiliary host legs keep their existing locked,
Expand Down
12 changes: 12 additions & 0 deletions crates/conformance/src/cases/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,18 @@ pub(crate) fn run(id: &str) {
Json::parse(b"{\"a\":{\"b\":1,\"b\":2}}").is_err(),
"nested duplicate keys are rejected"
);
assert!(
Json::parse(b"{\"a\":1,\"\\u0061\":2}").is_err(),
"a key spelled with an escape duplicates its plain spelling"
);
assert!(
Json::parse(b"{\"x\":{\"a\\\"b\":1,\"a\\u0022b\":2}}").is_err(),
"nested keys that decode equal are duplicates"
);
assert!(
Json::parse(b"[{\"a\":1},{\"\\u0061\":2}]").is_ok(),
"keys that decode equal in distinct objects are not duplicates"
);
assert!(
Json::parse(b"{\"a\":[{\"b\":1},{\"b\":2}]}").is_ok(),
"equal keys in distinct objects are not duplicates"
Expand Down
183 changes: 144 additions & 39 deletions crates/conformance/src/cases/bootstrap/rust_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,37 @@ fn render_run(render: &Render, expected: Files) -> Run {
)
}

/// The ordered render corpora consumed by the evaluator and rustc.
fn render_corpora(
renders: &[(Render, Files)],
shaped: &[Render],
mutants: &[Render],
) -> (Vec<Run>, Vec<Run>) {
let mut within = Vec::new();
let mut compiled = Vec::new();
let inputs = renders
.iter()
.map(|(render, files)| (render, Some(files)))
.chain(shaped.iter().chain(mutants).map(|render| (render, None)));
for (render, files) in inputs {
if render.library.len() <= EVALUATOR_LIBRARY {
let expected = files.cloned().unwrap_or_else(|| files_of(render));
let run = render_run(render, expected);
within.push(run.clone());
compiled.push(run);
} else {
// rustc expands each argument byte into an array element, so
// the native corpus uses the existing 4,096-byte prefix. The
// full-library run feeds neither consumer; accepted() still
// holds its complete library to the package::package recipe.
let mut render = render.clone();
render.library.truncate(4_096);
compiled.push(render_run(&render, files_of(&render)));
}
}
(within, compiled)
}

/// A manifest the oracle accepts, what `renderPackage` is given for it, and
/// the two files `package::package` wrote.
fn accepted(manifest: &Manifest) -> Option<(Render, Files)> {
Expand Down Expand Up @@ -866,45 +897,7 @@ pub(super) fn case() {
}
render_mutants.push(render);
}
let render_runs: Vec<Run> = renders
.iter()
.map(|(render, files)| render_run(render, files.clone()))
.chain(
shaped
.iter()
.chain(&render_mutants)
.map(|render| render_run(render, files_of(render))),
)
.collect();
let within: Vec<Run> = renders
.iter()
.map(|(render, _)| render)
.chain(&shaped)
.chain(&render_mutants)
.zip(&render_runs)
.filter(|(render, _)| render.library.len() <= EVALUATOR_LIBRARY)
.map(|(_, run)| run.clone())
.collect();
// rustc compiles each byte of an argument as one array element, and the
// libraries of the committed packages are megabytes together, so a render
// whose library is beyond the evaluator's bound runs under rustc on the
// first 4,096 bytes of it, held to the recipe, which reads it only as
// bytes to digest.
let compiled: Vec<Run> = renders
.iter()
.map(|(render, _)| render)
.chain(&shaped)
.chain(&render_mutants)
.zip(&render_runs)
.map(|(render, run)| {
if render.library.len() <= EVALUATOR_LIBRARY {
return run.clone();
}
let mut render = render.clone();
render.library.truncate(4_096);
render_run(&render, files_of(&render))
})
.collect();
let (within, compiled) = render_corpora(&renders, &shaped, &render_mutants);
eprintln!(
"BS-15: {} manifests ({} accepted), {} and {} rule inputs, {} and {} mutants, {} renders under the evaluator ({:?})",
manifests.len(),
Expand Down Expand Up @@ -1029,3 +1022,115 @@ pub(super) fn case() {
}
eprintln!("BS-15: passed in {:?}", started.elapsed());
}

#[cfg(test)]
mod tests {
use super::*;

fn previous_corpora(
renders: &[(Render, Files)],
shaped: &[Render],
render_mutants: &[Render],
) -> (Vec<Run>, Vec<Run>) {
let render_runs: Vec<Run> = renders
.iter()
.map(|(render, files)| render_run(render, files.clone()))
.chain(
shaped
.iter()
.chain(render_mutants)
.map(|render| render_run(render, files_of(render))),
)
.collect();
let within: Vec<Run> = renders
.iter()
.map(|(render, _)| render)
.chain(shaped)
.chain(render_mutants)
.zip(&render_runs)
.filter(|(render, _)| render.library.len() <= EVALUATOR_LIBRARY)
.map(|(_, run)| run.clone())
.collect();
// rustc compiles each byte of an argument as one array element, and the
// libraries of the committed packages are megabytes together, so a render
// whose library is beyond the evaluator's bound runs under rustc on the
// first 4,096 bytes of it, held to the recipe, which reads it only as
// bytes to digest.
let compiled: Vec<Run> = renders
.iter()
.map(|(render, _)| render)
.chain(shaped)
.chain(render_mutants)
.zip(&render_runs)
.map(|(render, run)| {
if render.library.len() <= EVALUATOR_LIBRARY {
return run.clone();
}
let mut render = render.clone();
render.library.truncate(4_096);
render_run(&render, files_of(&render))
})
.collect();
(within, compiled)
}

#[test]
fn render_corpora_preserve_inputs_and_outcomes() {
let mut renders = Vec::new();
for std in [false, true] {
for length in [
0,
4_096,
EVALUATOR_LIBRARY - 1,
EVALUATOR_LIBRARY,
EVALUATOR_LIBRARY + 1,
EVALUATOR_LIBRARY * 2,
] {
let render = Render {
scaffold: scaffold::get().expect("the scaffold").clone(),
name: format!("render_{length}"),
version: "1.2.3".to_owned(),
std,
program: "f".repeat(64),
sources: vec!["a".repeat(64)],
effects: vec!["overflow".to_owned()],
exports: vec![("run".to_owned(), 0)],
library: (0u8..=255).cycle().take(length).collect(),
};
// Distinct supplied files catch replacing the package's
// expected outcome with the recipe for a small library.
let files = (
format!("package cargo: {std} {length}").into_bytes(),
format!("package provenance: {std} {length}").into_bytes(),
);
renders.push((render, files));
}
}
let shaped: Vec<Render> = renders
.iter()
.map(|(render, _)| {
let mut render = render.clone();
render.name = "a\"b\\c".to_owned();
render.scaffold.library = "A.rs".to_owned();
render
})
.collect();
let mutants: Vec<Render> = shaped
.iter()
.map(|render| {
let mut render = render.clone();
render.exports.reverse();
render.sources.clear();
render
})
.collect();
let expected = previous_corpora(&renders, &shaped, &mutants);
let observed = render_corpora(&renders, &shaped, &mutants);
assert_eq!(
observed, expected,
"both ordered vectors are byte-identical"
);
assert_eq!(observed.0.len(), 24, "both profiles include the boundary");
assert_eq!(observed.1.len(), 36, "rustc keeps every render");
}
}
Loading
Loading