Repository navigation
Description
This was generated by AI during triage.
From the 2026-11-11 fleet retrospective: across Review run Session traces (thirdshift and tourbot), reviewer subagents attempting to resolve the prompt's fixed-point ref failed with fatal: Needed a single revision (exit 128).
Agent Brief
Category: bug
Summary: prompt::pull_request_review wraps its base argument in refs/remotes/origin/{base}, even when ReviewProcess passes a 40-character commit SHA (snapshot.base_head), producing an invalid git ref refs/remotes/origin/<40-hex-sha> in the rendered Review prompt.
Current behavior:
ReviewProcess calls prompt::pull_request_review(&snapshot.base_head, ...) where snapshot.base_head is a 40-character hexadecimal commit SHA. Inside prompt::pull_request_review, origin_base_ref(base) formats refs/remotes/origin/{base} unconditionally, instructing the session to review changes "since the merge-base with refs/remotes/origin/9ce638c7...". Git has no remote-tracking ref named after a raw SHA, so git rev-parse / git merge-base against that literal string fails with exit status 128 until the agent recovers manually.
Desired behavior:
- When a fixed point passed to
origin_base_ref(orprompt::pull_request_review) is already a full 40-character (or 64-character) hexadecimal commit object ID rather than a branch name, render the commit SHA directly without prefixingrefs/remotes/origin/. - When a branch name (such as
main) is passed (including in generated prompt documentation examples if applicable, or consistent with howprompts_pagerenders examples),refs/remotes/origin/<branch>continues to be used. - Regenerate any affected prompt snapshots / site fragments (
UPDATE_PROMPTS=1 cargo test prompts_page) if the canonical prompt example changes, preserving surrounding hand-written HTML.
Key interfaces:
origin_base_ref/prompt::pull_request_reviewin the prompt builder: distinguish a raw commit SHA from a branch name so the rendered merge-base target is always a valid git revision in the Review worktree.- Prompt verification tests (
prompts_pageand prompt unit tests).
Acceptance criteria:
- Calling
prompt::pull_request_reviewwith a 40-character hex commit SHA produces a valid revision string (<sha>, neverrefs/remotes/origin/<sha>) in the rendered prompt. - Calling
origin_base_ref/ prompt builders with a branch name such asmainstill rendersrefs/remotes/origin/main. - Unit tests cover both branch names and 40-hex commit SHAs, and
cargo test prompts_pagepasses.
Out of scope:
- Changing how
ReviewProcessfetches commits into the Review worktree. - Other prompt wording changes unrelated to the fixed-point revision reference.
Activity
JacobStephens2 commentedon Nov 11, 2026
This comment was generated by AI.
thirdshift's Run on this issue failed, so it waits for the Day shift.
issue-2046on origin, with pull request Name a commit fixed point directly in review prompts #2062Put
ready-for-agentback to retry.Name the fixed-point helper for what it returns; pin Base branch rend…