Skip to content

Put findings 115 and 116 in the audit's scope; fix stale docs lines - #150

Merged
shuv-amp merged 3 commits into
mainfrom
auto/A/docs-audit-scope
Oct 19, 2026
Merged

shuv-amp merged 3 commits into
mainfrom
auto/A/docs-audit-scope

Conversation

@shuv-amp

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 #149: merge that first; this PR is then rebased onto main.
The agents never merge. The owner reviews and merges.

What changed

Docs only, plus one new tools/claims.py rule. No program, test or guardian change. One commit (c5eaa6b), from an independent pre-merge review of the docs in #116–#148.

  • docs/16 §6 (the on-chain changes the external audit must cover) had no row for findings 115/116. Those rewrote the core's elf_extent and so change Floor on chain (Floor sBPF 8ca8a608 -> 86eb426e). The new row says what changed, where it's reached (Floor loader.rs snapshot_identical, called from pin_snapshot, abort, close_buffer and execute_release), and that it is not yet on devnet. There is also a new question for the auditors on the class below sBPF v3 that row 116 states.
  • docs/16 row 88d: says the fix then left some v3 code with no extent (finding 116).
  • docs/09 row 108: the 16 Oct count is kept, with the 18 Oct reconciliation appended (19 of the 25 since finding 120), so it agrees with §3.
  • README: CI's devnet job fails until findings 107, 115 and 116 are deployed (Floor also differs because of 115/116).
  • docs/14: 26 targeted unit tests (it said 18). A new claims.py rule now checks this line; with "18" planted back, claims.py fails.
  • README: the sweep count re-measured: 8,072 swaps refused on 19 Oct (6,264 Vault + 1,808 Floor, matching docs/09 §2), replacing the 16 Oct figure.
  • docs/15: A1's low-water fix has been on devnet since 8 Oct (PR Audit: flash-capital bypass, cross-protocol events, Floor re-pin, guardian approvals, tooling (findings 63–73) #35); it said "not on devnet yet".

Proof

  • Each item verified against the tree before editing. The reviewer then re-checked every call site, hash and count, and preferred the new 88d wording to their own suggestion (REVIEWS/auto-A-docs-audit-scope.md: APPROVE).
  • tools/claims.py OK (findings 131, targeted 26), self-test OK; each commit green; scripts/check.sh ALL CHECKS PASSED.

Limits

🤖 Generated with Claude Code

@shuv-amp
shuv-amp changed the base branch from auto/B/start-slot-cluster to main October 19, 2026 18:05
shuv-amp and others added 3 commits October 19, 2026 23:50
At start, a guardian following Floor configs takes the highest confirmed
slot any endpoint gives as the replay line (startSlot, main.mjs:1374):
rows at or before it are replayed, rows after it acted on. startSlot
asked `getSlot` of every entry in `rpc.endpoints` directly, past
FailoverRpc's genesis-hash gate (finding 114). A backup still unchecked
after the start's cluster check (it missed the 2 s grace, was busy, or
answers everything but getGenesisHash) was read anyway. On another
cluster its slot set the line for the life of the process: higher, and
every followed Floor event was replayed instead of acted on; lower, and
rows from while the guardian was down were acted on as new (finding
131). docs/09 row 114 says such an endpoint is never read from.

Fix: each endpoint is admitted first, as crossCheck does
(`rpc.admit(i)`, then getSlot only if it is on the configured cluster).
One not yet checked is asked its genesis hash again; one that cannot
answer, or answers from another cluster, gives no slot. Awaiting
admission, not filtering on `rpc.cluster[i] === "ok"`: a backup that
now answers on the right cluster still counts, so a primary behind does
not put the line early. The fallback when none gives a slot is
`rpc.call`, which FailoverRpc already gates; a plain Rpc is asked
itself, as before. An object with endpoints but no `admit` throws
rather than read them unchecked.

Tests:
- restart.test.mjs "the start slot is read only from endpoints found on
  the configured cluster (finding 131)": a real FailoverRpc on two local
  stub endpoints, the primary on mainnet at slot 300M, the backup at
  999M refusing getGenesisHash, as the start's check leaves them
  (['ok', 'unknown']). Unchecked, or answering devnet later: 300M, and
  the backup is never asked its slot. The primary giving no slot: the
  start fails rather than take the backup's. Answering mainnet later:
  999M. No cluster configured: 999M, as before.
  Red on the old code: `an unchecked backup's slot is not the line`,
  actual 999000000, expected 300000000 (tasks/start-slot-cluster/
  red.log), the reviewer's reproduction.
