Repository navigation
P6 milestone 1: Rust conformance core — reproduces the golden vectors byte-for-byte - #25
Merged
Merged
Conversation
…1/3: manifests) First landing of the single Rust port. decima-core reproduces the heartbeat reference byte-for-byte: canonical encoding (sorted-key JSON/UTF-8/NFC, arbitrary-precision ints), domain-separated BLAKE2b-128 content addressing, Ed25519 derived identity + golden signatures, Weft linear-append semantics, and the Weave fold subset exercised by the golden vectors. decima-verify re-derives every value in heartbeat/protocol/reference_vectors.json from first principles and exits 0 — 107/107 checks match, cargo test 10/10. Honest subset documented in rust/README.md: INVOKE/ATTEST folds, non-register reducers, leases, rotation, ingest, snapshots, persistence not yet ported. No unsafe; deps blake2/ed25519-dalek/serde_json/unicode-normalization/hex, exact-pinned via Cargo.lock.
…2/3: lock + hashing/crypto/weft) First landing of the single Rust port. decima-core reproduces the heartbeat reference byte-for-byte: canonical encoding (sorted-key JSON/UTF-8/NFC, arbitrary-precision ints), domain-separated BLAKE2b-128 content addressing, Ed25519 derived identity + golden signatures, Weft linear-append semantics, and the Weave fold subset exercised by the golden vectors. decima-verify re-derives every value in heartbeat/protocol/reference_vectors.json from first principles and exits 0 — 107/107 checks match, cargo test 10/10. Honest subset documented in rust/README.md: INVOKE/ATTEST folds, non-register reducers, leases, rotation, ingest, snapshots, persistence not yet ported. No unsafe; deps blake2/ed25519-dalek/serde_json/unicode-normalization/hex, exact-pinned via Cargo.lock.
…3/4: weave/model/capability/reference) First landing of the single Rust port. decima-core reproduces the heartbeat reference byte-for-byte: canonical encoding (sorted-key JSON/UTF-8/NFC, arbitrary-precision ints), domain-separated BLAKE2b-128 content addressing, Ed25519 derived identity + golden signatures, Weft linear-append semantics, and the Weave fold subset exercised by the golden vectors. decima-verify re-derives every value in heartbeat/protocol/reference_vectors.json from first principles and exits 0 — 107/107 checks match, cargo test 10/10. Honest subset documented in rust/README.md: INVOKE/ATTEST folds, non-register reducers, leases, rotation, ingest, snapshots, persistence not yet ported. No unsafe; deps blake2/ed25519-dalek/serde_json/unicode-normalization/hex, exact-pinned via Cargo.lock.
…4/4: conformance tests + verifier) First landing of the single Rust port. decima-core reproduces the heartbeat reference byte-for-byte: canonical encoding (sorted-key JSON/UTF-8/NFC, arbitrary-precision ints), domain-separated BLAKE2b-128 content addressing, Ed25519 derived identity + golden signatures, Weft linear-append semantics, and the Weave fold subset exercised by the golden vectors. decima-verify re-derives every value in heartbeat/protocol/reference_vectors.json from first principles and exits 0 — 107/107 checks match, cargo test 10/10. Honest subset documented in rust/README.md: INVOKE/ATTEST folds, non-register reducers, leases, rotation, ingest, snapshots, persistence not yet ported. No unsafe; deps blake2/ed25519-dalek/serde_json/unicode-normalization/hex, exact-pinned via Cargo.lock.
Adds the rust-conformance job and clears the lint debt so it can run with the same rigor as the Python lanes. WHY THE GATE. decima-verify already re-derives every value in heartbeat/protocol/reference_vectors.json and exits non-zero on mismatch, but nothing ran it — the port's conformance was hand-verified only. That left the golden vectors enforced on the PYTHON side alone (check 510): a deliberate, reviewed regeneration of the vectors would turn 510 green against the new bytes while the Rust port silently fell out of conformance, with nothing to say so. The vectors exist to be a continuously enforced port contract; this is the half that makes that true of the port itself. It is the same "proven mechanism, no caller" shape the roadmap re-audits kept finding, here as "proven verifier, no gate". THE JOB (4 steps): cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test, cargo run -p decima-verify. No third-party action is added — Rust ships preinstalled on the ubuntu runner, so this lane introduces nothing new to pin and audit, which is deliberate given this workflow's stated threat model for mutable action tags. checkout is the same pinned SHA the other jobs use. PROOF THE GATE BITES (not a green-always lane): injecting a real port divergence — removing the domain separator from the digest — makes the verify step exit 1 (34/107 checks fail) and the test step exit 101 (6/10 tests fail); reverting returns both to 0. LINT DEBT CLEARED so the new lane starts green: cargo fmt applied across the crate (formatting only), and three clippy warnings fixed — two redundant closures in weave.rs (sort_by(|a, b| value_cmp(a, b)) -> sort_by(value_cmp)) and a push-after-creation in decima-verify (Vec::new + 5 pushes -> vec![]). All behavior-preserving, confirmed by re-running the full verifier afterward: 107/107 checks, state_root 28aacd8ab21e83790eb81563b5de4e26, unchanged. Also adds rust/.gitignore for /target/. The crate shipped without one, so a clean debug build leaves 226 MB / 1087 files of artifacts untracked and one `git add` away from the history. Full CI sequence simulated locally from a clean build (rm -rf target): all four steps pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ath9hAwj37EriRGEDrj9a
Judge-M
force-pushed
the
p6/rust-conformance-core
branch
from
August 5, 2026 10:40
6bd91f6 to
2ca5fbb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What landed
The first milestone of the single Rust port, under
rust/:decima-core(library,#![forbid(unsafe_code)]) reproduces the Python heartbeat reference (heartbeat/decima/) byte-for-byte:hashing— canonical encoding (sorted-key JSON, UTF-8/raw non-ASCII, compact separators, recursive NFC, no floats, arbitrary-precision ints) and domain-separated BLAKE2b-128 content addressing ("decima:v0.1:" || kind || 0x00 || bytes; kinds cell/event/blob/snapshot)crypto— Ed25519 (RFC 8032, deterministic → golden signatures); named mint, self-certifying keyed mint, DerivedKeyStore-equivalent custodyweft— append-only signed log; linear append, Lamport clocks, NFC-on-entry, content-addressed event ids, author signs the eid string's UTF-8 bytesweave— the fold: deterministic total order(lamport, event_id), idempotent by event id, register merge substrate (LWW + MV/adjudicated head preservation), CONTENT/EDGE/TYPE_DEF, RETRACT modes WITHDRAW/REDACT/SUPERSEDE/TERMINATE with cascade-root recording, DERIVED_AUTHORITY/LEASE_TREE cascade as a pure derived pass,state_rootmodel,capability(grant + downhill attenuate),reference(a Rust re-run of the exact_fold_vectorscript)decima-verify(binary) — loadsheartbeat/protocol/reference_vectors.jsonand re-derives every value in it from first principles; prints a per-section report; exits 0 iff everything matches.rust/README.mddocuments the layout and the honest subset. Deps: blake2 / ed25519-dalek / serde / serde_json / unicode-normalization / hex, exact-pinned viaCargo.lock.Verification evidence
cargo test— 10/10 conformance unit tests pass (canonical, NFC collapse, big-int, blobs, principals, golden signatures + tamper fail-closed, weft linear append, fold golden root, fold idempotence).cargo run -p decima-verify— exit 0, 107/107 checks match:state_root=28aacd8ab21e83790eb81563b5de4e26(matches the golden vector)Not yet ported (honest list)
None exercised by the reference vectors: INVOKE and ATTEST folds (attestations, adjudication collapse, promotion), the or-set / counter / append-log / sequence / map reducers, lease-expiry derivation, capability delegation verification / authorization, key-rotation succession chains, event ingest/sync, snapshots, time-travel windows, SQLite persistence.
How to run