Guard PR bodies against premature payment-status wording#1168
Guard PR bodies against premature payment-status wording#1168yanyishuai wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
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 |
piaigmt
left a comment
There was a problem hiding this comment.
I found a current-head blocker before this can merge.
PR #1168 adds scripts/public_payment_language.py, scripts/check_pr_payment_language.py, and wires the advisory into scripts/submission_quality_gate.py, but the branch now imports a helper that is not present in the PR or in main:
from scripts.gh_collection_caps import (
GITHUB_COLLECTION_CAP_FOOTER,
describe_github_collection_cap,
)At head 834584f072206c8b889cab88cf00a43086f49381, scripts/gh_collection_caps.py is absent, so CI fails during test collection before the new payment-language tests can run:
ERROR tests/test_submission_quality_gate.py
scripts/submission_quality_gate.py:24: in <module>
from scripts.gh_collection_caps import (
E ModuleNotFoundError: No module named 'scripts.gh_collection_caps'
Validation/evidence:
- GitHub check
Quality, readiness, docs, and image checksis failing on run28321418553, job83903905254with the import error above. - Checked out PR #1168 at head
834584f072206c8b889cab88cf00a43086f49381. git diff --name-only origin/main...HEADlists the expected seven files, but notscripts/gh_collection_caps.py.test -f scripts/gh_collection_caps.pyfails locally on the PR branch.
This should be fixable either by adding the missing shared helper file to this PR or by removing/replacing the new import with logic that already exists on main. Until then the PR is not merge-ready because the repository test suite cannot collect.
Refs #1009
834584f to
ccd6d1e
Compare
qingfeng312
left a comment
There was a problem hiding this comment.
Reviewed current head ccd6d1e79366dbad26481c41ed723c4a48c61ede.
This is not merge-ready. The hosted Quality, readiness, docs, and image checks job is failing on this head, so the new payment-language guard cannot be treated as validated yet.
There is also a scope mismatch in the docs update: docs/agent-guide.md adds account path identifier rules and URL-encoded account rejection text, but this PR is for #1107 payment/status wording. That account-path content belongs with the account identifier hardening work, not this payment-language guard. Please remove that unrelated doc block and keep the docs focused on the new neutral submission-status/payment-language rule.
piaigmt
left a comment
There was a problem hiding this comment.
Follow-up review at updated head ccd6d1e79366dbad26481c41ed723c4a48c61ede.
My earlier review requested changes on head 834584f072206c8b889cab88cf00a43086f49381 because scripts/submission_quality_gate.py imported the missing scripts.gh_collection_caps module and CI failed during pytest collection. That blocker is partially addressed in the new head (the missing import is gone), but the branch is still not merge-ready: the touched scripts/submission_quality_gate.py file now fails ruff import ordering.
Current-head evidence:
$ uv venv --python 3.12 .venv
$ . .venv/bin/activate
$ uv pip install pytest ruff pydantic
$ ruff check scripts/check_pr_payment_language.py scripts/public_payment_language.py scripts/submission_quality_gate.py tests/test_public_payment_language.py
I001 [*] Import block is un-sorted or un-formatted
--> scripts/submission_quality_gate.py:18:1
18 | / from scripts.api_host_args import public_api_host
19 | | from scripts.bounty_refs import BOUNTY_REF_RE, GITHUB_LINKED_ISSUE_RE, LEADING_BOUNTY_REF_RE
| |____________________________________________________________________________________________^
help: Organize imports
Found 1 error.
GitHub's current Quality, readiness, docs, and image checks job is also failing on this head (28450943387 / 84312721817), matching the local ruff blocker.
I did not proceed to pytest after the lint failure because this is an auto-fixable merge gate failure on a touched file. Scope remains limited to docs, payment-language scripts, scripts/submission_quality_gate.py, and tests; no wallet, treasury, payout execution, secrets, or mutation path is changed by this review itself. Once the import block is sorted, this should be quick to re-check with the same ruff command plus the targeted payment-language/submission-quality tests.
Summary
Implements proposed work for #1107.
Test plan
Related to #1107