Skip to content

fix(notes): a capture with no notes keeps no title, so Home waits and the summary is owed - #25611

Merged
Git-on-my-level merged 3 commits into
mainfrom
lane/notes-fallback-title-admission
Nov 17, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
lane/notes-fallback-title-admission

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

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). fix(sync): reuse exact source files across upload bundles #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. fix(batch): project source-reuse rows a pre-reuse merger committed unmarked #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). fix: keep capture notes concrete and displayed titles stable #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

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 fix(batch): project source-reuse rows a pre-reuse merger committed unmarked #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

Git-on-my-level and others added 2 commits November 17, 2026 22:31
… the summary is owed

The shared note policy stamped the deterministic "Discussion notes" label on
every conversation write that carried a structured map, including the
in-progress capture stub and the raw completion of a batch capture. Home then
showed a finished row for a capture still waiting on its transcript, and the
batch projection skipped registering the first-summary obligation because the
row already had a title.

- the conversation writer leaves the title empty when nothing was generated
- the projection debt stamp treats a placeholder as untitled
- the transcribing hold, the processing step, the empty-capture rule and the
  legacy empty wire treat a placeholder as untitled
- the API exit serves a row that carries only the fallback label as untitled

Rows already stamped are healed on read; nothing stored is rewritten.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…inted policy module

utils/summary_quality.py is one of the notes prompt sources, so adding reader
helpers there changed the pinned prompt digest and would have forced a prompt
version bump, discarding reusable notes checkpoints. Move notes_pending and
is_fallback_title beside the other title readers in home_titles.py and leave
the policy module byte-identical to main.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Review: approve the code, with one sequencing condition

I re-derived the root cause independently against prod before reading the diff. It holds.

Independent confirmation (ro-prod, aggregates only, n=2,979 completed batch-live rows, last 16h):

check result
rows carrying the fallback label 49% (1,466)
notes_written_at present on those rows 0%
summary_due_at present 0%
summary_first_pending_at present 0%
content_word_units == 0 99%
title_changed_at − created_at p50 0.0s, p90 0.1s, 99% within 1s
control: non-fallback rows 23% notes written, 15% summary

So the model is not returning a placeholder. The label is stamped at row creation on a zero-word row that never had a notes run. That is exactly the mechanism described, and it is the right place to fix.

