Repository navigation
Consolidate GitHub readiness and review tests - #1896
Conversation
Co-Authored-By: Codex <noreply@openai.com>
|
Coverage.py 7.17.5 branch-mode comparison of |
There was a problem hiding this comment.
loopzero primary review by claude on 75243ecb15e03a3ab079a07f50b99a633a87e464, 37.5s: approve (0 critical, 0 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| assert "Nit off diff" in payload["body"] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("separator", ["\u2028", "\u2029"]) |
There was a problem hiding this comment.
suggestion: Removed reroute test drops the only check that an off-diff located suggestion stays out of the comments
The deleted test_post_review_reroutes_findings_outside_diff was the only test that sent a suggestion with a real path and line outside the diff (src/a.py:99) and checked that it went into the review body instead of being anchored. It also checked several blocking findings (off-hunk line, unknown file, line that exists only on the deleted side) all being rerouted to the same anchor. The executed source branches are still covered: the separator test covers an off-hunk line, the missing placement case covers an unknown path, and test_post_review_payload covers the loose branch with a suggestion that has no path. So this meets the coverage acceptance. However, a regression that anchors located non-blocking findings, or that treats f.path and f.line differently for suggestions, would no longer be caught. Smallest fix, if you have headroom: in test_post_review_counts_only_lf_as_patch_line_break, add Finding("suggestion", path, 3, "Nit", "") and assert that it is not in the comments but its title is in the body. That adds about 2 lines.
| ("approve", "lookup"), ("request_changes", "lookup"), ("approve", "supplied"), | ||
| ("approve", "fallback"), ("request_changes", "fallback"), | ||
| ]) | ||
| def test_post_review_comments_on_own_pr(gh: FakeGh, verdict: str, own_pr: str) -> None: |
There was a problem hiding this comment.
suggestion: Merged own-PR test splits into two assertion paths
test_post_review_comments_on_own_pr now holds two different scenarios behind if own_pr == "fallback": the 422 fallback retry and the direct COMMENT after an author lookup. Each path checks a separate set of things. The fallback cases no longer check the PR-details lookup or the graphql call order. That was never checked before either, so nothing is lost, but the conditional makes it harder to see what each case guarantees. This is fine given the line-budget goal. If you change this test again, think about putting the expected lookup argv in the parametrization instead of branching on it.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Consolidate GitHub readiness and review tests
Context and goal
Acceptance
Base
Base: f106753
Validation
Recorded for
c91a64d7a887uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review