Repository navigation
Correct finding 102: one request up to 40%, due tickets land together - #95
Merged
Merged
Conversation
What was wrong: the public counts had drifted from the code, and nothing caught it. At 54decc4 the README badge, results table, FAQ and SECURITY.md said 15 Kani harnesses (the core has 17, 09 says 17/17); README said 98 findings (09 §4 has 103 rows, 1..103 without a gap); 123 program tests (Floor 43, Vault 80) where floor.rs and vault.rs hold 45 and 86; 8 fuzz targets (fuzz/Cargo.toml has 9 [[bin]]s); 10 Floor core tests (12); the threat model's I15 cited 41 Floor tests; README and 09 said the differential runs 31 commands. Root cause: every count was typed by hand in several places, and no check compared any of them with the code. Fix: tools/claims.py (stdlib Python, like floor_check.py) computes each count from the files themselves: Kani harnesses by name, from their attributes; test functions per suite file, without #[ignore]d ones and reading past comments, literals and nested attribute brackets; the JS tests outside comments and strings, less skipped/todo ones; golden outputs and regression blocks as golden.py --check compares them; the fuzz [[bin]]s; the rows of 09 §4. It then matches 37 phrasings of those counts in every Markdown file in git's index, the CI workflow and the status page, case-insensitively and across line breaks, and fails on any mismatch. A passed/total result must be all passed, since a run with failures is a red CI, not a state the docs describe. More checks: - 09 §5.1's table must list exactly the harnesses in the source. The README's "14 for every value" and 09's "3 at small width" are derived from it. - Every file in the two LiteSVM/core test directories must be mapped to a count or listed with the reason it isn't. - A rule that matches no current statement fails, so rewording a sentence can't leave its rule checking nothing. - KEPT holds statements of a past state, each with its reason: the decision log's 14 harnesses and the submission's 95 findings. Each must match exactly once and overlap a rule match. scripts/check.sh runs the self-test and the check right after fmt, so CI's always-on `check` job fails fast on a stale count. Docs corrected to the tree, each from a run in this branch: - Kani 17/17. scripts/prove.sh on 15 Oct: "Complete - 17 successfully verified harnesses, 0 failures, 17 total" (4:43 wall). The README cites 09 §5.1's 14 Oct run (227 s), so one run is quoted in both places. - 131 program tests. scripts/check-programs.sh: floor 45 passed, vault 86 passed; curve_vectors and e2e_world 0 passed, 1 ignored each. sha256 floor 508e5a99…, vault b07655d9…, harbor 543be60b… - Core suites from cargo test: properties 26, exhaustive 6, floor 12, units 25, adversarial 7, cascade 2. node --test: 176. All equal to the static counts. - 103 findings, with the post-submission sentence restated: 96–103 are fixed in this tree but not yet on devnet, except 100 and 102, which are stated. - 9 fuzz targets. The 6 Oct 10-minute run had 8, and the guardian-set target has no recorded 10-minute run or coverage measurement, so the README and 09 now say that. - 33 differential commands, the distinct tags in check.sh's seed-11 run. - docs/12: 96–103 recorded on 13 and 14 Oct. docs/08's "+ 42 more Floor tests" stays as written: its status table is dated 10 Oct, when floor.rs had 43. Proof the check can fail, each mutant red and then reverted to green: - Docs: FAQ back to 15; an 18th harness not in 09 §5.1; a Vault test added (132 ≠ 131); a 104th finding row; a 10th fuzz bin; a 177th JS test; README back to 98 findings; a 09 §4 row deleted ("row 50 is numbered 51"); 09's "17 total" set to 16; a regression block dropped; 04's "36 fixtures" set to 35; an unmapped tests/zz/main.rs. - Checker logic, caught by the self-test: ignore not excluded; no number lookbehind; spaces matched literally; never comparing; stale or dead KEPT entries passing; kept spans not skipped or only matched at their start; no word boundary on KEPT; liveness not tracked; nesting depth ignored; attribute run not broken by code; raw strings, multi-char escapes or char literals not lexed; JS strings not lexed or dropped; skip:false read as skipped; cfg_attr/proof_for_contract harnesses missed; comments counted. - An unanchored line-comment pattern hung on 40 `//` (killed at 120 s). The test-count scanner now strips comments first. One equivalent mutant: resetting attributes after a non-fn item, since the item's own text resets the run anyway. Review: seven code-review passes (high). Every valid finding was fixed. Declined, with reasons: - "136 program tests": curve_vectors and e2e_world are #[ignore]d (run log above). - Checking only totals in passed/total: it would let a stale "15/17" stand. A results file written by the run itself is the real fix, now in the backlog. - "N findings" matching subsets: a false positive fails loudly, and KEPT takes a subset with its reason. - Narrowing ci-changes.sh's tools/* selector: that runs fewer jobs, so it is its own reviewed change. Known limits, stated in the code: counts come from source text, so a cfg-gated test or one registered in a JS loop needs a run to confirm. Sibling search: git grep for every count phrasing above across *.md, ci.yml and cloud/status. ci.yml's "core's 17 harnesses" and 09 §5.1's "Complete … 17 total" are now ruled too. No program source changed (git diff on crates/ and programs/ is empty), so the sBPF builds are unchanged. scripts/check.sh: ALL CHECKS PASSED. Rebased onto main 1045cd9 (#85, #86) for its own PR: README and docs/12 keep main's devnet and findings rows (devnet runs PR #85; 104 findings); counts are main's tree: programs 133 (Floor 45, Vault 88). claims.py --self-test OK, claims.py OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README and 12 name the findings since the submission as a range, "96–104". claims.py only knew the phrasing "N findings", so when a finding is added the range goes stale and the check still passes. It did once already: main's 104 left "96–103" in both (fixed on main by #86). - claims.py: one rule per sentence ties the range end to the 09 §4 row count: README "96–N were found after the submission", 12 "…at submission; 96–N recorded". One rule each, so rewording either sentence fails the "matches no current statement" guard. Locked to the wording because README's "96–99, 101 and 103 are fixed" (a sub-range) must not match. Either dash. The README rule is not read after a digit (WHOLE, now one guard shared by N, that rule and the KEPT matcher). The 12 rule's context is a lookbehind, which also does that job: a match overlapping the kept "95 findings at submission" would be skipped, and "96–N recorded" elsewhere must not match. Any whitespace after the semicolon. Self-test cases for each rule and branch, including a sub-range before the range, "96–N recorded" outside 12's sentence, the kept entry beside the range, and a reflowed line. - 05 §10's caption said the figures come from a build of "this tree". They come from #35's (25b5a87, 8 Oct; `git log -S` on the figures), and 12 commits dated after 8 Oct change Vault or core source. The caption now says so, and names the two later figures and their sources: a first deposit at a low bump (finding 75) and the full-ledger row (its own test, 14 Oct). S8's "< 1.4M" is the transaction limit, as its row says. The wording of README and 12 is main's (#86). An earlier version of this commit (55f4a7b, never integrated) reworded those sentences itself; #86 has since rewritten them, so only the rules move across, adapted. Evidence (tasks/sync-main/evidence.sh, its log final-evidence.log): claims.py OK, findings 104. Plants, each exit 1 and restored: README 96–103 and 96–105 ("states 103/105, the tree has findings = 104"); 12 96–103, also reflowed with two spaces; README "were found" → "came" and 12 "recorded" → "logged" ("rule … matches no current statement"), the latter also with "96–104 recorded" planted in README. "96–103 recorded" planted in README alone: exit 0 (not read). Self-test mutants, each red: delete either rule, drop the README rule's digit guard, narrow either to an en dash, loosen either to a bare "96–N", drop the 12 rule's context, make it a plain prefix instead of a lookbehind, allow exactly one space. Restored: "self-test OK: 39 claim cases, 22 count cases, 39 rules". Not checked: the fixed/stated split in the same sentences ("96–99, 101 and 103 are fixed…; 100, 102 and 104 are stated") and 12's dates ("13–14 Oct"). When finding 105 lands, check.sh fails until both ranges say 105, but nothing makes the split or the date follow. Also left (code review, pre-existing, backlog 1c): FAQ's "~10.3k" Floor stop vs 06 §7's 10,461, 06 §7's "this tree", and 09 §2's "(10 Oct 2026)" heading above today's counts, and 05 §10's Target column (≤ 25k deposit, ≤ 35k G2), where the test allows 12k more for Harbor's CPI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check() skipped a whole rule match when it overlapped a KEPT statement at all, so a current count matched by the same rule (the harness count in a Kani table row whose dated "16/16 verified" is kept) went unchecked. The self-test asserted that: "16 harnesses ... **16/16 verified**" with 16/16 kept gave 0 errors against kani = 17. Now each captured number is exempt only when it lies inside a kept statement; the rest of the match is checked, and a match counts as live whenever any of its numbers is checked. Self-test: that case now expects 1 error, and a new case (17 harnesses, the same kept 16/16) expects 0. With the old check() and the new cases: "self-test FAILED: ... 0 errors, expected 1". With the fix: self-test OK (40 claim cases, 22 count cases, 39 rules); claims OK on the tree, so no stale count was hiding behind a kept statement. Found by the owner's code review of PR #87. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/12's range rule used a lookbehind, with a comment that a match overlapping the kept "95 findings at submission" would be skipped whole. Since the previous commit only a kept statement's own numbers are exempt, so that comment was false and the workaround unneeded. The rule is now the plain "submission; 96–N recorded". Evidence: self-test OK (40 claim cases); claims OK on the tree; a planted "96–103 recorded" in docs/12 is caught: "states 103 (the tree has findings = 104)". Found by the owner's second code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three checks in programs/vault/src/genesis.rs had no test that fails
without them. Disabling each one, line-neutral, left the whole program
suite green (coverage map, iteration 1):
- import_backing after the seal (:401). require_no_seal_review passes
once sealed, so this is the only guard. Without it an admin key
credits itself backing that no balance check ever sees and takes it
as its own money, past the limiter (G2).
- upsert_asset after the seal (:300). Without it the admin loosens an
asset at once instead of through propose_change's 72h review (G4).
- execute_seal naming a vault twice (:501). Without it the seal names
one vault twice in place of another and skips the other's
claims-vs-balance check (solvency at seal).
One test for each. The import test refuses a new and an existing
backing. The upsert test applies the same loosening before the seal
and sees it pass, then after the seal sees a loosening, a tightening
and a first listing (for a closed-lane vault made after the seal)
refused. Under V3 the listing case alone, with the other two removed,
also fails ("expected failure, got success"). The seal test uses three vaults and names one
twice, both next to each other and apart. Naming all three, it sees
the skipped vault's uncovered import refused (the attack the check
stops), and once that import is covered the same seal passes.
Evidence (tasks/coverage-map/mutants.sh: apply the mutant, rebuild
sBPF, run all of programs/tests):
V2 genesis.rs:401 `if p.sealed && false`
KILLED by after_the_seal_the_admin_cannot_import_backing
V3 genesis.rs:300 `if p.sealed && false`
KILLED by after_the_seal_the_admin_cannot_upsert_an_asset
V5 genesis.rs:501 `... == vault_key && false`
KILLED by the_seal_checks_each_vault_once
V5b genesis.rs:499 compare only with the previous vault
KILLED by the_seal_checks_each_vault_once (a two-vault version
of the test, adjacent duplicate only, let it survive)
Each was killed only by its new test, with "expected failure, got
success". With the checks in place: scripts/check-programs.sh passes
(Vault 89 passed, was 86; Floor 45). Test-only change: sBPF hashes
unchanged (Floor 508e5a99..., Vault b07655d9..., Harbor 543be60b...).
Counts: tools/claims.py (check.sh) checks the stated test counts. README
badge and row, docs/09 rows 34 and 87 now say Vault 91, 136 program
tests; claims OK (programs 136, vault_programs 91).
Sibling search: the other GenesisOnly and DuplicateAccount returns in
the programs. The create_vault genesis check (genesis.rs:190) is killed
by after_the_seal_a_new_vault_starts_with_its_unbacked_lane_closed. The
release recipient-owner check (custody.rs:295) is killed by
a_release_cannot_pay_the_lifeboat. These survive and are left for a
separate change: deposit source == vault tokens (custody.rs:98), release
recipient == vault tokens (:291), and the first owner test in the
ticket recipient check (:509).
Rebased onto main 1045cd9 for its own PR (main adds two Vault tests, so
the counts are Vault 91, programs 136); claims.py OK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B's review of 3277800: a seal check comparing each vault only with the first one named (genesis.rs:499 pairs[..(i * 3).min(3)], B1) survived, since both duplicate cases repeated position 0. Code-review passes then found two more partial checks that three vaults cannot tell apart: one comparing with the first and the previous vault (B6), and one run only on the last vault named (B7). The test now seals four vaults and repeats one as the first named, next to its copy mid-list, and neither. A pass also found that no test pays the vault's own token account. custody.rs:291 refuses it, and so does the owner check at :295, since the vault PDA owns that account; that is why removing :291 alone (S3) survived. a_release_cannot_pay_any_account_the_vault_owns now pays it. Evidence (tasks/coverage-map/mutants.sh, each rebuilds sBPF and runs all of programs/tests): V5 (no duplicate check) KILLED by the_seal_checks_each_vault_once V5b (previous vault only) KILLED by the_seal_checks_each_vault_once B1 (first vault only) KILLED by the_seal_checks_each_vault_once B6 (first or previous vault) KILLED by the_seal_checks_each_vault_once B7 (last vault named only) KILLED by the_seal_checks_each_vault_once By hand: :291 removed and :295 made to let the vault account through: a_release_cannot_pay_any_account_the_vault_owns FAILED, 88 others pass. scripts/check-programs.sh: PROGRAM CHECKS PASSED, Floor 45, Vault 89. sBPF hashes unchanged (vault b07655d9..., floor 508e5a99..., harbor 543be60b...). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/05 section 9 row 6 named the DuplicateAccount checks as their own test, and described the recipient rule as recipient != vault account. The program refuses more: release and settle refuse any recipient whose owner is the Vault PDA (the vault token account, the lifeboat, any other) or the protocol PDA (custody.rs:295, :509). The row now says so, keeps release's address check (recipient != vault token account, :291), uses section 1's account names, and names the tests for the seal and release checks. It also keeps the limit custody.rs:296-303 states: an account another PDA owns is not refused (09 finding 89). That comment cites 07 section 2 for this, which does not say it; left for a line-neutral fix. Deposit's source != vault token account check (:98, mutant S2) and settle's owner check (:509, mutant S5) have no test: each mutant survived the whole program suite (sibling search of the first commit on this branch). The row says so rather than imply they are tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment on the vault-token case said the payout is refused by its address and by its owner. Only the address check (custody.rs, recipient == vault_tokens) can run: it comes first. Deleting the owner check leaves this assertion green, and deleting the address check does too, because the owner check then refuses it (owner == the vault PDA). The stray-account case above pins the owner check. The two checks are defence in depth for this account; the comment now says so. Found by the owner's code review of PR #87. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diff_runner.py --replay had its own skip rule, `l.strip() and not
l.startswith("#")`, tested on the unstripped line: an indented `# note`
was kept, so the replay counted a line neither side runs, and on a
mismatch named the wrong line. The Python side (protocol.run_lines) and
the Rust worker (bulkhead-diff main.rs) both skip it.
Fix: one skip rule, protocol.runnable (strip, then drop blank and `#`
lines), used by run_lines and --replay.
Test: reference/fixtures/replay-comments.txt (two commands, an indented
comment and a blank line); check.sh requires its replay to report
`lines=2 identical`.
- fixed: "OK seed=1 lines=2 identical (K=2)": green.
- M1, --replay back to the old rule: "lines=3 identical (#=1 K=2)": red.
- M2, runnable testing the unstripped line: "lines=3 ...": red.
The replay itself exits 0 on both builds (both sides skip the line), so
a plain regression fixture could not catch this; the count can.
Split out of b5da813 (the triple differential) so the fix stands alone,
with the in-tree test the owner's review asked for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JavaScript port of the limiter views (cloud/lib/limits.mjs: the
status page's and the guardian's worst-case figures) was checked only
against the Python reference, on the reasoning that Python is checked
against Rust. That link did not hold everywhere:
- max_unbacked_over (the G1 bound behind worst1h/24h/72h and the
guardian's 72-hour rule) was compared with Rust only for windows up
to 1e10 ms and durations up to 1e11 ms (diff_runner gen_pure). A
LimitConfig window is u32 seconds, up to ~4.3e12 ms.
- capacity_from_ref was compared only at gen_pure's edge values;
extreme_diff.py covered U/P/V/E/EL, not K or M.
- The JS availableNow was never compared with Rust: the "A*" cases
build arbitrary bucket states on the Python side only. Nothing ran
limiter sessions with full-range capacities and windows.
Changes:
- diff_runner.py: gen_full_range (K, M, E, EL: u16 bps, u64
capacities and balances, windows up to u32::MAX seconds, any i64
duration, EMA steps both far out and inside one TAU) and
gen_full_range_session (full-range capacities and windows, the
program's 7-day horizon, amounts and time steps sized to them; one
session in ten has a delay past the horizon).
- extreme_diff.py: its 40,000 lines per seed are unchanged (checked
byte-identical to the old generator for seeds 5/9/11); 20,000
gen_full_range lines and 300 full-range sessions follow. It refuses
a worker older than the core (check_worker), as diff_runner does;
before, it compared against whatever binary was there. It runs the
worker through run_worker, so a worker that exits non-zero fails the
run even when it answered every line. On a mismatch it prints the
first one's replayable prefix (diff_runner.fixture_for), since a
session line can't be replayed alone.
- limits.test.mjs: Python and the Rust worker both answer every
generated line; the test requires Rust == Python and JS == Python.
30,000 gen_pure lines as before, 10,000 full-range lines, and 1,500
limiter sessions (a third full range) in which the JS side follows
the state through the R/Z/W answers and computes every A. The
arbitrary-state A* cases stay Python-only: the worker has no command
that sets a state. Coverage floors stay at 2,000 per command, now
per source (realistic, full range), so losing the full-range lines
fails the test. Another floor counts the A views taken while a
bucket has a backlog (2,706 full range, 3,778 realistic; floor
1,000 each), so sessions that stop moving the buckets fail it too.
A failure prints the line with its session before it, a fixture
for diff_runner.py --replay. Same number of tests (176).
- run_worker names the first unanswered line, its replayable prefix and
the worker's stderr when it panics, and the signal when it is killed
(its buffered answers are lost, so no line is named), instead of a
bare CalledProcessError. It finds that line with protocol.runnable,
the one skip rule (previous commit).
Counts from a run (realistic / full range): K 9,943 / 2,528,
M 10,076 / 2,549, E 4,986 / 2,509, EL 4,995 / 2,414, session A
7,442 / 5,584; A* 10,000. Of 9,976 full-range E lines (seed 3),
6,098 have 0 < dt < 86,400, where the step is a fraction. In 500
full-range sessions (seed 1), 6,525 of 12,261 R lines are X
QueueFull: the payout would release past the 7-day horizon (an
amount far over capacity, a backlog, or in one session in ten a delay
past the horizon; bulkhead_ref.py:87-91). That is the domain, not a
generator fault.
Evidence (tasks/triple-differential/it4/mutants-final.log and
mutants-2/-3.log): each mutant against the old test (autopilot/
integration's file), the new test, and extreme_diff seeds 5/9/11
(mismatch counts):
- JS maxUnbackedOver clamps t at 1e12 ms: old pass, new FAIL.
- JS availableNow treats a window over 2^40 ms as full: old pass,
new FAIL.
- JS availableNow rounds up; JS capacityFromRef wraps past u64; JS
emaUpdate rounds a partial step up: old FAIL, new FAIL.
- The test ignoring W's window change: old pass, new FAIL.
- The test without full-range sessions: new FAIL ("coverage full A").
- Full-range (or realistic) sessions sending Z instead of R: new FAIL
("coverage full A with a backlog"); without the backlog floor, pass.
- Rust available_now rounds up: old pass, new FAIL, 1044/1109/1117.
- Rust capacity_from_ref truncates: old pass, new FAIL, 338/382/372.
- Rust max_unbacked_over clamps t at 1e12 ms: old pass, new FAIL,
950/943/911. It also passed every old Python-vs-Rust check:
diff_runner --cases 100000 seeds 11/12/13 "identical", golden OK,
the old extreme_diff "mismatches 0" on all three seeds.
- Worker missing, or older than the core: the node test fails with
"worker not built" / "worker is older than
crates/bulkhead-core/src/limiter.rs".
- A test keeping ~1/4 of the realistic E lines (1,294) fails the
2,000 floor; a 1,000 floor let it pass.
- A worker panic now reads "worker exited 101 at `M 0 0 0 0 0`:
... attempt to divide by zero ... replay:", also with comment lines
before it; a worker that kills itself with SIGKILL reads "worker
killed by signal 9 after 1 answers". The JS test without W tracking
prints "JS A 0 vs Python A 147616:" and the session from its L line.
- Under the Rust available_now mutant, extreme_diff seed 5 prints an
11-line prefix; --replay of it reports "1 mismatches out of 10"
under the mutant and "identical" after the revert.
Every core mutant was reverted with git checkout and the worker
rebuilt; no program or core file changes in this commit.
scripts/check.sh: ALL CHECKS PASSED.
Sibling search: the cross-language links are diff_runner (Python/Rust,
every command, realistic ranges), extreme_diff (now with K/M and full
sessions) and the end-to-end attest comparison (JS/program).
extreme_diff was the one runner without the staleness check; fixed.
attestLocal's composition is checked only end to end; not changed.
Docs: 09 §2 client-tests row and command list (the node suite now
needs the worker), 14's differential row, 00's D26, SECURITY.md's
Cloud row, check.sh's banners, limits.mjs header.
Rebased onto main 1045cd9 for its own PR. The --replay fix moved to the
previous commit with its own test. SECURITY.md keeps main's devnet row;
its Cloud row and limits.mjs's header now say the 10,000 arbitrary
bucket states are compared with Python only (the owner's review found
the header claimed Rust for every case).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- limits.test.mjs promised every failure a replayable --replay fixture, but an A* line (an arbitrary bucket state built on the Python side only) is read by neither protocol.Session nor the Rust worker. The comment says so, and a JS mismatch now prints how to reproduce it: a replay for session and pure lines, the A* fields otherwise. A rounding mutant in availableNow fails as "JS A 80 vs Python A 79 (replay with diff_runner.py --replay)"; unmutated, the test passes (2/2). - docs/09's Client tests row read as if the low-water balance view were among the Python-only states; it is in the EL lines compared with both Python and Rust. Reordered. Found by the owner's second code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and-in
Three Floor checks had no test that guards them. Each was dropped by a
line-neutral mutant that kept the whole program suite green
(tasks/coverage-map in the autopilot notes):
- F1 proposals.rs:333, `can_execute` in `execute_release`. Without it the
upgrade key is handed out at once, after a veto, or after expiry: G8's
72h and veto gone for the strongest action Floor has.
- F2 proposals.rs:114, `check_frozen_buffer` at propose. Without it the
owner proposes a buffer it still controls, rewrites it after the
guardians read or approve it, and freezes it just before execution.
- S8 proposals.rs:360, found by the sibling search: the stand-in for the
pin (finding 99) must be frozen to Floor, so that it is closed to the
owner in the pin's place. Without that, whoever executes a release
passes any copy of the live code instead of the pin, at no cost, and the
owner's pin stays open and frozen with no config left to close it.
Tests:
- a_release_waits_the_delay_and_a_veto_or_expiry_stops_it: one second
early (NOT_EXECUTABLE), vetoed during the wait or as it falls due
(VETOED), at expiry (EXPIRED),
and one second before expiry it runs; each from a fresh registration.
- a_code_change_names_a_buffer_already_frozen_to_floor: an upgrade naming
a buffer still under the owner's authority, or frozen to the Floor
authority of another protected program, and
a restore naming either, all BUFFER_NOT_FROZEN; the same buffer frozen
to Floor is then accepted.
- release_authority_hands_the_key_back_after_the_delay: a copy of the live
code not frozen to Floor does not stand in for the pin (WRONG_BUFFER).
Evidence (mutants.sh: apply, rebuild sBPF, run all of programs/tests):
F1 KILLED by a_release_waits_the_delay_and_a_veto_or_expiry_stops_it
F1a (eta one second early), F1b (expiry one second early), F1c (veto
ignored), all at proposals.rs:333: KILLED by the same test
F2 KILLED by a_code_change_names_a_buffer_already_frozen_to_floor
S8 KILLED by release_authority_hands_the_key_back_after_the_delay
Each case also fails alone: under F1, the loop cut to each one of its
first three cases fails; F1a and F1b can only be killed by the boundary
rows (3d-1, 10d-1); under F1c each veto row alone fails; under F2, with the earlier assertions removed, the
frozen-elsewhere upgrade, the unfrozen restore and the frozen-elsewhere
restore assertions each fail ("expected failure, got success"); the
frozen-elsewhere upgrade also fails alone under a mutant that accepts any
buffer authority (loader.rs:18). scripts/check-programs.sh: PROGRAM CHECKS PASSED (Floor 47,
Vault 86). Test-only change: sBPF sha256 unchanged, Floor 508e5a99...,
Vault b07655d9..., Harbor 543be60b... (Darwin build).
Sibling search, every other `can_execute` and `check_frozen_buffer` call
in Floor, each dropped by a mutant:
proposals.rs:275 (upgrade clock) and :465 (config clock), :391 (spares
closed at release), stop.rs:37, :70, :144, :294: KILLED by existing
tests.
proposals.rs:378 (held buffers frozen before closing at release):
SURVIVED, and no test can reach it. A held key always names a buffer
frozen to Floor: it is checked when staged or pinned, only Floor can
change or close it, and the key is cleared when the buffer is used up
(stop.rs:171, :249, proposals.rs:314). The loader's Close would refuse
any other buffer anyway. Defence in depth; left as is.
Not changed here: a frozen stand-in is accepted even when nobody re-pinned,
so whoever signs the release can leave the owner's own pin open for good,
paying its copy's rent to the owner instead (a scratch LiteSVM test: pin
and copy 2,094,960 lamports each, the pin still open after the release).
That is finding 99's trade-off reaching the owner's pin; it is a program
change and goes to its own finding.
The stated counts are in this commit (they were a separate commit,
b662ffa, so this one alone failed claims.py): README badge and row,
docs/04 I15 and docs/09 rows 34 and 87 say Floor 47, 138 program tests.
Rebased onto main 1045cd9 for its own PR; the run quoted above (Vault
86) was on the older base; here claims.py OK: floor_programs 47,
vault_programs 91, programs 138.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scenario table is headed "Status (10 Oct 2026)". Its S10 row said "+ 42 more Floor tests" (true on 10 Oct); a later commit (11cb0f6) made it 46 under the same date, and tools/claims.py has no rule for that phrasing, so either figure goes stale or contradicts the heading. The row now names the file's other tests without a count; the live count is in README and docs/09, which claims.py checks. Replaces 11cb0f6 in this PR (the owner's review found the date clash). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uffer Two gaps the owner's code review of PR #87 found in the new Floor tests: - The release clock checked one second before the delay and the last second before expiry, never the second it falls due, so an off-by-one (now <= executable_s refused) survived. New case: (None, 3 * DAY) runs. - a_code_change_names_a_buffer_already_frozen_to_floor showed a frozen buffer accepted only for RESTORE. A regression refusing every UPGRADE, or accepting only buffers not frozen to this Floor, passed. New case: an UPGRADE naming a buffer frozen to Floor, while the program runs, is accepted. Mutants (each applied, programs rebuilt, test run, reverted): - Ma, core governance.rs can_execute: now_s < executable_s -> now_s <= executable_s: FAILED at floor.rs:594, "veto at None, waited 259200s". - Mb, proposals.rs: every UPGRADE refused (BufferNotFrozen): FAILED. - Mb2, proposals.rs: UPGRADE accepted only when the buffer is NOT frozen to this Floor: FAILED. Clean build: Floor 508e5a99, Harbor 543be60b, Vault b07655d9 (macOS), the same as main; Floor suite 47 passed. Test-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The UPGRADE-of-a-frozen-buffer case shadowed env, p and owner with a second program inside the same test, while f still pointed at the first Floor: a later edit could mix the two. It now lives in its own block with its own names (live_env, live). Mutant Mb (every UPGRADE refused) still fails it; Floor suite 47 passed; Floor 508e5a99. - docs/08's S10 row (table headed "Status (10 Oct 2026)") said "and every other Floor test in that file", which still claimed tests added on 15 Oct as of 10 Oct. It now names the lifecycle test only; the live counts are in README and docs/09, which claims.py checks. Found by the owner's second code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four Vault rules had no test that could fail. A line-neutral mutant of each left the whole program suite green (coverage map, 15 Oct): - V4 lifeboat.rs:258: execute_exit ignores exit_vetoed. A guardian's veto of an exit did nothing (G6 "vetoable"). - V7 lifeboat.rs:195: propose_exit skips the destination's 72h age. - V8 lifeboat.rs:266: execute_exit skips "destination set >= 72h before the proposal", so an exit queued behind a destination change pays the new destination. - V6 lib.rs:402: live_guardian skips liveness. A guardian silent past its heartbeat interval still vetoes, freezes, cancels (G5). No test ever sent veto_lifeboat_exit and checked its effect, or reached DestinationNotSettled. The account sweep sends a veto, but the next proposal clears it before anything executes. Four tests, no program change: - a_vetoed_lifeboat_exit_never_executes: vetoed exit refused at the second its delay ends and 1 s before it expires; a new proposal clears the veto, is refused 1 s before its own delay ends and executes at that second. - a_lifeboat_exit_goes_only_to_a_destination_committed_72h_before_it: an exit queued behind a destination change is refused at execute, though the new destination signs, and still refused once that destination is 72h old (the age counts at the proposal); nor does it pay the destination it was proposed for. A new exit is refused at 72h - 1 s and accepted at 72h, then waits its delay to the second. - a_guardian_silent_past_its_interval_can_no_longer_act: one second past the 7-day interval, a guardian cannot heartbeat, veto an exit or a change, reset the backlog, extend or cancel a ticket, or freeze; one that heartbeat on time can do each (its heartbeat at exactly the interval counts). - a_guardian_silent_past_its_interval_cannot_veto_the_seal: the same, before the seal. Evidence (tasks/coverage-map/mutants.sh: rebuild sBPF, run all of programs/tests): - V4, V6, V7, V8 KILLED, each only by the new tests. - V4b (propose_exit no longer clears the veto, :206) KILLED. - Boundaries: :195 and :266 `<` -> `<=`, and :195 72h - 1 s, KILLED. - :266 measuring the age at execution (`t - destination_set_s`) KILLED; :204 keeping an earlier executable time on re-proposal KILLED. - :258 executing one second late (`t - 1`) KILLED. - :315 a veto that only postpones the exit by a loosen delay KILLED. - governance.rs:200 (a new guardian set starts live) is already KILLED by replace_recovery_respects_..._never_picks_a_guardian. - Sibling search, every live_guardian call site mutated to "a signing guardian, live or not" (signer check kept): brakes.rs:15 (freeze), :240 (reset_backlog), :35 (cancel), :76 (extend), :186 (heartbeat), lifeboat.rs:313, governance.rs:423, genesis.rs:456 (veto_seal). All KILLED by the new tests. Before the cancel, extend and veto_seal cases were added, :35, :76 and :456 SURVIVED: the sweep had killed the first version of those mutants only because it also dropped the signer check. - sBPF hashes unchanged: Floor 508e5a99..., Vault b07655d9..., Harbor 543be60b... - tools/claims.py: Vault 91 -> 95, programs 138 -> 142 (on integration 391acce) in README and docs/09. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sibling search for the previous commit's liveness rule. live_guardian covers actions one guardian takes; six actions need a quorum and count liveness through alive_mask instead. Replacing each alive_mask with u8::MAX (every guardian live), line-neutral, left the whole program suite green: - brakes.rs:154 unfreeze, :207 eject, :278 abdicate, - governance.rs:303 tightening an abdicated kind, - governance.rs:559 replace_recovery, - lifeboat.rs:134 a quorum's lifeboat return. So no test showed G5's "unfreezing needs a live quorum": a silent key plus one live guardian could unfreeze, eject, abdicate, replace the recovery key or return the lifeboat, and nothing would fail. a_silent_guardian_does_not_count_toward_a_quorum: g0 is one second past its 7-day interval. For each of the six, g0 and g1 sign and are refused (NoQuorum; CannotEject for eject); g1 and g2 sign and succeed. Evidence (tasks/coverage-map/mutants.sh, all of programs/tests): - Each of the six KILLED, only by the new test (each mutant changes one site, so the row for that site is the one that fails). - sBPF hashes unchanged: Floor 508e5a99..., Vault b07655d9..., Harbor 543be60b... - tools/claims.py: Vault 95 -> 96, programs 142 -> 143 (on integration 391acce). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B's review of this branch (REVIEWS/auto-A-lifeboat-exit-tests.md, R5):
tightening an abdicated kind builds its quorum bitmap by hand
(governance.rs:296-302), not through guardian_signers, so the account
sweep's unsigned-signer swaps never reach it. A mutant that counts every
listed guardian, signed or not (`if a.is_signer()` -> `if true`), left
every program test green: a stolen admin key alone, listing two live
guardians without their signatures, could tighten an abdicated kind for
good, which is what finding 88 closed.
a_silent_guardian_does_not_count_toward_a_quorum now also sends the
tightening signed by the admin only, with g1 and g2 (both live) listed
unsigned, and expects NoQuorum.
Evidence (tasks/coverage-map/mutants.sh, all of programs/tests):
- R5 KILLED, only by this test, at the new assertion ("expected
failure, got success": the change was applied). Green without it.
- L9 (freeze's own guardian_or_admin call, brakes.rs:116, the ninth
single-guardian site; the first commit listed eight) KILLED by
a_guardian_silent_past_its_interval_can_no_longer_act.
- Sibling search, every other is_signer() in the programs dropped
line-neutrally: lifeboat.rs:132, :280, custody.rs:147, harbor
lib.rs:94, :117 KILLED by existing tests. custody.rs:336 (a loan
needs its owner's signature) and harbor lib.rs:82 SURVIVED; they are
outside this branch and go to a separate one.
- sBPF hashes unchanged: Floor 508e5a99..., Vault b07655d9...,
Harbor 543be60b...
- No test added, so no count changes (claims.py OK).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment read as if the old destination were refused for being replaced. It is refused by the destination-age check, which runs before the recipient check; the replaced destination's own refusal is the RECIPIENT_OWNER_MISMATCH assertion further down. Found by a code-review pass. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
09 §4 finding 103 said the guardian-set code came from "PR B of the code-quality plan" and the fix was "in the programs from PR B"; the paragraph after finding 104 said "Since PR B". PR B is a plan's name for the change, and that plan is not in the repo. On GitHub it is #83 ("One guardian-set module in the core for Floor and the Vault (finding 103)", 78e371f on origin/main), so a reader can't look up "PR B". All three now say "PR #83", the form the same cell already uses for "PR #85". Sibling search: `git grep -nE 'PR B\b|code-quality plan' -- docs README.md` finds nothing after the change. claims.py OK (findings 104). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding 74's rule (custody.rs:336) backs a loan beyond the owner's own balance only if the owner signed: some account of the release has the owner's key and is a signer. No test listed the owner without a signature, so dropping `a.is_signer() &&` (the owner need only be listed) passed every program test. A caller could then add the holder's address as a read-only account and get a backed loan in the holder's name, the hole finding 74 closed. a_backed_loan_needs_the_borrowers_signature now repeats the unsigned admin payout with the holder's key appended, unsigned, and expects all 50,000 USDC unbacked (backed 0, instant + queued the full amount). docs/09 finding 74's test list names the case. Evidence: - Before: tasks/coverage-map/mutants.sh SG2 SURVIVED (iteration 9, on 21045e8's tests). - After, on this commit (tasks/signer-consent-tests/A-mutants.log): SG2 KILLED, only by this test. Applied by hand earlier, it failed at the new assertion, "listed, unsigned: not a loan", left 50000000000, right 0. - sBPF hashes unchanged (floor 508e5a99, vault b07655d9, harbor 543be60b). Test-only change. tools/claims.py OK (A-claims.log). Sibling search: every is_signer() in the programs was dropped one at a time (SG1-SG7 in tasks/coverage-map/mutants.txt). Only SG2 and SG5 (Harbor withdraw, next commit) survived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harbor's withdraw (harbor/src/lib.rs:82) checks that the user signed and owns the recipient token account. Only the ownership half was tested: dropping `!user.is_signer() ||` passed every program test. Without it, anyone could release a user's balance to the user's own account on their own timing, because the Vault backs the user's own balance whether or not the user signed. harbor_withdraw_needs_the_users_signature sends the withdraw with the user unsigned everywhere in the transaction. It expects exactly InstructionError(0, MissingRequiredSignature), no Vault invocation in the logs (so Harbor refused it, not the Vault inside the CPI), and no payment. Then the same withdraw, signed, pays, and its logs do show the Vault invoked: the control for the log check. Evidence (tasks/signer-consent-tests/): - Before: mutants.sh SG5 SURVIVED (iteration 9). - After, on this commit (B-mutants.log): SG5 KILLED, only by this test: "expected MissingRequiredSignature, succeeded". The account sweep still misses it; the next commit fixes that. - sBPF hashes unchanged (floor 508e5a99, vault b07655d9, harbor 543be60b). Test-only change. - Counts: Vault 96 -> 97, programs 143 -> 144 (README badge and row, docs/09 rows 34 and 87). tools/claims.py OK (B-claims.log). Sibling search: see the previous commit (SG1-SG7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The account sweep tried a signer "the same key, unsigned" only at a slot where no other slot made the same key sign. Signing is per key, so an unsigned slot next to a signed one changes nothing. As a result, a key listed as a signer twice was never tried unsigned at all. Harbor's withdraw lists the user twice: Harbor's account 2, and Vault release slot 15, which is free (the owner's signature, read only for a loan). That is why mutant SG5 (harbor lib.rs:82, `!user.is_signer() ||` dropped) survived the sweep. At the previous commit it is still killed only by the one-off test. The per-slot unsigned try is replaced by one pass per key. It takes each key that signs at any slot (a free one included) and stands at a checked slot, other than the fee payer (which signs the transaction anyway). For each such key, once, reported at its first checked slot, the key is sent unsigned at every checked slot, with the payer standing in at free slots where the key signed, since those take any account. Before that try, a control sends the payer at those free slots with the key signed at its checked slots, and it must succeed. So a refusal of the try is the missing signature's, not the stand-in's. Both the per-slot tries and this one share one helper, Sweep::attempt. The Vault sweep also repeats Harbor's withdrawal with the user's signature only at the free slot 15. It adds no program coverage. The sweep now records each key it sent unsigned (Sweep::unsigned; a try it could not sign is not recorded), and the test checks the user was tried there. So narrowing the per-key rule back to "signs at a checked slot" fails even with Harbor correct. Not kept: a fresh key at all of a key's slots. B's review found it pinned nothing (mutant T3, the try turned off, survived), since its 3 tries each had the key at one checked and one free slot, which the per-slot fresh key already covers. A test for a consistent attacker key at two checked slots waits for an instruction that has one, with a bug planted to show it can fail (backlog A 0u/0v). Evidence (tasks/signer-consent-tests/, on this tree unless named): - Counts: Vault 4,887 substitutions over 34 transactions (4,499 over 33 at the previous commit, a26676d), Floor 1,683 over 18 unchanged, all refused. README 6,570 swaps and docs/09's row, dated 16 Oct (4,890 at 65b13af, with the dropped try; I-T3.log, that tree with it turned off: 4,887, suite green). - O-mutants.log, programs mutated and rebuilt, whole suite: SG1 SG2 SG3 SG4 SG5 SG6 SG7 HB1 KILLED. SG5 by the sweep and harbor_withdraw_needs_the_users_signature; the sweep accepts "account 2 unsigned, the payer at [15]" in both withdraw runs (K-SG5-T3.log). HB1 (lib.rs:82, the recipient-owner check dropped) by the per-slot swaps of account 2 (I-HB1-T3.log: 10 in "withdraw (backed)" and 1 in the free-slot-only run). SG2 only by a_backed_loan_needs_the_borrowers_signature (previous commit). - O-test-mutants.log, programs correct, mutants of the sweep itself: the selection narrowed to `if !orig.is_signer`, nothing recorded in `unsigned`, and no unsigned try at all each fail at vault.rs:2287, "the sweep must try a key that signs only at a free slot unsigned"; the control not signing the checked slots fails at "deposit: the payer must be accepted at [2]". Restored: both sweeps pass. - sBPF hashes unchanged (floor 508e5a99, vault b07655d9, harbor 543be60b). Test-only change. claims OK, programs 144. Sibling search: the other per-slot tries (a fresh key, another known key) replace a key at one slot. A key at several slots is swapped one slot at a time (backlog A 0u, 0v, 0w). SG2 (a listed, unsigned borrower) is an extra account, not a slot, so the sweep cannot reach it; the loan test covers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding 102 says 6.25% is the largest payout that lands at once. That is the largest payout 6h after its request, not the largest lump. A request is refused only when its ETA is past the 7-day horizon (limiter.rs:189). settle_ticket checks only that the ticket is due and the vault is not frozen (custody.rs:513), so tickets never expire. A queued ticket also leaves its tokens in the vault, so it does not lower the capacity base (custody.rs:356). No test pinned any of this, so the docs could state a smaller figure and stay green. Three tests now pin today's behaviour at the defaults on a 10M vault: - core one_request_can_queue_up_to_the_horizon: 4,000,000 (40%, the long bucket's C_l·(W_l+horizon)/W_l, which binds at the defaults) is one ticket due at exactly +7d; 4,000,001 is QueueFull and changes nothing; - vault one_request_for_40_percent_is_paid_in_one_transfer_after_seven_days: the same through the program; a settle 1s before the ETA is TicketNotDue, and one settle_ticket at the ETA pays all 4,000,000; - vault tickets_requested_over_eighteen_days_land_in_one_transaction: nineteen tickets requested a day apart (625k, then 500k a day, then 875k due a day later) are settled together 19 days after the first, in one transaction of 1,194 bytes (asserted <= the 1,232-byte packet): 10,000,000, the whole vault. 1s earlier the last ticket is TicketNotDue. 19 days is the least G1 allows for 100% (5% x (1 + 19)). A 20th settle would make it 1,238 bytes (probe: 402 B for one settle, +44 B per settle). The docs are corrected in the next commit. If a per-request cap, ticket expiry or a queue-aware base lands, these tests fail and the docs must change with them. Evidence (tasks/finding-102-claim/mutants.log): - M1 limiter.rs:189 `>` to `>=`: the core test and the 40% test FAILED. - M2 QUEUE_HORIZON_S 7d to 8d: the core test and the 40% test FAILED. - M3 custody.rs:513 tickets expire a day after their ETA: the 18-day test FAILED; the 40% test passes (it settles exactly at the ETA). - M4 custody.rs:356 the base less queued_amount: the 18-day test FAILED. - Restored: green. Program hashes 508e5a99/543be60b/b07655d9, unchanged (no program source changed). - claims.py OK: targeted 26, vault_programs 99, programs 146 (on e8640a7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding 102's first correction said a single request for 6.25% of the vault is paid in one go 6 hours later (README, 03 §2.6, 09/102). That is the largest payout 6h after its request, not the largest lump. A request is refused only past the 7-day horizon, tickets never expire, and a queued ticket does not lower the capacity base. So at the defaults one request for 40% is paid in one transfer, and due tickets add up with no cap but G1 from the first request to the settlement: with nobody cancelling, the whole vault in one transaction 19 days after the first request. The tests in the previous commit pin both. Root cause: the first correction stopped at the 6h delay. It did not follow the ETA out to the horizon, or settlement out to "any later time". The wording follows the owner's decision (tasks/limiter-lending-decisions/ design-limiter-lending.md §2.4): the queue promises at least 6h in public in which any guardian can cancel, not a cap per clock hour. Changes from §2.4: "One request of up to 40% ... paid 7 days later" now reads "as large as 40% (it is then due 7 days later)", since smaller requests come due sooner. And the stacking example is the whole vault after 19 days, not 46.25% after 8, so the docs say there is no fixed bound. "Settled in a single transaction" now reads "settled at the same moment (19 fit in one legacy transaction)", the packet limit measured in the previous commit. In 03, "can be settled at any later time" gains "that neither the vault nor its protocol is frozen" (custody.rs:516), and "at least 6h and for each of those payouts" reads "at least `D` (6h by default) for each": min_queue_delay_s is per vault (classify.rs:59), so 6h is the default, and 04 and 09 say so too. The README keeps "6 hours" with 2% and 5% as its stated rules (backlog: the rules are defaults). The 40% formula is written min_k C_k·(W_k+horizon)/W_k, since a config whose short bucket binds would give a smaller lump. - README:42 and :52; 03 §2.6 (the settle-time bucket sentence is kept); 09/102 (the 16 Oct correction stated, the four tests named). Sibling search (git grep for 6.25, "in one go", "4% are paid", "clock hour", "in any (hour|day)", "10% (in|of|within)", "per hour", "leaves at most", "one transaction") found more wall-clock claims, now corrected: - README:93 "with nobody responding, up to 10% of the vault in a day"; - FAQ "the most unbacked money that can leave in any window ... up to 4% in any hour; up to 10% in any day"; - 12:8 "leaves at most 2% ... (at most 10% in any day)"; - 00:15 and 02:49 (G1's name) "Unbacked money leaves at most 2% per hour and 5% per day"; - 04 T4 "one transaction gets at most the available burst", residual "None beyond G1": due tickets can be settled together in one transaction or bundle (19 fit one legacy transaction); - reference/drift_model.py check() labels "at most 4% of a vault in any hour" / "10% ... in any day" (labels only; the checked values are G1's and unchanged; the model still runs clean). Left as they are: G1's statement in 02:49 (by request time, correct); 02:63 (the budget assumes a freeze inside 6h, and a freeze blocks settle_ticket); FAQ "half a vault takes 9 days" and drift_model's "hours of silence" (what is paid by t was requested by t, so G1 from the start of the attack bounds them). Evidence: exp102.py re-run on reference/ at this tree (tasks/finding-102- claim/exp102-rerun.out): 4,000,000 queued at +168.00h, one more unit QueueFull; identical to the research run apart from blank lines. `python3 reference/drift_model.py` exit 0. claims.py OK. No program source changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
attest's worst_1h and worst_24h are the G1 bound for payouts not yet requested (views.rs:45-46, max_unbacked_over over the capacities). A ticket already queued is not in them. It can come due inside the hour and land with others (finding 102). Yet the docs and the return-data comment read as "the most that can leave in the next hour": - views.rs:12 "most unbacked outflow possible if nobody freezes for 1 hour"; - 05 §6 "the G1 bound over T if nobody freezes"; - FAQ and README:98 "$Y in the next hour, $Z in a day"; - 11 "then $Y per hour until frozen, at most $Z per day". attest does return the queued total (`queued`), and the status page shows it beside the headline (cloud/status/index.html:192). Fix: each place now says the worst case covers payouts not yet requested, on top of `queued` (03 §7, 05 §6, 02 §5, FAQ, README, 11, views.rs:12), and 09/102 says so. The views.rs edit is one comment line, replaced in place. one_request_for_40_percent_is_paid_in_one_transfer_after_seven_days now also asserts that attest after the 4M request reports worst_1h 400,000, worst_24h 1,000,000 and queued 4,000,000. Evidence: - Program hashes before and after: 508e5a99/543be60b/b07655d9, unchanged (scripts/build-programs.sh). - M5 views.rs:45 worst_1h plus queued_amount: the 40% test FAILED (tasks/finding-102-claim/mutants.log, the run of all five mutants on this head). - claims.py OK; no test count changes. Not changed here: the status page headline (02 §4, cloud/status) still reads "at most $Y in 1h" with the queue on its own line. Adding "+ $Q queued" to the headline is a cloud/ change with its own tests (backlog). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
units.rs's header says each targeted unit test "exists because mutation testing showed a mutant that the property tests did not catch". docs/09 §2 row "Targeted unit tests" says otherwise: 18 of the 26 are mutant kills. The rest pin a finding's or review item's exact figure or boundary: capacity_base (15, A1), finding 40's saturation case, finding 96's guardian-set shape, finding 102's two queue figures and finding 103's parser. The code review of this branch found it for the new test, one_request_can_queue_up_to_the_horizon. Under M2 (QUEUE_HORIZON_S 7d to 8d), params_from_config_is_exact also fails, so the new test is not the only test that kills it. The test stays, because 09/102 cites it for the 40% figure. The header now says what the file holds. Evidence: `cargo test -p bulkhead-core` with M2 applied: FAILED one_request_can_queue_up_to_the_horizon and params_from_config_is_exact (24 of 26 passed); restored, green. cargo fmt --check clean. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts resolved: this branch's docs/09, main's reflowed comment in vault.rs, main's tools/claims.py, and main's README with this branch's finding 102 wording ported into the new layout: rule 2, the detail on what the limits count, the Vault's 'Does not stop' row, attest's queued amount, and 146/146. Also from finding 102: the header drawing said 'outflow <= 2%/h · 5%/day', which queued payouts landing together can exceed; it now says the limits refill at that rate. docs/02 §4 says the status page's worst-case line counts new requests only and shows queued payouts beside it, as the page does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shuv-amp
enabled auto-merge (squash)
October 17, 2026 18:52
shuv-amp
added a commit
that referenced
this pull request
Oct 17, 2026
Conflicts resolved: this branch's docs/09, main's reflowed comment in vault.rs, main's tools/claims.py, and main's README with 148/148. Finding 100's row cited 80.3% and 9.5% from a research script that is not in the tree. It now says so plainly, rounds the figure, and rests the case against the planned fix on the mechanism the row states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Finding 102's row said the largest single payout was 6.25% of the vault and that the queue stopped payouts from bunching. Both were wrong, and the risk was understated. Four commits (4a14196, 3832a5c, 2165134, 7c703ed). No program code changes.
one_request_can_queue_up_to_the_horizonand a Vault test.worst_1handworst_24hcover only payouts not yet requested;queuedcomes on top. The docs now say so. The on-chain fields are unchanged.Proof
>=, horizon 8 days, tickets that expire, a queue-aware base, attest counting queued, settle 1 s early.bin/check-each-commit.sh: 4/4 green.scripts/check.shon 7c703ed: ALL CHECKS PASSED (programs 146, Vault 99, targeted 26).Limits
README and FAQ still give 6h, 2% and 5% as rules. They are per-vault defaults with no floor (listed under "Needs the owner"). If a per-request cap lands, the 40% tests fail by design and the docs move with them. Stacking still reaches the whole vault.
Independent review (owner's session, 16 Oct)
Units 1–6 of this batch: ship. Overall grade A−. The per-commit check is green on all 27 commits,
scripts/check.shpasses, and the program tests pass at every unit tip with binaries matching each commit. Mutant: a capacity base lessqueued_amountwas killed bytickets_requested_over_eighteen_days_land_in_one_transaction, s1 and the Vault differential. Every figure was re-run againstexp102.pyand matches. Low, open: README's "at least 6 hours in a public queue" holds only at the default, becausemin_queue_delay_shas no lower bound (limiter.rs:98); 03, 04 and 09 already say "6h by default".🤖 Generated with Claude Code