Repository navigation
artifact: one UOR address scheme for every content identity (UOR-native, piece 2) - #506
humuhumu33 wants to merge 6 commits into
Conversation
A UOR address is `sha256:` and the SHA-256 of an artifact's canonical
bytes (SPEC.md §21.10), the label form of the UOR Foundation's uor-addr.
Every identity LexLean records is already that digest, so no recorded
byte moves.
content_id writes each recipe once over a sink, a SHA-256 state or a
buffer (Framed<S>, *_frames), so an identity and its canonical bytes
cannot differ. artifact::address has one function per artifact kind
returning its canonical bytes, Address with the sha256: label and a
strict parse, and identities() for a checked project, which
Engine::identities exposes. A unit test holds LexLean's canonical JSON of
{"foo":"bar"} to uor-addr's published address.
AR-15 recomputes with its own SHA-256 every identity the 26 committed
build manifests, their locks and outputs, and the 164 committed Rust
packages record (2,100 in all) and requires each to equal the recorded
one; a copy whose source changed under the committed manifest has its
source and build IDs named.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
afflom
left a comment
There was a problem hiding this comment.
Bounded review at82241baa. Keeping the existing SHA-256 identities and adding an explicit address label is the appropriate compatibility direction here; no BLAKE3 migration or producer regeneration is requested. The inspected shared-sink refactor preserves the existing frame recipes and avoids separate implementations of digest and canonical bytes. Two claims need correction before acceptance:
P2 — Make tooling evidence ownership explicit. artifacts.rs:816–835 handles tests/tooling by recomputing build_id from the recorded source_id and semantic_id, checking compiler semantics/outputs, then returning. It does not independently establish those two recorded IDs. The body candidly says the existing tooling cases reproduce them, while AR-15/§21.10 promise every recorded identity without that qualification. Connect those existing exact-source obligations explicitly to the claimed evidence and scope AR-15 accurately. Reuse their evidence; do not add duplicate tooling builds or a second universal gate merely to repair the wording.
P2 — Correct the cross-kind domain guarantee. §21.10 says two framed kinds never share an address, but Tree and CompilerSemantics deliberately share lexlean-tree-v1; raw file bytes can also equal a framed message. Kind is external to the address. Describe byte-content identity and the typing supplied by recorded fields accurately, and distinguish that from GNAF's per-kind domain requirement. A forced identity migration is not necessary to make this proposal honest.
Owner-reported2,100 comparisons are scoped local evidence, not independently reproduced here. Default proof/kernel/axiom-policy checks remain; source review does not establish final acceptance. Existing owner retains the corrections and qualification, and #468/#316 do not gain a new prerequisite or replacement executable.
The canonical bytes of a project's identities are a hidden free function, api::content_identities, and not an Engine method: §24.1 fixes the Engine's public entry points at seven. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cheme # Conflicts: # CHANGELOG.md
afflom
left a comment
There was a problem hiding this comment.
The CL13 API-shape correction is credited at be991d5: the identity helper is now a hidden free function rather than an eighth Engine entry point, with the existing AR15 call site updated. The focused delta does not resolve the two findings in review5884058513: tooling source/semantic IDs still rely on separate evidence while the normative claim is unqualified, and the cross-kind guarantee still exceeds the shared Tree/CompilerSemantics domain and raw-byte addressing behavior. Align the claims and explicitly name existing evidence owners; no digest migration, duplicate tooling build or new universal gate is requested.
For this PR and companion #498, the newly started manual runs remain scoped to their exact b8b6-based heads. Both drafts currently conflict with actual release fd7cedd (#499 and #474), so those runs cannot qualify the future reconciled tree. #498's previously reviewed inventory/selected-RUSTC/import-order findings also remain unchanged. Please disposition the small source/claim findings, compose actual release history while retaining applicable products, and update the bodies before resulting-head readiness and acceptance. Preserve the running gates and their results; this review requests no cancellation, rerun, competing patch or blanket identity wave. Independent sequencing receipt pr498-506-current-sequencing records the delta and limits.
afflom
left a comment
There was a problem hiding this comment.
Current-head delta review: 1ae9d4a integrates actual release 6a02d2c with ordered parents be991d5 + 6a02d2c. The previous release-integration blocker is resolved. The hidden free-function CL13 correction and unchanged identity recipes retain credit; this integration adds no language/schema/product change requiring another identity producer.
The two findings from review5884058513 remain: artifacts.rs:812–835 computes tooling build identity over recorded source/semantic IDs, while §21.10/AR-15 remain unqualified; address.rs still shares the Tree/CompilerSemantics domain, so the claimed cross-kind separation exceeds the byte-address behavior. The smallest owner correction is to name and bind the existing tooling evidence obligations and accurately describe byte identity plus external field typing. Reuse that evidence; no digest migration, duplicate tooling build or replacement universal gate is requested.
Update the body’s old base/count/no-dispatch narrative, then qualify the corrected final head. Current CI43525943926/repro43525943909 are pending, and earlier canceled/manual results do not establish this tree’s full acceptance. Independent bounded receipt: pr506-1ae9-owner-delta/receipt.json. Existing owner retains implementation and landing; no competing patch or CI-control action.
One address scheme for every content identity LexLean records: a UOR address is
sha256:plus the SHA-256 of an artifact's canonical bytes. Every recorded identity already is that digest, so no recorded byte moves.Where the scheme comes from
The UOR Foundation has no single address definition for raw bytes. All its sources write an address as
<alg>:<64 lowercase hex>over canonical bytes. They differ on the hash and on whether the kind is tagged inside the hash:uor-addrCONFORMANCE.md:46-48, the closest thing to a normative contract, JSON only:sha256:+ hex(SHA-256(JCS+NFC(json))), a 71-byte label, no kind inside the hash.uor-jcs-nfcSPEC.md v1.1 (draft): the samesha256:label.blake3:+ hex(BLAKE3(bytes)).u:digest: blake3 is primary, sha256 secondary.This PR takes
sha256:. Each kind's canonical bytes are the message LexLean already hashes:The result: every identity ever recorded is already its UOR address without the prefix, and the label is
uor-addr's form. A unit test shows that LexLean's canonical JSON of{"foo":"bar"}hasuor-addr's published address,sha256:7a38bf81…. Choosing BLAKE3 instead would re-address every lock, manifest, package, record and attestation. That choice is the maintainer's.What changed
artifact::content_idwrites each recipe once, over a sink: a SHA-256 state for the identity, or a buffer for the canonical bytes (*_frames,Framed<S>).FramedHasherkeeps its API. The identity and the canonical bytes cannot differ.artifact::addressprovides:Address:sha256:display, and a strictparsethat refuses another algorithm, upper-case hex, or a wrong length.Kind, with each kind's domain.file,tree,compiler_semantics,project_config,source,semantic,build,attestation,pdf_recipe,rust_program.identities, the canonical bytes of all of a checked project's identities.api::content_identities(&Engine, &CheckRequest)exposes them for a project. It is a free function, because §24.1 (CL-13) fixes theEngine's public methods at seven.lexlean::compiler_semantics_files(language)returns the rows of the embedded tree; the compiler-semantics ID is now computed from the same rows.AR-15
AR-15 recomputes every recorded identity with its own SHA-256, independent of the compiler's digest, and requires equality:
source_id,semantic_id,build_idandcompiler.semantics_id, the lock'scompiler_semanticsand everyworkspace_file, and every build output committed beside the manifest, with its length;program, and thecompiler_semanticsthe package was exported under.Result: 2,100 identities across 26 projects and 164 packages, all equal.
The plant is a copy of
nat-add-zerowhose theorem label changed while it kept the committed manifest. AR-15 names itssource_idandbuild_idas stale.Limits:
tests/tooling/*) render as embedded projects, so for them AR-15 holds the build ID to the build recipe over their recorded source and semantic IDs, plus their compiler-semantics ID and outputs. The tooling cases already reproduce their source and semantic IDs.expected/build/declarations) are not in AR-15 yet; their recipe is indeclaration_id.rs.What does not change
No recorded identity, lock, manifest, package, record or attestation moves, and the compiler-semantics ID is unchanged.
Gates run locally
All run in WSL on
release/v0.426e5e0a:cargo fmt --checkclippy -D warningslexleanlib testsaddressandcontent_idvalidate-model(494 IDs) andvalidate-spec-links--test bddconformance_ar_15: 361 s, 2,100 identities, plant refusedThe register grows from 493 to 494 IDs: README, the SPEC total,
spec_links.rsand RP-07's row count all move with it.No full-gate dispatch has run yet.
🤖 Generated with Claude Code