Skip to content

Name in each alert what it is about, and key repeats on it - #108

Merged
shuv-amp merged 35 commits into
mainfrom
auto/B/alert-subject-r3
Oct 18, 2026
Merged

shuv-amp merged 35 commits into
mainfrom
auto/B/alert-subject-r3

Conversation

@shuv-amp

@shuv-amp shuv-amp commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Opened by the Bulkhead autopilot agents: one reviewed unit of work. Every commit was reviewed adversarially by the other agent, with mutants, and passes tools/claims.py on its own.
Stacked on #107: merge that first; this PR is then rebased onto main.
The agents never merge. The owner reviews and merges.

What changed

Off-chain guardian (cloud/guardian) and its tests, plus docs/09's client test count (181 -> 184). No program change. The guardian mutes repeats of one kind of alert for 10 minutes, and the webhook shows only an alert's title and detail. Three gaps, and a pin:

  • 9a03ced: a heartbeat warning named its account (Vault or a Floor program) only in target, which was not part of the repeat key. "This key is no longer a live guardian" for the Vault and then for a Floor program within 10 minutes was one alert; the second never went out.
  • 297e688: a sent or failed action's line didn't carry the change, proposal, program or mint it acted on. So vetoing loosening 5 a minute after loosening 4 sent one alert, and the second veto reached no one. The same held for exits on two mints and Floor proposals.
  • e389a6d: lines that named their subject only in a field ("floor not ready", Floor's stop, ejection and restore, a lifeboat move, cursor gaps, a dead heartbeat key, a veto) arrived without it. An operator watching two Floor programs could not tell which one was affected.
  • 72de79c: change and ticket ids start at 0 and are BigInt; a test now pins that an id of 0n is kept and named.

Proof

  • Each new test fails before its fix (8e0e5a3's at "another target": actual null).
  • Mutants: b317ae2 A1–A7 KILLED; 924e741 S1–S20, K1, K2 KILLED (tasks/alert-subject/r3/). A's review found that dropping an id of 0 (truthiness in actionLine and about()) passed the suite; 50b0819 kills those (N2, N2b, N6, N6b, T1, T1b, and A's N6c).
  • Client suite 184/184; each commit green; check.sh ALL CHECKS PASSED on integration d72cda3 (B).
  • Reviewed by A: CHANGES (the id 0 case), then APPROVE at d06adb7 (REVIEWS/auto-B-alert-subject-r3.md). d72cda3 is d06adb7 rebased onto c808791: range-diff all =, and the unit's diff is the same apart from blob index lines.

Limits

  • main.mjs calling actionLine is not pinned: no test drives execute(). With the success site reverted to the old object, the suite still passes 183/183. Checked by reading only.

Hashes after the #102 fix (17 Oct)

The owner's review asked #102 to stop citing bf8ba41; 5e4eeca fixes that one line of docs/09 row 106, and every unit above #102 was rebased onto it. Each rebased commit differs from its old one only in that line (checked: git diff <old published head> <new head> is that one line for #102–#109). Commits are named above at their new hashes. Where a review or run is quoted at a hash, that is the hash it was done at, before this rebase: 14644d0 = 8e0e5a3, a283cb9 = b317ae2, 2dbfd9e = 924e741, d72cda3 = 50b0819.

Re-verified on 17 Oct on autopilot's integration tip 8718bc7, which contains this unit and those above it: scripts/check.sh ALL CHECKS PASSED (claims OK, client 198/198, differential 3 × 50,000 cases identical) and scripts/check-programs.sh PROGRAM CHECKS PASSED (Floor 50, Vault 115). bin/open-pr.sh ran tools/claims.py and the each-commit gates on this unit before pushing it.

Hashes after the sync onto main (17 Oct)

sync-main-97 replayed the stack onto main d7b9bdb (#97), after the owner's README redesign (#115). Each commit's own diff is unchanged, except README hunks ported to the new README. Outside README, every old/new pair differs only by main's own changes (autopilot tasks/sync-main-115/per-commit-tree.log treebad=0, tasks/sync-main-97/pairs.log bad=0). The ids under What changed are the new ones; the runs and reviews quoted elsewhere were done at the old ones. Old = new: 8e0e5a3 = 9a03ced, b317ae2 = 297e688, 924e741 = e389a6d, 50b0819 = 72de79c. On the synced chain: bin/check-each-commit.sh 60/60 green, and scripts/check.sh ALL CHECKS PASSED at its tip 2fa7a7f (tasks/sync-main-97/each-commit.log, check-tip.log). Agent B reviewed the sync: REVIEWS/auto-A-sync-main-97.md (APPROVE).

🤖 Generated with Claude Code

shuv-amp and others added 27 commits October 18, 2026 03:07
Finding 107 (AUD-2, owner decision 16 Oct) will refuse a guardian set
with fewer than threshold + 2 keys. Every test fixture and most tests'
own sets were 2-of-3. This moves them to 2-of-4, which today's rule
also accepts, so this commit changes no program: Floor, Vault and Harbor
hash 508e5a99 / b07655d9 / 543be60b, as before.

- Fixtures: Protected (Floor) and Market (Vault, through Harbor) now
  hold 4 guardians. Each test that built its own 3-key set gets a 4-key
  set with the same threshold and the same assertion.
- Two tests changed meaning with a 4th key and were fixed, not loosened:
  a_quorum_ejects_a_rogue_guardian_who_vetoes_everything (Floor) and
  a_quorum_ejects_a_guardian_who_freezes_forever (Vault). With 4 keys,
  the last eject was refused only because the target's own vote is
  masked. Both now eject a second guardian (a set an ejection shrank to
  threshold + 1 still ejects) and then show the 2-of-2 refusal.
- Account sweeps: an eject's signers may now be any two of the three
  others, so each of those two slots is free for the third, never for
  the target or the other signer again. Vault 5,365 and Floor 1,710
  substitutions, refused (docs/09, dated 16 Oct). Listing all three
  others at each slot would have skipped the duplicate: with a mutant
  that counts a guardian listed twice as two (governance.rs:270), the
  sweeps listing all three pass, and these fail at "eject: account 2
  replaced by key ..." (Vault and Floor). No other program test kills
  that mutant (tasks/aud2-guardian-margin-impl/dup-mutant-*.log).
- floor_differential: the guardian pool is 6 keys, 4 registered; the
  proposed sets are 2 to 6 keys.
New tests (pass on both rules; they show what the margin buys):
- a_lost_key_and_a_rogue_do_not_lock_a_two_of_four_set (Floor): g0's
  key lost, g1 rogue stops the program; the lost key does not help a
  quorum; the honest pair ejects g1 and restores; neither can veto the
  owner's refill, which executes after 72h.
- two_rogues_in_turn_are_both_ejected_from_a_two_of_four_set (Floor):
  the second rogue vetoes the refill and is ejected from the 2-of-3.
- a_lost_key_and_a_rogue_do_not_lock_a_two_of_four_vault: the same in
  the Vault (freeze, eject, unfreeze, refill).

Rebased on 16 Oct onto 12b91a8 (findings 102 and 100, and the attest
and quote sweep): the counts and the sweep figures here are from runs
there (tasks/aud2-guardian-margin-impl/r4/). The E2E run, the mutants
and the new-rule run below were made before, on e8640a7; this commit's
programs and core are the same as there but for one comment line in
views.rs (line-neutral, same hashes).

Evidence:
- E2E=1 scripts/check-programs.sh: PROGRAM CHECKS PASSED (Floor 49,
  Vault 98; S1 and E2E passed; the resumed setup found all 14 steps;
  vault check, Floor demo and deploy dry run passed), with the next
  commit's deploy rehearsal in the tree.
- tools/claims.py: OK (floor 49, vault 104, programs 153).
- Under the new rule (core from two commits on, programs rebuilt), only
  the two tests that state the old rule fail: an_n_of_n_guardian_set_is_
  refused (accepts 3-of-4) and the Floor differential's model.
- Mutants (tasks/coverage-map/mutants.sh), each red, then restored:
  AV1 Floor live_guardian ignores liveness: KILLED by a_lost_key_and_a_
    rogue_do_not_lock_a_two_of_four_set (+2 others).
  AV2 the Vault's: KILLED by ..._two_of_four_vault (+2 others).
  AQ1 Floor restore quorum ignores liveness: KILLED by ..._two_of_four_set
    and the differential only.
  AQ2 the Vault's unfreeze quorum: KILLED by ..._two_of_four_vault and
    a_silent_guardian_does_not_count_toward_a_quorum.
  AE1 can_eject refuses at count == threshold + 1 (AUD-2 option (a)):
    KILLED by two_rogues_in_turn_..., and the two eject tests above.
  Hashes after: 508e5a99 / 543be60b / b07655d9.

Split on 16 Oct from ec0cacc at the owner's review (D2): the deploy
rehearsal's move to 4 guardians is now the next commit. programs/ and
programs/tests/ here are byte-identical to ec0cacc, so its runs below
hold for this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding 107 (AUD-2, owner decision 16 Oct) will refuse a guardian set
with fewer than threshold + 2 keys, so the deploy rehearsal must
register 2-of-4 sets. Split from ec0cacc at the owner's review (D2);
the text is that commit's, unchanged:

Deploy rehearsal (cloud/deploy market.mjs, vault-check.mjs,
floor-demo.mjs): 4 guardians (keys/guardian3), so the dry run keeps
working once the rule lands; one more funding step (14, was 13).
The devnet market has 3 guardian files. A first version of this change
loaded guardian3 everywhere: vault-check.mjs failed there with ENOENT,
and heartbeat silently created a key nobody holds as a guardian. Now
market.mjs guardianKeys(dir, create) reads guardian0, 1, ... and
throws on a gap (never fills it with a new key). Setup creates keys up
to 4 only while the protocol is not registered, so resuming an old
market adds no key the chain lacks; a new deploy-dryrun step resumes
the dry-run market with guardian3 moved aside and fails if setup makes
it again (with setup always creating: "DRY RUN FAILED: resuming a
registered market made keys/guardian3.json", r3-dryrun-J7.log).
renew-guardians tops up to 4 and logs each new key (unfunded); a
2-of-3 renewal would be refused once the rule lands. keysIn reads the
guardians only when a command uses them, so caps and set-recovery
never need them; heartbeat says a key is not in the set rather than
dead. One THRESHOLD (2) for the register and renewal payloads and
MIN_GUARDIANS. vault-check.mjs
compares the chain's set with the first files, and liveness with the
chain's count. An extra file (a renewal not executed yet) and a set
without the margin are info lines, not failures, since such a set
keeps working. GUARDIAN_MARGIN and guardianMarginProblem live in
cloud/lib/solana.mjs, used by these and by the guardian bot's existing
warning (cloud/guardian/main.mjs), and vault-check uses THRESHOLD. The e2e scripts fund guardian3 too. Three
tests in cloud/test/deploy.test.mjs (client tests 176 -> 179). JS
mutants (js-mutants-r3.log), each red then restored: always create,
never create, no gap check, margin 1, `>`, GUARDIAN_MARGIN = 1.
Setup always creating survives these tests and is killed by the dry
run step above.

cloud/, scripts/deploy-dryrun.sh and docs/09's client-test row are
byte-identical to ec0cacc (git diff empty), so its runs hold for them:
the E2E check-programs run with the dry run (r4), and the JS mutants.
tools/claims.py: OK (client 179).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AUD-2, decided by the owner on 16 Oct (option (e) of 16 §4.4). A set
stays live while its honest live guardians reach the threshold: they
eject every rogue in turn, and dead guardians cannot veto the owner's
new set. Finding 96 asked for one key beyond the threshold, so a 2-of-3
or 3-of-4 set survived one fault but not a lost key plus a rogue: the
honest guardian left is no quorum, nobody can be ejected, and the rogue
keeps Floor stopped (or the Vault frozen) and vetoes every new set.

Fix, in the core so both programs inherit it through GuardianSet::parse
(registration, and every SetGuardians when proposed and when executed):
  GUARDIAN_MARGIN = 2
  guardian_set_ok := count <= 8 && t >= 2 && count >= t + 2
(saturating_add: t is a payload byte). A stored set is not checked
again, so existing 2-of-3 sets keep working, and ejection is unchanged:
a shrunk set still ejects. A 2- or 3-key set is BadThreshold, not
BadCount; the count rule is only the bitmap size, and the error order
of finding 103 is kept.

This changes both programs, by intent:
  Floor 508e5a99 -> 8ca8a608, Vault b07655d9 -> 7086148b,
  Harbor 543be60b (unchanged). Darwin-arm64 builds.
Compute (scratch LiteSVM test, tasks/aud2-guardian-margin-impl/cu.md):
-3 CU on every path that parses a set (Floor propose 2035 -> 2032,
execute 1682 -> 1679; Vault register 9592 -> 9589, SetGuardians 2979 ->
2976; Floor register varies with its PDA bump, residue also -3).

Proof and tests:
- Kani: accepted_sets_can_eject_anyone restated (ejection reachable
  exactly when count > t, so option (a) cannot slip in; accepted sets
  have >= 4 keys and a margin of at least 2, and 2 is accepted). New:
  an_honest_live_quorum_ejects_any_rogue (any slots, anyone else alive)
  and accepted_sets_survive_any_two_faults (any two faulty keys, lost
  or rogue, leave a live honest quorum, which ejects each rogue, and the
  rogues alone eject no honest guardian). That holds only short of a
  rogue quorum: two rogues in a 2-of-n set are one (out of scope, 04
  T7). With the assumption rogue < t dropped, the harness fails at
  `!can_eject(rogue, ..)` (kani-no-rogue-assume.log), so the docs say
  "short of a rogue quorum", not "any two faults".
  19/19 verified, 240 s (cargo kani -j 2, as CI); again after the
  restatement, 235 s summed (r2-prove.log).
- Kani mutants (kani-mutants.sh): margin 1, margin 3, `>` for `>=`,
  t >= 1, count <= 9, option (a), and an eject one vote short (only
  the two-fault harness kills that one): each KILLED by a harness
  (kani-mutants-r2.log). The eject
  ignoring liveness is the eject harness's case, not these.
- Program mutants (coverage-map/mutants.sh, rebuilt each time):
  margin 1: KILLED by a_guardian_set_without_two_spare_keys_is_refused
  (Floor and Vault), registration_rejects_weak_settings and the Floor
  differential. Margin 3 and `>`: KILLED by most of the suite (the
  fixtures are 2-of-4). t >= 1: first only the Floor differential; the
  1-of-2 registration case was now refused by the margin too, so it is a
  1-of-4 here and a Vault 1-of-4 case was added: then KILLED by both.
  count <= 9: SURVIVES the program tests, equivalent there (parse refuses
  more than 8 keys first), KILLED by Kani. Option (a): KILLED by the
  eject tests two commits back (the tests on 2-of-4 sets).
- Tests: the Floor and Vault refusal tests above cover proposal and
  execution (a stored 2-of-4 proposal whose threshold turns 3 is refused
  when executed, as the devnet renewals proposed before this rule will
  be); registration_rejects_weak_settings gains 2-of-3 and 3-of-4.
  an_n_of_n_guardian_set_is_refused (Vault) is renamed and accepted a
  3-of-4: it now refuses it and accepts 3-of-5.
- Model: the Python rule, the Floor differential's model, and the
  guardian_set fuzz target state it again; the GP generator now also
  picks count - 2. With the Python rule put back to the old one, seed 11
  (20,000 cases) reports 5 GP mismatches; restored, seeds 11-13 identical.
  Fuzz seeds two_of_three_refused, two_of_four, six_of_eight, and
  seven_of_eight renamed seven_of_eight_refused (byte 323, the
  threshold, is 7: now refused). With margin 1 in the core the target
  crashes within 60 s; restored, 222,615,288 runs in 601 s, no crash.
- scripts/check.sh: ALL CHECKS PASSED, and E2E=1 check-programs.sh:
  PROGRAM CHECKS PASSED, both at the branch tip, whose code is this
  commit's (the next commit is docs only; tasks/aud2-guardian-margin-
  impl/r4/check.log, r4/check-programs-e2e.log). claims: kani 19,
  floor 50, vault 104, programs 154, client 179.

Rebased on 16 Oct onto 12b91a8 (findings 102 and 100, and the attest
and quote sweep). The core and the program sources are the same as
before the rebase but for one comment line in views.rs (line-neutral),
so the Kani, fuzz, differential and mutant runs above were made on the
pre-rebase commit; the hashes, check.sh, check-programs and the counts
are from r4 runs (tasks/aud2-guardian-margin-impl/r4/).

The finding 96 row said the restated harness proves "exactly"; it now
says what it proved then and proves now, and gives the Vault test's new
name. The finding 107 row waits for rows 105 and 106 to land (09 §4 is
numbered 1..n); its text is ready. The rule's prose is the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit made both programs refuse a new guardian set
without two keys beyond its threshold (finding 107). The docs that
state the rule now say so:
- README: guardians 4-8 keys; the G5 row and the "who the guardians
  are" paragraph give the reason (any two faults leave a quorum, unless
  the rogues are one themselves: two in a 2-of-n set, 04 T7).
- 05 register_protocol: 2 <= threshold <= count - 2, also for every
  SetGuardians, proposed and executed. 05 abdicate: abdicating
  SetGuardians fixes the set, so ejections shrink it for good.
- 06 state table, 00 D22, FAQ: the same rule.
- 07 §2: 4-8 guardians, and don't abdicate SetGuardians. 07 §6: the
  programs enforce the margin; sets registered before keep their
  exposure until replaced; an ejection uses up a spare key until the
  owner's new set executes; a lost key counts as live until its
  interval passes.
- 16: the AUD-2 row is decided; §4.4 gives the decision, why the
  margin is the number of faults a set survives (short of a rogue
  quorum), the options rejected
  and why (the honest-owner and stolen-owner cases look the same
  on-chain), what it costs, what it leaves (a rogue quorum; a stolen
  owner key with every guardian dead; a rogue's veto of the recovery
  key's rotation, checked: Floor's veto has no recovery exception, as
  a_vetoed_recovery_proposal_does_not_hold_the_owner_s_slot shows), and
  Lido-style lapsing vetoes as a future option only. §5: "independent
  guardians, 3-of-5 or more".
- 10: the guardian set's minimum size is no longer an open decision.
SECURITY.md and 08 describe what is on devnet, which still runs the
old rule, and are left as they are.

claims: OK. Docs only; no program file changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ci.yml's header and scripts/ci-changes.sh said the weekly run does every
job, and 09 §8 gave `mutants` as running on any change to the core. The
`mutants` job's `if` starts with `github.event_name == 'pull_request'`,
so the Monday schedule (and a manual dispatch) never runs it: it mutates
a pull request's diff and has none to mutate. Its trigger list in 09 §8
also left out scripts/mutants.sh and .cargo/mutants.toml, which
ci-changes.sh (line 22) selects it for.

Comments and docs only; nothing runs differently.

Sibling search: `git grep` for "weekly run does", "every job ... weekly"
and "mutants ... weekly" across md/yml/sh/mjs/py. The other hits are
09 §8's "at full depth every Monday" (its table now says which job is
not weekly) and the dispatch input's "every job at weekly depth", which
is the same set as the weekly run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…105)

