chore: stop tracking test snapshots; regenerate locally instead - #84
Conversation
Committed Soroban test snapshots are derived artifacts (cargo test regenerates them from any commit) and are not byte-reproducible across runs, so they churned on every test run and inflated PR diffs past the limits of the security scanners: on PR #82 both Almanax (diff too large) and CodeRabbit (198 files) skipped review of a HIGH-severity contract change because of snapshot noise. Gitignore test_snapshots/, untrack the 238 committed files (kept on disk locally), and update the CLAUDE.md hard rule so contributors inspect regenerated snapshot diffs during review instead of committing them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (244)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughThe change marks ChangesSnapshot policy
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Resolved snapshot file conflicts by accepting upstream deletion (snapshots are gitignored per repo convention). Upstream changes: - chore: stop tracking test snapshots; regenerate locally instead (boundlessfi#84) - test(admin): assert admin auth is actually required, not just mocked (boundlessfi#78) - fix(events): harden cancellation liveness (boundlessfi#82)
…rror-enum cap Brings the two-step manager delegation up to current testnet (boundlessfi#90 pull-model claims, boundlessfi#84 snapshots) and makes it build and pass there. Error enum: testnet is at the 50-case contracterror cap, so a new PendingManagerMismatch variant would not compile. Instead generalize the two admin-rotation variants — PendingAdminMismatch/PendingAdminExpired -> PendingRotationMismatch/PendingRotationExpired (discriminants 12/13 unchanged, so no on-chain code change) — and share them across both two-step rotations. accept_manager now distinguishes no-pending (Mismatch) from expired (Expired), which is more precise than the original single-variant usage. Conflict resolution: - types.rs / storage.rs / event_ops.rs: PendingManager keys and helpers ordered after the 1.3.0 prize keys; append-only, no reorder. - cross_contract.rs: kept the new manager suite; the accepted-manager test now claims the prize before asserting Completed, since under the pull model select_winners records rather than pays. Verified: cargo test 216 events + 66 profile green; make build OK (events wasm 56,202 bytes, < 64 KB); fmt + clippy clean.
Summary
Committed Soroban test snapshots are derived artifacts —
cargo testregenerates them from any commit — and they are not byte-reproducible across runs (BytesN::randomvalues differ per run), so they churned on every local test run and inflated PR diffs past the limits of the review tooling. On #82 both Almanax ("Diff Too Large for Analysis") and CodeRabbit (198-file limit) skipped scanning a HIGH-severity contract change because ~17k of its ~17.5k diff lines were snapshot noise.Changes
test_snapshots/to.gitignorecargo test)Verification
cargo test --allon the branch: 197 events + 66 profile tests pass🤖 Generated with Claude Code
Summary by CodeRabbit