[defer] feat(calls): record rendered-content presence and usage provenance per request - #14795
Merged
diegosouzapw merged 2 commits intoSep 25, 2026
Conversation
maxmad64bis
force-pushed
the
fix/call-content-provenance
branch
2 times, most recently
from
September 24, 2026 19:25
d2118c3 to
d5f0c12
Compare
maxmad64bis
marked this pull request as ready for review
September 24, 2026 19:26
5 tasks done
maxmad64bis
marked this pull request as draft
September 24, 2026 23:42
maxmad64bis
force-pushed
the
fix/call-content-provenance
branch
from
September 25, 2026 00:24
d5f0c12 to
0a96ad0
Compare
maxmad64bis
marked this pull request as ready for review
September 25, 2026 01:01
Drop the stale migration-count edits to AGENTS.md, README.md, llm.txt and the 66 docs/i18n llm.txt mirrors; the count is synced in a follow-up.
Owner
|
Migration number coordination: several open PRs claim the same slot, and the release tip is already at |
diegosouzapw
merged commit Sep 25, 2026
9753c7f
into
diegosouzapw:release/v3.8.51
10 of 16 checks passed
diegosouzapw
added a commit
to maxmad64bis/OmniRoute
that referenced
this pull request
Sep 25, 2026
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.
diegosouzapw
pushed a commit
that referenced
this pull request
Sep 25, 2026
…l logs (#14810) Maintainer rework: reconciled with release/v3.8.51 after #14795 (migration 190) landed — migration 191 now sits contiguous (temporary 190 KNOWN_GAPS reservation dropped), the INSERT keeps has_content/usage_provenance plus the optional resilience_actions column (spliced instead of a duplicated statement) and the #14474 id-collision retry loop, buildContinuationLogHooks takes (log, correlationId, resilience), and the resilience-actions parser moved to src/lib/usage/resilienceActionsParse.ts to keep callLogs.ts under the cap. Tests: 131/131 node (resilience-actions context/sink/notes/badges, migration-191, stream-recovery-trace-logging, call-log id-collision/persistence/reasoning/provenance) + 2/2 vitest UI badges; typecheck:core and check:open-sse-typecheck clean; check-file-size and check-migration-numbering OK. Thank you @maxmad64bis!
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!
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.
Call logs could not tell an empty success apart from a missing usage counter, so debugging silent responses meant guessing which side failed. Each successful request now records whether client-visible content was rendered (
has_content) and where the usage numbers came from (usage_provenance: reported, estimated, or absent), with both columns left null whenever nothing was measured. Existing columns keep their exact semantics and the journal screen is unchanged (follow-up PR).Summary
Call logs could not tell an empty success apart from a missing usage counter: each successful request now records whether client-visible content was rendered and where the usage numbers came from, with both columns left null whenever nothing was measured.
Related Issues
Validation
npm run lintTests Added Or Updated
tests/unit/call-content-provenance.test.ts(new, 10 cases): empty vs content-bearing success, silent provider, threaded and rebuilt estimates, reasoning-only, tool-calls-only, non-text route, failure, fresh-database migration; failing before the fix (RED), passing after (10/10).Coverage Notes
src/lib/usage/callContentProvenance.ts) and the sink lines insrc/lib/usage/callLogs.tsare covered branch by branch by the new suite, including the null-when-unmeasured paths (non-success, logging disabled, non-text output).Reviewer Notes
0, never confused with unmeasuredNULL; a missing counter reads asabsent, never as an error.Maintainer rework (merge-batch 2026-09-24)
release/v3.8.51into the branch (real merge, author commit preserved) to clear the conflicts with the tip.AGENTS.md,README.md,llm.txtand the 66docs/i18n/*/llm.txtmirrors: the count was already stale against the tip, those are agent-instruction surfaces, and they were the source of the conflicts. The count is synced once for the whole batch in a follow-up.190_call_logs_content_provenance.sql(the tip ends at 189), the fourrequestLogger.detailkeys in all locales, and the tests. Series order for the batch: 190 ([defer] feat(calls): record rendered-content presence and usage provenance per request #14795) → 191 ([defer] feat(call-logs): record per-request resilience actions in call logs #14810) → 192 (feat(sse): record per-request added wait with cause in call logs #14756).