- The existing startSlot test's stubs get an `admit` that admits all.
- tasks/start-slot-cluster/mutants.log: 8/8 KILLED, full cloud suite
  each (no admission; admission ignored; only "wrong" skipped;
  cluster[i] === "ok" without asking again; a failed genesis ask taken
  as admitted; fallback asking every endpoint directly; fallback
  dropped; Math.min), restored and cmp equal, 258/258 after.
- cd cloud && node --test: 258/258. docs/09:40 client 258;
  python3 tools/claims.py: claims OK, client 258.

Sibling search (every direct `rpc.endpoints[...]` / `e.call(` in
cloud/ outside tests): solana.mjs:422 askGenesis is the gate itself;
:489 crossCheck's getSlot is gated by admit; :502 reads the active
endpoint, "ok" by invariant (checkCluster moves off a non-"ok" one at
start, switchTo only ever takes an admitted endpoint, and "ok" never
reverts); :503 is gated on cluster[i] === "ok"; :559 call() is gated
by admit; main.mjs:1323 is the admission. main.mjs's extraRpcs and
stop.mjs's backups only get sendTransaction copies (signer.mjs:108,
140), which row 114 states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commit before this one admits each endpoint before reading its
slot for the Floor replay's start line. startSlot asked every endpoint
directly, so a backup still unchecked after the start's cluster check,
and on another cluster, set the line for the life of the process. This
gives it a number.

docs/09 §4 gets row 131. Row 114 said an endpoint on another cluster
"is never read from"; that was untrue for the start slot until this
fix, so the row now says so, dated, and names finding 131. README and
docs/12 count 131 findings, 96–131 recorded after the submission, and
128–131 among the guardian's fixed. No code changes.

Evidence:
- The reviewer's stub reproduction (mainnet primary at 300M, devnet
  backup at 999M answering its hash late) gave 999000000; the
  commit before's test reproduces it on the old code
  (tasks/start-slot-cluster/red.log).
- python3 tools/claims.py: claims OK, findings 131, client 258.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An independent docs review of the stack found these; each was checked
against the tree first.

- docs/16 §6 says every on-chain change since the engagement belongs
  in the independent audit's scope, but had no row for findings 115
  and 116, which change Floor's on-chain rule (`elf_extent`; Floor
  8ca8a608 -> 319f19a2 -> 86eb426e in b40657a and 564b934). It gets a
  row, and the questions gain the class 116 states below v3 and the
  SPL Memo mutants its loader test did not analyse. Row 88d says the
  fix later left some v3 code with no extent (116).
- docs/09 row 108 (16 Oct) says 18 of the 25 now fail a test; §3 says
  19 since 18 Oct (finding 120). The row keeps its 16 Oct text and
  says what changed and when.
- README: the devnet job fails until findings 107, 115 and 116 are
  deployed, not 107 alone (115 and 116 change Floor only). The sweep
  count is re-measured: 6,264 Vault and 1,808 Floor substitutions, all
  refused (19 Oct, as docs/09 §2 records), not 7,075 (16 Oct).
- docs/14 said 18 targeted unit tests; units.rs has 26. claims.py
  checked the property and exhaustive counts on that line but not
  this one; it gets a rule.
- docs/15 said A1's low-water fix was not on devnet; docs/09 row 65
  has it on devnet since 8 Oct (PR #35).

No statement of what devnet runs now changes. No code changes.

Evidence:
- scripts/build-programs.sh: Floor 86eb426e, Vault 7086148b, Harbor
  543be60b (tasks/docs-audit-scope/hashes.txt).
- every_account_substitution_is_refused: "6264 substitutions over 37
  transactions ... 745 refused at a backstop slot";
  every_floor_account_substitution_is_refused: "1808 substitutions
  over 18 Floor transactions ... 172 refused at a backstop slot"
  (tasks/docs-audit-scope/sweep-{vault,floor}.log).
- The new claims rule with docs/14 put back to 18: "'18 targeted unit
  tests' states 18 (the tree has targeted = 26)", exit 1; restored,
  claims OK.
- python3 tools/claims.py: claims OK, targeted 26, findings 131;
  --self-test OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shuv-amp
shuv-amp force-pushed the auto/A/docs-audit-scope branch from c5eaa6b to 1b954fb Compare October 19, 2026 18:06
@shuv-amp
shuv-amp merged commit 6c4798d into main Oct 19, 2026
11 checks passed
@shuv-amp
shuv-amp deleted the auto/A/docs-audit-scope branch October 19, 2026 18:14
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