.cargo/mutants.toml excludes the core's 22 equivalent mutants, and the
docs say so. Since 9 Oct it excluded 19. The murmur3 tail's pattern is
pinned by line, `floor.rs:(235|238|241)`, because the body's `h ^= k`
has the same column and function and is not equivalent. 1dc7861 (#52)
moved those lines (now 327/330/333), and nothing checked the patterns.
Failing closed, the three would have failed CI's `mutants` job on a
pull request that changed those lines. Failing open, a pattern that
starts matching a non-equivalent mutant hides it from every run.

Root cause: nothing checked that a pattern still names its mutants.

Fix:
- each pattern ends with the number of mutants it excludes (`# 3`), and
  the murmur3 pattern names 327/330/333;
- tools/mutant_exclusions.py fails unless each pattern matches exactly
  its number in `cargo mutants --list --no-config`, and cargo-mutants
  (the list with the config) excludes exactly the mutants the patterns
  match, so a pattern this parser can't see, or reads differently, fails
  too. No two patterns may match the same mutant, since the docs' count
  is the counts' sum, and the kept list must be part of the full one.
  It reads only the exclude_re array's body, needs no tomllib
  (Python 3.9), and names colour codes in the list as the problem;
- scripts/mutants.sh makes both lists (--colors never: CI sets
  CARGO_TERM_COLOR=always) and runs it first, except when the caller
  passes --config or --no-config (as whole arguments). CI's `mutants` job runs that script;
  ci-changes.sh now also selects the job for the new tool;
- scripts/check.sh runs its --self-test on planted configs;
- tools/claims.py ties the docs' "22 equivalents" (README, 09 §6 and the
  summary row) to the sum of the counts, with the same parser. It finds
  that parser from its own directory, so `python3 -I` runs it too, and
  check.sh runs its self-test that way. 00's
  "18 equivalents" (26 Sep log entry) and run 9's "exactly the 22
  equivalents below" (6 Oct) are kept as dated records.
Docs: 09 §4 finding 105, §6 run 10 and the "In CI" note, §8's mutants
row; README and 09's summary row 669 → 797 mutants (run 10); README and
12's post-submission range 96–105.

Evidence (first on 1f2ad48 + the parent, logs in the autopilot's
tasks/mutants-exclusions-r2/; re-run on 58697c6 + the parent,
tasks/mutants-exclusions-r3/):
- `cargo mutants --list`: 797 with --no-config, 778 with the old config
  (19 excluded), 775 with this one. The 22 excluded are §6's list, the
  murmur3 ones at 327/330/333.
