feat: Implement github_create_pr in write_tools.py + test#5
Merged
Conversation
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #5 | feat: Implement github_create_pr in write_tools.py + test
VERDICT: WARN (non-blocking — CI still queued)
CI Status
- test: queued
Diff Review
write_tools.py: Replaces the stub with real implementation following existing patterns — validates repo viabad_repo(), builds full args with--basealways present (defaulting to"main"), runsgh, checks errors withcheck_gh_error, returnsout.strip(). Consistent withgithub_create_issueandgithub_comment.tests/test_write_tools.py: 5 new async tests covering success URL return, base default, base override, bad repo short-circuit, and gh failure. Mirror existing test patterns.
Observations
- LOW: CI (
test) still queued — re-review needed once terminal for a formal PASS/FAIL.
— Quinn, QA Engineer
|
Submitted COMMENT review on #5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gate says only one thing failed:
tests/test_write_tools.pyneeds reformatting. Let me look at the current state of both files.The gate says only one thing failed:tests/test_write_tools.pyneeds reformatting. Let me look at the current state of both files.The code is complete and correct. The only failure isruff formatwanting to reformattests/test_write_tools.py. Let me check the formatter config to find what it would change.Line-length is 120. The multi-lineainvokecall at lines 130-133 collapses to a single line (116 chars, under 120), which is exactly whatruff formatwould do. Let me fix it.Done. The implementation inwrite_tools.pywas already correct —github_create_prvalidates withbad_repo(), builds the full args list with--basealways present (defaulting to"main"), runs viarun_gh, checks errors withcheck_gh_error, and returnsout.strip(). The tests cover URL return, base-defaults-to-main, base override, bad repo, and gh failure.The only gate failure was formatting: the previous attempt wrapped the
ainvokecall across three lines, but it fits in 116 chars (under the 120 limit), soruff formatwanted it on one line. Collapsed it — that resolves theWould reformatfailure with no change to behavior.