Skip to content

refactor(github): define get_compare_diff once - #5405

Merged
dan-petty merged 2 commits into
mainfrom
fix/5404-main-defines-get-compare-diff-twice
Nov 13, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/5404-main-defines-get-compare-diff-twice

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

PR #5387 and PR #5401 merged two minutes apart, and each added GitHubClient.get_compare_diff to src/devops_cli/github/client.py with the same body. Git merged both with no conflict, so main defines the method twice: ruff F811 and mypy no-redef fail, the Static Analysis check of main fails, and the pre-push hook refuses every branch that holds this main (#5389 and #5400 wait for this fix). This change keeps one method and names both callers (#5346, #5388) in its docstring. The body does not change, so no behavior changes.

Closes #5404
Change: openspec/changes/archive/2026-11-13-5404-main-defines-get-compare-diff-twice/

PR #5387 and PR #5401 each added GitHubClient.get_compare_diff with the same body, so main failed ruff F811 and mypy no-redef. Keep one method and name both callers in its docstring.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/github GitHub Projects v2, Views, Milestones, Labels, and PR automation labels Nov 13, 2026
@dan-petty dan-petty changed the title fix(github): define get_compare_diff once refactor(github): define get_compare_diff once Nov 13, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Title changed from fix(github) to refactor(github). The change removes one of two definitions with the same body, so no behavior changes and no test can fail on the base: Python already used the second definition. The Fail-to-Pass Check applies to a behavior fix and cannot pass here ("0 failed on base ... The fix changes no tests/**/test_*.py file"). The proof of this change is the lint and typecheck rows: ruff F811 and mypy no-redef fail on main (c54e14c) and pass on this head, and 1,278 tests of the callers pass (tests/github, test_review_pr_post.py, test_roadmap_stage_ready.py).

@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 12:01
@dan-petty
dan-petty merged commit 61357b9 into main Nov 13, 2026
25 of 26 checks passed
@dan-petty
dan-petty deleted the fix/5404-main-defines-get-compare-diff-twice branch November 13, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/github GitHub Projects v2, Views, Milestones, Labels, and PR automation type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(github): main defines get_compare_diff twice

1 participant