- scripts/mutants.sh --list: exit 0, "22 of 797 mutants excluded"; with
  CARGO_TERM_COLOR=always also exit 0. Old config: exit 1, every pattern
  "no '# N' count". Planted on the real lists: the old lines with a
  count (matches 0, says 3) and the body XOR added (matches 4, says 3)
  both exit 1; in both the set comparison alone passes. /usr/bin/python3
  (3.9.6): self-test OK and the real check passes.
- The self-test pins each problem by its message, not a count. Mutants
  of the tool (tool-mutants.log), each red: M1 no per-pattern check,
  M2 no set comparison, M3 no colour check, M4 no empty-array check,
  M5 a missing count accepted, M6 a missing count read as 0, M7 the
  parser reading past the array. M3 and M5 survived a first version
  that checked only the number of problems.
  After A's review (16 Oct): the set comparison was pinned only by its
  size, so `len(excluded) != len(matched)` passed the self-test. A
  case with as many excluded as matched but not the same ones now
  fails it (15 cases; red with that mutant, green without), and the
  message says how many mutants are in one set only.
  From the code review after the rebase: colour codes only in the kept
  list were reported as a kept list made with other options; the
  colour check now reads both lists (16 cases; dropping the kept half
  fails the new case).
  On 58697c6, with the overlap and kept-list checks: M8 no overlap
  check and M9 no kept-list check, red too, as M1–M7 still are. A
  duplicate of the can_eject pattern planted in the real config:
  scripts/mutants.sh --list exits 1, "the counts add up to 23, the
  patterns match 22 mutants" (planted-overlap.log). Without the
  sys.path line, `python3 -I tools/claims.py` fails with
  ModuleNotFoundError; with it, both claims runs pass.
- claims.py (claims-mutants.log): one count 1 → 2 fails four statements
  (README 188; 09 33, 333, 335; kept-run9.log), not run 9's 331, which
  failed too before it was kept; a dropped count fails with the
  tool named; deleting any of the three rules fails a self-test case;
  deleting the KEPT entry fails 00:103.
- The 22 excluded mutants run alone (--no-config, --re per pattern,
  2 min): 22 missed, exactly the excluded list; --re also picked
  ema.rs:70 (a field deletion, no pattern matches it), caught.
