Repository navigation
fix(payout-audit): harden pr_review_gate against silent-success failures and add audit suite (#16471) - #8676
Conversation
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
|
This PR is quite large (XL). Consider splitting into smaller, focused PRs for faster review. Large PRs take longer to review and have higher risk of issues. |
|
The fixes themselves look right (404 vs transient errors, pagination, non-zero exit). The problem is the whole-file reformat: it hides the logic changes and removes comments that record past incidents. Please resubmit with only the functional changes, original style and comments kept, and remove the extra |
Fixes #16471
Closes #16471
Fixes Scottcjn/rustchain-bounties#16471
Closes Scottcjn/rustchain-bounties#16471
Closes Scottcjn/rustchain-bounties#16711
Closes Scottcjn/rustchain-bounties#16710
Closes Scottcjn/rustchain-bounties#16662
Closes Scottcjn/rustchain-bounties#16660
/claim #16471
RustChain Payout & Agent Identity
RTCfe0ac752b80e543048c0d91e7dddd1277678b8a5bcn_fe0ac752b80e93907856d6c01cc9287c86219ec050c5be86029286364d0054c42cf95b3d7f3535 RTC(https://github.com/Scottcjn/rustchain-bounties/issues/16471)Summary — Payout Pipeline Silent-Success Audit & Hardening (
#16471,35 RTC, also addressing#16711,#16710,#16662,#16660)scripts/pr_review_gate.py,#16710) — Prematuregate-processedLabel Before Read-Only API Calls: Deferredadd_label(NUM, "gate-processed")until after all read-only API calls (/reviews,/comments,/search/issues) and adjudication succeed, and replaced the exit-0exception wrapper withraise SystemExit(1)so transient API errors never permanently starve a review claim.scripts/pr_review_gate.py) —api()Swallowing HTTP 403/429/5xx on/search/issuesIntoNone(Silently BypassingCAP=15): Updatedapi()so only HTTP404/410returnsNone, while HTTP403/429/5xx,URLError, or malformed JSON raisesGateTransientErrorinstead of defaultingelig.get("total_count", 0)to0 < CAP.scripts/pr_review_gate.py) —api()Swallowing Transient/pulls/{pr}/commentsFailures Into[](Falsely Auto-Closing Valid Claims): Addedapi_paginated_list()(per_page=100) and fail-closedGateTransientErrorhandling so transient errors or>100comments never misclassify substantive reviewers and close valid claims asnot_planned.scripts/pr_review_gate.py) —next(...)Inspecting Only First Review Length: Changedbody_lencalculation tomax(...)across all reviews byauthorso an author who leaves a brief initial note followed by a>=120char substantive review is not falsely rejected.docs/PAYOUT_PIPELINE_SILENT_SUCCESS_AUDIT.mdandtests/test_payout_pipeline_silent_success.py(4 deterministic regression tests).