Repository navigation
verify: every part names its toolchain by address (UOR-native, piece 1) - #498
Conversation
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, hashed by the build script). A part that reads another refuses it (LLI9001, naming the part, the tool and both addresses) unless all five equal its own. A process record names only lean or leanchecker, 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, runs a join whose own lake differs from the pinned one by one byte; both are refused. Published directories, attestations and expected/verify do not change, and neither does the compiler-semantics ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The custody record becomes lexlean/ci-bootstrap-export/2. Beside what `rustc -vV` and `lean --version` report, it names the SHA-256 of the pinned toolchain's lake, lean and leanchecker and the address of the rustc that compiled the exporting binary (SPEC.md §22.11). A leg whose own executables differ refuses the export. A version banner is the same for a rebuilt or patched binary; the bytes are not. RP-14 plants another leanchecker and another rustc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
afflom
left a comment
There was a problem hiding this comment.
Bounded source review at34c3ccd3:
-
P2 — Do not silently emit a launcher-only compiler address. In build.rs around116, failed bin/lib read_dir calls are continued and filter_map(Result::ok) drops entry errors; the only final assertion requires bin/rustc. No condition requires a rustc_driver library. A missing/unreadable/unrecognized driver inventory can therefore compare equal on both sides while omitting the component SPEC§22.11 says is essential. Fail closed for the required inventory, or explicitly define and validate a supported alternative layout rather than silently downgrading the identity.
-
P2 — Bind the selected compiler. Around100, RUSTC supplies -vV and --print=sysroot, but the hashed executable is sysroot/bin/rustc, not necessarily the selected RUSTC executable. A different compiler or wrapper reporting the same sysroot can retain the same recorded address. Bind the resolved selected executable with an explicit wrapper/driver scope, or reject unsupported selections and narrow the public claim accordingly. This is about the stated compiler identity, not a demand for unrelated full environment provenance.
Ordering observation: verify/mod.rs1348–1352 calls partition::import before check_toolchain; import already copies oleans and parses process records. This conflicts with the new 'before reading any record' claim. The inspected path still refuses before subsequent Lean consumption, so no proof-acceptance bypass was demonstrated. Put the address comparison before that work if early refusal is required, or accurately state the boundary.
The bounded review credits closed five-address parsing, all-five comparisons, and shared custody-v2 producer/consumer checks retaining existing run/tree/pin/bundle checks. No replay or axiom-policy deletion was found. Owner-reported local tests were not repeated; draft/full qualification remains pending. These addresses may supply a narrow #468 custody input, but do not complete its source/environment controls or authorize rebuilding/refreezing #316/#468 tools. Existing contributor retains implementation; no competing patch or gate was started.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-addresses # Conflicts: # CHANGELOG.md
afflom
left a comment
There was a problem hiding this comment.
Bounded review credits actual6a02 integration: ordered parents68061 +6a02, treec8578593, and no language/schema/generated-product delta. This resolves the old base-composition gap without indicating an identity writer.
The three prior source dispositions in5880517426 remain unchanged: rustc_identity still silently skips required inventory read failures and only asserts bin/rustc; selected RUSTC supplies metadata but its executable is not itself bound; partition import still precedes check_toolchain while the prose promises comparison before reading any record. No proof-acceptance bypass is asserted. Resolve the required inventory, selected-executable scope and ordering-or-claim accuracy in one owner correction, preserving existing custody/axiom checks.
The historical manual43472785457 is cancelled, not running or accepted; old successful gates do not qualify this combination. Current CI43525392869/repro43525392855 are queued. Existing owner retains implementation and qualification; no logs, checks, producers or CI controls were repeated.
afflom
left a comment
There was a problem hiding this comment.
The c5ef→65b delta fixes the missing VR-23 toolchain clause in CONFORMANCE.md: one generated projection line, with build/verify implementation unchanged. This is useful projection credit, not resolution of the three source findings in5880517426/5899385408. Required driver inventory, selected-RUSTC executable binding and import-before-check/prose accuracy still need owner disposition. Existing custody and axiom checks remain preserved; no proof bypass is asserted.
Current CI43538556422/repro43538556389 are pending on65b. Preserve earlier results with their original heads; no identity writer, duplicate build or replacement gate is requested by this review. Independent receipt pr498-65b-projection-delta-review/receipt.json.
…urity-patch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
|
Postlanding readback: #498 was externally merged as11f16b88db582d1a024aff8153d07d0beabf3b44, ordered parents[f8854bf,65bfb484]. Actual tree d386b58f differs from head tree b1d0443d; the incoming difference is VERIFICATION.md plus rust_package.rs from #459. This does not change the three source findings in5880517426/5900325073: required driver inventory, selected-RUSTC executable binding, and import-before-check versus its claim still need the implementing owner's follow-up. PR run43538556422 completed only3 successful jobs with15 skipped; full manual43552089060 on65b remains active. Landing run43552094663 was cancelled. None is full acceptance of the actual landed tree, and canceled jobs are not combined. The following actual69de release gate43555579969 is pending with its own repro43555579964; preserve evidence at each exact tree. Please carry the existing three dispositions in one bounded corrective follow-up and keep #468's broader custody/tooling work open. Root did not perform this merge or approve it retrospectively; no duplicate checks or producer were started. |
…ng fix Only CHANGELOG.md conflicted: the nesting entry stays first, #498's follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every part of a verification now names its toolchain by address, and a part that reads another refuses it unless all five addresses equal its own.
What changed
toolchain.json(lexlean/verify-toolchain/1) beside its output. It holds the SHA-256 of thelean,lakeandleancheckerits preflight hashed, the SHA-256 of the runninglexlean, and the address of therustcthat compiled thatlexlean.rustcaddress is computed bycrates/lexlean/build.rs. It is the SHA-256 of one line<sha256> <sysroot-relative path>per file of the compiler'srustcexecutable andrustc_driverlibrary, in path order. Both files are hashed becauserustcitself is only a launcher; the compiler is the driver library.rustc -vVis embedded beside it (lexlean::build_identity).partition::check_toolchaincompares every part's addresses with the reader's own before it reads any record. A mismatch is refused withLLI9001, naming the part, the tool and both addresses; so is a missingtoolchain.json.lexlean/ci-bootstrap-export/2. Besides the version banners it already had, it now names the SHA-256 of the pinnedlake,leanandleanchecker, and therustcaddress of the binary that made the export. A leg whose own differ refuses the export. A version banner reads the same for a rebuilt or patched binary; the bytes do not.leanorleanchecker, so before this a shard that ran a differentlake,lexleanorrustcwas accepted by the join.What the tests show
partitionunit test: a part whoselake,lexleanorrustcaddress differs is refused, naming the tool. A part withouttoolchain.jsonis refused. A record of anotherleanis still refused as before.VR-23, file plant: anotherlakeaddress is written into a real shard's output; the join refuses it withLLI9001.RP-14custody plants: a record naming anotherleanchecker, or anotherrustc, is refused, and the refusal namesexecutablesalone.VR-23, real binary (unix): the join's own toolchain is a symlinked copy of the pinned one whoselakehas one appended byte. Its preflight hashes the changed file, and it refuses the shards that ran the pinnedlake, naming both addresses.What does not change
expected/verifyare unchanged, so nothing is regenerated.language/orschemas/moved.VR-23's statement adds "or a part that ran a toolchain other than its own". It is updated inmodel/ids.toml, the §31 row,CONFORMANCE.mdand the scenario.toolchain.jsonand therustcaddress.Not in this PR, and why
rustcinside the attestation itself.schemas/is part of the compiler-semantics ID (§21.2). Adding a field toattestation.schema.jsonwould move that ID and regenerate every lock, export, golden and record, Atlas included. Thelexleandigest the attestation already records fixes therustcoutput it came from. This is the maintainer's call.Gates run locally
All run in WSL on the tree merged with
release/v0.426e5e0a, which includes #483:cargo fmt --checkclippy -D warningslexleanlib testspartitionandtoolchain(7 passed)validate-model,validate-spec-links--test bddconformance_vr_23(17 s, with the real changedlake)Full gate: dispatch run 43324805389 on 041b7ab (which includes the CL-13 fix) passed every job.
🤖 Generated with Claude Code