Repository navigation
Empty the -o file when every flushed annotation is deleted - #446
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
an
Oflush that wrote the-ofile, followed by deleting every annotation (or dropping them withR) and quitting withq, left the flushed snapshot in the file. The plugin launcherscatthat file on exit, so the agent received notes the reviewer had already deleted.a graceful quit now writes the empty output when an
Oflush wrote the file earlier in the session, the same rule #422 added for--annotationspreloaded notes. It also covers a quit after a failedRreload, wherefinalizereturned the load error before clearing the file; the load error is still returned.Qdiscard 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.