Skip to content

Resume reviews automatically after a history rewrite - #114

Merged
nnutter merged 7 commits into
masterfrom
fix-review
Nov 5, 2026
Merged

nnutter merged 7 commits into
masterfrom
fix-review

Conversation

@nnutter

@nnutter nnutter commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

No description provided.

@nnutter nnutter changed the title fix review Unblock review and approval after a history rewrite Nov 5, 2026
An interrupted review keeps its captured stack. When a rewrite removes
those commits and leaves no lineage, no current stack continues the
attempt, so a review can neither reopen the saved range nor select a
replacement for it. The attempt then stops every review with a recovery
choice that has no working answer, and nothing ever removes it because
cleanup only covered stacks that a fixup commit extended.

Cleanup now drops an unfinished attempt whose captured commits no current
stack continues, and the saved sessions of the stack versions it drops.
The review then starts on the current stacks, and recovery is offered
only for a range that a review can actually reopen.
Approval refused any attempt that still looked active, asking the user
to recover or replace it. For an attempt whose captured commits a
rewrite removed, both choices are impossible, so the stack could never
be approved and status kept reporting the dead attempt as active.

An attempt that no review can reopen is no longer active, so approval,
automatic review, feedback listings, and status all ignore it. The next
review discards it.
A session document lives in a store whose index names it. A later change
moves a session to another commit range, which needs the store as well as
the document, so record the store beside the path that the reader already
reports. The field is not serialized.

Change-Id: Iab01f2030d6a2a2089da96644a9c6482457c2553
@nnutter nnutter changed the title Unblock review and approval after a history rewrite Resume reviews automatically after a history rewrite Nov 5, 2026
tuicr keeps a session only for the exact commit range that a review
shows, so a rebase or a reword discarded the reviewer's marks and
comments even when the patch was identical. The human then had to review
the same patch again, and the attempt that Timber recorded described a
range that no review could reopen.

A review now moves the session of a reviewed patch onto the current
stack before it starts: the files, marks, comments, and content hashes
stay, the commit-message entry follows the new tip, and a reworded
message drops its mark and its comments so the message is read again.
Only a matching patch carries, so no mark ever describes content that
changed. Carrying is best effort, because the store belongs to tuicr:
an unreadable or unexpected document warns and leaves a fresh review.

Change-Id: Ic1634260e2004f026ac407b5fb2a2dc910931789
An interrupted review asked the user to recover or replace it, and after
a rewrite neither answer could open the captured range: recovery showed
commits that no longer exist and replacement refused to start. The
question was also unnecessary in the common case, where resuming is the
only sensible answer.

A review now resumes the attempt that captured the same stack, and it
starts a new attempt on the current stack otherwise, which the previous
change already carries the saved review onto. The --recover and
--replace flags, the prompt, the decision result, and the
decision_required status are removed, so a review either runs or reports
its outcome.

Change-Id: Ie52af4a26a36c18d09ef0a8563864d5795f8928d
A review that resumes automatically needs an explicit way to start over,
and a state that no command can change is the trap that a rewrite used to
create.

Reset clears the attempts and saved sessions of one stack, selected by a
commit or by inclusive commit_stack endpoints, or of every stack in the
feature range when it has no argument. It holds the review lock, so it
cannot clear state under a live review, and both views then agree on an
empty state.

Change-Id: I5bf34c0e32e3c9e0710cc5999405c2c852e88be1
The skill told agents that recovery needs the user's choice and that
--recover exists. Both are gone: a review resumes the attempt that
captured the same stack, a matching patch carries its saved review onto
rewritten commits, and reset clears the state when the user wants a
clean start.

Change-Id: I228617b704eeaece0b4639f41cf1967a2ee47e20
@nnutter
nnutter merged commit f74bfb4 into master Nov 5, 2026
3 checks passed
@nnutter
nnutter deleted the fix-review branch November 5, 2026 16:46
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