Skip to content

feat(review): replay a PR without its existing discussion - #627

Draft
zzwong wants to merge 2 commits into
mainfrom
zzwong/issue-626/replay-without-discussion
Draft

zzwong wants to merge 2 commits into
mainfrom
zzwong/issue-626/replay-without-discussion

Conversation

@zzwong

@zzwong zzwong commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds cr review --without-discussion for replaying a PR review as a first-pass review. It requires --dry-run (or --no-post) and both --review-base-sha and --review-head-sha.

A pinned replay already skipped fetching review threads, issue comments, and prior reviews. The remaining leak was saved sessions: the replay resumed the PR's saved orchestrator session and each reviewer's saved session, which carry earlier live reviews including their discussion, and then saved over them. With the flag:

  • no PR discussion is fetched, and the dossier records that none was provided
  • saved orchestrator and reviewer sessions are not resumed or overwritten; the PR's reviewer cohort is left as it was
  • an incomplete run is only resumed by a run with the same setting, and task fingerprints include it
  • the run marker, dossier, and --json output record without_discussion

PR title, description, diff, and files are unchanged.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Repo scaffolding / maintenance

Checklist

  • I have read the contributing guide
  • My change follows the project structure and conventions
  • make tidy passes
  • make lint passes
  • make test passes
  • make build passes

Related Issues

Closes #626

Add `cr review --without-discussion` for first-pass replays of pinned
dry-run reviews. It requires --dry-run (or --no-post) and both
--review-base-sha and --review-head-sha.

Pinned reviews already skipped the live thread, review, and issue-comment
reads, but a replay still resumed the PR's default orchestrator session
and reviewer cohort sessions, which carry the earlier discussion, and it
overwrote that cohort. With the flag, the run reads no discussion,
resumes and updates no PR-scoped session or cohort, and so selection,
reviewer, and rollup prompts see only the PR title, description, and diff.

The run marker, dossier discussion artifacts, and JSON run output record
without_discussion, and an incomplete run resumes only into a run with the
same setting. Reviewer task fingerprints include the setting as well.
A --without-discussion replay kept its discussion out of every prompt, but
a reviewer with a shell could still fetch it with gh, curl, or the GitHub
API. Such replays now remove the git remotes from the workbench and each
reviewer checkout, deny claude_cli reviewers WebFetch, WebSearch, and Bash
commands that reach the network (gh, curl, wget, git fetch/pull/ls-remote
and similar), and run codex_cli reviewers with web search and sandbox
network access off. The adapters' argument validation requires these
restrictions exactly when the workspace is marked offline.

This narrows the tool surface rather than sandboxing the network, and the
README says so. --fresh-session is now rejected with --without-discussion,
since a replay never reuses or resets PR sessions.
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.

Replay a PR review without its existing discussion

1 participant