Repository navigation
fix: keep capture notes concrete and displayed titles stable - #25462
Git-on-my-level merged 14 commits into
Conversation
Failure-Class: FC-generated-presentation-contract-bypass
…hority Failure-Class: FC-generated-presentation-contract-bypass
…tion Failure-Class: FC-generated-presentation-contract-bypass
Failure-Class: FC-generated-presentation-contract-bypass
Failure-Class: FC-generated-presentation-contract-bypass
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. |
… guards Failure-Class: FC-generated-presentation-contract-bypass
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a99da5c3f
ℹ️ 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".
| prior = before.get('title') if before.get('title_provenance') != 'server_minimum' else '' | ||
| cleaned['title'], reason = stable_title(prior, cleaned['title']) |
There was a problem hiding this comment.
Keep deferred preview titles replaceable by the first real summary
For a lazily deferred desktop capture, build_deferred_structured() stores the first eight transcript words as a temporary title without title_provenance. On first-open enrichment, this transaction rereads that raw row and treats the preview as a valid generated title, replacing the real model headline with it. Read-side neutralize_minimum_title() does not repair the stored provenance, so the conversation can continue displaying a neutral Recording label even after successful enrichment. Exclude provisional previews, including existing unmarked rows, from the title-stability lock.
Useful? React with 👍 / 👎.
| r"\b(?:missing (?:from (?:the )?)?transcript|(?:not|never) (?:in|captured in|present in) (?:the )?transcript|" | ||
| r"transcript (?:is |was |remains )?(?:missing(?! from\b)|unavailable|incomplete|empty)|" | ||
| r"(?:no|without|insufficient) (?:usable )?(?:transcript|transcription|audio evidence)|" | ||
| r"(?:audio|capture|recording|transcription|pipeline) (?:gaps?|missing|unavailable|pending|failures?)|" |
There was a problem hiding this comment.
Restrict mechanics filtering to narration about the current capture
When a conversation concerns software reliability, this expression deletes legitimate subject matter rather than just narration about missing evidence. For example, safe_body('Fix pipeline failures before Friday.') and safe_body('Investigate audio gaps in the mobile app.') both return an empty string. Because this filter runs before note persistence and during legacy episode reads, supported commitments and details disappear from otherwise valid notes. Restrict removal to explicit statements about the current capture's evidence instead of matching standalone topic phrases.
Useful? React with 👍 / 👎.
| from utils.summary_quality import clean_structured, stable_title | ||
| from utils.conversations.llm_input_dedupe import NOTES_OUTPUT_HASH, output_fingerprint | ||
| from models.structured import Structured | ||
| from database.read_boundary import parse_payload_strict |
There was a problem hiding this comment.
Move the new backend helper imports to module scope
backend/AGENTS.md explicitly requires “All imports at module top level — never inside functions.” This new production helper introduces four function-local imports, with additional instances added in the conversation-processing and episode-read helpers. Move the new dependencies to module scope, restructuring the shared dependency if necessary, rather than extending a pattern the backend guide expressly prohibits.
AGENTS.md reference: backend/AGENTS.md:L168-L168
Useful? React with 👍 / 👎.
| out.append((open_at, f"[{local:%H:%M:%S}] {open_speaker}: {' '.join(words)}")) | ||
|
|
||
| for segment in _segments(row): | ||
| segments, _ = owner_safe_transcript_segments(_segments(row)) |
There was a problem hiding this comment.
Add the required pipeline change note for speaker attribution
Both episode transcript renderers now remove weak owner labels before supplying speech to the model, which changes speaker-attribution behavior. backend/AGENTS.md requires speaker changes to “add a note under docs/listen_pusher_pipeline/changes/ in the same PR.” This commit adds no such note, and a repository-wide search found none covering the new episode projection. Add the required record of the authority change, rollout/default behavior, and verification evidence so this attribution change is documented alongside the pipeline contract.
AGENTS.md reference: backend/AGENTS.md:L164-L164
Useful? React with 👍 / 👎.
…otes Reuse the existing preview recognizer for the first real summary, narrow evidence-mechanics filtering, and document existing owner authority in episode prompts. Move new dependencies to module scope. Failure-Class: FC-generated-presentation-contract-bypass Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the actual pure note and hash seams available when the archive fixture closes the utils import path. Archive query assertions remain unchanged. Failure-Class: FC-generated-presentation-contract-bypass Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ac6e8c696
ℹ️ 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".
| if field(structured, 'title_provenance') == 'server_minimum' or is_deferred_preview_title(row): | ||
| return '' |
There was a problem hiding this comment.
Stop treating enriched conversations as provisional minima
For a conversation that began as a server minimum and has since received real notes, this provenance-only exemption disables title stability indefinitely. Structured omits unset title_provenance, while _processing_result_update_fields() and the legacy recursive merge preserve the old nested marker, so successive enriched writes continue taking this branch and can accept different headlines. Only exempt a minimum while no real summary is present, or explicitly clear its provenance on enrichment; cover the two-write sequence with the strict transactional fake prescribed by backend/AGENTS.md.
AGENTS.md reference: backend/AGENTS.md:L232-L232
Useful? React with 👍 / 👎.
| title, reason = stable_title(previous.get('title'), out.get('title')) | ||
| out['title'] = title |
There was a problem hiding this comment.
Let the first episode compose replace its deferred fallback
For a late episode with no prior compose, defer_late_compose() copies the first member’s title as a temporary fallback, which can be a server-minimum Recording · … label. The new composer finish paths feed that row to this unconditional lock, so the first real episode headline is discarded and composed_notes records the fallback as successful output. Subsequent composes also preserve that label. Exclude uncomposed deferred fallbacks from the stability lock, or carry their provisional provenance, so successful enrichment can establish the first real episode title.
Useful? React with 👍 / 👎.
Keep exact old checkpoints reusable, reserve at most one visible-violation repair, and permit title changes only across a numeric material-growth boundary. Classify capture-availability prose in the same response across languages and preserve subject-matter evidence. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Narrow dynamic JSON containers and scaled-detail metadata at their validated boundaries, and construct the repair prompt in one constant assignment. Output and paid-work contracts remain unchanged. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Remove only the exact availability sentence when a field also contains useful notes, and retain content when a flag names an invalid span. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Load fallback telemetry only when recording a fallback, and retain the existing regeneration label values through the shared closed-reason contract. Keep notes prompts and quality-repair policy unchanged. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 624c7b0c3f
ℹ️ 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".
| from typing import Any | ||
| from google.cloud import firestore | ||
| from database._client import get_firestore_client | ||
| from utils.conversations.fragment_visibility import ( |
There was a problem hiding this comment.
Remove utils-layer imports from the repair database module
backend/AGENTS.md explicitly requires “Higher imports from lower, never reverse” for the database → utils → routers → main.py hierarchy. This newly added database module imports both utils.conversations and utils.sync, while the utils-side dedupe code imports it, adding a persistence-to-utils back edge to the quality-repair path. Move the shared visibility predicates into an import-safe lower layer while keeping the reservation’s visibility recheck inside its transaction.
AGENTS.md reference: backend/AGENTS.md:L171-L174
Useful? React with 👍 / 👎.
| clear_notes = all(key in updates for key in ('title', 'bullets', 'moments')) and not any( | ||
| updates[key] for key in ('title', 'bullets', 'moments') | ||
| ) |
There was a problem hiding this comment.
Preserve the title clear when duplicate notes are invalidated
When an episode has a valid headline and capture_groups.join_duplicates() invalidates a duplicate member’s contribution, its update explicitly clears title and bullets but leaves duplicate-moment removal to _merge_state (backend/utils/episodes/capture_groups.py:41-47). Because moments is absent from updates, this guard does not recognize the clear, and episode_quality(raw, merged) restores the old headline. Subsequent composition also preserves it without material growth, leaving a deliberately invalidated title user-visible. Honor this existing invalidation path before applying title stability.
Useful? React with 👍 / 👎.
| changed['title'], reason = stable_title( | ||
| episode.get('title'), | ||
| update.title, | ||
| previous_units=episode.get('title_content_units') or 0, | ||
| current_units=units, |
There was a problem hiding this comment.
Allow language repairs to replace the previous episode title
When an existing episode is in the wrong output language, _record_moment_once sends an explicit whole-state language repair (backend/utils/episodes/service.py:1048-1056). If the next moment adds less than the growth threshold, or the legacy row has no title basis, this new lock discards the translated title even though the translated bullets are accepted; the database quality pass applies the same lock again. This leaves a successfully repaired episode with its old-language headline. Pass language-repair authority through both stability checks instead of requiring unrelated new speech to translate a generated title.
Useful? React with 👍 / 👎.
* feat(app): recordings and conversations (v3) capability and wire client Reads the per-account switch and the conversation in progress from GET /v1/conversations/live, and adds the audio-manifest and summary-stream clients. A v3 account makes no episode or Home-feed calls: both providers take a suppression hook, so the server episode-call counter that gates deleting the old code only counts released builds. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(app): v3 Home and conversation page For an account on recordings and conversations (v3): - Home is one flat list of conversations under day labels. The conversation in progress is the top row, from the live read. - A row tile shows where the conversation is: the breathing dot while it is going, a spinner while its transcript arrives, a pen while its summary is written, then the emoji. - A finished day label carries a chevron and opens that day summary; Today has none. - Opening a conversation in progress writes its summary and streams it in, with a pen and "Writing your summary…" over a skeleton; another writer falls back to re-reading every 2 s for up to 60 s. Accounts not on v3 see today Home unchanged (tested). Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(app): v3 Home render evidence; live row counts from its start The live row length reads the app clock, the live summary section takes a test stream, and the Home v3 test renders Home, the writing state and the streamed summary. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat: add recording-derived conversation wire contracts Failure-Class: none * feat: derive conversations from per-owner pendant recordings Failure-Class: none * fix: preserve recording audio owners through playback and merge retries Failure-Class: none * fix: keep v3 scheduling off the event loop and retain deletion access Failure-Class: none * fix(app): v3 review round 1 (DeepSeek + Luna) - The switch has an unknown state: until its first answer the app makes no episode or Home-feed read, so a v3 account never makes one; a first-answer server error runs today Home. Both answers are remembered per account. - The feed and episode providers re-check the switch on every read and drop cached episodes when it turns on; wrap-up, dismiss and open are gated. - Capture events refresh the list on a stable key (ids, statuses, steps), at most every 10 s; object identities caused a refresh loop. - The live row leads its day, honours the delete tombstone and home_hidden, cannot be selected for merge or bulk delete, and counts from created_at when started_at is missing. Recordings delivered by the socket never show. - The live poll skips ticks while a page covers Home; one read in flight per account switch. - The live summary keeps its streamed sections when the follow-up read fails, and polls one read at a time. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: suppress recording intelligence across finalizer replays Failure-Class: none * fix(app): v3 review round 1, tests lane - Tile states, the live row and the on-open summary apply only to an account on v3: an account rolled back keeps today Home whatever old documents say. - Day header: 44 pt tap target and the recap recovery action failure copy. - The tile pen reads "Writing your summary…". - Tests: polling window asserts its exact read count, unwatch stops the poll, failure copy is asserted, v3-off Home asserts the live episode row; light theme evidence. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(app): v3 review round 1, summary lane (Luna) - A summary that arrives whole in the done frame stays up when the follow-up read fails. - Polling has a wall-clock 60 s deadline, each read bounded by the time left; running out with nothing stored offers Try Again. - The stored summary no longer flashes for a frame beside the writing state. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: validate v3 ownership and declare serving query contracts Failure-Class: none * test: cover released capture polls and finish writer type fences Failure-Class: none * test: verify cursor visibility before renewing query review digest Failure-Class: none * test(app): format the v3 decoder test; the wire decoder owns malformed pieces Sol's generated wire decoder rejects a recording piece missing a required field, so the round-trip test no longer feeds one through the whole conversation; the piece reader's own drop is tested directly. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations): clip v3 playback to claimed windows Failure-Class: audio-window-isolation * fix(conversations): preserve exact audio for backup consumers Failure-Class: none * fix(conversations): close v3 writer, backlog and reader gaps Failure-Class: none * test(conversations): record review regressions and verification Failure-Class: none * fix(conversations): preserve title locks across upstream cleanup Relocate additive declarations so newer owner changes integrate without replacing their code. Cover the post-cleanup title fence and align the outside-query witness with cached admission. Failure-Class: none * fix(config): classify shared conversation rollout settings Declare stage and first capable build as public runtime configuration and pin their regular environment bindings across all Cloud Run services. Failure-Class: none * feat(app): a failed v3 conversation shows a warning tile, never its emoji Quality review: tile_state had no failed value, so a conversation whose transcription or summary failed read as finished on v3 Home. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(conversations): pin final review test selection and scope evidence Record the 651-test component run, scope limitations and repository verification repairs. Freeze the worktree for the required full preflight. Failure-Class: none * fix(app): an unreadable live row never leaves the v3 switch unanswered The compact live row from conversations/live omits finished_at, which the generated decoder requires, so the whole read failed. On a first launch that left the switch unresolved and held back both Homes. The switch now resolves from the v3 flag alone; an unreadable row is no live row. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations): honor manual intent and show failures and recognition uncertainty Failure-Class: none * test(conversations): separate v3 writer declarations from concurrent additions Failure-Class: none * fix(conversations): retain window mapping type when closing failed transcription Failure-Class: none * fix(conversations): offload async failure helpers through managed executor Failure-Class: none * test(app): a failed v3 conversation decodes through the generated wire type Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations): close final playback paging and lease integration gaps Failure-Class: none * fix(conversations): retain bounded personal context in v3 notes and outlines Reuse the composer context pack in one-shot notes, bound outline context, and version effective outline inputs. Keep context-only changes outside summary rewrite scheduling. Failure-Class: none * docs(conversations): record round-four context verification Record exact test commands, corrected rerun counts, frozen preflight receipt, token bounds and optional participant-linking boundary. Failure-Class: none * fix(conversations): pin v3 notes prompt and conversation fields against main's guards Main added the notes prompt-digest pin and the exact Conversation field pin after the v3 branch point. notes-6 covers the v3 notes path (all behind v3_models.active()); notes-5 stays reusable because non-v3 output is unchanged. The v3 fields are server-written by the builder, not projection-family. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(app): v3 Home render evidence includes the failed tile Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations): classify readers main added since the v3 branch point Episode live members (#25481), listen batch reconnect (#25466), notes quality repair (#25462), batch retention and enrichment custody each read conversations by id. Classify them for the v3 reader audit: capture, retention and custody own the recording layer; the episode and notes-repair writers are storage that never targets a recording. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(app): v3 decoders to schema, summary stream to a service The API-result boundary allows no null-swallowing or catch in backend/http/api/. The v3 wire types and their decoders move to backend/schema/conversation_v3_wire.dart (re-exported by the API file), and the summary stream consumer, which maps a 409 to SummaryInProgress, moves to services/conversation_summary_stream.dart. No behaviour change. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(app): purpose headers on the new v3 app files Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(app): emoji tile uses the shared OmiType scale Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(app): regenerate the perf production shell for the v3 provider Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: regenerate client type method counts after merging main Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: align export and action-item tests with the v3 readers Data export deliberately includes recordings (include_recordings=True), and the conversation action-items route reads through read_product_conversation, which the stubbed-import test must call through. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: drop review-panel scoping briefs from the v3 evidence They were the prompts for the per-round scoping panels, not evidence; the per-round evidence and test inventories stay. Keeps the PR under the compare API's 300-file window the UI approval guard reads. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): address review — drop audio manifest, chat SSE newlines, dedupe, live close refresh - Remove the unused /v1/conversations/{id}/audio-manifest route and its models: it returned whole pieces without subtracting deleted spans. Playback and export use the window-exact conversation_audio artifact from /urls. - Summary stream sections travel in the chat SSE framing (newlines as __CRLF__), which the app's chat stream decoder turns back into newlines. - Outline dedupe drops only the same speech captured by another recording at an overlapping time; a sentence repeated within one recording is kept. - v3 Home re-reads the conversation list when the conversation in progress closes, so it appears as an ordinary row without waiting for a processing change. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): hydrated transcript, merged legacy audio, settled partials, redirect host - Projection reads the hydrated recording transcript (manual speaker corrections and the recurring-voice privacy filter applied); the strict decode only proves it is readable. - Playback resolves audio a merge copied from a legacy conversation (no recording alias) to the merged conversation's own file, so it stays in the window-exact artifact. - A partial-recording marker counts as pending transcription only until its newest planned generation is applied; a settled recording no longer pins its windows in "transcribing". - The v3 audio download redirects only to a Cloud Storage https signed URL. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): green the full backend suite and gauntlet; stay under 300 files - v3 markers count only when literally True (policy.flag): a truthy stand-in no longer sends non-v3 conversations down the recording or v3 paths. - v3 model module loads LangChain providers on first use, so importing process_conversation does not pull in every chat-model provider. - /summary/stream is exempt from gzip like the other streaming routes. - Deploy: the v3 stage, first build and task queue are declared on every product host and mapped to staging-conversations-v3 in staging; pusher/listen charts bind them; the v3 sweeper is not declared in dev, whose data plane is production Firestore. - Test fakes accept the new allow_recording / include_recordings / v3_enabled arguments, the listen-pusher harness forwards lookup options, and inventories/baselines list the new readers and context loads with their reasons. - Review-round test logs move out of the repository; the four change notes merge into one; Conflict lives in the v3 package; two small test files fold into their siblings; the four render frames are one composite image. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(flags): re-render registry for the v3 chart bindings Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): track the composite render evidence; classify the v3 task queue binding Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): strongest protection, custom-STT provenance, rewrite coverage, backfill batches - A derived conversation keeps the strongest protection of any contributing recording and never drops below its own (enhanced speech is never stored as standard). - uses_custom_stt follows any contributing custom-STT recording, so the paid-postprocessing guard still applies to the copy. - A late-speech rewrite clears summary_covers_through, so the covered-summary guard cannot return the old notes and spend the only automatic rewrite. - Multi-batch backfill: its own recording/structured conversion is not a race, and converted donors keep a durable pending obligation until the final batch lands. - The pusher canary test expects the v3 config-map references; the v3 gateway feature map lives in the gateway config loader (its only reader), keeping the PR under GitHub's 300-file compare. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): null recording pieces stay legacy; keep repeats; re-arm on late audio - has_recording_pieces: the Conversation model defaults recording_pieces to None, so ordinary rows written through it carry the key; only a list (even empty) selects v3 playback, in /urls, the artifact task and builder, and plugin backup. - Late merges into a finished copy drop same-text lines only when they overlap the stored line in time; a repeated sentence a few seconds later is kept. - update_conversation re-arms the v3 builder when audio_files land on a settled recording (sync finalize, merges, projection repair), so the conversation gains its recording pieces. - The lifecycle writer inventory lists the planner's uses_custom_stt sibling field. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(playback): keep the Optional narrowing before the v3 snapshot Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
… the summary is owed (#25611) ## Problem Since 2026-11-16 22:17Z, about half of new recordings show on Home as a row titled "Discussion notes" with no summary and the default emoji. They never change. Two defects overlap in that window. This PR fixes the second one. The first is already fixed on main and is waiting on a deploy. 1. **Transcripts stopped landing (not this PR).** #25479 shipped on Cloud Run at 18:11–18:52Z on 11-16 while the GPU worker stayed on an older image, so source-reuse results were committed without their marker and the projector refused them. Projection is ordered per owner, so every later recording for that owner waits behind the refused result. #25597 fixes this; it merged at 11:38Z on 11-17 and is not serving yet (all four Cloud Run services report release `0ce3965`). 2. **A capture with no notes gets the fallback title (this PR).** #25462 added the deterministic label "Discussion notes" for generated notes whose headline is unusable. `_quality_processing_notes` applied it to every conversation write that carries a `structured` map, including the in-progress stub a listen socket creates and the raw completion of a batch capture. Neither has notes. What the stamped title does to a batch capture: - **Home shows a finished row.** `transcribing_hold.applies` and `home_step.classify` read any non-empty title as "has notes". The row leaves the bounded "Transcribing…" presentation and shows "Discussion notes" with no expiry. - **The first-summary obligation is not registered.** `stamp_projection_debt` skips a row that already has a title, so the row gets no `summary_due_at`. The repair sweep never sees it; it depends on one enrichment attempt. - **A stamped zero-content stub is no longer classified as noise** by the expired empty-capture rule. ## Evidence (prod, read-only tier, aggregates only, 2026-11-17 14:50–15:21Z) Completed `batch_live_v1` rows, 12,656 sampled across 11-16 12:00Z → 11-17 14:50Z: | Rows carrying the fallback title (n=3,756) | value | | --- | --- | | `title_change_reason = initial_title` | 100% | | title stamped minus row created (p10 / p50 / p90) | 0.0 s / 0.0 s / 0.1 s | | title stamped minus recording finished (p50) | 126 s **before** the finish | | `content_word_units = 0` when stamped | 99.6% | | notes run recorded (`notes_written_at`, notes input hash) | 0% | | `summary_first_pending_at` / `summary_due_at` | 0.0% / 0.1% | | first row stamped | 11-16 22Z hour (the listen roll to `235baea` finished 22:17Z) | The title is written at creation, on a row with no speech, before any model call. The model is not returning a placeholder. Rows created through the idempotent create path skip this writer and stay untitled, which is why the same feed mixes "Discussion notes" rows with untitled or "Transcribing…" rows. Replayed on unmodified `f47914db885`: a stub written through `upsert_conversation_with_lifecycle` commits `title='Discussion notes'`, `title_change_reason='initial_title'`; `replace_record` then stamps no debt; `home_step.classify` returns `ready`. For the transcript stall, on the same sample: `record_audio_closed` is true on ≈100% of rows throughout, while rows with a landed transcript fall from 82–88% (finished 11-16 14–18Z) to 51% (19Z), 16% (22Z) and 6–20% since. `summary_first_pending_at` tracks that within 1 point every hour. Of 60 owners with a stuck row, 49 had a chain head that was `pending`, `protocol_version=2`, with no source marker and committed a median 15.4 h earlier; the median owner had 563 results pending behind it. ## Changes On by default. No new flag, Firestore read, provider call or stored-data rewrite. - **Write.** `_quality_processing_notes` leaves the title empty when `home_titles.notes_pending` holds (no usable title, overview, gist, section body, task or event) and there is no user title or stored valid title. A stored stand-in title is kept and a stored placeholder is cleared. Generated notes with an unusable headline still get the fallback label. - **Admission.** `stamp_projection_debt` treats a placeholder as untitled. Rows stamped before this change are enrolled when their transcript lands. - **Read.** `transcribing_hold.applies`, the `processing` branch of `home_step.classify`, `empty_capture.applies` and `legacy_empty_wire.project` treat a placeholder as untitled. `home_titles.placeholder_title_wire`, applied at the same API exits as the transcribing hold, serves a row that carries only the fallback label as untitled. It matches the two labels `title_or_fallback` produces and nothing else, and never changes a user title or a row with notes. - **Home feed.** `GET /v1/home/feed` serves a title sealed at write time, so the list-wire rule does not reach it. `database/home_feed.py` now applies `home_titles.display_title` to conversation cards: a bare fallback label with no preview is served as untitled. Rows already stamped are healed on read. `utils/summary_quality.py` is byte-identical to main, so the notes prompt fingerprint and its reuse checkpoints are unchanged. ## Not in this PR - Deploying #25597 and rolling the GPU worker. Both are required before transcripts and summaries land again. - A bound and alert for a permanently blocked projection head (also called out by #25597). - A backfill for rows stamped in the window whose transcript lands before this PR serves and whose enrichment attempt fails. They keep a transcript with no registered obligation. The verification query below counts them; if the count is not zero, a follow-up enrols them. - `process_conversation` recovery's `stored_content_is_replaceable` still reads a placeholder as a title. ## Serving and rollback Serves from `backend-listen` (stub writes), `backend` (list and detail reads) and `backend-integration` (projection). Each part is independent, so the services can roll in any order. Rollback is a revert; no stored state depends on the change. Deploy this before or with #25597 if possible. The projector then registers the obligation for stamped rows as the backlog drains. ## Verification after deploy (read-only) 1. **New rows are no longer stamped.** Completed `batch_live_v1` rows created after the listen roll, stored `structured.title` matching `^discussion (notes|\d+)$` with `summary_output_present != true`: 37–64% per finished hour now → **0%**. 2. `sum(increase(omi_fallback_total{component="conversation_notes",to_mode="deterministic_title"}[1h]))`: about 15,800/h now. It should fall by more than 90%, to the rate of generated notes with an unusable headline. 3. **Stamped rows are enrolled.** Rows created 11-16 22:17Z → deploy that carry the fallback title and a `record_projection_revision` set after the integration roll: `summary_due_at` or `summary_completed_at` present on 100%. 4. **Residue.** Rows with the fallback title, a `record_projection_revision`, no `summary_due_at`, no `summary_completed_at`, no `summary_blocked_reason` and `summary_output_present != true`. For projections that land after the integration roll: 0. For projections that landed before it (6 in the last pre-deploy sample): the count must only fall; what remains is the backfill population above. 5. **End to end, after #25597 and the worker roll.** Share of rows finished more than 15 minutes ago with `summary_output_present = true`: 5–12% now → back to the 57–63% of 11-16 14–18Z. ## Tests `backend/tests/unit/test_notes_pending_title.py`, 43 cases (plus one pin in `test_summary_quality.py` so a new fallback label fails beside the policy that emits it): stub create and raw completion stay untitled; a stored placeholder is cleared; a stored stand-in, user title or earlier generated title is kept; generated notes with an empty headline still get the fallback; the projection enrols a placeholder-only row and leaves titled or summarised rows alone; Home classifies a stamped capture as transcribing with the bounded wait; the wire rule and its non-matches; a stamped expired empty capture is noise; a pending write is sanitized like generated notes and records no title fallback; the Home card title rule. Focused regression at `fd3ee68a9c7` (before the review fixes; the review-fix commit re-ran the 5 directly affected files, 154 passed): the 91 test files that reference the touched modules, one pytest process per file, cloud credentials unset. 89 files pass. `test_chat_edits_firestore.py` is skip-only (it needs the emulator). `test_empty_capture_recovery.py` has 7 failures, all `RuntimeError: Opus support requires opuslib and the native libopus library` on the development host; CI has the library. `test_llm_input_prompt_version.py` passes: the notes prompt fingerprint is unchanged. Also run: `scripts/pr-preflight` (39 checks), runtime-image contracts (19 images), the conversation lifecycle write guard, import-time purity, async blockers and the dead-code ratchet. No production writes, deploys or flag changes were made. No app UI change. ## Product invariants affected none ## Failure class (fixes) Failure-Class: FC-provisional-home-content-published-as-final The admission half also reopens the contract of `FC-content-write-omits-implied-obligation`: the projection landed content without recording the obligation, this time because a placeholder satisfied the "already titled" check. Line-Count-Exception: backend/database/conversations.py | 5225 -> 5245 | The pending-notes rule belongs in the one transaction that decides the stored title, beside the user-title and stability rules it must not override. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Generated chapter and episode notes could narrate capture failures, omit headings, or rename entries during refreshes. Add a shared concrete-notes contract, deterministic heading fallback, and output filtering. Episode prompts reuse the existing owner-safe transcript projection: unknown voices stay neutral and all speech remains available.
Valid generated titles survive minor edits. A title may change once at least 40% of the current word units arrived since it was set, with a 20-unit minimum; the numeric basis advances only on a title change. Matched chapter headings apply that threshold to covered span seconds. Legacy rows bootstrap without a rename, user titles always win, and changes record a bounded reason and timestamp. No private title/text history is added.
Reuse and quality guard
Exact notes-4 checkpoints, and the existing compatible unscaled notes-3 aliases, remain reusable across the prompt update. Filter saved output locally and restamp its hash; new prompts apply to new/changed inputs. A visible saved output with detected availability narration or an empty heading may reserve one repair attempt. A transaction checks current visibility, sync revision and saved input/output hashes before reserving; a failed attempt consumes its reservation.
conversation_notes_quality_regenerations_totalcounts admitted attempts by fixed reason. Clean unchanged rows buy no model call and need no reservation read/write. Intentionally empty filtered checkpoints remain reusable.The same model response includes internal
quality_flagswith field paths and thecapture_availabilityenum, allowing removal in any output language without another classifier call. English and Japanese patterns are a backstop. Subject-matter evidence, scientific/legal uncertainty and transcription/audio product work remain notes. For mixed fields an exact availability-only sentence/bullet is removed while real notes remain. Flags are consumed before storage/client conversion; flags cannot remove tasks or entire chapters.Validation and limits
Synthetic tests cover old checkpoint reuse, changed inputs, one repair including failure/exhaustion, strict transaction fences, material/minor growth, user overrides, non-English classifications and backstops, and preserved evidence/product discussion. All 422 changed-module importer/affected test files passed (15,616 passed, 18 skipped), one file per plain pytest process from backend through
omi-heavy. The 21 files affected by final guard/typing edits were rerun successfully; totals use the latest result per file. Typing passed with zero errors; required CI-lane manifest passed all 40 checks on the clean committed tree. CI followup passed all 302 cases across eight isolated test files, including both reported CI guards. It keeps the offline evaluation import path database-free until a title fallback actually records, and routes the existing repair labels through a closed reason enum without changing their values or the repair policy. No live LLM or device-quality improvement is claimed.Default-on backend policy. No app UI, transcript merge, production data, deployment or serving-flag changes. Existing paid-agent/compose failure budgets remain authoritative. No production credentials or account APIs were used for this revision.
Product invariants affected
Line-Count-Exception: backend/database/conversations.py | 5047 -> 5090 | Keep title growth checks and canonical output hashes inside the existing fenced writer; count speech before its existing encryption/offload step.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3417 -> 3455 | Keep returned notes and persisted title decisions consistent while preserving private identity and user edits.
Line-Count-Exception: backend/utils/episodes/composer.py | 2084 -> 2110 | Apply shared filtering and title growth checks before the existing notes hash, using already-loaded member speech.
Line-Count-Exception: backend/utils/episodes/service.py | 2249 -> 2256 | Carry numeric content units at the existing live moment seam and retain legacy wire heading fallback.
Line-Count-Exception: backend/utils/conversations/llm_input_dedupe.py | 346 -> 418 | Preserve exact old checkpoint aliases, filter saved output, and admit only one fenced quality-repair attempt in the existing paid-work reuse seam.
Line-Count-Exception: backend/models/conversation.py | 1080 -> 1082 | Hydrate two server-only numeric/hash fields with exclude=True so title decisions and filtered checkpoint reuse survive processing without entering API/integration dumps.
Line-Count-Exception: backend/utils/observability/reasons.py | 1053 -> 1060 | Add the closed quality-repair reason vocabulary and family at the existing central metric-label authority.
Failure-Class: none
🤖 Generated with Claude Code