Repository navigation
Conversation
Add tests for the coverage scripts, the Timba boundary, owner and reentrancy checks, and the entropy budget. Spread the Rust mutants over every weekly part, and let an empty part pass when the full list has mutants. Skip the one equivalent Solidity mutant with its reason.
astrovm
marked this pull request as ready for review
November 29, 2026 02:03
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Handles every missed mutant in Issue #175 (weekly parts 0-63), and fixes the Rust weekly parts that failed with no mutant.
Closes #175
How each finding is handled
scripts/check-coverage.ts23-31 (glob and root scope).and globs with*and?.(config.exclude ?? [])becameconfig.exclude?., which has no empty-array mutant.scripts/check-coverage.ts36-43 (tracked files)filter(Boolean)and\\replace did nothing (git writes/, and the empty last name matches no extension), so they are removed.scripts/check-coverage.ts48-49, 75 (report paths)..guard was dead: an outside path starts with..and no tracked file does. Removed.scripts/check-coverage.ts79-91 (line data)DA:<line>,<hits>[,<checksum>]. New tests: negative, zero, missing, extra and checksum fields, and a record's lines afterend_of_record.scripts/check-coverage.tssort ofmissinggit ls-files, which is sorted.scripts/check-coverage.tsimport.meta.mainblock// Stryker disable allwith the reason.check-coverage-cli.test.tsalready runs it as a subprocess.scripts/supplement-sbf-coverage.ts11, 25, 32LF/LHare recomputed per record, host summary lines add nothing, and every field after the count is kept.scripts/supplement-sbf-coverage.ts8 (let source = "")DAline before anySFline is not LCOV, and its key matches no line. Disabled with the reason.scripts/supplement-sbf-coverage.ts40-48 (command line)main(args, base). New tests: it writes the output, each missing or empty path fails, and the default base issolana/.evm/src/Timba.sol:123remove__Ownable2Step_init()scripts/mutants-sol/run.pynow has anEQUIVALENTlist that drops it, with this reason.evm/src/Timba.sol:146, 199, 244, 271, 319, 340removenonReentrantReentrantTokennow passes on the nested call's revert.testReentryFromTransfersAndUpgradesIsBlockedexpectsReentrancyGuardReentrantCallfromcreateGame,closeGame,joinGame,completeGame,refundPlayerandupgradeToAndCall, then shows the same nested join succeeds outside the guard.evm/src/Timba.sol:169, 173removeonlyOwnerrenounceOwnershiportransferOwnership(timba)getsOwnableUnauthorizedAccount, notInvalidAuthorization.evm/src/Timba.sol:161, 204, 215, 216, 218, 248boundariesmaxTimeout == minTimeout, creation at its deadline, timeout at the minimum and maximum, the largest coinflip amount, the latest start that fits inuint48, and a private join at its deadline.evm/src/Timba.sol:268-to+in thePlayerJoinedindexevm/src/Timba.sol:307<to<=(32 entropy samples)ExhaustedEntropyTimbanow returns usable entropy only from the last rehash, which the 32-sample budget never reads.Rust parts with no mutant
Parts 49-63 of the Rust weekly run failed on 2026-11-14 with
Found 0 mutants to test. The Solana program has 194 mutants. The default slice sharding gives each of the 64 parts a run of 4, so parts 0-48 get all of them and parts 49-63 get none.foundthen treated an empty part as a broken setup.scripts/mutants-rust.sh shardnow uses--sharding round-robin, so each part gets 3 or 4 mutants.cargo mutants --list. The part passes only when there is at least one mutant and fewer mutants than parts. With as many mutants as parts, round-robin gives each part one, so an empty part fails as a broken setup.All changes
scripts/check-coverage.ts: simpler scope, tracked-file and report-path code; one regex forDAlines; Stryker disable for theimport.meta.mainblock.scripts/check-coverage.test.ts: tests for scope roots and globs, report base and outside paths, line data, record ends, and a non-git directory.scripts/supplement-sbf-coverage.ts: exportedmain(args, base); Stryker disable comments with reasons.scripts/supplement-sbf-coverage.test.ts: tests for summaries, checksum fields and the command line.scripts/mutants-rust.sh: round-robin sharding; an empty part passes when the unsharded list has mutants (has_mutants,found MUTANTS_OUT [ALL_LIST]).scripts/mutants-rust.test.ts: tests for both empty-part cases.scripts/mutants-sol/run.pyandtest_run.py: anEQUIVALENTlist the filter drops, with a test.evm/test/Timba.t.sol:ReentrantTokenreplacesCallbackToken; new reentrancy, owner, boundary and event checks;ExhaustedEntropyTimbatests the exact budget.Done when
scripts/check-coverage.tsandscripts/supplement-sbf-coverage.ts: 0 survived, 0 no coverage (5 workers, 235 mutants, all killed).bun test scripts: 63 pass on 6dfa64b.tsc --noEmitand prettier pass.forge test --match-contract TimbaTest: 32 pass.forge fmtapplied.cargo mutants --list --shard K/64 --sharding round-robin: parts 0, 48 and 63 have 4, 3 and 3 mutants. With the old sharding, part 63 had 0 and wrote[].remove __Ownable2Step_init();was dropped as equivalent.Review
One Sonnet review of
git diff origin/main...HEAD(the usage limit allowed one review).--listhad any output. It did not compare the mutant count with the part count, so a broken part could pass.foundnow takes the part count and passes an empty part only when0 < mutants < parts. Two new tests inscripts/mutants-rust.test.tscover both sides. I rechecked this logic fix myself instead of a second review.__Ownable2Step_initexclusion inscripts/mutants-sol/run.pynow also names theonlyInitializingcheck.nonReentrantremovals that vertigo reports as caught. Each one is killed bytestReentryFromTransfersAndUpgradesIsBlocked. No change.