Repository navigation
fix: preserve MCP transcript budgets and expose truthful read coverage - #24418
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
There was a problem hiding this comment.
All reported issues were addressed across 26 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This branch was successfully deployed
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.
Requested by: @dazheng
Implemented by: Codex
What changed and why
Weekly API/MCP feedback for 2026-10-26 through 2026-11-01 showed batch deep reads shrinking transcripts to one character when rosters consumed the response budget. Batch reads now page whole per-item details within the existing wire cap, return one nested conversation per item, and allow omitting rosters. Oversized single details return actionable guidance. Dotted structured fields and short aliases are supported.
Closes API feedback 1, 12, 13, 14. Partially addresses 3, 4, 7, 8, 9: separate query completeness from unknown capture completeness; expose per-device observation bounds with unknown sync watermarks; label summary cutoffs/storage counts; expose evidence source times; and avoid advancing product updated_at for KG bookkeeping.
Remaining: visible-memory counts require the caller's memory policy and scope (daily summaries use conversations.read); device watermarks need a producer protocol; legacy extraction timestamps remain unknown; late-day regeneration and broader no-op writer auditing are separate lifecycle work. No historical records are rewritten. Speaker identity, call linkage, pending-card ledgers, deep-read timezone options, language classification, and ID migration are outside this PR.
Companion quality PR: #24415. The complete item disposition gives the reason and acceptance evidence for every remaining API and quality item.
Product invariants affected
INV-MEM-1, INV-MEM-3, INV-MEM-4. This change only projects provenance and marks KG bookkeeping; memory tiers, access policy, promotion authority, and receipts retain their existing contracts. Search adds provenance only after the same universal authority and eligibility check; it introduces no legacy fallback or extra read.
How it was verified
backend/test.shwith file-isolated selections throughomi-heavy(focused MCP/memory/screen tests plus the seven Firestore guard files);make preflight;scripts/pr-preflight --metadata-only --pr-body-file <body>.Tests
The complete OpenAPI/compatibility and Dart/TypeScript/Swift generation checks passed; all four generated TypeScript clients include the additive response fields.
Regression coverage is in test_mcp_batch_tools, test_mcp_read_correctness, test_memory_api_contract, test_canonical_kg_promotion, and screen summary endpoint tests.
UI-Evidence: none -- backend read contracts and generated wire types only
Failure-Class: none
Line-Count-Exception: backend/utils/memory/memory_service.py | 4708 -> 4709 | Add one shared provenance projection to the existing authorized MCP search path; eligibility and reads are unchanged.