fix(buzz-acp): distinguish cancel-drain expiry from real hard-cap timeout#1893
Open
wpfleger96 wants to merge 1 commit into
Open
fix(buzz-acp): distinguish cancel-drain expiry from real hard-cap timeout#1893wpfleger96 wants to merge 1 commit into
wpfleger96 wants to merge 1 commit into
Conversation
…eout The post-cancel cleanup drain in cancel_with_cleanup_grace() shared AcpError::HardTimeout with the true 1-hour max-turn deadline. PR #1844's hard-cap policy dead-lettered the in-flight batch immediately whenever the 5s drain expired, even though it should have been preserved and merged into the next turn like a normal cancel. cancel_with_cleanup_grace() now maps its own drain-deadline expiry to a new AcpError::CancelDrainTimeout, leaving genuine absolute-deadline HardTimeout failures untouched. The corresponding PromptOutcome:: CancelDrainTimeout requeues the triggering batch via requeue_as_cancelled (no retry/dead-letter accounting) while still respawning the agent process, since its post-cancel protocol state is unknown. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
678b23d to
f94c48f
Compare
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.
The post-cancel cleanup drain in
cancel_with_cleanup_grace()sharedAcpError::HardTimeoutwith the true 1-hour max-turn deadline. The hard-cap dead-lettering policy triggered whenever the 5s drain expired after a steer/interrupt/cancel, even though the original in-flight batch should have been preserved and merged into the next turn like a normal cancel.cancel_with_cleanup_grace()now maps its own drain-deadline expiry to a newAcpError::CancelDrainTimeout, leaving genuine absolute-deadlineHardTimeoutfailures untouched.TimeoutKindis unchanged (still Idle/Hard only) — this is a wholly separatePromptOutcome::CancelDrainTimeoutvariant to avoid re-overloading the same signal.The corresponding
PromptOutcome::CancelDrainTimeoutrequeues the triggering batch viarequeue_as_cancelled(no retry/dead-letter accounting, preserving the originalCancelReason) while still respawning the agent process, since its post-cancel protocol state is unknown. The existingPromptOutcome::Timeout(TimeoutKind::Hard)dead-letter path is untouched.