Repository navigation
Extend the WAL coverage wait memo (SCA-3376) - #26333
Merged
Merged
Conversation
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. |
This was referenced Nov 26, 2026
aryanorastar
added a commit
that referenced
this pull request
Nov 27, 2026
## What changed and why The backend can send a 1,800-second `record_capture_pending` wait after a cached negative audio-coverage check (#26333). The mobile upload gate capped all recording waits at 300 seconds, so affected recordings could retry early even after an app restart. Honor typed recording waits up to 30 minutes. Preserve the five-minute cap for header fallback and local backoff. Each wait remains scoped to the recording session. The existing receipt path still controls when a local recording can be released. Related: #21216, #25770, #26333. ## Product invariants affected - **INV-CAP-1** — the wait changes retry timing only. The affected file remains readable and pending throughout the deferral, with the existing server receipt still required for release. ## How it was verified - The restart regression failed before the patch. The queue issued another request at six minutes despite a 30-minute response. - 81 focused Flutter tests passed. The updated loopback HTTP test separately passed with the full 1,800-second response. - The backend coverage-wait suite passed 27 tests, including the 1,800-second response. - Analyzer ratchet and all 27 local preflight checks passed. - Independent review checked the bounds, persisted values, and unchanged custody logic. - Production coverage and historical recording recovery require separate verification. ## Tests - `recording_wait_deferrals_test.dart` checks typed and header limits, default waits, and short backoff. - `wal_upload_resilience_test.dart` checks a restarted queue, a sibling session uploading independently, retained audio, and exact expiry. - `wal_retry_manifest_transport_test.dart` verifies the typed 503 over loopback HTTP, no request during the restored wait, and a queued receipt after expiry. ## UI evidence UI-Evidence: none -- Upload retry timing only. ## Failure class Failure-Class: none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26396?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/26396?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26396&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.
Change
SCA-3376. Completed negative WAL coverage comparisons now memoize for six hours by default. Redis SET NX sets expiry only on insertion. A coverage memo hit returns the existing retryable HTTP 503 with
retry_after_seconds: 1800in the JSON body. Coverage misses and other custody waits keep the 30-second hint. The fast hit still wakes the partial coordinator. Receipt, handoff, and WAL retention behavior is preserved.The job snapshot already hashes
audio_uriwith the exact GCS generation. Audio staging is create-only, and coverage reads pin the generation. Retained manifests pin source generations and verify decoded PCM against their authenticated digests. A replacement generation needs a new job URI to affect coverage, which changes the key. A read or digest failure cannot populate the memo. The regression test accepts the same WAL after a repair switches the job to a newer generation at the same object name, while the old negative remains cached.Tuning and rollback
SYNC_RECORD_COVERAGE_WAIT_TTL_SECONDSbounds overrides to 30–21,600 seconds and applies on insertion.SYNC_RECORD_COVERAGE_WAIT_RETRY_AFTER_SECONDSbounds overrides to 30–1,800 seconds.SYNC_RECORD_COVERAGE_WAIT_MEMO=falseon all serving upload revisions. It bypasses populated entries as well as writes. The new Redis prefix keeps long-lived entries isolated from older code during a mixed-revision rollout or code rollback.App behavior
Source checks at tagged iOS 1.0.577+1520 and Android 1.0.577+1516 show that those builds use the Retry-After header path and ignore this JSON hint. The macOS 0.12.578+12578 source treats a 503 as a generic retryable upload failure. The Flutter pacing code from #25868 applies at most 300 seconds to a 1,800-second hint. Store adoption and actual retries must be measured by build before estimating fleet savings.
Verification and production readback
omi-heavy run --wait 300 --timeout 300. Suites covered coverage memo and telemetry, artifacts, WAL handoff, duplicate settlement and the flag budget.sync_record_uploadevents withpath=coverage. Sum request latency in seconds for HTTP 503 on POST/v2/sync-local-files. Compare peak concurrent active backend-sync instances using time-aligned instance counts across revisions. Report successful uploads and oldest observed pending WAL age alongside these results, by app build where available.Product invariants affected
UI-Evidence: none