Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Regression system

Every discovered correctness or security bug in this repository becomes a permanent regression case. A case is never deleted once the bug is closed — it is the repository’s memory, and it fails loudly if the fix ever stops holding.

The case model

A RegressionCase pairs:

  • a stable regression id (CT-REG-001 …), independent of the issue tracker;
  • the original issue reference;
  • the affected component (which crate/module the bug lived in);
  • the version or commit the fix landed in;
  • the reconstructed minimal scenario that pins the fixed behavior — it passes with the fix in place and fails while the bug is open.

Regression scenarios are Category::Regression, registered with regression provenance, and judged with the built-in invariant registry attached: a regression is a regression if the fix stops holding.

Current cases

IdBugWhat the case pins
CT-REG-001the assertion engine read the first observation for keys that are re-recorded as a run progressestwo deposits of 40 then 10 assert the final public balance of 50
CT-REG-002an unregistered actor acting on another owner’s state was not refused by the registration check firstmallory’s transfer of alice’s state is refused as unregistered-account, not wrong-owner
CT-REG-003the ledger’s replay protection keyed on the operation idresubmitting identical content under a new id is refused as duplicate-submission

Run them with:

cargo run -p cli --bin crucible-scenarios -- run --category regression
cargo run -p cli --bin crucible-scenarios -- report

Adding a regression case

When a bug is found (by hand or by the fuzzer):

  1. Reconstruct the minimal operations that reproduce it.
  2. Add a case builder in crates/regression/src/cases.rs whose scenario asserts the fixed behavior.
  3. Register it in regression::all().
  4. For fuzz findings, use fuzz::reduce_finding to shrink to the minimal case and FuzzFinding::to_regression_case to scaffold the case (ids land in CT-REG-100..999 so they never collide with hand-authored ones).

Never delete a regression case because the issue is “fixed” — the point of the case is to stay.