Repository navigation
impl(043): enforce A-75's USD 10 testing cap - #476
Conversation
AI review (findings)Looking at the PR, which raises the testing spend cap from USD 5 to USD 10 and adds journal header migration logic (A-75). Finding 1 — Numbered list out of order in spec 043 In Finding 2 — Lock released before In drop(file);
file = migrate_header(&path, &bytes).map_err(io)?;Yet {"head": "cbfda17de066e2a0c056f4be8b22ee7447d26341", "verdict": "findings", "findings": [{"path": "specs/043-live-re-execution-at-scale/spec.md", "line": 352, "summary": "New item numbered 6 is inserted before existing item 5, producing the out-of-order sequence 4 → 6 → 5 in the rendered numbered list."}, {"path": "crates/rustev-live/src/journal.rs", "line": 519, "summary": "`drop(file)` releases the exclusive lock before `migrate_header` is called, contradicting that function's own \"The caller holds the lock\" contract and opening a race window where a concurrent opener can acquire the lock and attempt a second migration between the drop and the atomic rename."}]}Subject: cf3ae8d...cbfda17, diff digest ed41f8e3e1399cb33296dd30f59e45beb6dc2c70aba762cc81a6090bf9261dc2, 1 call(s). An AI comment is not an approval. |
Raise TESTING_CAP_UNITS to 10,000,000,000 nano-USD and migrate a testing journal header that names the superseded USD 5 cap: after the replay, under the lock, the header is replaced through an fsynced sibling file and rename, entries and sequence numbers unchanged. Every other header mismatch is still refused. A checkpoint bound to the superseded header digest resumes and is rebound to the current one. Specs 043, 012, 022, 030 and 039 state the new cap and cite A-75.
cbfda17 to
0b9f37f
Compare
AI review (no-findings)Reviewing the PR, which raises the testing budget cap from USD 5 to USD 10 (A-75) and adds atomic journal header migration. Code correctness: The migration logic in The refactoring from The The checkpoint fallback in Atomicity and crash safety:
Spec/code consistency: All changed spec files (012, 022, 030, 039, 043) and the doc strings reference A-75 consistently. Section 3.5.6 and 3.10.2 in spec 043 match what the code does. The No concrete defects found. {"head": "0b9f37f260f16cb200af20c909d0b9e2f36d93d3", "verdict": "no-findings", "findings": []}Subject: cf3ae8d...0b9f37f, diff digest 6e3ca83873e26870293bdc9473e2104899ab65aae80c9bf8ea1410978f486bbd, 1 call(s). An AI comment is not an approval. |
Enforces owner decision A-75 (2026-11-03): R-29's testing cap rises from USD 5 to USD 10 in total. The production cap (USD 25 per month) is unchanged. The A-75 decision row is in #473; this change cites it.
What changed
rustev_live::journal:TESTING_CAP_UNITSis now 10,000,000,000 nano-USD; the old value is kept asSUPERSEDED_TESTING_CAP_UNITS.SpendJournal::openaccepts a testing journal whose header names the superseded cap. It replays every line first, then, under the lock, writes a sibling file holding the new header followed by every later byte unchanged, fsyncs it, renames it over the journal (keeping its permissions) and fsyncs the directory. Entries, sequence numbers and unsettled reservations are untouched. Every other header mismatch is still refused, and a journal refused for a later line is left unchanged.SpendJournal::superseded_testing_header_digest()) resumes and is rewritten with the current digest, so a run stopped by the USD 5 cap can complete (043 3.10.5).rustev-liveandrustev-clitests now track the constant.rustev-jevPRODUCTION.md and smoke example,rustev-bedrockREADME.Checks
make gate: passmake code(build, test, clippy -D warnings, fmt, boundaries): passcargo test -p rustev-live -p rustev-jev -p rustev-bedrock --all-features,cargo test -p rustev-cli --test eval_live: passspec-spine verify043, 012, 001, 022, 030, 039: passscripts/check-authored-content.sh: pass