Skip to content

fix(ai-review): review exact changes with complete PR context - #13

Merged
absorbb merged 1 commit into
mainfrom
fix/ai-review-context
Oct 16, 2026
Merged

absorbb merged 1 commit into
mainfrom
fix/ai-review-context

Conversation

@absorbb

@absorbb absorbb commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

PR reviews could inspect files from a different ref than the requested head and compare against the base branch tip, including unrelated changes when a branch was behind. Check out the exact head and derive the PR diff from its merge base; commit reviews retain parent-to-commit comparison.

Prepare PR title/body and independently paginated review threads/comments before analysis. Tighten the prompt to validate concrete failure scenarios, omit speculative comments, consider intentional tradeoffs, and avoid repeating findings already covered by the discussion. review_instructions now supplements the core rules.

Intentional decisions and tradeoffs

  • This is PR 1 of the review-quality work: model (gpt-5.6-terra), effort, CLI/action pins, and direct APPROVE posting remain unchanged.
  • Context preparation stays inline because reusable workflows execute against the caller checkout, which does not contain this repository's helper scripts.
  • A PR-head mismatch during context preparation fails the run rather than mixing a newer PR context with an older reviewed head.
  • The optional decisions section is documented for caller PR descriptions/templates; consumers are not modified in this PR.
  • Structured publishing, incremental review, and model/runtime comparisons are deferred to subsequent PRs.

Validation

  • python3 -m unittest discover -s tests -v: 5 regression tests passed (branch behind main, parent-to-commit review, incorrect checkout, changed PR head, prompt/checkout contract, and multi-page API response handling).
  • actionlint 1.7.7: passed.
  • Executed the exact context API code against a real PR: fetched its title/body, one resolved thread, and both comments including the dismissal.
  • git diff --check: passed.

Live Codex analysis was not invoked; this PR validates workflow plumbing and prompt generation without posting test reviews.

@jitsu-code-review jitsu-code-review 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.

Reviewed the exact-head checkout and merge-base diff preparation, PR context/history pagination, prompt contract, and regression coverage. No high-confidence defects found in this change set.

@absorbb
absorbb merged commit f569596 into main Oct 16, 2026
1 check passed
@absorbb
absorbb deleted the fix/ai-review-context branch October 16, 2026 08:23
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