fix(tools) correctly land the check-claims batch-query fix - #439
Conversation
PR #404's second commit unintentionally reverted its own first commit while adding a separate, real fix, so the sibling-PR check still ran the old N+1 gh pr view loop while also carrying the intended C++ and C# word-boundary correction. This applies both fixes cleanly against current main. - check-claims.py. sibling_pr_paths reads files directly off the single gh pr list --json number,files response instead of a second gh pr view call per sibling PR. - check-claims-test.py. updated to mock the single batched response. - gen-by-problem-by-language.py. the C++ and C# regex patterns no longer require a trailing word boundary that a following punctuation character (a comma, a period) would fail to satisfy. - docs/BY-LANGUAGE.md. regenerated with the corrected detection.
os and sys were unreferenced anywhere in the test module.
|
Reviewed the CI-controlling path change in tools/check-claims.py. The diff replaces a two-step gh pr list / gh pr view call chain with a Applying security-reviewed. |
|
REVIEWED. Approve. Small, mechanical diff (86 lines across 5 files), single-pass review. Confirmed line by line against PR #404's own two original commits that Ran python3 tools/check-claims-test.py locally. 7 of 7 pass. Confirmed The CI-controlling path finding on tools/check-claims.py is genuine |
Summary
Supersedes PR #404, which was opened by Jules and left in a state that
reverted its own first commit. Its second commit (a real fix, the C++
and C# regex word-boundary correction) was built on a stale local
checkout that still had the pre-batch-query version of
check-claims.py, so committing it silently rolled the sibling-PRcheck back to the old N plus one
gh pr viewloop while regeneratingdocs/BY-LANGUAGE.mdwith the intended fix.This branch applies both changes correctly against current main.
check-claims.py.sibling_pr_pathsreads files directly off thesingle
gh pr list --json number,filesresponse instead of asecond
gh pr viewcall per sibling PR.check-claims-test.py. mocks updated to match the single batchedresponse, plus two genuinely unused imports removed (caught by this
repo's own zero-warnings push gate on the file I was already
touching).
gen-by-problem-by-language.py. the C++ and C# regex patterns nolonger require a trailing word boundary that a following punctuation
character would fail to satisfy.
docs/BY-LANGUAGE.md. regenerated with the corrected detection.Verification
python3 tools/check-claims-test.py. 7 of 7 tests passmarkdownlint-cli2on the regenerateddocs/BY-LANGUAGE.md. 0 issuesoriginal commits before applying, confirmed the final state of
sibling_pr_pathsmatches the batched implementation Jules intendedTest plan
combines both of its intended changes without the accidental
revert