Repository navigation
chore(backend): prod notes wait 120 s, not 600 s, after the last synced audio - #26708
Merged
Merged
Conversation
…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).
This was referenced Nov 29, 2026
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. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=120on 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 floorprocessing_hold.quiet_seconds()already clamps to, and the knob was added in #25304 for exactly this.SYNC_REPROCESS_SETTLE_SECONDSstays 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.processing_hold.admissionreturnsquiet_waituntillast_content_at + 120, thenready.After deploy:
omi_sync_processing_hold_totalby outcome (ready,late_cap), and first-summary latency on the same cohort.Rollback
Remove the four overlay entries (default 600).
Product invariants affected
🤖 Generated with Claude Code