Skip to content

chore(backend): prod notes wait 120 s, not 600 s, after the last synced audio - #26708

Merged
kodjima33 merged 1 commit into
mainfrom
fix/sync-quiet-120
Nov 29, 2026
Merged

kodjima33 merged 1 commit into
mainfrom
fix/sync-quiet-120

Conversation

@kodjima33

@kodjima33 kodjima33 commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Pendant conversations that reach the server as phone uploads wait 600 s after the last audio arrival before their first summary. Prod, 2026-11-28 15:35 to 18:35 ET, 3,790 Home-visible pendant conversations: 15% sat in that wait, with a median of 17.1 min from end of speech to first summary.

Change

SYNC_PROCESSING_QUIET_SECONDS=120 on the four prod backend Cloud Run services (backend, backend-sync, backend-sync-backfill, backend-integration; the projection pump inherits it from integration). No code change: 120 is the floor processing_hold.quiet_seconds() already clamps to, and the knob was added in #25304 for exactly this.

SYNC_REPROCESS_SETTLE_SECONDS stays 600, so a re-run after late audio is still coalesced over ten minutes.

Expected effect

Simulated on the same 3,790 conversations: the affected group's median goes from 17.1 to 9.1 min, the overall median from 10.5 to 8.5 min. Of content arrivals that follow another within ten minutes, 96% follow within 120 s (omi_sync_content_arrival_gap_seconds, 24 h).

Cost

cost-delta-usd-day: 110

That is a ceiling: about 27.7k arrivals a day land 120 to 600 s after the previous one, and each can cost one more full processing run at about $0.004. Immaterial appends and the one automatic late run per conversation keep the real figure below it. Approved by Nik on 2026-11-29 with this number.

Verification

  • backend/scripts/pre-deploy-check.sh: 709 passed.
  • make preflight: 21 checks passed.
  • tests/unit/test_sync_processing_hold.py, tests/unit/test_sync_capture_end.py: 132 passed.
  • With the value set, processing_hold.admission returns quiet_wait until last_content_at + 120, then ready.

After deploy: omi_sync_processing_hold_total by outcome (ready, late_cap), and first-summary latency on the same cohort.

Rollback

Remove the four overlay entries (default 600).

Product invariants affected

  • INV-MEM-4: named because the prod runtime env overlay is under its path glob. Unchanged: this adds one notes-timing value and touches no memory intake, consolidation or promotion setting.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…ed audio

Set SYNC_PROCESSING_QUIET_SECONDS=120 on the four prod backend Cloud Run
services. 120 is the floor quiet_seconds() already clamps to; no code change.
Late-audio re-runs keep their 600 s settle (SYNC_REPROCESS_SETTLE_SECONDS).
@kodjima33 kodjima33 added the deploy-approved Releases a deploy-stop hold for omi-deployer label Nov 29, 2026
@kodjima33
kodjima33 merged commit 36d9f63 into main Nov 29, 2026
73 of 74 checks passed
@kodjima33
kodjima33 deleted the fix/sync-quiet-120 branch November 29, 2026 09:04
kodjima33 added a commit that referenced this pull request Nov 30, 2026
#26772)

## Problem

#26708 set the notes wait to 120 s on the Cloud Run services, and it
works there: the median wait after the last audio went from 608 s to
about 150 s. But 11.5% of held conversations still wait about 10
minutes.

Prod, 2026-11-30 03:18 to 05:18 UTC, 304 held conversations: 35 were
claimed once, 624 to 811 s after their last audio, with summary lane
`live` and `sync_hold` set, while every Cloud Run service already served
120.

The enroller computes the outbox due time, not the service that later
admits the row. `backend-listen` ingests already-transcribed late audio
(`utils.sync.late_audio.ingest_late_transcript`) and marks the outbox
with `sync_hold`, so `due_at = now + quiet_seconds()` is evaluated
there. Prod `backend-listen` has no `SYNC_PROCESSING_QUIET_SECONDS`, so
it uses the 600 s default.

## Change

Add `SYNC_PROCESSING_QUIET_SECONDS=120` to the prod shared ConfigMap
(`prod-omi-backend-config`), which `backend-listen` and `pusher` load
with `envFrom`. No code or chart change.

## Rollout

The ConfigMap is written by the listen Helm deploy and the full backend
deploy. Pods read it at start, so the value serves after the next
`backend-listen` rollout. This PR does not roll listen.

## Cost

cost-delta-usd-day: 15

This is the listen share of the $110/day ceiling declared and approved
in #26708. Measured so far on the Cloud Run services (19 h): full
processing runs are not above the same hours the day before.

## Verification

- `backend/scripts/pre-deploy-check.sh`: 709 passed.
- `make preflight` and the pre-push gate.
- After the next listen rollout: `kubectl -n prod-omi-backend get
configmap prod-omi-backend-config -o
jsonpath='{.data.SYNC_PROCESSING_QUIET_SECONDS}'` returns 120, and
outbox rows with `summary_lane=live` and `sync_hold=true` are claimed
about 120 s after the last content arrival.

## Rollback

Remove the entry (default 600).

## Product invariants affected

- INV-MEM-4: named because the prod runtime env overlay is under its
path glob. Unchanged: this adds one notes-timing value and touches no
memory intake, consolidation or promotion setting.

🤖 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/26772?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/26772?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26772&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. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy-approved Releases a deploy-stop hold for omi-deployer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant