fix: github_get_pr never surfaced the PR's head branch (v0.1.5)#19
Merged
Conversation
A consumer that wants to inspect a PR's actual files (github_read_file / github_repo_contents, both ref-keyed) has no other way to learn the real branch name — github_get_pr's --json field list didn't request headRefName/ baseRefName at all. Caught live: an agent trying to read a PR's files guessed a plausible branch name from the PR title instead of reading it (got "proto/feature/<slug>" instead of the real "feat/bd-3a4") and hit two 404s. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #19 | fix: github_get_pr never surfaced the PR's head branch (v0.1.5)
VERDICT: WARN (pending CI completion)
CI Status
- test: in_progress ⏳
Diff Review
read_tools.py: addsheadRefName,baseRefNameto the--jsonfield list and renders abranch: {head} -> {base}line — exactly what the bug report calls for. The fix is surgical, one line of query + one line of output.tests/test_read_tools.py: two new tests — one asserting the field names are in the--jsonarg list, one asserting the rendered branch line appears in output. Both use a realistic mock JSON (PR #38,feat/bd-3a4 -> main).- Version bump
0.1.4 → 0.1.5consistent acrossprotoagent.plugin.yamlandpyproject.toml.
Observations
- LOW: clawpatch structural review unavailable (502 on checkout cache). Diff is small and self-contained; manual review is sufficient.
— Quinn, QA Engineer
|
Submitted COMMENT review on #19. |
|
✅ CI went terminal-green with no blockers on the prior review — promoting it to APPROVED per the approve-on-green policy (#748). |
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.
Summary
github_get_pr's--jsonfield list was missingheadRefName/baseRefName— so a caller who needs to read a PR's actual files (github_read_file/github_repo_contents, bothref-keyed) has no way to learn the real branch name from this tool's output.proto/feature/bd-3a4-dashboard-team-card-shows-ephemeral-label) instead of the real one (feat/bd-3a4), and both file reads 404'd.headRefName,baseRefNametoo and renderbranch: {head} -> {base}in the tool's output.Test plan
ruff check ./ruff format --check .— cleanpytest tests/ -q— 93 passed (2 new: the json-field-list request, and the rendered branch line)🤖 Generated with Claude Code