Repository navigation
Name a commit fixed point directly in review prompts - #2062
Merged
Merged
Conversation
origin_base_ref wrapped every base in refs/remotes/origin/, so the Review run prompt built from snapshot.base_head named refs/remotes/origin/<sha>, which git cannot resolve. A full commit object ID is now named as it is.
…/actions/runs?head_sha=a86d66391abaf598ae1165c9ea21277b932ee871&per_page=100 failed: gh: API rate limit exceeded for user ID 53905376. If you reach out to GitHub Support for help, please include the request ID 8300:128E60:8A16FF:1B358F2:6AF4CAE9 and timestamp 2026-11-11 20:07:05 UTC. For more on scraping GitHub and how it may affect your rights, please review our Terms of Service (https://docs.github.com/en/site-policy/github-terms/github-terms-of-service) (HTTP 403)) 2026-11-11T20:07:05Z, host lima-thirdshift. Uncommitted work at the time of failure is included in this commit.
JacobStephens2
marked this pull request as draft
November 11, 2026 20:07
3 tasks
…ering literally (#2046) Review findings: origin_base_ref now also returns a bare commit ID, so it becomes fixed_point_revision. The Base branch test compared prompts with the helper under test; it now asserts refs/remotes/origin/<base> literally.
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
A Review run passes the pull request's captured base commit (
snapshot.base_head) toprompt::pull_request_reviewas the fixed point. The old helper wrapped every base inrefs/remotes/origin/. That told reviewers to userefs/remotes/origin/<sha>, which git cannot resolve (fatal: Needed a single revision, exit 128).base_branch_review_fixed_points_use_originnow assertsrefs/remotes/origin/<base>literally. Before, it compared the prompt against the helper under test.<base>, so generated prompts don't change.Evidence
Execution evidence
3beacb7f, with only the new test applied):cargo test --bin thirdshift prompt::tests::commit_review_fixed_points_name_the_commitConfirmed cause:
origin_base_ref(src/prompt.rs) always formattedrefs/remotes/origin/{base}.ReviewProcess(src/processes/review.rs:349-351) passes the commit SHAsnapshot.base_head(GitHub'sbase.sha) asbase.Visual evidence
Not applicable. This change has no rendered UI.
Merge Danger
Door: two-way
Blast Radius: narrow
Only prompt text changes, and only when the base is a full commit ID. Today that happens only for the Review run's fixed point.
Review coverage
Both axes read every changed file (
src/prompt.rs). No generated output changed. Standards raised 3 judgement calls; Spec raised 1 test-strength finding.Addressed:
origin_base_refis renamedfixed_point_revisionand its doc comment rewritten.refs/remotes/origin/{base}literally.Unaddressed findings
Standards
base: &strcarries a Base branch or a commit. The helper tells them apart by shape, so a Base branch named exactly 40 or 64 hex characters renders bare.hex_named_base_branch_keeps_origin_ref(origin_base_ref(&"a".repeat(40))), withcargo test --bin thirdshift prompt::tests::hex_named_base_branch_keeps_origin_ref. It fails as the finding says:left: "aaaa…",right: "refs/remotes/origin/aaaa…".refs/remotes/origin/". It namesorigin_base_refas the place that should "distinguish a raw commit SHA from a branch name".FixedPointtype would change every prompt builder's signature. Review run prompt formats commit-SHA fixed point as invalid refs/remotes/origin/<sha> #2046's out-of-scope list excludes changes beyond the fixed-point reference.src/evals/format.rs:289-297,src/github/advisories/description.rs:44andsrc/scoring/origins.rs:257-259.commit_idaccepts lowercase only, andis_commitaccepts SHA-1 only.Spec
None.
Closes #2046
Built with claude 2.1.314 · opus · default effort
Security review outcome
No unaddressed introduced findings.