Skip to content

fix: github_get_pr never surfaced the PR's head branch (v0.1.5)#19

Merged
mabry1985 merged 1 commit into
mainfrom
fix/pr-headref
Jul 4, 2026
Merged

fix: github_get_pr never surfaced the PR's head branch (v0.1.5)#19
mabry1985 merged 1 commit into
mainfrom
fix/pr-headref

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Summary

  • github_get_pr's --json field list was missing headRefName/baseRefName — so a caller who needs to read a PR's actual files (github_read_file/github_repo_contents, both ref-keyed) has no way to learn the real branch name from this tool's output.
  • Caught live: an agent tried to inspect PR #38's files after reading its diff, guessed a branch name from the PR title (proto/feature/bd-3a4-dashboard-team-card-shows-ephemeral-label) instead of the real one (feat/bd-3a4), and both file reads 404'd.
  • Fix: request headRefName,baseRefName too and render branch: {head} -> {base} in the tool's output.

Test plan

  • ruff check . / ruff format --check . — clean
  • pytest tests/ -q — 93 passed (2 new: the json-field-list request, and the rendered branch line)

🤖 Generated with Claude Code

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>
@protoquinn

protoquinn Bot commented Jul 4, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn 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.

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: adds headRefName,baseRefName to the --json field list and renders a branch: {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 --json arg 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.5 consistent across protoagent.plugin.yaml and pyproject.toml.

Observations

  • LOW: clawpatch structural review unavailable (502 on checkout cache). Diff is small and self-contained; manual review is sufficient.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jul 4, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #19.

@mabry1985 mabry1985 merged commit 65b18eb into main Jul 4, 2026
1 check passed

@protoquinn protoquinn 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.

CI terminal-green, no blockers on prior review — auto-approving on green (#748).

@protoquinn

protoquinn Bot commented Jul 4, 2026

Copy link
Copy Markdown

✅ CI went terminal-green with no blockers on the prior review — promoting it to APPROVED per the approve-on-green policy (#748).

@mabry1985 mabry1985 deleted the fix/pr-headref branch July 4, 2026 07:17
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