Repository navigation
fix(auto-reply): record reply_operation_aborted as skipped, not completed - #244
Closed
jerhinesmith wants to merge 10000 commits into
Closed
jerhinesmith wants to merge 10000 commits into
jerhinesmith wants to merge 10000 commits into
Conversation
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.
Summary
finishReplyOperationAbortedDispatchloggedoutcome:"completed"for a turn that was dropped before any reply was dispatched (or aborted mid-flight), misreporting it as a successful completion in themessage.processeddiagnostic log/event that Loki, dashboards, and thediagnostics-otelcounters read verbatim.reply_operation_aborted(the chat-send steering path inchat-send-message-injection.ts, and themessageInjectionAbortedbranch indispatch-from-config.finalize.ts) already uses"skipped"for this reason, and the audit-terminal projection indispatch-from-config.audit.tsalready reclassifies this reason tooutcome:"skipped"regardless of what raw outcome is passed in — so only the raw diagnostic log/event was out of step with the rest of the codebase's own handling of this reason.outcome=completedwith zero content ever delivered, hiding a real drop from on-call triage. RCA + timeline: ENG-20495.Test plan
dispatch-from-config.acp-abort.test.ts: 18/18 pass (updated two tests that pinned the oldoutcome:"completed"behavior)dispatch-from-config.test.ts,.reply-dispatch.test.ts,.final-outcome-counts.test.ts,.stale-recovery.test.ts,.terminal-recovery.test.ts,.turn-ledger.test.ts,chat-send-message-injection.test.ts,src/audit/: 602/602 passsrc/auto-reply/reply/sweep are pre-existing (reproduced identically against unmodifiedmainviagit stash)Not in scope (flagged for follow-up)
terminal_unreleased/finalization_stalled/genericrun_failed(currently silent) — UX tradeoff, product call.dispatch-acp.ts:901(reason:"acp_aborted") is deliberately NOT touched here — an ACP-cancelled turn may have already delivered content before cancellation, so"completed"may sometimes be legitimate there.🤖 Generated with Claude Code
Summary by cubic
Fixes the
message.processeddiagnostic loggingreply_operation_abortedturns asoutcome:"completed", so a turn dropped before any reply was dispatched now reads as skipped in Loki, dashboards, anddiagnostics-otelinstead of a successful completion.Root-caused from the tanco incident, where inbound messages arriving during a stalled session were logged as completed with zero content ever delivered, hiding the drop from on-call triage. This aligns
finishReplyOperationAbortedDispatchwith every other call site recording this reason and the audit-terminal projection, both of which already classify it as skipped. Updated the two tests that pinned the oldcompletedbehavior.Written for commit 2471fed. Summary will update on new commits.