Skip to content

External review: findings 132–141 fixed - #151

Merged
shuv-amp merged 1 commit into
mainfrom
review/findings-105-114
Oct 22, 2026
Merged

shuv-amp merged 1 commit into
mainfrom
review/findings-105-114

Conversation

@shuv-amp

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

Copy link
Copy Markdown
Owner

Fixes from the 22 Oct external review, rebased onto main at #148. Each finding is logged in docs/09-VERIFICATION.md §4 as 132–141 (105–131 landed on main meanwhile); the report is docs/17-EXTERNAL-REVIEW.md.

Vault (one LiteSVM test per fix, each fails on the previous build)

  • 132: a deposit into a full ledger (ninth mint) is refused with NoSlot instead of accepted with no backing.
  • 133: execute_change accepts a recovery-key proposer only for SetAdmin and SetRecovery.
  • 134: execute_lifeboat_exit is refused with Frozen while the protocol or the vault is frozen.

Cloud guardian (7 tests in cloud/test/review.test.mjs)

  • 135: a replayed release with no block time is dated by getBlockTime, or kept out of the rolling windows with an error log, instead of stamped with the wall clock.
  • 136: a release of a mint with no successful attest is recorded and judged once the figure arrives, instead of frozen against a worst case of 0.
  • 137: the slot the protocol account was read at is saved in the state file and used as minContextSlot on the first read after a restart; the startup sync retries instead of exiting.
  • 138: the freshness cross-check also compares monotone on-chain counters (next ticket id, unbacked outflow) across admitted endpoints and switches away from a primary that is behind on writes.
  • 139: cancels are sent 64 per pass; unreadable event layouts and balance rows are dropped instead of thrown on; one guardian per state file (<stateFile>.lock); no hold renewal once the chain covers the hold's end; config file permissions are reported; key() requires exactly 32 bytes.

Verification (140)

  • reference/bulkhead_ref.py: set_windows no longer returns early on an unchanged window, matching the Rust.
  • Two exhaustive tests check backed_amount against an independent oracle: the u128-overflow region (every ledger up to 48 units) and maximality at full width.
  • Kani harness low_water_never_counts_fresh_capital (full width); all 20 harnesses verified.
  • Counts corrected (20 Kani harnesses, 9 exhaustive tests, 182 program tests, 265 Cloud tests, 141 findings); tools/claims.py passes.

Build and scripts (141)

  • build-programs.sh asserts cargo-build-sbf 4.3.0, installs platform-tools v1.57 explicitly and fails if it cannot; --locked on every cargo call in check.sh, check-programs.sh, build-programs.sh, build-harbor.sh and CI.
  • deploy.sh refuses any uncommitted tracked file and logs the commit; floor-devnet.sh treats an RPC error as unknown, not as "not deployed".
  • .gitignore: COMPETITIVE_*.md.

Not run here: the programs rebuilt for sBPF v3 and the 182 LiteSVM tests against them (the review machine could not fetch platform-tools). Against the 14 Oct binaries, 174 of 182 pass; the 8 failures are the tests of on-chain rules that build lacks (this PR's three, and main's five for findings 107, 115 and 116). scripts/check.sh and scripts/prove.sh pass on this tree.

🤖 Generated with Claude Code

…ication, build)

Vault: a deposit into a full ledger is refused (NoSlot) instead of accepted with no
backing (132); execute_change takes a recovery-key proposer only for SetAdmin and
SetRecovery (133); a lifeboat exit does not execute while the protocol or the vault
is frozen (134). One LiteSVM test per fix, each failing on the previous build.

Cloud guardian: replayed releases with no block time are dated by slot or left out of
the rolling windows (135); a mint with no attest is recorded and judged once attest
succeeds, not frozen on a worst case of 0 (136); the protocol read slot is kept in the
state file and used on the first read after a restart (137); the freshness cross-check
compares monotone on-chain counters across admitted endpoints (138); bounded cancel
sweep, non-throwing decoders and balance parser, an instance lock, no hold renewal once
covered, config permission warning, strict 32-byte keys (139). Seven tests in
cloud/test/review.test.mjs.

Verification: the Python reference's set_windows early exit removed; two exhaustive
ledger tests against an independent oracle; a full-width Kani harness for the
low-water balance; counts corrected and checked by tools/claims.py (140).

Build: cargo-build-sbf version asserted and platform-tools installed explicitly with
a loud failure; --locked on the check and release paths; deploy gate over every tracked
file; floor-devnet.sh no longer deploys on an RPC error; COMPETITIVE_*.md ignored (141).

Docs: 03, 05, 07, 09 §2/§4/§5, 12, 14, FAQ updated; the review report is docs/17.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@shuv-amp
shuv-amp force-pushed the review/findings-105-114 branch from 01ef095 to 0d5ceb1 Compare October 22, 2026 12:42
@shuv-amp shuv-amp changed the title External review: findings 105–114 fixed External review: findings 132–141 fixed Oct 22, 2026
@shuv-amp
shuv-amp enabled auto-merge (squash) October 22, 2026 12:42
@shuv-amp
shuv-amp merged commit f5c83a1 into main Oct 22, 2026
11 checks passed
@shuv-amp
shuv-amp deleted the review/findings-105-114 branch October 22, 2026 12:51
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