Repository navigation
impl(067): live runs bind the journal identity: checkpoint digest, journal member, --require-existing-journal, new_journal (increment 1a, run binding) - #550
Conversation
AI review (findings)Reviewing the diff for bugs, security problems, and inconsistencies. with_cap – unchecked slice access Inside the let mut next = i;
while bytes[next].is_ascii_whitespace() { next += 1; }
if bytes[next] == b':' {
next += 1;
while bytes[next].is_ascii_whitespace() { next += 1; }None of these accesses guards against Superseded-cap resume test broken by assert change
{"head": "d15f109f1838971b6801f2f8f55075997dc3db3a", "verdict": "findings", "findings": [{"path": "crates/rustev-live/tests/run.rs", "line": 2072, "severity": "medium", "category": "correctness", "summary": "Changing assert_eq! to assert_ne! is correct, but the unchanged test body then installs SpendJournal::superseded_testing_header_digest() (legacy no-identity format) in the checkpoint; a new-format journal's superseded_header_digest() includes journal_id and created_at_ms fields, so the digests cannot match and the migration resume path returns checkpoint-mismatch instead of succeeding."}, {"path": "crates/rustev-live/src/journal.rs", "line": null, "severity": "low", "category": "correctness", "summary": "The with_cap function accesses bytes[next] without a bounds check inside the depth==1 'cap'-key branch; unreachable on validated headers but would panic on a truncated or empty input."}]}Subject: 78dfabd...d15f109, diff digest e429e72c9fd02b155893a8c3b80e119f8bcb55ca957cf1341832268518c46997, 1 call(s). An AI comment is not an approval. |
|
Review note: the medium finding on |
42e3d12 to
bd720f7
Compare
AI review (no-findings)Reviewing this PR, which refactors journal opening from call sites into a two-phase Key design properties I verified against the diff:
No concrete defects found. {"head": "bd720f7adafa3ff21f3fafdb963c440c5a6200a5", "verdict": "no-findings", "findings": []}Subject: c2f6d47...bd720f7, diff digest bf1e68d7756b0ba5c902ce57f28065e7731dd6e3a1894bc4ecb8553c648f0711, 1 call(s). An AI comment is not an approval. |
c2f6d47 to
745dcc4
Compare
bd720f7 to
471b8cc
Compare
AI review (findings)Reviewing the diff, which refactors journal-opening from call sites into Correctness of TOCTOU handling. Resume path Checkpoint digest migration. The legacy path (
Usage text omission. Crash-test No other defects found in the supplied evidence. {"head": "471b8cccd3a6f445012e9aa48ddd81ec74d40018", "verdict": "findings", "findings": [{"path": "crates/rustev-cli/src/args.rs", "line": 489, "severity": "low", "category": "other", "summary": "The new 'rustev eval live' usage line documents --run-deadline-ms but omits --host-cap-ms, which is defined in the args spec for this command and is a user-visible flag."}]}Subject: 745dcc4...471b8cc, diff digest 4666f4fb80517a7e316f198ce285f6e32291c3824e0d3b5fb66ea9e2cbe05b7f, 1 call(s). An AI comment is not an approval. |
AI review (no-findings)Reviewing the diff, which moves journal opening from call-site Key properties checked:
No concrete bugs, security issues, or rule contradictions supported by the supplied evidence. {"head": "d10b7c40ac65a6f4f79925cf3f5692574adeb9bc", "verdict": "no-findings", "findings": []}Subject: 745dcc4...d10b7c4, diff digest 7a16b3fe55a4646683b9dacac9def8950a88993177169ae75ca8c74d26149bbc, 1 call(s). An AI comment is not an approval. |
…n report journal member, --require-existing-journal and new_journal (increment 1a, run binding)
…-bless its outputs
d10b7c4 to
b58cd99
Compare
AI review (no-findings)Reviewing the PR, which moves journal opening into Design integrity check: The sequence in TOCTOU between
Conformance fixture consistency:
No concrete defects found. {"head": "b58cd9954d535289be400b2c4e26912fd85fb326", "verdict": "no-findings", "findings": []}Subject: c575145...b58cd99, diff digest 7a16b3fe55a4646683b9dacac9def8950a88993177169ae75ca8c74d26149bbc, 1 call(s). An AI comment is not an approval. |
Summary
Spec 067 increment 1a, run binding (the journal half is #551; this pull request is stacked on #551's branch and is retargeted to
mainonce #551 merges). The AI review of the earlier, unsplit head timed out on size.rustev-liverun (src/run.rs,src/documents.rs):RunOptionsgainsjournal_path,require_existing_journalandjournal_clock(breaking library change, allowed at the 0.6.0 position, 067 3.9.4).preparereads the header throughJournalOpeningbefore any output exists, binds the digest of the actual header in the checkpoint (043 3.10.1), refuses a missing journal withjournal-missingwhen the switch is set (3.4.6), and refuses a resume whose journal is missing or replaced (checkpoint-mismatch); the superseded-cap exception (043 3.10.2) is computed from the actual header.PreparedRun::open_journalopens exactly the checked journal;executerefuses a journal whose header digest is not the bound one.rustev.live-run/1andRunOutcomegainjournal { id, created_at_ms, created }(3.4.5); old reports without it still parse.crates/rustev-cli):rustev eval live --require-existing-journal(switch, usage text added); stdout gainsnew_journalwhen the run created the journal; journal creation time comes from--now-ms(the testing period istotal, so accounting is unchanged).open_journal),rustev-bedrock'slive_runexample, and the live conformance runner (tools/rustev-conformance/src/live.rs, test(067): live conformance cases and their Rust runner (increment 3, part 1) #557), which now prepares with the journal path andSetClock(now_ms)and opens throughPreparedRun::open_journal.Goldens: the live conformance outputs are re-blessed with the suite's mechanism (
RUSTEV_BLESS=1 cargo test -p rustev-conformance --test live, then--test manifest); a structural comparison of everyexpected/live/*/out/*.jsonagainst the base shows only/journal(new member),/bindings/journal_header_digestand/identities/journal_header_digestchanged, and eachjournal.jsonlchanges only its header line (the id now derives from the case's run id instead ofstandalone);cases/changes are sha256 pins. Otherwise the only moved expectation iseval live's inline stdout line incrates/rustev-cli/tests/eval_live.rs(new_journal); no golden file, plan golden orPlanIdchanges.Spec: 067 3.4.5, 3.4.6, 3.10.1, 3.10.3. The implementation record paragraph and the
extendsedge forintegrations/rustev-bedrock/are held for the increment 4 closure pull request.Spec-Drift-Waiver: spec 067 (approved, A-86) already extends crates/rustev-live/ and crates/rustev-cli/ for 3.4.5 and 3.4.6; the Bedrock example change only follows the changed
RunOptions. Under the 0.6.0 orchestrator rule of 2026-11-07 22:05, 067 implementation record paragraphs and edges 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.Tests
crates/rustev-live/tests/run.rs: first/second/fresh/legacy runs (this_run/earlier/legacy, spend before, ids), replaced journal on resumecheckpoint-mismatchbefore lock or output changes, the switch on missing (no journal, lock or out dir) and existing journals, a journal changed between prepare and open refused, superseded-cap checkpoints still resume, old reports round-trip.crates/rustev-cli/tests/eval_live.rs: the same through the CLI, including help text andnew_journal.Local, on top of #551:
cargo test -p rustev-conformance --locked(full),cargo clippy -p rustev-conformance --all-targets -- -D warnings; earlier, on top of #551 and current main:cargo test -p rustev-live -p rustev-live-crash -p rustev-cli -p rustev-surface --locked,cargo build -p rustev-bedrock --examples --locked,cargo clippy --workspace --all-targets --locked -- -D warnings,cargo fmt --all --check,make gate; earlier head alsocargo test -p rustev-jev -p rustev-bedrock.