review: pin review sessions to a single checkpoint in PostCommit

main

Commit

dipree3mo ago

A read-only entire review session touches no files, so it never accrues shadow-branch content and never reaches the existing FullyCondensed && PhaseEnded terminal path. Left active in the worktree's session set, it was re-condensed into every subsequent commit's checkpoint — so one review's session id leaked into many unrelated checkpoints' session lists, and its prompt rendered once per checkpoint on the session page.

Once a review session has actually been condensed into a checkpoint (gated on handler.condensed, so attribution still gets its one home), mark it ended and fully condensed. PostCommit's existing skip then drops it from all later commits — attach once, then done.

Add TestPostCommit_ReviewSession_PinnedToSingleCheckpoint covering the condense-once-then-skip behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: c8d0a234809e

Checkpoints

Debug Repeated Prompt Review Sessions

Claude CodeOpus 4.8
View session
Checkpoint 1