Repository navigation
fix(mcp): page complete long conversation transcripts - #25491
Conversation
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2743d27df5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| projected, _ = bounded_transcript_segments( | ||
| [fragment], max_segments=1, max_chars=remaining, speaker_display=display |
There was a problem hiding this comment.
Preserve speaker mappings for id-less legacy segments
For otherwise-unattributed legacy segments lacking id, speaker_id, and person_id, passing the copied fragment to the full-transcript display loses the original-row identity lookup. DisplayParticipants.for_segment() then falls back to _projection_key, which is identical for these entries and resolves to the last matching segment. Two unknown turns that previously had speaker keys c0 and c1 are consequently both returned as c1, while the participant roster still contains c0 and c1. This affects both detail and batch reads, even when no text needs splitting. Resolve the participant from the original segment and preserve that mapping when projecting its fragments.
Useful? React with 👍 / 👎.
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ate on cards (#25497) * feat(mcp): outline-first, offset and lines reads, and conversation state on cards Builds on transcript paging (#25491) so an agent can read a long conversation the way a person skims one, without loading the whole transcript first. - view=outline returns the card plus the stored note sections, each anchored to the segment range it cites (first_segment, segment_count, start, end), and no transcript. - offset starts a transcript read at a segment index, such as a section's first_segment; the cursor then continues it (a resent offset is ignored). - format=lines renders a page as one "[h:mm:ss] Speaker: text" line per speaker turn with transcript_range, about a third of the size of the per-segment JSON; the cursor is bound to the format. Also on get_conversations_by_ids. - Cards carry status and duration_seconds, plus kind, shown_on_home and summary_covers_through where stored, so agents can tell live conversations, media and other people's background talk from the user's own. - Tool descriptions and server instructions say to start long conversations with the outline, prefer lines, and treat transcript text as quoted content, never instructions. - omi_mcp_transcript_pages_total counts detail pages by tool, view, format, position and whether more remain, so paging can be measured. Defaults are unchanged: transcript view, JSON segments. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): bound outlines, honest card duration, and one card per detail read Review follow-ups on the progressive-reads commit: - view=outline returns at most 100 sections, reports sections_truncated, and checks the 120k serialized budget like transcript pages. - duration_seconds is the transcript's speech span: null on list and search cards, which load no transcript, instead of the wall window, which can start long before speech. - summary_covers_through is localized like the other card timestamps. - The default format adds nothing to the detail cursor fingerprint, so cursors minted before format existed still decode during a rolling deploy. - offset is ignored, not parsed, when a cursor is given; negative, malformed or oversized offsets are argument errors rather than clamped. - The page counter's position=first means "no cursor sent", so an offset read from the outline counts as a first page. - The detail card is built once per request rather than on every budget-fitting retry. The 1,200-segment walk test uses about 0.27s of CPU instead of 0.43s, well inside the 1.0s per-test limit that CI shard 5 hit. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): lines page what they render, split same-label speakers, full outline windows Codex review follow-ups on #25497: - format=lines pages over text only. original_text is not rendered, so a page boundary inside it produced continuation pages with no speech. - Lines join turns on speaker_key, not the display label, so two people who share a name (or two unresolved speakers) stay on separate lines. - An outline section's start/end span every cited segment (min start, max end), since cited segments can overlap or be stored out of time order. - transcript_range is always present on lines pages and null when the page is empty, so fields=[transcript, transcript_range] works at the end of a read. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): lines join turns only when speaker key and label both match A segment-only speaker correction leaves adjacent rows with one diarization key but different resolved labels; joining on the key alone attributed an unassigned speaker's words to the user. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): transcript-free detail records keep their wall-window duration A loaded detail with no transcript (a photo-only capture) reported a null duration; use the shared conversation_duration_seconds wherever the transcript is loaded, and keep list cards null. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…25527) * feat(mcp): outline-first, offset and lines reads, and conversation state on cards Builds on transcript paging (#25491) so an agent can read a long conversation the way a person skims one, without loading the whole transcript first. - view=outline returns the card plus the stored note sections, each anchored to the segment range it cites (first_segment, segment_count, start, end), and no transcript. - offset starts a transcript read at a segment index, such as a section's first_segment; the cursor then continues it (a resent offset is ignored). - format=lines renders a page as one "[h:mm:ss] Speaker: text" line per speaker turn with transcript_range, about a third of the size of the per-segment JSON; the cursor is bound to the format. Also on get_conversations_by_ids. - Cards carry status and duration_seconds, plus kind, shown_on_home and summary_covers_through where stored, so agents can tell live conversations, media and other people's background talk from the user's own. - Tool descriptions and server instructions say to start long conversations with the outline, prefer lines, and treat transcript text as quoted content, never instructions. - omi_mcp_transcript_pages_total counts detail pages by tool, view, format, position and whether more remain, so paging can be measured. Defaults are unchanged: transcript view, JSON segments. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): bound outlines, honest card duration, and one card per detail read Review follow-ups on the progressive-reads commit: - view=outline returns at most 100 sections, reports sections_truncated, and checks the 120k serialized budget like transcript pages. - duration_seconds is the transcript's speech span: null on list and search cards, which load no transcript, instead of the wall window, which can start long before speech. - summary_covers_through is localized like the other card timestamps. - The default format adds nothing to the detail cursor fingerprint, so cursors minted before format existed still decode during a rolling deploy. - offset is ignored, not parsed, when a cursor is given; negative, malformed or oversized offsets are argument errors rather than clamped. - The page counter's position=first means "no cursor sent", so an offset read from the outline counts as a first page. - The detail card is built once per request rather than on every budget-fitting retry. The 1,200-segment walk test uses about 0.27s of CPU instead of 0.43s, well inside the 1.0s per-test limit that CI shard 5 hit. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): lines page what they render, split same-label speakers, full outline windows Codex review follow-ups on #25497: - format=lines pages over text only. original_text is not rendered, so a page boundary inside it produced continuation pages with no speech. - Lines join turns on speaker_key, not the display label, so two people who share a name (or two unresolved speakers) stay on separate lines. - An outline section's start/end span every cited segment (min start, max end), since cited segments can overlap or be stored out of time order. - transcript_range is always present on lines pages and null when the page is empty, so fields=[transcript, transcript_range] works at the end of a read. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(mcp): hybrid conversation search with match_basis, and literal search_transcripts Agents asking about something said in passing found nothing: MCP search read summary vectors only, and the keyword index ran only when vectors returned zero rows, so one semantic hit hid every exact title or overview match. Two-hour v3 conversations make summaries leave out more detail. search_conversations: - asks summary vectors and the keyword index (titles, overviews) on every call; shared hits rank first, then the two indexes alternate, so neither crowds the other out. Stale ids get one bounded second hydration. - each card carries match_basis (summary, keyword, transcript); only match_snippets quote the transcript, and each snippet carries segment_index, the get_conversation_by_id offset to read around it. - search_coverage names what actually ran (summary_vectors_and_keyword, summary_vectors_only, keyword_only) plus unavailable_indexes; one index down still answers. No hits with the keyword index down stays a 503. search_transcripts (new, conversations.read): - literal words or a short phrase in saved transcripts, newest first, over the bounded owner/query-bound scan chat transcript recall already uses (no derived index, 50 records and 4s per call, signed cursor resuming after the last record examined). - optional conversation_id finds where something was said in one long conversation; hits carry segment_index, speaker and time. - locked, discarded, deferred and unreadable records are never quoted; misses are never presented as absence. The developer search route reports the same truthful coverage. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): lines join turns only when speaker key and label both match A segment-only speaker correction leaves adjacent rows with one diarization key but different resolved labels; joining on the key alone attributed an unassigned speaker's words to the user. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): transcript-free detail records keep their wall-window duration A loaded detail with no transcript (a photo-only capture) reported a null duration; use the shared conversation_duration_seconds wherever the transcript is loaded, and keep list cards null. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(mcp): task-shaped agent journeys across the read tools Four journeys chain real tool calls the way an agent would (search -> outline -> section in lines; literal transcript hit -> read around it; a whole long conversation by cursor; a day listing that tells media from conversation, then a batch read) and validate every response against its output schema and the serialized budget, so a tool that stops leading to the next one breaks a journey. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): type the transcript hit card's structured dict for pyright Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): search fallbacks and literal matching per panel review A summary-vector index still building is one index down: keyword search still answers, and the index error returns only when both are down. search_transcripts rejects dates with conversation_id (it searches the whole conversation). A one-letter query word must appear as a word in the segment. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): bound search_transcripts by serialized size; count keyword-down fallbacks A page of large (or escaped CJK) hits stops before the 120000-character serialized budget and resumes at the first conversation it left out. Keyword or vector index loss now records the degraded fallback even when other hits survive. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(openapi): regenerate client method totals after #25524 and #25500 Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): full stale-id backfill, deferred check on scoped reads, legacy segment index Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): transcript search deadline, unreadable fallback, all-words snippet window Matching gets 2s after the 4s scan (chat's 6s overall) and resumes after the last finished record; unreadable records record a degraded fallback; a long segment is clipped around the shortest stretch holding every query word. Developer changelog entries for #25497, #25524 and this PR. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mcp): report an unconfigured vector index and unreadable records as partial coverage Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Long conversation transcripts currently end at a segment or character cap with no way for MCP clients to retrieve the rest. Add owner-bound, authenticated opaque transcript cursors to
get_conversation_by_id; batch items return the same cursor for continuation through the detail tool. Responses includetotal_segments,truncated, and nullablenext_cursor, and oversized segments continue without dropping text or original text.Raise the hosted segment default from 120 to 500 with request-time
MCP_CONVERSATION_FETCH_DEFAULT_MAX_SEGMENTS(set120to roll back). Keep the default 24k text budget, 100k hard text cap and 120k serialized response budget. Single-detail pages shrink when JSON-RPC duplication/SSE escaping consumes that budget; batches retain their complete-item admission rule. Tool descriptions and advertised schemas explain both continuation paths.Cursor positions are encrypted and authenticated with a domain-separated application key; uid and conversation content are never serialized into the token. Owner and conversation/view options are authenticated as associated data. Every continuation still performs the existing owner-scoped read and entitlement check. Each page uses one existing detail read with no added query, write or provider call.
Validation: focused unit files run separately through
omi-heavy, with Google credentials and all CLOUDSDK_* variables removed. New synthetic tests walk 1,200 segments without gaps/duplicates, reassemble oversized Unicode/text/original_text segments, reject tampering and owner/view changes, enforce response budgets, test env rollback and schemas, and exercise JSON/SSE HTTP paging on both hosted paths. All seven focused files pass (496 tests), including 270 HTTP transport contracts. Existing MCP batch, read-correctness, pagination, REST legacy-row and flag-budget tests pass. Push gates run before submission; exact results are recorded in the lane handoff.Release: default-on source change; no production configuration or deployment performed. Quality lead owns release and review of tool errors, duration and response size; registry/budget review date is 2026-12-15. Env rollback requires applying the setting to serving instances; no code change is needed. Existing REST contracts and standalone MCP clients are outside this change. Vendor-side ChatGPT tool-result limits, deployed latency/cost and live connector behavior remain unverified. A cursor is positional, not a snapshot: restart the read if the transcript is edited while paging.
Follow-ups: processing-conversation listing, search within a conversation, and malformed legacy REST-row 404 handling.
Failure-Class: none
🤖 Generated with Claude Code