fix(code-review): use stable GitHub PR checkout refs#2852
fix(code-review): use stable GitHub PR checkout refs#2852alex-alecu wants to merge 4 commits intomainfrom
Conversation
| model: config.model_slug || DEFAULT_CODE_REVIEW_MODEL, | ||
| variant, | ||
| upstreamBranch: review.head_ref, | ||
| upstreamBranch: githubCheckoutRef, |
There was a problem hiding this comment.
WARNING: Follow-up reviews can run against a stale checkout
upstreamBranch is now the synthetic refs/pull/<number>/head ref. The cloud-agent checkout path fetches that ref into a local branch without configuring an upstream, while v2 incremental reviews reuse previousCloudAgentSessionId and only send a follow-up message. On a later push, the incremental prompt's git pull cannot update this branch, so the agent can read files from the previous commit while reviewing the current PR diff. Please make the follow-up path fetch/checkout this pull ref again, or pin the checkout to head_sha, before starting the review.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Reviewed by gpt-5.5-2026-04-23 · 1,928,785 tokens |
|
Manual test passed. Tested:
Verified:
|
Summary
refs/pull/<number>/headref for code-review checkouts on both same-repo and fork PRs.head_refvalues can retrigger after source branches are deleted.Verification
N/A - no manual UI path; backend checkout-ref selection only.
Visual Changes
N/A
Reviewer Notes
Full
pnpm typecheckis currently blocked by unrelated existingkilo-chatmodule/type errors underapps/web/src/app/(app)/claw/kilo-chat/*in this checkout. The initial push was blocked by repo-wide pre-push lint/typecheck failures in unrelatedservices/kilo-chatandservices/kilo-opsfiles; this branch was pushed with explicit approval to bypass that hook.