Skip to content

fix: preserve MCP transcript budgets and expose truthful read coverage - #24418

Merged
Git-on-my-level merged 12 commits into
mainfrom
lane/weekly-api-quality-1102
Nov 3, 2026
Merged

Git-on-my-level merged 12 commits into
mainfrom
lane/weekly-api-quality-1102

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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

  • Unit/local: focused backend file-isolated suites cover batch ordering/continuation, large rosters, Unicode HTTP/SSE wire bounds, locked/missing records, dotted projection, summary cutoff, memory source-time projection, KG update payload, and screen coverage through REST serialization.
  • Commands: backend/test.sh with file-isolated selections through omi-heavy (focused MCP/memory/screen tests plus the seven Firestore guard files); make preflight; scripts/pr-preflight --metadata-only --pr-body-file <body>.
  • All fixtures are synthetic. No production data, live user API calls, deployments, or user messages. These checks establish unit/local contracts only.

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.

@mintlify

mintlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
omi 🟢 Ready View Preview Nov 2, 2026, 7:05 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/doc/developer/mcp/tools.mdx Resolved
Comment thread backend/models/screen_activity.py Resolved
Comment thread backend/utils/mcp_server/registry.py Resolved
Comment thread backend/routers/mcp.py Resolved
Comment thread backend/utils/mcp_server/registry.py Resolved
@Git-on-my-level
Git-on-my-level merged commit 9be7a90 into main Nov 3, 2026
66 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/weekly-api-quality-1102 branch November 3, 2026 15:51

This branch was successfully deployed

1 active deployment
staging - docs — 0b2f2093 Deployed Nov 2, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant