Skip to content

Consolidate GitHub readiness and review tests - #1896

Merged
mergify[bot] merged 3 commits into
mainfrom
lean178/575-github-test-dedupe-pass2
Nov 26, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
lean178/575-github-test-dedupe-pass2

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Consolidate GitHub readiness and review tests

Context and goal

Acceptance

  • Compare coverage before and after, preserving all executed source lines and branches.
  • Keep the fixture cases for direct and fallback own-PR reviews and open finding gates.

Base

Base: f106753

Validation

Recorded for c91a64d7a887

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 75243ec, approve

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Coverage.py 7.17.5 branch-mode comparison of tests/test_github.py on base ac55b163 and the same source with the deduplicated test file: 1,272 executed source lines and 291 executed branch arcs in both runs, zero lost or added. 246 tests passed before and 243 after. The own-PR fallback/direct cases and readiness findings are parameterized together; approval metadata and the empty-publisher check share existing fixtures. The standalone off-diff reroute scenario had zero unique source arcs in per-test coverage; non-diff placement is exercised by the remaining anchor/pagination cases. REST /pulls/{n}/files inspection kept edits outside #1436, #1508, #1529, and #1893 hunks. Net −43 tests, zero source.

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/test_github.py
assert "Nit off diff" in payload["body"]


@pytest.mark.parametrize("separator", ["\u2028", "\u2029"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/test_github.py
("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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@eowca
eowca marked this pull request as ready for review November 26, 2026 13:23
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 6f34309 at 13:31 UTC

6 min in the queue, 5 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 13:24 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1905
  • ✅ Merged 13:31 · 6f34309 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit 6f34309 into main Nov 26, 2026
13 checks passed
@eowca
eowca deleted the lean178/575-github-test-dedupe-pass2 branch November 26, 2026 13:31
@mergify mergify Bot removed the queued label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant