[defer] feat(call-logs): record per-request resilience actions in call logs - #14810
Merged
diegosouzapw merged 7 commits intoSep 25, 2026
Merged
diegosouzapw merged 7 commits into
diegosouzapw merged 7 commits into
Conversation
maxmad64bis
force-pushed
the
fix/call-resilience-actions
branch
3 times, most recently
from
September 25, 2026 08:26
abdc84a to
e33c9ee
Compare
maxmad64bis
marked this pull request as ready for review
September 25, 2026 08:28
Each call-log row carries an additive nullable resilience summary (rotations, park wait, empty-turn retries, mid-stream continuation, stored-error replay, buffered-turn verdict), written by existing action points and rendered as read-only badges in the request log.
maxmad64bis
force-pushed
the
fix/call-resilience-actions
branch
from
September 25, 2026 11:31
e33c9ee to
7912697
Compare
Resolve the file-size-baseline conflict against the tip (chat.ts 2567->2582, auth.ts keeps the tip's 3602) and drop the unrelated i18n sync noise: every locale is restored to the tip (copiedAll, no __MISSING__ in bs.json, no reordering of stickyLimit*/connectionAwareExpansion) plus only this PR's six requestLogger.detail.resilience* keys, translated in all 65 locales.
Merged
5 tasks done
Owner
|
Migration number coordination: several open PRs claim the same slot, and the release tip is already at |
# Conflicts: # open-sse/executors/opencode.ts # open-sse/handlers/chatCore/recoveryTraceLogging.ts # src/lib/usage/callLogs.ts
…d of duplicating INSERT Reconcile with release/v3.8.51 (call-log id-collision retry loop): keeps callLogs.ts under the 1200-line cap and re-measures the opencode.ts ceiling on the reconciled tree.
# Conflicts: # config/quality/file-size-baseline.json # src/lib/db/schemaColumns.ts # src/lib/usage/callLogs.ts
Reconciled with release/v3.8.51 after diegosouzapw#14795 (migration 190) landed: drop the temporary 190 KNOWN_GAPS reservation, keep has_content / usage_provenance alongside resilience_actions in the INSERT, and re-measure the RequestLoggerDetail.tsx ceiling.
# Conflicts: # config/quality/file-size-baseline.json
diegosouzapw
pushed a commit
that referenced
this pull request
Sep 25, 2026
) Maintainer rework: reconciled with release/v3.8.51 after #14750/#14795/#14810/#14659 — migration 192 now follows 190/191 with no gap, the call_logs INSERT carries has_content/usage_provenance + added_wait_ms/added_wait_cause + the optional resilience_actions column and the #14474 id-collision retry, attempt logging keeps the fresh-UUID row key and reads the added wait late, opencode keeps both the served-account tracker and the park/throttle added-wait counters, the unused getAddedWaitPercentiles was dropped, and file-size-baseline.json was rebuilt from the tip with only this PR's own ceilings (opencode.ts, proxyFetch.ts, core.ts, RequestLoggerDetail.tsx) instead of rewinding unrelated entries. Tests: 133/133 focused (opencode-added-wait, applied-egress-key, egress-throttle, attempt-logging, call-log persistence/id-collision/provenance, resilience-actions); typecheck:core and check:open-sse-typecheck clean; check-file-size and check-migration-numbering OK. opencode-429-park-resume / opencode-429-pool-reselect fail identically on the pure release tip (inherited, not from this PR). Thank you @maxmad64bis!
diegosouzapw
pushed a commit
that referenced
this pull request
Sep 25, 2026
…14752) Maintainer rework: reconciled with release/v3.8.51 after #14795/#14810/#14756 — migration 193 now follows 190/191/192 with no gap; AGENTS.md / llm.txt / README edits are out of the diff; selectorHelp ICU-escapes the selector=<name> placeholder; ENVIRONMENT.md keeps the tip's PROXY_SKIP_RECENTLY_FAILED default-on row plus this PR's SELECTOR_CONTROL_ALLOWLIST row. Tests: 142/142 focused (proxySubscription selector client/endpoint/functional/guard/help-ICU/schema/strip/trigger/warning, proxy-outcome-memory); typecheck:core and check:open-sse-typecheck clean; eslint clean on changed files; check-file-size and check-migration-numbering OK; no __MISSING__ markers. Thank you @maxmad64bis!
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
The request log stayed silent about recovery work: a request parked 40s before dispatch read as merely slow, and a served stored rate-limit response was indistinguishable from a real upstream 429. Each call-log row now carries an additive nullable
resilience_actionssummary (rotations, park wait, empty-turn retries, mid-stream continuation, stored-error replay, buffered-turn verdict), rendered as read-only badges in the request log; a served stored 429 keeps the flag whatever the served status.Related Issues
No linked issue — per-request recovery visibility is a new observability column with no prior ticket.
Upstream census (2026-09-24)
Validation
npm run lintTests Added Or Updated
tests/unit/resilience-actions-context.test.ts(11 tests: round-trip, out-of-context null, read/reset, combo isolation, accumulation, guards, cap)tests/unit/resilience-actions-sink.test.ts(5 tests: valid JSON, corrupt null, unknown dropped, type guards, flag regardless of status)tests/unit/resilience-actions-notes.test.ts(9 tests: rotations, replayed/stored matrix, streaming flag on 200, isolation, suffix-only continuation, invariants, resume threading, combo+resume limit)tests/unit/resilience-actions-badges.test.ts(5 tests: null input, stored-error on flag alone, parked duration, OR rule, unknown keys)tests/unit/db/migration-191-resilience-actions.test.ts(2 tests: legacy lineage gains the column, fresh lineage idempotent)Coverage Notes
New sink fields, park hook, per-attempt accumulator, migration plus self-heal, and badges are covered by the 32 new unit tests above; neighboring suites (park-resume, chat-core, call-log) stay green.
Reviewer Notes
191_call_logs_resilience_actions.sql(renumbered from 190, taken by open [defer] feat(calls): record rendered-content presence and usage provenance per request #14795 on the same base).opencode.ts,chat.ts,chatHelpers.ts); declare merge order at push.added_wait, open) needs no coordination: disjoint need, zero shared symbols, no shared migration.Maintainer rework (merge-batch 2026-09-24)
release/v3.8.51into the branch (real merge, author commit preserved) and resolved theconfig/quality/file-size-baseline.jsonconflict against the tip:src/sse/handlers/chat.ts2567→2582 (+15 on the reconciled tip),src/sse/services/auth.tskeeps the tip's 3602; the other own ceilings (chatCore.ts6441,opencode.ts1354,RequestLoggerDetail.tsx1211) were re-measured after the commit.copiedAllrestored, no__MISSING__markers inbs.json, no reordering of thestickyLimit*/connectionAwareExpansionkeys). Only this PR's sixrequestLogger.detail.resilience*keys are added, translated in all 65 non-English locales (49 of them were still English in the branch).191_call_logs_resilience_actions.sql, and the"190"entry inKNOWN_GAPSstays so this branch is green on its own. Once [defer] feat(calls): record rendered-content presence and usage provenance per request #14795 (migration 190) lands, that entry becomes stale and has to be dropped when this PR is merged.