- Run 10 (f1f05ba, old config, -j4, 46 min; tasks/mutants-run10/):
  778 tested, 712 caught, 5 timeouts, 58 unviable, 3 missed, exactly
  the murmur3 tail. The core's source is unchanged since (`git diff
  --stat f1f05ba HEAD -- crates/bulkhead-core/src` is empty; only
  tests/units.rs gained finding 102's tests).
- No program or core source changed.

Rebased on 16 Oct onto cede705 (findings 102 and 100, the attest
sweep and AUD-2). AUD-2 changed the core's source (governance.rs), so
the line above saying it is unchanged since run 10 held on 58697c6, not
here. On cede705: scripts/mutants.sh's list check passes, "22 of 795
mutants excluded, each pattern matching its count"; the murmur3 lines
are still 327/330/333. The 797 in README and 09 is run 10's figure:
README now dates it ("in the last full run, 15 Oct") and finding
105's row says the core has changed since (finding 107).

The setup line in scripts/mutants.sh now pins cargo-mutants 27.1.0,
the version ci.yml installs: each count is the number of mutants that
version lists, so another release can break the check (code review,
16 Oct; `git grep 'install.*cargo-mutants'` finds no other unpinned
install).

The check's report goes to stderr in scripts/mutants.sh, so
`scripts/mutants.sh --list` prints only cargo-mutants' names: before,
its first stdout line was the report; after, stdout is 773 lines
(795 - 22) and stderr the one report line. ci.yml's `mutants` comment
says the job checks the exclusions first.

Row 105 and 09 §6 gave the pin's reason as the body's XORs. The
finalizer's are at column 7 (`grep -n '\^=' floor.rs`, 337-342); the
non-equivalent XOR at column 11 is `h ^= k`, in the body (320) and after
the tail (335). The toml comment, the row and §6 now say that. 09 §8's
`check` row names the two tool self-tests check.sh runs.

README no longer calls run 10's 797 "injected bugs": cargo-mutants
listed 797 but tested 778, 19 being excluded (09 §6, run 10's row).

Sibling search: the other 14 patterns use `\d+` for the line, and each
matches the count now written after it. The murmur3 one is the only
line-pinned pattern.

Not done, by choice:
- Catching an edit that keeps a pattern's number but changes its
  mutants (an excluded line itself edited, or a murmur3 body XOR moved
  onto a pinned line). The toml and 09 §6 say so: such an edit needs the
  mutant judged again by hand. Failing on any diff that touches an
  excluded line would catch the first; it is a separate change.
- Moving murmur3's tail into its own function, so its pattern needn't
  name lines. It shifts core lines, so it changes the program hashes.
  Until then a line move above it fails the check, with a message
  saying what to fix.
- A weekly full mutants run in CI. It took 46 min here at -j4, likely
  past the job's 90 min on two CI cores: a minutes call for the owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two Vault checks that keep a ticket to its own protocol and vault had no
test. Deleting either one left every program test green
(tasks/error-codes/mutants.log, base cede705):

- brakes.rs:79, extend_ticket: tk.protocol != protocol. Without it, a live
  guardian of any other protocol extends this protocol's tickets. Anyone
  can register a protocol and name its guardians, so that guardian could
  hold back every queued payout up to the total extension limit. The
  sweep did not catch it: it has no second protocol's guardian to swap in.
- custody.rs:501, settle_ticket: tk.vault != vault. A USDC ticket settled
  through the SOL vault (its tokens, its mint) got past the Vault's checks.

New test another_protocols_guardian_cannot_extend_a_ticket: a second
Market's live guardian extends this market's ticket -> WRONG_VAULT; the
same instruction from this market's guardian succeeds. The settle test
now settles the USDC ticket through the SOL vault and expects
WRONG_VAULT.

Evidence (tasks/error-codes/mutants.log, STATE=c1; full program suite
per mutant):
  W02 brakes.rs:79 deleted -> KILLED by
      another_protocols_guardian_cannot_extend_a_ticket ("expected
      failure, got success": the stranger's extension went through)
  W06 custody.rs:501 deleted -> KILLED by
      a_ticket_settles_after_its_eta_to_its_stored_recipient_only (8049
      InsufficientBalance from the empty SOL vault, not 8010)
Both were SURVIVED at base. No program source change: hashes
8ca8a608/543be60b/7086148b, as at cede705.

Sibling search: the other 12 WrongVault sites were deleted one at a time
in the same run. Eight are KILLED by the sweep (brakes.rs:39, lib.rs:320,
custody.rs:160, genesis.rs:491, views.rs:27, lifeboat.rs:151,
governance.rs:169/259). lib.rs:324 (vault PDA address), genesis.rs:523,
lifeboat.rs:71 and :247 survive; later commits on this branch deal with
them.

Counts: Vault 104 -> 105, programs 154 -> 155 (claims.py OK).

The test also reads the ticket's ETA: unchanged after the
refused extension, 3,600 s later after its own guardian's (code-review
fix: success alone did not show the extension happened).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two seal checks had no test; deleting either left every program test
green (tasks/error-codes/mutants.log, base cede705):

- genesis.rs:486, execute_seal: the pairs must number 3 * vault_count.
  Without it, the seal checks only the vaults it is given. A vault left
  out skips its claims-vs-balance check, so an uncovered import seals.
  docs/05's seal row says every vault is passed exactly once.
  the_seal_checks_each_vault_once covered a vault named twice in place of
  another, not one left out.
- genesis.rs:431, propose_seal: refused once sealed (AlreadySealed).
  Without it, a sealed protocol's admin re-proposes, which rewrites
  seal_executable_s/expires_s and clears seal_vetoed on a sealed protocol.

the_seal_checks_each_vault_once now also leaves the uncovered USDC vault
out (expects VAULT_COUNT_MISMATCH) and, after the seal, proposes it again
(expects ALREADY_SEALED). No new test, so no count change.

Evidence (tasks/error-codes/mutants.log, STATE=c2, full program suite):
  E05 genesis.rs:486 deleted -> KILLED by the_seal_checks_each_vault_once
      ("expected failure, got success": the seal went through without
      the USDC vault and its 1,000 USDC uncovered import)
  E04 genesis.rs:431 deleted -> KILLED by the_seal_checks_each_vault_once
      ("expected failure, got success")
Both were SURVIVED at base. Vault hash 7086148b unchanged (tests only).

Sibling search: the seal's other checks. :491 vault_tokens (KILLED by the
sweep), :519 lifeboat owner and :523 lifeboat mint/owner (SURVIVED; the
lifeboat is a PDA checked by expect_pda just above, which only this
program can create, as its own token account: see this branch's note in
docs/09).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three bound checks had no test; deleting any one left every program test
green (tasks/error-codes/mutants.log, base cede705):

- genesis.rs:171, create_vault: config_is_valid (bps <= 100%, windows
  > 0). Without it, a vault is created with a 100.01%-an-hour burst.
- governance.rs:40, parse of a SetLimits change (at proposal and again
  at execution, :254 and :478): the same rule for a proposed change.
- governance.rs:47, parse of an UpsertAsset change: valid_asset (haircut
  <= 100%, liability >= 100%, the oracle bounds of finding 88). Only the
  genesis upsert's copy (genesis.rs:296) was tested, by
  oracle_settings_of_a_priced_asset_are_bounded.

New test invalid_limits_and_assets_are_refused_wherever_they_enter:
before the seal, create_vault with short_bps 10,001 -> INVALID_LIMITS;
after it, a SetLimits proposal with long_window_s 0 -> INVALID_LIMITS,
and an UpsertAsset proposal with a 10,001 bps haircut -> INVALID_ASSET.

Evidence (tasks/error-codes/mutants.log, STATE=c3, full program suite):
  E06 genesis.rs:171 deleted    -> KILLED ("expected failure, got success")
  E07 governance.rs:40 deleted  -> KILLED ("expected failure, got success")
  E08 governance.rs:47 deleted  -> KILLED ("expected failure, got success")
each by the new test only. All three were SURVIVED at base. Vault hash
7086148b unchanged (tests only).

Sibling search: every config_is_valid / valid_asset call in programs/
vault/src: genesis.rs:170 (create_vault), :295 (upsert_asset, KILLED by
the oracle test), governance.rs:39 and :46. All now killed.

Counts: Vault 105 -> 106, programs 155 -> 156 (claims.py OK).

The execution copy (:478) is not reached by any transaction: it
parses the bytes the proposal already checked, and the bounds read
nothing else. The test comment says so (code-review fix: it had
claimed execution was covered). oracle_settings_of_a_priced_asset_are_
bounded now asserts INVALID_ASSET for each of its four cases, not any
error (all four return it; E09 stays KILLED).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
genesis.rs:410, import_backing: a backing ledger holds MAX_SLOTS (8)
mints, and an import into a ninth is refused with NoSlot. Deleting the
check left every program test green (tasks/error-codes/mutants.log, base
cede705). From the code, without it the import goes through: the vault's
imported total grows (:414), and the seal must cover that, but the
owner's ledger is saved unchanged, so the owner has no backed claim for
it.

New test an_import_into_a_ninth_mint_is_refused: nine vaults before the
seal; one owner gets an import into eight (ledger_of shows 8 positions),
then the ninth -> NO_SLOT.

Evidence (tasks/error-codes/mutants.log, STATE=c4, full program suite):
  E14 genesis.rs:410 deleted -> KILLED by an_import_into_a_ninth_mint_is_
      refused ("expected failure, got success"); SURVIVED at base.
Vault hash 7086148b unchanged (tests only).

Sibling search: the only other ledger credit is deposit's
(custody.rs:128). There a full ledger is by design: the deposit is taken
unbacked (Ledger::credit's doc, ledger.rs:187-189), and credit's result is
the backed flag, not an error.

Counts: Vault 106 -> 107, programs 156 -> 157 (claims.py OK).

import_ix now calls import_into_ix, which takes the vault, so the
new test shares the one import layout (code-review fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six reachable checks had no test that failed when the check was deleted
(tasks/error-codes/mutants.log, base cede705). Each now has an assertion
on its code, and each was seen to fail with the check deleted:

  E02 genesis.rs:185 create_vault of an existing vault after the seal:
      ALREADY_INITIALIZED (with the check gone: 8043 GenesisOnly, so the
      "says so first" order in the comment above it was untested)
  E12 governance.rs:426 veto of an executed change: CHANGE_EXECUTED
      (gone: the veto succeeds and marks an executed change vetoed)
  E13 governance.rs:517 cancel of an executed change: CHANGE_EXECUTED
      (gone: the cancel succeeds)
  E16 lifeboat.rs:256 execute_exit with no exit proposed:
      NOTHING_TO_EXIT (gone: 8033 ChangeNotExecutable)
  E17 custody.rs:84 a zero deposit: ZERO_AMOUNT (gone: it succeeds)
  E18 custody.rs:272 a zero release: ZERO_AMOUNT (gone: it succeeds; a
      zero release has no unbacked part, and the limiter, whose own zero
      check custody.rs:242 maps, is called only when unbacked > 0, :361)

Where: E02 in after_the_seal_a_new_vault_starts_with_its_unbacked_lane_
closed, E12/E13 in an_unvetoed_loosening_executes_after_the_delay, E16 in
the_lifeboat_stays_shut_until_the_seal (after the move in, before an
exit is proposed), E17/E18 in the new a_zero_deposit_or_release_is_
refused.

Evidence (tasks/error-codes/mutants.log, STATE=c5, full program suite):
all six KILLED by the tests named above; all six SURVIVED at base. The
vault suite is green (108 passed). Vault hash 7086148b unchanged.

Counts: Vault 107 -> 108, programs 157 -> 158 (claims.py OK).

Helpers (code-review fixes): veto_change_ix beside cancel_change_ix;
create_vault_for_ix, create_vault_ix with a given mint and token
program, so E02's case names USDC's own accounts and creates no mint.
E02's comment now repeats the program's ("whatever the seal's state"):
create_vault checks the limits first (genesis.rs:170).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four checks survived deletion (tasks/error-codes/mutants.log, base
cede705) because something later still refused the case, with its own
error, so no test could tell. Each now has a test that sees the Vault's
own code, and each was seen to fail with the check deleted:

  E01 lib.rs:230, create_pda's guard: a second registration of an
      existing protocol (register_protocol has no check of its own) ->
      ALREADY_INITIALIZED. Gone: the system program refuses it, with no
      custom code (custom_code 0).
  W10 lifeboat.rs:71, move_in naming another mint or token program ->
      WRONG_VAULT. Gone: the token program refuses (code 3, MintMismatch).
  W12 lifeboat.rs:247, execute_exit naming another mint or token
      program -> WRONG_VAULT. Gone: the same token-program error.
  T01 token.rs:37, account_info on an account no token program owns: a
      copy of a real USDC account's bytes under the system program. Gone:
      the quote SUCCEEDS (it promises a payout), and the release fails
      only in the runtime at the transfer ("instruction modified data of
      an account it does not own"). The quote is asserted first so the
      mutant is seen at the quote (STATE=c6b).

New tests: a_protocol_registers_once, a_lifeboat_move_names_the_vaults_
own_mint (also completes a move in and an exit, as a control: the
destination receives 1,000 USDC), a_payout_goes_only_to_an_account_a_
token_program_owns.

Evidence (tasks/error-codes/mutants.log, STATE=c6 and c6b, full program
suite): E01, W10, W12, T01 KILLED by the tests named above; all four
SURVIVED at base. Full program suite green: Floor 50, Vault 111. Vault
hash 7086148b unchanged (tests only).

Counts: Vault 108 -> 111, programs 158 -> 161 (claims.py OK).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B's review of vault-error-tests-r3 (R1) found two Vault codes no test
asserted by value that the earlier commits missed: ExtensionTooLong
and LaneClosed. Deleting the 7-day total extension cap (brakes.rs:86,
B24) left every program test green, so a live guardian, or a stolen
guardian key, could hold a queued payout back without end, 24h at a
time, against docs/05 row 11. The wide differential models the total
(differential_wide.rs:406), but its default run never extends one
ticket that far. Mapping LaneClosed to QueueFull (custody.rs:240, B23)
also survived.

The code review of the fix found a worse gap at the same check: no
test sends a negative extension (the differential draws secs from 0,
1, 3600, 86400, 86401). With `secs <= 0` weakened to `secs == 0` (A3,
brakes.rs:84) every program test passed, and one guardian key could
pull a queued payout's ETA into the past, skipping the queue delay,
and refund its own 7-day budget.

- a_ticket_is_extended_later_by_at_most_a_day_a_call_and_seven_in_total:
  -1h, 0 and 24h + 1 s are each refused with EXTENSION_TOO_LONG, ETA
  unchanged; six 24h extensions and one of 23h pass; 2h more is
  refused, ETA unchanged; the last hour is granted; then 1 s more is
  refused. The split is unaligned so that a total that ignores this
  call's `secs` fails too.
- a_closed_lane_refuses_an_unbacked_payout: a vault with short_bps 0,
  and one with long_bps 0, each refuse an unbacked admin payout with
  LANE_CLOSED; the same payout from a vault with both buckets open is
  taken (the control, so a capacity base of 0 cannot pass it).

Evidence (tasks/vault-error-tests-r4/, B's runner copied: each mutant
applied alone, programs rebuilt, whole program suite run):
- without these tests (551e519; run-without.out, run-base2.out,
  run-base3.out): B23, B24, A1 (`tk.extended_s >= MAX`, this call's
  secs ignored), A2 (`>=` for `>`) and A3 SURVIVED. A4 (the 24h per
  call deleted), A5 and A6 (either half of limiter.rs:172's closed-lane
  test deleted) were KILLED by the differential only, not by value;
- with them (run-final.out, at the branch tip): B23 KILLED by
  a_closed_lane_refuses_an_unbacked_payout; B24 A1 A2 A3 KILLED by the
  extension test only; A4 by it and the differential; A5 A6 by the
  closed-lane test and the differential.
No program change: the runner's closing build gives 8ca8a608 /
543be60b / 7086148b, as at cede705.

Counts: Vault 111 -> 113, programs 161 -> 163 (claims.py OK).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B's review of vault-error-tests-r3 (R2): each half of lib.rs:229
(`!is_data_empty() || !owned_by(SYSTEM)`) survived deleted on its own
(B20, B21), since an existing protocol account fails both, so
a_protocol_registers_once pinned them only jointly.

The test now also plants, at a fresh protocol address, an account that
fails just one half: one with data owned by the system program, one
with no data owned by another program (a fresh address). Each
registration is refused with ALREADY_INITIALIZED. The comment says no transaction is
known to make either account: data or a new owner at a PDA needs its
signature, which only the Vault gives, and create_pda gives both in one
instruction.

Evidence (tasks/vault-error-tests-r4/): at 551e519 B20 and B21
SURVIVED (run-base2.out); at the branch tip both are KILLED by
a_protocol_registers_once only (run-final.out).

No count change (claims.py OK: vault_programs 113, programs 163).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/09 §3 gains a row for the deletion run this branch answers
(tasks/error-codes/mutants.log): 38 refusals, across 14 of the 18 Vault
codes no test asserted by value at cede705, each deleted on its own
with the whole program suite run against it, on the AUD-2 build.

The 18 (each VaultError variant with no `verr::` use in programs/tests
at cede705): AlreadyInitialized NotRegistrar WrongVault
WrongTokenProgram AlreadySealed VaultCountMismatch InvalidLimits
InvalidAsset LaneClosed TicketNotPending ExtensionTooLong
ChangeExecuted LedgerUnsound LedgerCorrupt NoSlot NothingToExit
ZeroAmount Overflow. The run missed LaneClosed and ExtensionTooLong;
B's review deleted one check of each (B23 custody.rs:240, B24
brakes.rs:86), and both survived until 1797ae5. That commit
also pins a negative extension (A3, which survived every test before
it), the 24h per call, and a lane closed by either bucket.

At base: 13 KILLED, 25 SURVIVED. The commits before this one add tests
that kill 18 of the 25 and both of B's, each asserting the Vault's own
code (W02 W06, E04 E05, E06 E07 E08, E14, E02 E12 E13 E16 E17 E18, E01
W10 W12 T01; B23 B24). The row names the 7 that still survive and why:

- six guards no transaction is known to reach: lib.rs:324 (vault PDA
  address; create_vault creates a vault only at its PDA), genesis.rs:519
  and :523 (the lifeboat, checked by expect_pda first, created only by
  lifeboat_move, move_in requires the seal, lifeboat.rs:53, and the
  seal happens once, so no lifeboat holds data at it), brakes.rs:50 and
  custody.rs:541 (a pending-ticket count below zero), token.rs:235
  (GetAccountDataSize's return data from an already-checked program);
- custody.rs:399, stated as not shown unreachable: properties.rs:588-592
  debits backed_amount and one more on random ledgers, and only
  crates/bulkhead-core/tests/units.rs:375 debits less, on a one-mint
  ledger with no liability. properties.rs:606 asserts backed(a) ==
  min(a, backed(MAX)) for requests below 2^52 (:613), so any smaller
  amount is backed too, and debit_backed(b) refuses only when
  backed_amount(b) != b (ledger.rs:289). The known exception is a
  collateral value that overflows u128 (ledger.rs:262): the valid
  amounts need not form an interval there, so the consent or freeze
  cap (custody.rs:337, :347) can lower the amount to an invalid one and
  :399 refuses the release (fail closed). The search's own result is
  always valid. Not verified by a tool beyond that property test. (A full ledger cannot reach :399 through
  set's NoSlot: backed_amount's valid() refuses a new liability slot
  on a full ledger, ledger.rs:237.)

Not deleted, as the row says: the two core-error mappings to
ChangeExecuted and ZeroAmount, token.rs:233, and the codes Overflow and
LedgerCorrupt (checked arithmetic, decoding).

After this branch five codes are still asserted by no test (same grep
at this commit): NotRegistrar (E03, genesis.rs:108, was KILLED at base
by another test), TicketNotPending, LedgerUnsound, LedgerCorrupt,
Overflow.

Docs only: no count change (claims.py OK: vault_programs 113, programs
163).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A's review of finding 105 (REVIEWS/auto-B-mutants-exclusions-r7.md,
finding 1, Low): CI's `mutants` job acts on main's exit status, but the
self-test called problems() only, and check.sh never runs the tool on
real lists. With main returning 0 on a mismatch (mutant A10), every
in-tree check passed, and CI would have printed the problems and gone
green. This was not a defect at fb771c6, since the job fails today. The
gap was that a later regression would pass.

Fix: main takes its arguments and, for the self-test, a config path
(default: the repo's .cargo/mutants.toml, as before), and its lines name
the config it read. The self-test runs main in-process on a planted
config and checks the exit status and every line on each stream:
- the right lists: exit 0, "1 of 3 mutants excluded" on stdout, nothing
  on stderr;
- the lists the other way round: exit 1, nothing on stdout, and exactly
  the count and "full list lacks" problems, so KEPT is read as KEPT;
- coloured lists: exit 1 with exactly one problem, so a main that fails
  only on several problems is caught;
- one argument and three: exit 2 and the two usage lines.

One subprocess (python3 -I, 60 s timeout, in the temporary directory so
the config must be found from the tool's own path) runs the command line
with two lists and the repo's config, as scripts/mutants.sh does: on a
list no pattern can match, it exits 1 with an empty stdout and problem
lines that each name .cargo/mutants.toml. Which problems those are
depends on the config, so only their form is checked. Self-test: 16
cases -> 22. No doc states the number.

Evidence (tasks/exclusions-main-exit/):
- old-A10.log: the fb771c6 self-test with A10 applied prints "self-test
  OK: 16 cases" and exits 0.
- mutants-r6.log (mutants.py applies each mutant to a scratch copy of
  the tool, which reads the real config through a symlink): unmutated,
  "self-test OK: 22 cases", exit 0. All 18 are KILLED (exit 1): A10
  (return 0), A10b (fail only on more than one problem), A0 (always 1),
  U1 (usage returns 0), U2/U3 (argument check `< 2`, `< 1`), K1 (KEPT
  ignored), K2 (ALL read twice), C1 (planted config ignored), C2 (no
  default config), R1 (the default config read from the cwd), E1/E2
  (sys.argv sliced as [:] or [1:2]), P1 (problems not printed), S1
  (problems on stdout), L1 (the planted config not named), N1 (only the
  first problem printed), G1 (the success line printed on failure too).
  Code-review passes at high shaped this. The first version ran three
  subprocesses against the real config, and A0, K1 and U3 survived it.
  The second left E2, C2 and G1 alive. Declined from the third: catching
  exceptions in the self-test (a traceback already exits 1) and moving
  the config hook out of main. The fourth showed that requiring one
  "matches 0 mutants" line per live pattern tied the self-test to the
  config's contents. The subprocess now checks the form of the lines
  only, and the 17 stay killed. The fifth showed that R1 survived while
  the child ran in the repo root (it does in check.sh); now it runs in
  the temporary directory. Its other points repeat declined ones.
- real-lists.log: on the real lists, made with scripts/mutants.sh's
  commands: ".cargo/mutants.toml: 22 of 795 mutants excluded, each
  pattern matching its count", exit 0.
- python3 -I tools/mutant_exclusions.py --self-test: 22 cases OK.
- scripts/check.sh: ALL CHECKS PASSED (check-final.log);
  bin/check-each-commit.sh green (each-commit.log).

Sibling search: the other tools check.sh runs (tools/claims.py,
tools/floor_check.py) also gate CI through main's exit status. claims.py
has the same gap: check.sh runs it on the real tree, where it finds no
problems, and its self-test calls self_test(), not the path in main that
returns 1. With that return changed to 0, `--self-test` and the real run
both still exit 0 (claims-C1.log). Not changed here: it is its own
commit (BACKLOG-B). floor_check.py runs in CI only as --self-test, whose
result main returns as is. Its RPC mode is an operator's tool that no CI
job runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests landed in 944f5e8 (lifeboat-exit-tests-r3, 15 Oct). Their
09 §4 row waited for 104 and 105 so the list stays numbered without
gaps; 105 is now on integration (fb771c6), so the row lands here.
Docs only: 09 §4 row 106; README and 12's count and post-submission
range (96–106, 106 fixed). Two code-review passes changed the row as
written on 15 Oct: a sentence for today's re-run, the nine
single-guardian sites named, G5 quoted verbatim, and the exit veto
attributed to T18 (G6 has no veto), as is the veto test's doc comment
(vault.rs:3996, comment only).

Evidence, re-run today on bf8ba41 (the row's claims are from 15 Oct,
and AUD-2 changed the Vault since): B's re-review list of 33 line-
neutral mutants (the ten rules, the nine single-guardian sites L1-L9,
the boundaries, the six quorums, R1-R6), each applied, programs
rebuilt, all program tests run:
  33 KILLED, 0 survived, 0 not applied, 0 build failures. Vault
  hashes after the run match the tip (Vault 7086148b, Floor 8ca8a608,
  Harbor 543be60b).
Log: autopilot tasks/finding-106-row/mutants.log.
- python3 -I tools/claims.py: OK, findings 106.
- git grep for "96–105", "105 findings": no other stale range.
- scripts/mutants.sh still mutates the core only (SCOPE, line 11), so
  the row's last sentence holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding 106's row in docs/09 said its 33 mutants were re-run on 16 Oct
at bf8ba41. That commit is not an ancestor of this branch or of the
stack above it and is on no remote branch, so the citation would point
at nothing once the stack lands. The owner's review of #99-#109 found it.

bf8ba41 and 86b777b (the head of PR #100, vault-error-tests-d2, the D2
replay of vault-error-tests-r4) have the same tree, 36187b4
(`git rev-parse bf8ba41^{tree} 86b777b^{tree}` prints it twice). So
the run was a run on 86b777b's tree, and the row now says "on tree
36187b4, the tree of 86b777b (PR #100's head)". Why not just "at
86b777b": it was committed on 17 Oct, after the run; and main
squash-merges (1045cd9 has one parent), so after PR #100 lands 86b777b
is reachable only as GitHub's refs/pull/100/head. The tree id stays
checkable from main: squashed bottom first, main's commit for PR #100
has that tree. "PR" keeps "#100" from reading as finding 100, the
row above. These points came from two code-review passes.

Sibling search: every 7-12 hex token in tracked .md/.py/.sh/.mjs/.rs/
.toml files at autopilot/integration 3e9f58d that names a local commit
(51 tokens) was checked with git merge-base --is-ancestor against
integration. bf8ba41 was the only one that is not an ancestor.

Docs only. tools/claims.py: claims OK (26 files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guardian checks the Vault protocol's guardian set against finding
107's margin (main.mjs checkGuardianSet), but never a Floor config's.
A Floor set registered before the rule, say 2-of-3, keeps working and
keeps AUD-2's exposure: one lost key and one rogue guardian lock its
governance for good. The guardian said nothing, and docs/07 §6 said so
("not yet a Floor set").

The rule moves to policy.mjs as guardianSetWarning, a pure function:
the same text as before, a warn line that alerts on mainnet only. In
main.mjs, checkGuardianSet now remembers the set shape per set
("protocol", or the protected program), and checkFloor calls it for
each watched Floor config it reads. floorAlerts is unchanged. The
margin is not a readiness code there: "floor not ready" alerts on
every cluster, and only the owner's new set clears a margin problem, so
"floor ready" would never be logged again.

Evidence (tasks/floor-guardian-margin/r2/):
- node --test cloud/test/*.test.mjs: 180/180 pass (one new test).
- Mutants of guardianSetWarning, each run on policy.test.mjs and
  reverted; each fails the new test: N1 never warn, N2 threshold fixed
  at 2, N3 notify always, N4 notify never, N5 GUARDIAN_MARGIN = 1.
- tools/claims.py: OK, client 180 (docs/09:40 updated).
- Not tested: the main.mjs wiring (the per-set Map and the checkFloor
  call). No test runs checkFloor; deleting the call leaves every test
  green.

Sibling search: guardianMarginProblem's callers are vault-check.mjs (an
info line) and guardianSetWarning. The status snapshot
(snapshot.mjs:33) prints live guardians and the quorum, not the margin;
left as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent's per-set memory (which set shapes were already reported)
lived in main.mjs, so no test could fail on it: dropping the
once-per-shape check, or keying every set the same, left every test
green. The warning did not say which set it was about (only a program
tag on Floor lines), and it gave the same text for a set ejected down
to its threshold, or registered n-of-n before finding 96. There one
rogue guardian alone locks governance; a lost key alone does not, since
dead guardians cannot veto the owner's new set (docs/16 §4.4), but it
leaves no quorum until that set executes. Nothing was said when the owner's
new set fixed the problem. And a delivered alert did not say which Floor
program it was about: the program went only into the line's `program`
field, which alertFor uses in its repeat key but does not show.

Moving the program name into the text is a trap: alertFor keys repeats
on the first 60 characters of the text, and "the Floor guardians of
<44-character id>" pushes the shape past them. A 2-of-3 set ejected to
2-of-2 within ten minutes would then give the same key, and the worse
warning would not alert. So the program goes after the shape: "the
Floor guardians are 2-of-3 for <program>: ...". The `program` field
stays for the repeat key.

guardianSetWarning becomes guardianSetCheck(shapes, which, set,
mainnet) in policy.mjs. It keeps each set's last shape and whether it
was short in the Map, keyed by "protocol" or the protected program, and
returns the line to log or null. The warning names the set and has its
own text for n-of-n. When a set that was short gets the margin, it
returns one line saying so, which alerts on mainnet like the warning,
so whoever was paged hears that it is fixed. main.mjs only logs what it
returns. docs/07 §6 says so. The advice also had a hole: a set
registered as 7-of-8 was told to "run at least 7-of-9", and no set can
have 9 keys (core MAX_GUARDIANS is 8). When threshold + 2 is over 8,
the advice is now to lower the threshold to at most 6-of-8. That needs
MAX_GUARDIANS in JS, so lib/solana.mjs gets it next to
GUARDIAN_MARGIN; the next commit ties both to the core.

Evidence (tasks/floor-guardian-margin/):
- node --test cloud/test/*.test.mjs: 180/180 pass (the test is
  extended, not added).
- 19 mutants, each run on policy.test.mjs and reverted (r6/mutants.py,
  r6/mutants.log, r6/N5-margin1.log). Each fails the extended test, and
  only it: never warn, threshold fixed at 2, notify always, notify
  never, GUARDIAN_MARGIN = 1, no once-per-shape, one Map key for every
  set, the n-of-n text for threshold + 1, no fixed line, a fixed line
  for a set that was never short, the fixed line never alerting, no
  program tag, every set named as the protocol's, the short flag not
  stored, the program before the shape, the program left out of the
  text, `need < 8` for `need <= 8` (6-of-7), the 8-key limit ignored
  (7-of-8), 7-of-8 as the lowered advice.
- The mainnet alerts are checked on their own in a scratch copy of the
  test without the earlier text assertions (r5/C1-C3-alone.log): with
  the program left out of the text, the alert's detail check fails;
  with a long name pushing the shape past character 60, "2-of-2 alerts"
  fails.
- A's review of the previous version (branch
  auto/B/floor-guardian-margin-r7, kept) found two survivors there: X3,
  the shape keyed on the count only, and X5, the advice
  threshold-of-(n+1). It also found that the n-of-n text said a lost key
  alone locks governance. The test now has a threshold-only fix (7-of-8
  -> 6-of-8, the advice's own step) and pins the n-of-n text and advice.
  r9/mutants.log: X3, X5, the r7 n-of-n text and the text without its
  lost-key clause are all KILLED. r9/mutants-r7.log: X3 and X5 SURVIVED
  on the r7 code and test. The 18 mutants of r6/mutants.py, re-run on
  this code: all KILLED (r9/r6-mutants-rerun.log). Two code-review
  passes on the fix (kept as -r8 and -r9) added the lost-key clause: a
  lost key alone leaves no quorum (it never approves, and core `quorum`
  needs threshold approvals) until the owner's new set executes. A third
  pass (-r10) fixed the comments' wording only.
- tools/claims.py: OK, client 180.
- Still not tested: the checkFloor call in main.mjs (no test runs
  checkFloor).

Not changed (code review): the "fixed" line needs the short shape to
have been seen since the guardian started (the Map is in memory, as the
old per-process shape was; docs/07 says so). A protocol that abdicated
SetGuardians can't take a new set, so the advice to run 2-of-4 can't be
followed there; REPORT lists that case for the owner. The fault text
assumes a margin of 2, the owner's decision (16 §4.4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cloud/lib/solana.mjs keeps its own GUARDIAN_MARGIN = 2, which the
guardian and the deploy tooling use to judge a guardian set, and now
MAX_GUARDIANS = 8, which the guardian's advice uses. Their comments say
they are core governance.rs's constants, but nothing checked that. Had
the programs' margin moved to 3, every JS test would have stayed green
while the guardian passed sets the programs refuse.

deploy.test.mjs now reads governance.rs and requires exactly one
`pub const GUARDIAN_MARGIN: u8 = N;` and one `pub const MAX_GUARDIANS:
usize = N;`, each N equal to the JS constant. It reads the source text,
like the build-script test above it. If a declaration changes form, the
test fails rather than passing.

Evidence (tasks/floor-guardian-margin/r6/tie-mutants.log):
- node --test cloud/test/*.test.mjs: 181/181 pass (one new test).
- Mutants of governance.rs, each reverted with its mtime kept (else the
  limiter differential asks for a worker rebuild): GUARDIAN_MARGIN = 3,
  MAX_GUARDIANS = 9, and a trailing comment on MAX_GUARDIANS. Each fails
  the new test, naming the constant. deploy.test.mjs is green again.
- tools/claims.py: OK, client 181 (docs/09:40 updated).

Sibling search: the other JS copies of core rules (the limiter port,
the account layouts) are checked by the differential and by decoding
real accounts. MIN_GUARDIAN_THRESHOLD has no JS copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
differential_wide.rs drew extension seconds only from {0, 1, 3600,
86400, 86401} on a random ticket and lumped every refusal into one
counter. A ticket never got near the 7-day total, no negative value was
sent, and a refusal was not checked by its code. So the default run
could not tell the total bound, a negative extension or the error code
from a bug: only the unit tests at vault.rs:3382-3401 pinned them.

Now one extension draw in three pushes the chosen ticket by up to 24h
a call to exactly the 604,800 s total, then asks for 1 s more, so the
edge itself is hit on every push, not only when earlier draws line up.
The other draws are half legal sizes (1, 3600, 86400) and half out of
range for one call (i64::MIN, -86400, -1, 0, 86401, i64::MAX). Each
refusal must fail with EXTENSION_TOO_LONG. The counters are split into
extend (a random legal size), extend_push, extend_refused_call and
extend_refused_total, all required >= 10, so pushes cannot stand in for
the random sizes.
The model reads both bounds from bulkhead-core (consts.rs:37-38), as
the module says it is built, rather than restating 86,400 and 604,800.
docs/09 §7's row says so, and the 16 Oct "Vault refusals deleted" row,
which says the default run never extended a ticket that far, now says
it does since this change (its differential_wide.rs:406 cite had drifted).

Default run (24 seeds x 250 steps): extend 16, extend_push 126,
extend_refused_call 16, extend_refused_total 30 (was extend 40,
extend_refused 27); every other required counter still >= 10
(loosen_executed 12, as before).

Evidence: mutants of brakes.rs extend_ticket, each built and run against
the old and the new differential_wide only:
  T1 drop the total check            old SURVIVED  new KILLED
  T2 total > to >=                   old SURVIVED  new KILLED
  T3 drop secs <= 0                  old KILLED    new KILLED
  T4 secs <= 0 to < 0                old KILLED    new KILLED
  T5 total ignores this call's secs  old SURVIVED  new KILLED
  T6 extended_s += secs / 2          old SURVIVED  new KILLED
  T7 refusal returns WrongTicket     old SURVIVED  new KILLED
  T8 secs <= 0 to == 0 (negatives)   old SURVIVED  new KILLED
  T9 total > to > total + 1         old SURVIVED  new KILLED
(T9: a draft that pushed by 24h until refused killed it only through
chance 1 s and 3600 s draws on the same ticket; the push to exactly
604,800 then 1 s more reaches the edge every time.)
sBPF sha256 after the run unchanged (Floor 8ca8a608, Harbor 543be60b,
Vault 7086148b): tests only.

Sibling search: the other refusal counters in this file (reset_refused,
lifeboat_refused_*, loosen_*) are each split by cause already.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same gap as the extension refusal, found in the sibling search for
the previous commit: a refused settle and the three lifeboat-move
refusals asserted only r.is_err(). Any refusal passed, so the order of
the checks and the program's own codes went unchecked by the
differential. Settle's comment (custody.rs:520-521) says it returns its
own error, not the token program's, when the vault is short; nothing in
this file held it to that.

Now a settle refused while frozen must fail with FROZEN, and one that is
only short with INSUFFICIENT_BALANCE (frozen is checked first). A
lifeboat move inside the delay after the seal must fail with NOT_SEALED,
one while frozen with FROZEN, and one beyond the balance with the token
program's InsufficientFunds (1). The two settle refusals get their own
counters: settle_refused_frozen is required >= 10 like the rest;
settle_refused_short needs lifeboat moves to drain a due ticket's
tokens first and occurs 7 times in the default run, so it is required
>= 1.

Evidence: mutants of programs/vault/src, each built and run against the
previous head's differential_wide and this one, nothing else:
  S1 settle: drop the InsufficientBalance check   old SURVIVED  new KILLED
  S2 settle: balance check before the freeze      old SURVIVED  new KILLED
  L1 require_sealed returns Frozen                old SURVIVED  new KILLED
  L2 move_in's freeze returns NotSealed           old SURVIVED  new KILLED
The token-program code (1) on a move beyond the balance is pinned but
not shown red by a mutant. sBPF sha256 unchanged (Floor 8ca8a608,
Harbor 543be60b, Vault 7086148b): tests only.

Deep run of both commits together (BULKHEAD_PROGRAM_SEEDS=600
BULKHEAD_PROGRAM_STEPS=500, 85 s): 300,000 steps, all identical;
extend 876, extend_push 6,462, extend_refused_call 1,175,
extend_refused_total 1,453, settle 2,024, settle_refused_frozen 921,
settle_refused_short 566, lifeboat refusals 3,854 + 5,768 + 1,171. docs/09 §7's
row gets that run as a 16 Oct result next to the 5 Oct one, which
predates these checks.

Sibling search: in differential_wide.rs, reset (TICKETS_PENDING) and
execute change already asserted codes, and a release or quote refused
for want of tokens asserts INSUFFICIENT_BALANCE. A release or quote the
limiter refuses (frozen, lane closed, queue full) is still compared only
as a refusal: mapping the core's refusal to the program's code is left
for its own change. Lifeboat returns only send legal amounts. docs/09's
row now says which refusals are checked by code. differential.rs:327
has the same is_err settle check; left as it is, since the wide run now pins both
settle codes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release or quote that the limiter refused (lane closed, queue full)
was compared with the model only as Err. Any refusal code passed: a
program that swapped LaneClosed and QueueFull in custody.rs's
limiter_error, or checked the backed part against the balance before
the limiter and so answered InsufficientBalance for a full queue,
still matched the model. About 670 such refusals happen in a default
run.

The model now maps core's LimiterError to the program's code with
verr::limiter in the test harness (all four variants, as custody.rs's
limiter_error does), and every refused quote and release must fail
with the model's code. Lane-closed and queue-full refusals have their
own counters, each required at least 10 times; a refusal code with no
counter panics rather than being counted as want of tokens. docs/09
row 362 says so and records the deep run.

Evidence (autopilot tasks/differential-limiter-codes/):
- mutants.log: C1 (LaneClosed and QueueFull swapped in
  limiter_error), C2 (QueueFull -> InsufficientBalance), C3
  (LaneClosed -> ZeroAmount) and C4 (backed > balance checked before
  the limiter, same line) each SURVIVED the old test and are KILLED
  by the new one. Hashes back to 8ca8a608/543be60b/7086148b after.
- c4-full-suite.log: under C4 the whole program suite (Vault 113,
  Floor 50, the fixed differential) passes; only this test fails.
  C1-C3 are also caught by vault.rs's code tests (:434, :3428).
- Default run: refused_lane_closed 254, refused_queue_full 414,
  insufficient 118.
- deep-600x500.log: 300,000 steps, 15,561 lane closed, 18,853 queue
  full, 6,345 want of tokens, all identical.

Sibling search: every other Err arm in differential_wide.rs already
asserts a code (extend, settle, reset, lifeboat in, execute change).
Not here: lifeboat returns are never refused (backlog), and lifeboat
move_in beyond the balance fails with the token program's code
(backlog, a program change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
differential.rs reduced every refused release to Err(()) on both
sides, so a program that refused for the wrong reason still matched
the model. The same gap the previous commit closed in the wide
differential (found by its code review).

The model's refusal now carries the program's code: verr::limiter for
a limiter refusal, INSUFFICIENT_BALANCE when the vault holds less
than it would pay. A refused release must fail with that code, and
the assert prints the program's error. Refusals for a full queue get
their own counter, required at least 10 times like the others. Want of
tokens and a closed lane are counted and printed but not required:
the wide differential requires both. A refusal with any other code
panics, as in the wide differential, so the counts always add up.
docs/09 row 361 says so; its undated figure (4,843 releases) no longer
matched a run, so it is replaced by a dated one.

Evidence (autopilot tasks/differential-limiter-codes/):
- mutants-narrow.log (mutants.sh <wt> differential): C1 (LaneClosed
  and QueueFull swapped), C2 (QueueFull -> InsufficientBalance) and C4
  (backed > balance checked before the limiter) SURVIVED the old test
  and are KILLED by the new one. C3 (LaneClosed -> ZeroAmount)
  survives both: no release in this test's runs is refused for a
  closed lane. The wide differential kills it, and docs/09 says so.
  Hashes back to 8ca8a608/543be60b/7086148b after.
- r2/default-run.log: 1,000 steps, 82 releases refused, all for a
  full queue (want of tokens 0, lane closed 0).
- r2/narrow-24x500.log: 12,000 steps, 4,831 releases (3,715 backed,
  265 instant, 1,138 queued, 1,104 refused: 1,092 queue full, 12 want
  of tokens, 0 lane closed), 609 settlements, 466 cancellations, 2,405
  deposits, all identical.

Revised at B's review (17 Oct): the test comment and docs/09 called a
closed lane "rarer still" and "rare here", but no run has had one. The
closed-lane count was only inferred (refused minus the other two), so
it is now its own printed counter; the comment points to docs/09 for
the figures instead of quoting them, and the row shows "0 for a
closed lane" from the 17 Oct run. The printed counters are not
asserted; only the queue-full one is required. A refusal with an
unlisted code now panics (found by code review); in
r2/mutant-no-queue-arm.log, with the queue-full arm deleted, the test
panics ("release refused with 8026, which has no counter"), and
restored, it passes (r2/default-run.log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/05 row 6 listed two DuplicateAccount checks with "no test yet":
deposit's source must not be the vault token account (custody.rs:98),
and settle refuses a recipient whose owner is now this vault's PDA or
the protocol PDA (custody.rs:509). Deleting either check left the whole
program suite green.

Two tests, one per instruction:
- a_deposit_cannot_come_from_the_vault_token_account: a deposit from
  the vault token account fails with DuplicateAccount.
  Without the check the token program still refuses it, with its own
  error, so the test tells the two apart by code.
- a_ticket_cannot_settle_to_an_account_handed_to_the_vault_or_protocol:
  two queued payouts; each payee hands its token account to a new owner
  with a real SetAuthority (AccountOwner), one to the vault PDA and one
  to the protocol PDA. With both tickets due, each settle fails with
  DuplicateAccount. One case per owner, so each half of the check is
  pinned on its own.

docs/05 row 6 now names both tests. Counts: Vault 113 -> 115, programs
163 -> 165 (tools/claims.py OK).

Evidence (mutants.sh: line-neutral mutant, rebuild, whole program suite):
- D1 :98 `if false {`: KILLED only by the deposit test.
- S1 :509 vault-PDA half dropped, S2 protocol half dropped, S3 whole
  check `if false {`: each KILLED only by the settle test.
All four survived the suite before these tests (no other test
fails). Hashes after the run: 8ca8a608/543be60b/7086148b, unchanged.
Sibling search: every DuplicateAccount return in programs/ (custody.rs
:99, :292, :304, :510, genesis.rs:503) now has a test asserting it;
:292/:304 by the release tests, genesis.rs:503 by
the_seal_checks_each_vault_once. Floor and Harbor return no
DuplicateAccount.

Test-only: no program source changes (sBPF hashes unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README's range "96–N were found after the submission" is tied by
tools/claims.py to the latest finding. Finding 107 (next commit) is
AUD-2, which the pre-audit engagement raised on 9 Oct (docs/16 at
7b80758 already states the 2-of-3 lock), before the submission (finding
95, 10 Oct, is the review "before the submission"). With the next row,
the rule would force README to call it found after the submission.
Every finding from 96 on was recorded after the submission, which stays
true with 107. So README now says "recorded", as 12 already does
("96–106 recorded 13–15 Oct"), and the rule accepts either verb, so a
sentence left in the old wording is still checked.

Evidence:
- python3 -I tools/claims.py --self-test: self-test OK: 46 claim
  cases, 22 count cases, 42 rules (the range cases in "recorded", and
  two kept in "found", one stale, one current).
- python3 -I tools/claims.py: claims OK, findings 106.
- Planted in README, each red, then restored green: "96–105 were
  recorded" and "96–105 were found": "README.md:194: '96–105 were ...
  after the submission' states 105 (the tree has findings = 106)",
  exit 1 each. The rule without "found|": self-test FAILED: "'96–1,102
  were found after the submission': 0 errors, expected 1", exit 1.
- git grep "found after the submission": only README:194 and the
  self-test used it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shuv-amp and others added 7 commits October 18, 2026 03:08
The code landed in dd7786c (refuse a set without two keys beyond its
threshold), be9e0c1 (fixtures on 2-of-4, recovery tests) and 39611fd
(the rule's prose). Their 09 §4 row waited for 105 and 106 so the list
stays numbered; 106 is the previous commit but one. 16, 06, 07 and the
finding 96 and 105 rows already cite finding 107; until now it had no
row. Docs only: 09 §4 row 107; README and 12's count and range.

The row as drafted on 16 Oct (autopilot tasks/aud2-guardian-margin-
impl/finding-107-row.md) was checked against the tree and corrected:
- Date 9 Oct, not 15 Oct: AUD-2 came from the pre-audit engagement
  (docs/16 at 7b80758: "A lost guardian key plus a rogue guardian lock
  a 2-of-3 set's governance"), as finding 90's row dates its decided
  engagement item. Hence the previous commit's "recorded", and README
  says 107 is AUD-2, decided 16 Oct.
- "the GV differential" -> GP: with the model's GUARDIAN_MARGIN put
  back to 1, python3 reference/diff_runner.py --cases 20000 --seed
  11/12/13 exits 1 each time: GP 5/5/4 mismatches, GV 0/0/1 (GV draws
  count and threshold in 0..11, and only 6 of those 144 pairs differ).
  Restored: "OK seed=11 lines=113903 identical". (The run writes
  reference/regressions/seed*-line*.txt; removed with git clean.)
- "option (a)" and "refusing an eject that leaves count <= threshold
  + 1" were one mutant (M6), listed as two. 16 has no lettered options
  (they are the research notes' labels; git grep "(e)" docs/16 finds
  none), so the row names the rejected option and cites 16 §4.4. It
  also says an eject ignoring liveness (M7) fails none of the three
  harnesses.
- Finding 89 (9 Oct) already lists this lock among the decisions left
  to the team, as it lists the backed lane that finding 90 then
  decided and fixed. 107 follows 90: its own number, dated when raised;
  the row says it was stated in 89.
- registration_rejects_weak_settings is Floor's.

Evidence, run today on this tree (the core, the model and the fuzz
target are unchanged since dd7786c: git diff --stat dd7786c HEAD on
crates/bulkhead-core, reference/bulkhead_ref.py, diff_runner.py, fuzz,
programs/{floor,vault}/src is empty):
- Kani mutants (autopilot tasks/aud2-guardian-margin-impl/kani-
  mutants.sh, the three AUD-2 harnesses each): M1 margin 1, M2 margin
  3, M3 `>`, M4 t >= 1, M5 count <= 9, M6 option (a), M8 one vote
  short: KILLED; M7 eject ignores liveness: SURVIVED. Same as the
  16 Oct log. Log: tasks/finding-107-row/kani-mutants.log.
- Each named test and harness exists (git grep "fn <name>"); the fuzz
  target states threshold + 2 <= count (guardian_set.rs:32).
- python3 -I tools/claims.py: claims OK, findings 107.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README, 05, 06 and the FAQ said devnet runs "this tree's build (PR #85,
15 Oct)". That was true on main at PR #85, and stopped being true at
dd7786c (finding 107), which changed the core both programs build on.
Docs only:
- README:193, 05, 06, FAQ: devnet runs PR #85's build; this tree adds
  finding 107, not deployed yet.
- 12's evidence row ("The three devnet programs run this repository's
  code") says the same; its evidence is the script at PR #85's commit
  (`3eec968`), where it matches.
- The devnet check compares devnet with the checkout it runs in
  (scripts/verify-devnet.sh: build-programs.sh, or the Docker build of
  HEAD). Its comments in README (twice) and 09 §1 say to run it at
  `3eec968` until 107 is deployed.
- README's "CI repeats this check every week", 12's "repeated weekly in
  CI" and 09 §8's "CI repeats it weekly" now say the scheduled run builds
  main (ci.yml: schedule, cron "17 3 * * 1"; the devnet job builds the
  checkout), so it reports Floor and Vault as different until 107 is
  deployed.
SECURITY.md and 08 state what is on devnet, name PR #85 and `3eec968`,
and stay as they are. Not changed: the script still builds the
checkout, not the deployed commit; that is CI's design ("Catches an
upgrade that did not come from main", ci.yml's devnet job).

The script itself is left alone on purpose. scripts/ci-changes.sh sets
devnet=true for any change to it, and ci.yml's "Devnet runs this build"
step skips only pull requests that change the programs. So even a
comment edit there would run the devnet comparison on this PR, against
a build that includes 107, and fail.

Evidence:
- git diff --shortstat 3eec968 HEAD: programs/floor/src and
  programs/harbor/src none; programs/vault/src 1 line (views.rs
  comment, line-neutral, 2165134); crates/bulkhead-core/src 2 files
  (dd7786c only, of the commits touching program or core sources).
- sha256 of this tree's builds (target/deploy, darwin-arm64): Floor
  8ca8a608, Harbor 543be60b, Vault 7086148b; dd7786c records the build
  before it as Floor 508e5a99, Vault b07655d9 (Floor 508e5a99 is also
  devnet's, README:202).
- git grep -i "this tree's build" -- '*.md': none left. git grep
  "weekly" over the docs: 10's plan row ("checked against devnet weekly
  in CI") states the design and stays.
- python3 -I tools/claims.py: claims OK, findings 107.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 §6 says every on-chain change since the reviewed commit (`9aae0c4`)
belongs in the independent audit's scope, and lists 87–95. It stopped
there: the on-chain fixes for 96–99, 101 and 103, the guardian margin
of 107, and the Floor split were missing, so an auditor scoping from §6
would not see them. Its rows for 93 and 95 also pointed at `lib.rs`
`execute`, which PR #84 split into `proposals.rs` `execute_release`,
and row 91 left out `genesis.rs` `create_vault`, which c65068f changed
to start the exit proposer.

Fix: one row per change, each from its 09 §4 row and the commit that
made it, with the functions and files where the rule now is, by the
names they have today (row 87–89 still points to 09 §4, as before, and
now names the core it also changed). For 96/107 the rule is in the core
and the programs' parsers; the call sites are named as such. 96 and 107
share a row (the same check, `guardian_set_ok`); it says, as 09's 107
row does, that a stored set is not checked again, that an ejection may
shrink one below the margin, and that 107 is not on devnet yet. PR #82
(entrypoint behind `no-entrypoint`) and PR #84 (Floor split into
modules, `execute` into three functions) are meant to change no rule and
share the last row; their evidence is in the PRs. The intro said each
test "fails with its rule deleted"; 09 §4 says that for some fixes,
"fails on the previous build" for others (96–99, 101), and gives a
differential case for 103, so it now points to each row's evidence in 09
§4 instead. The questions for the auditors: the release question said
trailing accounts can only close buffers, but since 99 a live copy among
them stands in for the pin; and one is added for 98 (any other signature
that could pass as a borrower's consent) and one for 107 (any path but
registration and SetGuardians that installs or keeps a set below the
margin, as a stored set and an ejection can).

Evidence:
- git log 9aae0c4..autopilot/integration -- programs/{floor,vault,
  harbor}/src crates/bulkhead-core/src: 13 commits. Each is now in §6
  except 2165134 (views.rs comment, line-neutral) and a47d0cb's tests
  part; its program part is PR #82's row.
- Every function named exists: grep finds guardian_set_ok,
  GuardianSet::parse, guardian_alive, guardian_index, alive_mask,
  signer_bits (core governance.rs:137, :188, :103, :233, :239, :259),
  Floor guardian_signers and replace_recovery (guardians.rs:25, :126),
  no-entrypoint (both Cargo.toml:15), parse_guardian_set in Floor
  guardians.rs:39 and Vault lib.rs:420, called from Floor
  register.rs:27, proposals.rs:91 and :471, Vault genesis.rs:70 and
  governance.rs:52 (parse at propose :254 and execute :478),
  may_charge_transfer_fee and transfer_fee_possible (token.rs:154,
  :161), FeeBearingMint in lifeboat.rs move_in (:74), the caller check
  in custody.rs release (:336), execute_release (proposals.rs:325, the
  live-copy rule at :352), reset_backlog's max(t, ref_updated_s)
  (brakes.rs:252).
- python3 -I tools/claims.py: claims OK, findings 107.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alertFor mutes the same kind of alert for 10 minutes. The kind is the
level, the action, a subject (change, proposal, program, mint, what) and
the first 60 characters of the text. beatOne names the account a dead or
unlisted key was found on only in `target` ("vault" or "floor <program>"),
which was not in the subject. So "this key is no longer a live guardian"
for the Vault and then for a Floor program within 10 minutes was one
kind, and the second alert was never sent. The operator heard about one
of the two places the key had to be replaced. The heartbeat failure line
(main.mjs:443) has the same shape.

Fix: `target` joins the subject.

Evidence:
- New test "the same warning about two heartbeat targets is two alerts".
  Before the fix it fails at "another target" (actual null). After it,
  alert.test.mjs passes 8/8 and node --test cloud/test/*.test.mjs passes
  182/182.
- docs/09 row 40: 181 -> 182 client tests (claims.py OK, client 182).

Sibling search: every log() in cloud/guardian/main.mjs that reaches
alertFor and names its subject only in a field. ticketId is left out on
purpose (one alert per cancel sweep, pinned by an existing test). program,
mint, changeId, proposalId and what were already keyed. No other field
names a place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alertFor mutes the same kind of alert for 10 minutes, and its doc says
two different vetoes are two alerts. They weren't. execute() logged a
sent action as { action, reason, ticketId, signature, ... } and a failed
one as { level, action, error, ticketId }. Neither carried the change,
proposal, program or mint the action was built with (policy.mjs:1037,
:1068, :1139, :1267, :1272, :1284). A veto's kind was therefore
"info:veto_change::", whatever the loosening. Vetoing loosening 5 a
minute after loosening 4 sent one alert, and the second veto reached
no one. The same held for exits on two mints, Floor proposals, and
failed vetoes with the same error text. The existing test missed it
because it fed alertFor a line with a changeId, which main.mjs never
logged.

Fix: actionLine(action, fields) in alert.mjs builds both lines and adds
the action's changeId, proposalId, program and mint. A cancel's mint is
left out, so the cancels of one sweep stay one alert, as before.

Evidence (tasks/alert-subject/r2/ in the autopilot directory):
- New test "the line for a sent or failed action says what it acts on":
  real action shapes, sent and failed, for each veto type, a second Floor
  program, and a two-mint cancel sweep. mutants-c2.log: A1 (the old
  line, no subject), A2 (a cancel keeps its mint), A3-A6 (drop each
  field) and A7 KILLED.
- Not pinned: main.mjs calling actionLine. With the success site
  reverted to the old object, node --test cloud/test/*.test.mjs still
  passes 183/183 (main-mutant.log). No test drives execute(). The two
  call sites are checked by reading only.
- node --test cloud/test/*.test.mjs: 183/183 (node-c2.log). docs/09
  row 40: 182 -> 183 client tests (claims.py OK).

Sibling search: the other action lines in main.mjs (:489-:616, the
skipped ones) already carry their subject and don't alert. The
keeper's execute line carries `what`. beatOne's lines carry `target`
(previous commit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The webhook shows an alert's title and detail only. alertFor keyed its
repeats on the line's subject (what, target, change, proposal, program,
mint) but built the detail from reason, text, ticket and signature. So
a line that named its subject only in a field arrived without it:
"floor not ready" (main.mjs:1087), Floor's stop, ejection and restore
lines (:798-:806), a lifeboat move (:809), the Floor cursor gaps
(:1279, :1281: "check this program's proposals"), a dead heartbeat key,
and a veto or failed veto, which now carries its subject (previous
commit). An operator watching two Floor programs could not tell which
one was unarmed, stopped or had lost history.

Fix: one table, about(line), gives the subject. alertFor keys on its
labelled parts, so change 4 and proposal 4 no longer share a key (they
did before). The detail names each part after the text: what,
"on <target>", "change N", "proposal N", "program P", "mint M". A part
is left out when the reason, the text or an earlier part already says
it as a whole word: "change 4" is not said by "change 45", and case is
ignored for a change or proposal ("Change 4" says it). A program or
mint is said by its bare key, and it, `what` and `target` (which may
hold a key) match exactly: base58 case matters. Empty values are dropped. That also keeps
an empty word out of says(): once past the end of the text, indexOf("")
keeps returning the end, so the search loop would never stop. The
guardian-set lines, which name their program in the text, read as
before.

Evidence (tasks/alert-subject/r3/, earlier drafts in r2/, in the
autopilot directory):
- New test "an alert names what it is about when its text does not":
  23 assertions, using the line shapes main.mjs logs (veto lines through
  actionLine).
- r3/mutants-c3.log, on this commit's code: S1-S20, K1 and K2 KILLED. S1 (detail without the subject) is the old behaviour. S13
  (empty values kept) is KILLED by the 90 s timeout, which is the hang.
- In an earlier draft (r2/mutants-c3.log), says() had an
  `if (!word) return false` guard. That mutant (S12) SURVIVED because the
  filter made the guard unreachable, so I removed it. S13 then survived
  too (r2/mutants-s13.log): with no reason, says("", "") is true at once.
  The case "due | tx S" (a reason and an empty what) now kills it.
- node --test cloud/test/*.test.mjs: 184/184. docs/09 row 40:
  183 -> 184 client tests (claims.py OK).

Code review high, three passes. Pass 1 found the hang, the veto shape
(previous commit), the reason and case points, and the second subject
list. Pass 2 found the folded key, the unlabelled key and about() run
twice; all three are fixed here. Pass 3 found `what` folded (it may
hold a key), the redundant labelled check for keys, and the label built
twice. These are fixed by giving each part its needle and fold flag. Declined from pass 2: moving the
cancel-mint rule into alertFor (a cancel's line never carried its mint,
so nothing is lost). Backlogged as c3b-c3d: the failed-action line
drops the reason, and the skipped lines' fields (no alert). From pass 3,
c3e and c3f: two exits on one mint within the window share a kind
(keying on the reason would split a cancel sweep), and alerter's `seen`
is never pruned. Both predate this branch. Declined: per-action subject
sets in policy.mjs, and dropping the text match. The actions already
carry the fields, and the texts name ids on purpose.

Sibling search: webhookBody is the only consumer of detail. cloud/e2e
checks alert titles only (run.sh:67). policy.test.mjs:237 and
restart.test.mjs:156 match parts of a detail and pass. Out of scope:
"floor not ready" still doesn't list the missing pieces (its `alerts`
field), and the 600 s repeat window keys on text (backlog c4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A's review of alert-subject: the code keeps an id of 0 (actionLine's
`!= null`, about()'s `v != null && v !== ""`), but no test held it. Two
truthiness mutants survived: N2 (actionLine `action[k]`) and N6 (about()
`.filter(([v]) => v)`). Under either, a veto of change 0 is logged or
shown without "change 0" and keyed with no subject. Change ids start at
0 (next_change_id in programs/vault/src/genesis.rs, taken by the first
loosening in governance.rs), so the first loosening of every protocol is
change 0.

The asserts use 0n, not 0: the guardian reads ids with Reader.u64(),
which returns a BigInt (cloud/lib/solana.mjs). A guard written as
`v || v === 0` keeps a Number 0 but drops 0n, and only a 0n case catches
it. They sit in the existing tests, so the client count is unchanged.

Mutants, each run on the whole client suite (183 pass, 1 fail each):
- N2 `action[k]`, N2b `action[k] || action[k] === 0`: killed by the
  actionLine deepEqual of change(0n), next to change(4)'s.
- N6 `v`, N6b `v || v === 0` in about(): killed by the detail
  "could not be read | change 0".
- T1, T1b: the same two on alertFor's ticket part (below), killed by the
  cancel of ticket 0n.
Unmutated: 184 pass, 0 fail. Logs: tasks/alert-subject/r3/ in the
autopilot directory.

Sibling search: T1 (`line.ticketId != null` -> `line.ticketId`) also
survived the whole client suite before this commit: 184 pass, 0 fail.
Ticket ids start at 0 too (next_ticket_id), so a cancel of the first
queued payout would arrive without "ticket 0". No other id in alert.mjs
is tested for truthiness. Floor proposal ids start at 1
(proposals.rs adds 1 to pending_id, which starts at 0), so a proposal 0
case would pin a value the guardian never sees; there is none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shuv-amp
shuv-amp force-pushed the auto/A/finding-107-row-r6 branch from 1a38483 to 449a19a Compare October 17, 2026 22:53
@shuv-amp
shuv-amp force-pushed the auto/B/alert-subject-r3 branch from 50b0819 to 72de79c Compare October 17, 2026 22:53
Base automatically changed from auto/A/finding-107-row-r6 to main October 18, 2026 15:03
Conflicts resolved hunk by hunk in docs/09: this branch's 184 client tests,
main's wording of the weekly devnet check; main's README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shuv-amp
shuv-amp enabled auto-merge (squash) October 18, 2026 15:05
@shuv-amp
shuv-amp merged commit 388bf5b into main Oct 18, 2026
11 checks passed
@shuv-amp
shuv-amp deleted the auto/B/alert-subject-r3 branch October 18, 2026 15:15
shuv-amp added a commit that referenced this pull request Oct 18, 2026
Conflicts resolved to main in README and docs/09, which this branch does
not change; tools/claims.py merged cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant