Skip to content

fix(review): include checkpoint context and review flow fixes#1132

Open
peyton-alt wants to merge 6 commits intomainfrom
fix/review-checkpoint-context
Open

fix(review): include checkpoint context and review flow fixes#1132
peyton-alt wants to merge 6 commits intomainfrom
fix/review-checkpoint-context

Conversation

@peyton-alt
Copy link
Copy Markdown
Contributor

@peyton-alt peyton-alt commented May 6, 2026

https://entire.io/gh/entireio/cli/trails/312

Summary

  • include compact checkpoint context in generated entire review prompts, preferring checkpoint summaries and falling back to stored prompts without inlining raw transcripts
  • repair the review configuration flow so built-in commands/plugin skills stay visible, multi-agent selections persist per agent, and additional instructions augment selected skills
  • restore live review output: single-agent runs show progress, Codex /review expands into a scoped prompt sent through codex exec -, and Codex assistant/tool events stream while the process is running
  • harden final review rendering so Markdown code blocks keep styling without Chroma panics; renderer failures fall back to raw markdown instead of crashing after agents finish

Why the diff is larger than the fixes look

  • The user-facing issue crosses picker config, agent adapters, and final output rendering. Most added lines are regression tests for those paths.
  • Codex needed parser coverage for live assistant text, tool calls, duplicate summary filtering, and streaming before EOF. That accounts for much of the added test surface.
  • This is not a broad review refactor. The changes stay within the review command, Codex/Claude reviewer tests, and the shared markdown renderer used by review dumps.

Tests

  • go test ./cmd/entire/cli/mdrender ./cmd/entire/cli/agent/codex ./cmd/entire/cli/review -count=1
  • mise run lint
  • mise run build
  • manual smoke with rebuilt binary: entire review --edit and entire review verified the configured Claude Code + Codex flow, final Codex output, and no renderer panic after agents completed

Note

Medium Risk
Adds dynamic, git- and checkpoint-derived context into all generated review prompts, which could affect agent behavior and relies on best-effort parsing of repo history/metadata. Risk is moderated by guardrails (scope required, truncation, no raw transcript inlining) and added tests.

Overview
Generated entire review prompts now include a best-effort “checkpoint context” section derived from checkpoints found in commits within the detected branch scope.

This threads a new RunConfig.CheckpointContext through both single- and multi-agent paths, appends it in ComposeReviewPrompt (while keeping PromptOverride verbatim), and wires the implementation via review_bridge.go to avoid import cycles.

A new review_context.go builds the compact context by scanning scoped commits for Entire-Checkpoint trailers, preferring stored checkpoint summaries and falling back to prompts, truncating detail, and pointing users to entire explain <id> for full context; tests cover prompt composition and an end-to-end smoke capture of the emitted prompt.

Reviewed by Cursor Bugbot for commit 0c630e2. Configure here.

@peyton-alt peyton-alt requested a review from a team as a code owner May 6, 2026 20:52
Copilot AI review requested due to automatic review settings May 6, 2026 20:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances entire review prompt generation by appending compact, best-effort checkpoint-derived context for commits within the detected review scope, so reviewers can reference relevant checkpoint IDs and summaries without inlining raw transcripts.

Changes:

  • Add CheckpointContext to review run configuration and append it to composed prompts (while keeping PromptOverride verbatim).
  • Introduce checkpoint-context extraction for the review scope, preferring checkpoint summaries and falling back to stored prompts, with guidance to use entire explain for full context.
  • Wire the new context provider through dependency injection and add unit/smoke tests covering prompt composition and end-to-end prompt capture for a stubbed agent.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/entire/cli/review/types/reviewer.go Extends review run configuration with checkpoint context.
cmd/entire/cli/review/tui_model.go Updates nolint rationale comments for Bubble Tea interface returns.
cmd/entire/cli/review/prompt.go Appends checkpoint context to generated prompts (non-override path).
cmd/entire/cli/review/prompt_test.go Adds coverage ensuring checkpoint context is included and override remains verbatim.
cmd/entire/cli/review/cmd.go Injects and threads checkpoint context into single- and multi-agent run configs.
cmd/entire/cli/review/cmd_test.go Adjusts stub reviewer Start signature to match interface usage style.
cmd/entire/cli/review_context.go Implements best-effort checkpoint context extraction for a scoped range of commits.
cmd/entire/cli/review_context_test.go Adds tests for summary/prompt fallback behavior and a smoke test verifying prompt inclusion.
cmd/entire/cli/review_bridge.go Wires the checkpoint-context provider into review deps from the CLI package.

Comment thread cmd/entire/cli/review_context.go Outdated
Comment thread cmd/entire/cli/review_context.go
Comment thread cmd/entire/cli/review_context.go
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0c630e2. Configure here.

Comment thread cmd/entire/cli/review_context.go Outdated
@peyton-alt peyton-alt changed the title fix(review): include checkpoint context in prompts fix(review): include checkpoint context and review flow fixes May 6, 2026
alishakawaguchi
alishakawaguchi previously approved these changes May 6, 2026
Copy link
Copy Markdown
Contributor

@alishakawaguchi alishakawaguchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Ensure review picker options remain visible and selected across agents.

Expand Codex built-in review prompts, stream Codex assistant/tool events, and harden markdown rendering so code-block output cannot crash review dumps.

Entire-Checkpoint: 80ad30770d35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants