Repository navigation
test-audit: widen too-tight probabilistic margin in rarity prestige test - #819
Merged
Merged
Conversation
test_roll_rarity_prestige_bonus_shifts_toward_higher_tiers set its threshold at ~1.7 sigma below the expected mean, giving it a ~5% false failure rate by the test's own comment. Increase trials 1500 -> 8000 and widen the margin to ~3.2 sigma to cut that down to <0.1%. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAYN2B3RiSrxmVB6aNi8AL
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAYN2B3RiSrxmVB6aNi8AL
stphung
marked this pull request as ready for review
October 12, 2026 16:37
stphung
enabled auto-merge (squash)
October 12, 2026 16:37
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.
Summary
Ran the
test-auditskill (3 parallel read-only agents across the fulltests/*_tests/scope) per the scheduled routine. One auto-fixable finding, several flagged for human review.tests/item_tests/item_pipeline_test.rs::test_roll_rarity_prestige_bonus_shifts_toward_higher_tiershad a Monte Carlo threshold set at only ~1.7 sigma below the expected mean (the test's own comment noted a ~5% false-failure rate). Increased trials 1500 → 8000 and widened the margin to ~3.2 sigma (false-failure rate now <0.1%).src/combat/enemy_generation.rsstill callsrand::rng()directly (unlikeitems::drops, fixed in Fix unseeded RNG in item drop generation (test-audit) #692) — a production-code RNG-injection change, outside this skill's scope.helpers.rsintests/game_tick_tests/— both previously flagged, still unresolved.Full findings detail is in the history log entry added in this PR.
Verification
cargo test --test item_tests test_roll_rarity_prestige_bonus_shifts_toward_higher_tiers— passesmake check— fmt, clippy, full test suite (2908+3074+... tests), progression check, voyage simulator, and security audit all greencargo testrun 10x consecutively — 0 failures across all runs (flakiness verification per the skill's Phase 3)Test plan
make checkpassescargo test— 0 failures🤖 Generated with Claude Code
https://claude.ai/code/session_01XAYN2B3RiSrxmVB6aNi8AL
Generated by Claude Code