I also confirmed the serving state: all four Cloud Run services run commit-sha 0ce396503a5 (#25588). #25597 is 191e4435f27 and is not serving.

The one condition: do not ship this alone

This is not a code defect — the behaviour is deliberate and tested (test_stamped_capture_keeps_the_bounded_wait). It is a sequencing risk that will read as a regression to users.

Of the fallback-labelled rows:

  • 100% have a transcription deadline set.
  • 85% are already past it (99% of the 6–12h cohort, 98% of 12–16h).
  • 0% have any words.

After this ships, the 14% still inside the bound become transcribing (one collapsed Processing row), and the 85% past the bound become failed and are hidden from Home. Their transcripts never arrive, because #25597 is not serving and the GPU worker roll has not happened.

Net visible effect of shipping #25611 on its own: the junk feed becomes an empty feed, and it stays empty until #25597 serves and the workers roll. That is the correct end state, but it is a worse-looking product for the interval, and it will be reported as "my conversations disappeared".

Recommendation: ship #25611 with #25597 serving and the GPU worker roll, or hold #25611 until that window. If it must go first, say so explicitly to whoever is watching the feed, because the row count will drop by roughly half.

Two follow-ups, not blockers

1. /v1/home/feed is not covered. placeholder_title_wire is applied inside transcribing_hold.project, which the feed path never calls — home_feed._conversation_projection seals home_display from the raw structured.title via utils/home_feed/projection.py:content(). home_step is classified there, so the 85% past-deadline rows are excluded by _visible(), but a row that is ready with a fallback title and no notes would still render "Discussion notes" on the feed. That is precisely the cohort that appears once #25597 lands and transcripts arrive ahead of notes. The feed is not live in prod today (home_visible is unset on every row I sampled), so this is not urgent — but the fix silently does not apply on the path that is meant to replace the one it does apply to.

2. valid_title is wider than the fallback label. Swapping str(...).strip() for valid_title(...) in empty_capture, legacy_empty_wire, summary_delivery, transcribing_hold and home_step also treats meta-narration and capture-availability text as untitled, not just Discussion notes. That is probably right, but it is a broader blast radius than the PR description implies: it can newly enrol rows in summary debt and newly blank titles that were previously kept. Worth a sentence in the change note and a case in the tests, so the next reader does not assume the change is scoped to the two fallback labels.

Minor

_quality_processing_notes builds the pending branch as {**generated, 'title': ...} without clean_structured(generated), while every other branch cleans. For a genuinely empty stub that is a no-op, but it means the one path that writes a stub is the one path that skips the sanitiser. Cheap to make uniform.

What I checked and did not find

No stored-data rewrite, no new flag, no provider call, no read amplification. The read-side rule is presentation-only and reversible. The 32 new cases cover the cases I would have asked for, including the stand-in and user-title preservation, and the replay-on-main reproduction is the right way to prove the bug.

The number that proves this PR is the one you named: fallback-labelled share of newly created completed rows, 49.5% → 0%. I will re-measure it after the listen roll and post the result here.

…le (panel review)

Review panel review-20261117t155801-e885, all accepted:

- F1: the pending-notes branch stored generated fields without the note
  policy's sanitization. It now runs the same cleanup, with a stand-in title so
  a row that never had notes records no generated-title fallback.
- F2/F3: GET /v1/home/feed serves a title sealed at write time, which the
  list-wire rule never reaches. Conversation cards now serve a bare fallback
  label with no preview as untitled.
- F5: pin the reader's label matcher beside the policy that emits the labels.
- F6: cover a non-fallback placeholder on an expired empty capture.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit ee38e22 into main Nov 17, 2026
62 of 64 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/notes-fallback-title-admission branch November 17, 2026 16:40
Git-on-my-level added a commit that referenced this pull request Nov 17, 2026
…not a transcription wait (#25614)

## Problem

Follow-up to #25611, from the review panel's pass on its exact merged
head (`review-20261117t163910-5377`, finding F1, major).

#25611 made `transcribing_hold.applies` and the `processing` branch of
`home_step.classify` treat any placeholder title as "untitled". That is
right for a capture stub, which has no notes. It is wrong for generated
notes whose headline was unusable: those carry the fallback label
"Discussion notes" beside real content. On a batch capture whose
transcript receipt has not landed, an indexed list read (which omits the
transcript) would present that row as "Transcribing…" and hide its
notes, then as "Couldn't transcribe" after the wait bound.

## Change

`home_titles.untitled_pending(structured)`: true when there is no title,
or when the title is a placeholder and `notes_pending` holds (no
overview, gist, section body, task or event). Both call sites use it. An
empty title keeps its previous meaning.

No flag, no stored-data change. Read path only (`backend`).

## Not changed (panel F2, minor, rejected with reason)

The Home feed card rule decides from the sealed preview (gist or
overview). The sealed card carries no flag for a user title or for
section-only notes, and adding one changes the sealed schema and needs
every card re-prepared. Residual: a user title that is literally the
fallback label with no preview, or section-only notes under a fallback
headline, are served untitled on `GET /v1/home/feed`.

## Tests

`backend/tests/unit/test_notes_pending_title.py`: 3 new cases for a
placeholder title beside an overview, a section body and a gist (not a
transcription wait; `ready`; wire unchanged; `writing_notes` while
processing), plus the missing user-title case for the wire rule (panel
F3). 388 passed across that file and `test_home_transcribing_hold.py`,
`test_home_step.py`, `test_stale_empty_capture.py`,
`test_home_transcribing_readers.py`, `test_home_feed.py`.

## Serving and rollback

Not yet serving: #25611 is merged but has not been moved to `backend`;
this lands before that move. Rollback is a revert.

## Product invariants affected

none

## Failure class (fixes)

Failure-Class: FC-provisional-home-content-published-as-final

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/25614?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/25614?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F25614&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
kriegcloud pushed a commit to kriegcloud/omi that referenced this pull request Nov 17, 2026
…not a transcription wait

Follow-up to BasedHardware#25611 from its exact-head panel review (review-20261117t163910-5377 F1, F3).

transcribing_hold.applies and the processing branch of home_step.classify
treated any placeholder title as "untitled". Generated notes with an unusable
headline carry the fallback label beside real content; on a batch capture
whose transcript receipt has not landed (indexed list reads omit the
transcript) that row was presented as "Transcribing…", hiding its notes.
Both now use home_titles.untitled_pending: no title, or a placeholder on a row
with no notes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Nov 17, 2026
Completed batch-live captures retain a finalization job ID after
raw-capture handoff. Projection debt admission therefore refused them as
`generation_owned`, even when the bound finalizer job was already
completed successfully. A pending timestamp from enrichment acceptance
also incorrectly prevented a missing due time from being armed. The
placeholder-title admission in #25611 did not remove either guard.

The projection transaction now verifies the finalizer's
owner/conversation/revision, terminal success, completed fanout and
immutable non-BYOK custody, then commits generation-bound summary
custody with the transcript and armed debt. Active, mismatched, failed
and BYOK generations remain fenced, including a completed requires_byok
job after the account switch turns off. Pending-only rows retain valid
non-future original clocks; malformed/future clocks fall back to
acceptance and expired clocks remain unarmed. A malformed finalizer ID
refuses debt without aborting transcript projection. Legitimate unbound
orphan records keep the existing debt policy without a custody
exception. The existing default-on `SUMMARY_PROJECTION_DEBT_ENABLED`
switch disables enrollment and the custody exception. Projection and
repair continue sharing the conversation-keyed enrichment outbox and its
active leases; no new task producer is added.

The new unit suite runs Projector -> ProjectionSession -> assignment ->
replacement -> real codec -> stored conversation. The original code
committed a transcript with no due time. The regression now covers
blank/placeholder titles, pending clocks, generation/BYOK fences,
kill-switch rollback, SDK deletion semantics, receipt-only acceptance
and repair over an active enrichment lease. Literal metadata writes are
registered in the lifecycle AST inventory; refusal logs contain only
bounded static reasons, no customer/job identifiers.

The CI follow-up removes duplicate module parsing and skips
expression-only subtrees in the assignment-constant inventory; five
cases preserve constants through control flow and nested scopes. All 26
transaction tests remain in the fast lane. A module fixture prepares the
real lazy lifecycle/speaker-evidence dependencies before the
concurrent-reconcile call, following the existing summary-delivery
fixture convention. Import failures still fail the suite; the unchanged
whole-file wall limit includes their cost. The replay and every
concurrency assertion stay real. No threshold, allowlist, marker,
workflow or product/rollout change.

Rollback behavior: setting `SUMMARY_PROJECTION_DEBT_ENABLED=false`
pauses both new enrollment and repair admission through existing
batch-live finalization proofs. It retains their pending/due markers;
ordinary already-enqueued enrichment continues independently.
Re-enabling restores proof-based admission while the generation,
privacy, BYOK, summary and age guards still pass. A pause extending past
the repair age window requires a fresh residue count and separate
approval before any enrollment/backfill. The flag does not delete
receipt metadata or cancel existing enrichment.

Validation: guard-enabled authoritative test.sh through omi-heavy passes
36 arming cases, all 26 transaction cases, 259 lifecycle invariants (86
existing xfails) and 1,901 writer-inventory cases. Complete local shards
1/8 (133 files) and 2/8 (156 files) pass with the normal guard enabled
and four workers. GitHub checks are authoritative for current-head CI;
the owning report links exact-head panel and triage receipts. Full
runtime source closure covers all 19 registered images. The selected
failure-class gate also exposed a stale missing-family fixture: its
temporary definition now explicitly removes the migrated seed family,
retaining the original assertions.

Historical investigation used ro-prod metadata aggregates only. Server
document update_time proves some due markers already existed before
November 16; retained finalizer IDs still prevented repair admission
under the old predicate. This is a latent projection-admission gap, not
a universal absence of due fields or a reconstructed historical arming
rate. Owning evidence and full five-question report:
`data/run-2026-11-17-discussion-notes-rootcause/lane-f/REPORT.md` on
m5-mbp. Follow-up CI/review receipts are in its `ci-followup/`
directory. No titles/transcripts/user IDs were emitted by the historical
probes. The required dated pipeline note and canonical summary-custody
section document the conditional read, custody boundary and rollback.

Already-drained enrollment remains proposal-only. The report specifies
the exhaustive read-only count and five-field transactional patch, with
fresh privacy, generation, age, summary and manual-edit guards. Neither
that residue count nor backfill was run. Production writes require
David's separate approval. No merge, deploy, flag change, requeue, index
creation, record sealing, in_progress backlog or v3 rollout/behavior
change. No overlap with #25617 alerting files.

Failure-Class: FC-content-write-omits-implied-obligation
Line-Count-Exception: backend/database/conversation_finalization_jobs.py
| 3639 -> 3640 | Extract the existing collection constant into an
import-safe schema module; no finalizer behavior changes.
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