Refs #406: Align script bounty reference verbs#555
Conversation
📝 WalkthroughWalkthroughAdds a shared bounty-reference regex module and switches two validation scripts to import and use it; updates their failure messages and extends tests to accept many GitHub linking keyword variants and to reject invalid suffixed references. ChangesBounty reference keyword expansion
Possibly related PRs
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: dbf4e60e-adec-4a8f-bc79-5441f171b60a
📒 Files selected for processing (4)
scripts/pr_queue_health.pyscripts/submission_quality_gate.pytests/test_pr_queue_health.pytests/test_submission_quality_gate.py
|
Follow-up pushed in
Local validation after the follow-up: focused parser tests |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/test_pr_queue_health.py (1)
169-187: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winExpand malformed-suffix regression cases for boundary coverage.
This test only guards
Fixes#310abc``. Add_and `-` suffixed variants (e.g., `#310_abc`, `#310-abc`) to lock the full suffix-boundary contract.Proposed test tightening
-def test_pr_queue_health_rejects_linking_keyword_issue_suffix() -> None: +@pytest.mark.parametrize("body", ["Fixes `#310abc`", "Fixes `#310_abc`", "Fixes `#310-abc`"]) +def test_pr_queue_health_rejects_linking_keyword_issue_suffix(body: str) -> None: report = analyze_queue( { "bounties": [{"number": 310, "state": "OPEN", "awards_remaining": 1}], "pull_requests": [ { "number": 8, "title": "Harden bounty queue checks", - "body": "Fixes `#310abc`", + "body": body, "merge_state": "clean", "labels": [], } ], } )As per coding guidelines, “tests/**/*.py: Do not request docstrings. Focus on whether tests prove the changed behavior and include negative, replay, boundary, or regression cases where relevant.”
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7633a3a0-5a8d-453e-aa43-7b1b3c571302
📒 Files selected for processing (6)
scripts/__init__.pyscripts/bounty_refs.pyscripts/pr_queue_health.pyscripts/submission_quality_gate.pytests/test_pr_queue_health.pytests/test_submission_quality_gate.py
|
Reviewed PR #555 at I found a blocker in the current head: both public CLI scripts now fail when executed directly by path. Evidence:
Reproduction on this head:
Expected: both direct script commands should reach argparse/help and continue to work for the documented contributor and agent workflows. Suggested fix: keep the shared parser, but make direct script execution work too, either by using a local fallback import from |
|
Follow-up pushed in commit |
|
Current-head follow-up for PR #555 at Recheck evidence:
The remaining fix is still to make |
|
Follow-up pushed in commit |
|
Current-head follow-up for PR #555 at Recheck evidence:
No remaining blocker in my reviewed slice. CodeRabbit was still pending when I rechecked, so maintainers may still want to wait for that bot result. |
Summary
fix/fixes/fixed,close/closes/closed,resolve/resolves/resolved,ref(s),reference(s),bounty, and/claimstyle referencesFixes #<issue>abc,Fixes #<issue>_abc, andFixes #<issue>-abcdo not get parsed as issue referencesRefs #406
Validation
./.venv/bin/python scripts/pr_queue_health.py --help-> ok./.venv/bin/python scripts/submission_quality_gate.py --help-> okPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m pytest tests/test_submission_quality_gate.py tests/test_pr_queue_health.py -q-> 42 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m pytest -q-> 424 passed./.venv/bin/python -m ruff check scripts/pr_queue_health.py scripts/submission_quality_gate.py tests/test_pr_queue_health.py tests/test_submission_quality_gate.py-> passed./.venv/bin/python -m ruff format --check scripts/pr_queue_health.py scripts/submission_quality_gate.py tests/test_pr_queue_health.py tests/test_submission_quality_gate.py-> 4 files already formattedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m mypy scripts/bounty_refs.py scripts/submission_quality_gate.py scripts/pr_queue_health.py-> successgit diff --check-> clean