Skip to content

Empty the -o file when every flushed annotation is deleted - #446

Merged
umputun merged 2 commits into
masterfrom
clear-flushed-output
Nov 12, 2026
Merged

umputun merged 2 commits into
masterfrom
clear-flushed-output

Conversation

@umputun

@umputun umputun commented Nov 12, 2026

Copy link
Copy Markdown
Owner

an O flush that wrote the -o file, followed by deleting every annotation (or dropping them with R) and quitting with q, left the flushed snapshot in the file. The plugin launchers cat that file on exit, so the agent received notes the reviewer had already deleted.

a graceful quit now writes the empty output when an O flush wrote the file earlier in the session, the same rule #422 added for --annotations preloaded notes. It also covers a quit after a failed R reload, where finalize returned the load error before clearing the file; the load error is still returned. Q discard and signal exits leave the file as it was, and a session that never flushed or preloaded writes nothing, as before.

README, docs.html, both usage references and the gotchas entry describe it.

after an O flush wrote the -o file, deleting every annotation (or dropping
them with R) and quitting with q left the flushed snapshot in place. The
plugin launchers read that file on exit and handed the deleted notes to the
agent. A graceful quit now writes the empty output when an O flush wrote
the file in this session, the same rule #422 applies to preloaded notes.
Q and signal exits still leave the file as it was.

README, docs.html, both usage references and the gotchas entry describe it.
finalize returned the file-list load error before reaching the empty-output
write, so an O flush (or --annotations preload), then an R reload that failed,
then q left the old notes in the -o file. The launchers cat that file on any
exit code, so the caller still got the deleted notes next to the error. The
load-error path now clears the file first under the same rule, graceful exit
with preloaded or flushed notes, and still returns the load error.
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:06

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@umputun
umputun merged commit 97a5fa7 into master Nov 12, 2026
7 checks passed
@umputun
umputun deleted the clear-flushed-output branch November 12, 2026 18:12
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.

2 participants