Repository navigation
impl(067): spend journal identity: journal_id and created_at_ms in new headers (increment 1a, journal half) - #551
Conversation
AI review (no-findings)Reviewing the diff across the three changed files.
The relaxation of
The
The implementation record (paragraph added under "Implementation record") accurately describes the code change. The spec No concrete defects found. {"head": "998ee470552a39bc18cf698e43b02c6e06c0faf5", "verdict": "no-findings", "findings": []}Subject: 3a3c9bb...998ee47, diff digest 4b4b6195ec445b74f43f0b9f688ee2704a00e49128763ec877072f02843a5a7b, 1 call(s). An AI comment is not an approval. |
AI review (no-findings)Reviewing the diff across the four changed files:
No concrete defects found. {"head": "219cd181060cb333b0cbdcce9966ca44e20daf3f", "verdict": "no-findings", "findings": []}Subject: 3a3c9bb...219cd18, diff digest 9e12752a7de1f0e9c5ed976b18c0f2f683911364ae85e855f4d31f62bea0ede1, 1 call(s). An AI comment is not an approval. |
219cd18 to
8ac52cc
Compare
AI review (no-findings)Reviewing the four changed files against each other and the governance context.
The
The implementation record is added within an existing spec. The diff touches only the No concrete defect found across all changed paths. {"head": "8ac52ccbc9283b139d46bb2d26046dcf93fc9d1b", "verdict": "no-findings", "findings": []}Subject: ce699ae...8ac52cc, diff digest 640257730860164c731f90bbfc4dc370dc862ece93b20af915f9fb16d7a1785f, 1 call(s). An AI comment is not an approval. |
8ac52cc to
47ffe56
Compare
AI review (no-findings)Review
|
47ffe56 to
c2f6d47
Compare
AI review (findings)Review
|
|
Review note: false positive. In |
…w headers (increment 1a, journal half)
c2f6d47 to
745dcc4
Compare
AI review (no-findings)Reviewing the diff carefully for bugs, security issues, and correctness problems.
TOCTOU mitigation – Migration path – Identity computation –
Conformance fixtures – The input fixture No concrete defect found that the supplied evidence supports. {"head": "745dcc4acfa520543fb6a2fc751d0da130d1dbf0", "verdict": "no-findings", "findings": []}Subject: 811643f...745dcc4, diff digest b13238a4ee6df0b80373ab3736e954bffc95049ce71c822b1db44e59fdbeecc6, 1 call(s). An AI comment is not an approval. |
Summary
Spec 067 increment 1a, journal half (split out of #550, whose AI review timed out on size; #550 keeps the run binding and is rebased onto this once it merges).
crates/rustev-live/src/journal.rs(3.4.5):Headergains optionaljournal_idandcreated_at_ms(schema name unchanged;deny_unknown_fieldskept, so an earlier release refuses a new journal rather than misreading it).Header::newcomputesjournal_id = tagged_digest("rustev.spend-journal-id/1", canonical_bytes({created_at_ms, run_id}))from the injected clock and the creating run's id.Header::parseaccepts a header with both or neither member, a well-formed id, and the current or superseded testing cap (A-75).JournalIdentity { id, created_at_ms, created: this_run | earlier | legacy }; a legacy header is never stamped (no time invented).JournalOpening::prepare(path, kind, clock, run_id, require_existing)reads the header without creating anything (refuses a missing file withJournalError::Missingwhen asked), exposesheader_digest(),superseded_header_digest()andidentity();open()takes the lock and refuses withJournalError::Changedif the header bytes changed since prepare. An empty file left by an interrupted creation gets an identity on open.with_cap, a bounded byte scanner over the validated header line with a typed fallback), so identity and layout survive; the checkpoint digest is over the actual header bytes.SpendJournal::openkeeps its signature and creates under run idstandalone;open_for_runnames the run;identity()andheader_digest()accessors.The run binding (
RunOptionsjournal path/switch/clock, checkpoint bound to the actual header,journalreport member, CLI--require-existing-journalandnew_journal) is in #550. This half changes no run, checkpoint or CLI behavior: checkpoints still bind the fixed testing header digest until #550.Spec: 067 3.4.5. The implementation record paragraph is held for the increment 4 closure pull request (no spec or derived edit here, so 067 code pull requests stop colliding in the queue).
Spec-Drift-Waiver: spec 067 (approved, A-86) already extends crates/rustev-live/ for 3.4.5; under the 0.6.0 orchestrator rule of 2026-11-07 22:05, 067 implementation record paragraphs land together in the increment 4 closure pull request, because parallel record edits collided on .statecraft/derived and ejected each other from the merge queue. Covered by the owner's 0.6.0 preapproval of 2026-11-07.
Re-blessed conformance files
Rebased over #557 (live conformance cases), whose journals carry the old header. Re-blessed with the suite's own mechanism (
RUSTEV_BLESS=1 cargo test -p rustev-conformance --test live, then--test manifest), never by hand: in eachtools/rustev-conformance/expected/live/*/journal.jsonland infixtures/live/journal-cap.jsonlonly the header line changes (gainsjournal_idandcreated_at_ms); thecases/live/*.jsonandcases/manifest.jsonchanges are only the matching sha256 pins. No other golden moves. 14 files, 21 lines each way.Tests
crates/rustev-live/tests/journal.rs: ids for(1, "23.x"),(12, "3.x"),(1, "3.x")distinct and equal to an independently computedtagged_digestover the canonical record; reopen reportsearlierwith unchanged bytes; superseded-cap migration keeps identity and returns the original bytes; a hand-written legacy header (whitespace, reordered members) islegacy, unstamped and its digest is over its actual bytes; an empty file gets an identity on open. The crash suite's release clock now counts the journal creation read (crates/rustev-live/crash/tests/crash.rs). Thewith_capcode was exercised by #550's full runs (cargo test -p rustev-live,-p rustev-cli, crash crate,-p rustev-jev,-p rustev-bedrock, clippy, fmt, all passing); after the rebase:cargo test -p rustev-conformance --locked(full),cargo test -p rustev-live -p rustev-live-crash --locked(full),make gate.