Repository navigation
Test each Floor loader call's own program and authority checks (finding 111) - #119
Merged
Merged
Conversation
shuv-amp
force-pushed
the
auto/A/floor-error-tests-r6
branch
from
October 17, 2026 22:54
5466cca to
66d1afd
Compare
shuv-amp
force-pushed
the
auto/A/floor-check-calls-r2
branch
from
October 17, 2026 22:55
a133186 to
70eee34
Compare
shuv-amp
force-pushed
the
auto/A/floor-error-tests-r6
branch
from
October 18, 2026 20:04
66d1afd to
ada0239
Compare
shuv-amp
force-pushed
the
auto/A/floor-check-calls-r2
branch
from
October 18, 2026 20:04
70eee34 to
0a3084a
Compare
shuv-amp
force-pushed
the
auto/A/floor-error-tests-r6
branch
from
October 19, 2026 17:02
ada0239 to
c90d85a
Compare
Floor's two shared checks, check_program_accounts (loader.rs:135) and check_authority (lib.rs:198), are called at eight places. With each call replaced by `let _ = ...` on its own (tasks/floor-check-calls/ mutants.log, STATE=tip, base 7f8c9ff, 17 Oct), the two in a stop were KILLED (a_stop_names_its_own_program_sysvars_and_authority), and six SURVIVED with every program test green, the sweep included: K3 stop.rs:211 restore_snapshot check_program_accounts K4 stop.rs:216 restore_snapshot check_authority K5 stop.rs:293 close_buffer check_authority K6 proposals.rs:261 execute_code check_program_accounts K7 proposals.rs:270 execute_code check_authority K8 proposals.rs:339 execute_release check_authority Root cause: the sweep checks only that a substituted account fails, and without the check the loader still refuses the CPI, so nothing pinned Floor's own code at these six sites. The rules held; no test could fail if one went. Same class as finding 110. New test each_loader_call_names_its_own_program_and_authority. A second protected program supplies a programdata, program and Floor authority that pass every other check; each is substituted on its own in a snapshot restore, a close of a cancelled proposal's buffer, an upgrade after its delay and a release, and must fail with PROGRAM_MISMATCH or WRONG_AUTHORITY_ADDRESS. Each instruction then succeeds unchanged, and the other program's authority stays Floor's. Evidence (STATE=g3, full program suite per mutant, mutants-frozen.sh): K3-K8 each KILLED by the new test, whose swap then gets the loader's error instead of Floor's (InvalidArgument for K3 and K6, PrivilegeEscalation for K4, K5, K7 and K8); K1, K2 still KILLED by the stop test. Floor sha256 8ca8a608 after restoring, unchanged. Re-run after the restack onto floor-error-tests-r6 (tasks/floor-check- calls/r2/mutants.log): STATE=r2, K1-K8 KILLED as above; STATE=r2parent, the parent's test file, K3-K8 SURVIVED. The first run's base 7f8c9ff is an earlier head of floor-error-tests-r5 (kept as branch auto/A/floor-error-tests-r5-7f8c9ff), not of this history; its programs and core equal this commit's (git diff --stat 7f8c9ff HEAD -- programs/floor/src programs/vault/src programs/harbor/src crates/: empty). programs/tests clippy --release --tests -D warnings: clean. Sibling search: `grep -n "check_program_accounts\|check_authority" programs/floor/src` lists the eight calls and the two definitions; the four programdata-only checks (returns at stop.rs:35, :68, :296, proposals.rs:337) are already asserted by code (finding 110's tests and a_proposal_has_a_known_kind_and_a_release_its_own_programdata). Docs: the §3 row "Floor refusals deleted one at a time" said the calls were not deleted; it now says, dated 17 Oct, that each was, and in its result column what that did, on the same build as the 16 Oct run (Floor 8ca8a608 in both mutants.log files). docs/08's list of what the other Floor tests cover gains another program's accounts refused by Floor's code. Counts: Floor 57 -> 58, programs 172 -> 173 (claims.py OK). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding 110's deletion run removed the returns of Floor's two shared checks, check_program_accounts and check_authority, but not their calls. Each of the eight calls, replaced on its own by `let _ = ...` with the whole program suite run against it (tasks/floor-check-calls/ mutants.log, 17 Oct), showed six with no test that could fail: in a snapshot restore (stop.rs:211, :216), a close (:293), an upgrade (proposals.rs:261, :270) and a release (:339). The loader refused the CPI with no Floor code, and the sweep checks only that a step fails. The previous commit adds the test that fails under each; this one records the finding in 09 §4 and moves the counts: README 110 -> 111 findings, "96–111 were recorded" and 111 among the fixed (Floor tests), docs/12's range 96–111 with 111 fixed (Floor tests). Docs only: claims.py OK, findings 111. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shuv-amp
force-pushed
the
auto/A/floor-check-calls-r2
branch
from
October 19, 2026 17:11
0a3084a to
dbf3099
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Program tests (programs/tests/tests/floor.rs) and docs. No program change (Floor 8ca8a608). Two commits.
Finding 110's run deleted the returns of Floor's two shared checks,
check_program_accountsandcheck_authority, but not their eight calls. With each call replaced on its own bylet _ = …, the two in a stop were KILLED, but six survived with every program test green: in a snapshot restore (stop.rs:211, :216), a close (:293), an upgrade (proposals.rs:261, :270) and a release (:339). The loader still refused the CPI, with no Floor code, and the sweep checks only that a step fails.each_loader_call_names_its_own_program_and_authority. A second protected program supplies a programdata, program and Floor authority that pass every other check, and each is swapped in on its own into restore, close, upgrade and release. Each must be refused with Floor's own code (PROGRAM_MISMATCHorWRONG_AUTHORITY_ADDRESS), and the other program must still work afterwards.Proof
scripts/check.shALL CHECKS PASSED (findings 111, Floor 58, programs 173).Limits
each_instruction_names_its_own_accounts_and_stateanda_proposal_has_a_known_kind_and_a_release_its_own_programdata.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: 5081b4d = 73ddc78, a133186 = 70eee34. On the synced chain:
bin/check-each-commit.sh60/60 green, andscripts/check.shALL 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).Hashes after the sync onto main (19 Oct)
The sync replayed the stack onto main bb55c15 (#114), whose tree is auto/B/failover-snapshot-r2's (8506759); #113's is auto/B/floor-follow-each's (51d20d3), both built on the main they merged into. The owner's #107 edited one sentence in README.md, docs/08 and docs/09 (the devnet job, and with it
ci, fails for Floor and Vault until finding 107 is deployed); and #99's merge changed README's devnet line and the guardians figure (3-8 -> 4-8 keys). Each commit's own message is unchanged. Every old/new pair's trees differ by exactly that: README.md, docs/08, docs/09, docs/assets/src/figures.py and the two PNGs, the same +/- lines for all 38 synced commits (autopilot tasks/sync-main-114/per-commit-tree.log and map.txt). The ids under What changed are the new ones; the runs and reviews quoted elsewhere were done at the old ones. Old = new: 73ddc78 = b3e62f9, 70eee34 = 0a3084a. On the synced chain:bin/check-each-commit.sh bb55c1541/41 green (the 38 synced commits, then the murmur3 exclusion fix, finding 106's citation and the full-ledger fuzz target), andscripts/check.shALL CHECKS PASSED at their tip (tasks/sync-main-114/each-commit.log, check-tip.log). Agent B reviewed the sync: REVIEWS/auto-A-sync-main-114.md.🤖 Generated with Claude Code