Repository navigation
fix(runs): deny an open approval when its run is stopped - #2171
Merged
Merged
Conversation
|
@tc3oliver is attempting to deploy a commit to the Inbox Zero Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
[Medium impact] The PR appears safe to merge; the previous finding is fixed and no new actionable issues were found. SummaryStopping a run now denies effects behind its unanswered approval cards without changing effects for tools already running without approval.
The previous finding is fully addressed. No new actionable issues were found. Tests were not run during this review.
|
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.
Why
Stopping a run while its approval card was open left the card's effect
intendedforever. The run can't resume, so nothing ran or settled it.What changed
clearEndedRunStatenow marks the effects behind the ended runs' unanswered approval cardsdenied, the status a declined card already uses. It finds them through the cards'approvalEffectId, so an effect with no card, such as a tool that needs no approval and is still running, keeps its status. The thread stop path and the shared cancel helper now callclearEndedRunStateinstead of repeating its checkpoint and secret cleanup, so both get the fix.How tested
A new journey test against Postgres sets an approval rule, waits for the card, stops the thread and checks the effect is denied. It fails without the change. Unit tests cover that only an unanswered card's effect is denied and that nothing changes when no card is open. Typecheck passes and Biome is clean on the changed files; the unit suite passes except the backup script tests, which fail the same way on main on macOS.