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
| Id | Bug | What the case pins |
|---|---|---|
| CT-REG-001 | the assertion engine read the first observation for keys that are re-recorded as a run progresses | two deposits of 40 then 10 assert the final public balance of 50 |
| CT-REG-002 | an unregistered actor acting on another owner’s state was not refused by the registration check first | mallory’s transfer of alice’s state is refused as unregistered-account, not wrong-owner |
| CT-REG-003 | the ledger’s replay protection keyed on the operation id | resubmitting 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):
- Reconstruct the minimal operations that reproduce it.
- Add a case builder in
crates/regression/src/cases.rswhose scenario asserts the fixed behavior. - Register it in
regression::all(). - For fuzz findings, use
fuzz::reduce_findingto shrink to the minimal case andFuzzFinding::to_regression_caseto scaffold the case (ids land inCT-REG-100..999so 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.