fix(sse): correlate mid-stream continuation logs with requesting call - #14793
Merged
diegosouzapw merged 1 commit intoSep 25, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
maxmad64bis
force-pushed
the
fix/recovery-trace-correlation
branch
from
September 24, 2026 17:43
e160ae4 to
90446c5
Compare
maxmad64bis
marked this pull request as ready for review
September 24, 2026 17:52
buildContinuationLogHooks takes the request correlationId, suffixes every line with correlationId=<id|none> (same empty-string fallback as the emptyTurnRetry neighbor guard), and routes stitched/terminal outcomes to info so a recovery stays visible outside debug; give-ups stay warn and tool-call refusals stay debug. Single call-site argument at chatCore.ts.
maxmad64bis
force-pushed
the
fix/recovery-trace-correlation
branch
from
September 24, 2026 20:41
90446c5 to
cb6c8ce
Compare
maxmad64bis
marked this pull request as draft
September 24, 2026 23:41
maxmad64bis
marked this pull request as ready for review
September 25, 2026 01:01
diegosouzapw
merged commit Sep 25, 2026
d6bd040
into
diegosouzapw:release/v3.8.51
16 of 28 checks passed
fouadSalkini
added a commit
to fouadSalkini/OmniRoute
that referenced
this pull request
Sep 26, 2026
Slice 2/3 rewrote open-sse/handlers/chatCore.ts from an older snapshot, silently undoing four merged fixes. Rebuild the file as the base version plus only this PR's own hunks: stripNonStreamingForwardedHeaders on the non-streaming path and apiKeyInfo on the streaming headers meta. Restored: - handleChatCore -> withResilienceActionsContext -> handleChatCoreInner wrapper, previousResponseResumed handling, notePreviousResponseResumed and the three noteBufferedVerdictOutcome calls (diegosouzapw#14810) - pendingRequestId in every trackPendingRequest call, the pipeline options and finalizeToolLoopError (diegosouzapw#14797) - the full-UUID traceId and its collision comment (diegosouzapw#14474) - correlationId on buildContinuationLogHooks (diegosouzapw#14793)
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.
Summary
Mid-stream recovery lines carry no request correlation, so concurrent recoveries cannot be attributed, and every non-abandon outcome stays at debug, so successful recoveries are invisible. This change threads the request id through the log hooks and routes stitched outcomes to info while give-ups stay warn and tool-call refusals stay debug. The two
file:linereferences now name theformatBufferedVerdictLogsymbol instead of a perishable line number.Related Issues
No linked issue — #13650 (merged) added the recovery traces this change attributes; #14639 widened them to Responses upstreams (searched
recoveryTraceLogging,continuation outcome info: no open match ata41ded27cc).Validation
npm run lintTests Added Or Updated
tests/unit/stream-recovery-trace-logging.test.ts: correlation suffix, per-outcome levels, and empty-id fallback.tests/unit/chatcore-stream-recovery-log-wiring.test.ts: wiring asserting the persisted lines carry the request id at the new levels.emptyTurnRetry.ts:337references now read as the empty-string fallback informatBufferedVerdictLog(11/11 green).Coverage Notes
open-sse/handlers/chatCore/recoveryTraceLogging.tsplus a one-argument call-site hunk; both test files above cover the hooks and the wiring.Reviewer Notes