Repository navigation
SCA-4753: raise backend scrape cap and band release builds by floor - #26689
Merged
Merged
Conversation
Backend GMP sample cap 15,000 -> 25,000. Backend peaked at 14,397 post-relabel samples per instance on 2026-11-28, and the fleet pilot (#26677) adds up to 4,376 worst-case samples. Over the cap GMP drops the instance's whole scrape. Ingestion is billed per sample emitted. Phase 0 upload-trace build bands use per-platform floors and a per-process cap. The allowlist (1367-1520) matched none of the builds phones sent on 2026-11-28 (iOS 1597-1650, Android 1500/1651). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
Git-on-my-level
added a commit
that referenced
this pull request
Nov 29, 2026
## Pilot behavior - Reuse `POST /v1/telemetry/fleet` for one content-free snapshot per installation per UTC hour. A durable local reservation precedes the one-shot request. The existing analytics consent and a fresh positive `sync-backlog-fleet-snapshot` flag gate delivery. - Report amount waiting at the pendant, phone, and settlement stages. Phone seal and upload clocks define the age measurements. Known empty queues contribute zero and unavailable observations are omitted. Fresh INFO supplies pendant counts and packet size. The oldest pendant age is unavailable from INFO. - Show accepted installation-hours by build and the eligible counts behind the Omi Core Features distributions, age shares, and pendant holdout comparisons. Accepted installation-hours use a dedicated counter, including snapshots with unavailable audio durations. The four checked-in build numbers have a 7,658-sample maximum including 3,842 legacy samples. Keeping up to six exact builds bounds the total at 8,282. Backend peaked at 14,397 post-relabel samples per instance against the existing 15,000 cap. Release must verify [prerequisite #26689](#26689) is serving the 25,000-sample profile on Backend before enabling the pilot flag. Record total scrape size and headroom during the pilot. ## Release and validation The initial exact pins cover observed iOS builds 1597 and 1650 and Android builds 1500 and 1651. Verify the exact beta and stable builds before admission and adjust the pins within the six-build budget as needed. Release owns the backend and dashboard serving receipts and the same-build mobile holdout. Use the deny cohort in the ring drain gate for the three-day comparison. Ring comparisons use passive INFO, so the two scheduler cohorts can yield different eligible counts. The dashboard remains observational during the seven-day baseline before thresholds, provisioning, and drift verification. - 84 focused backend tests and 54 focused Flutter tests passed. - Focused Dart analysis and generated fleet schema, monitoring inventory, and flag registry checks passed. The fail-closed follow-up passed 15 focused Flutter tests, including enabled cache with a failed reload, and focused Dart analysis. - Review follow-up: 87 focused backend tests, 16 Flutter tests, and focused Dart analysis passed. The fleet schema and dashboard query inventory were regenerated. - The production dashboard and the remote stop still require readback on the pilot. ## Product invariants affected - INV-CAP-1 — the beacon observes inventory and existing BLE signals. It has no authority to start a read, advance the ring, settle a recording, or change custody. Failure-Class: none UI-Evidence: none Line-Count-Exception: app/lib/utils/analytics/analytics_manager.dart | 3168 -> 3170 | Add strict reload handling inside the existing identity and timeout fence for this pilot. Line-Count-Exception: app/lib/services/devices/connectors/omi_connection.dart | 1622 -> 1632 | Capture fresh INFO and the known codec at the existing connection boundary. The observer implementation lives in a separate file. Line-Count-Exception: app/lib/services/wals/local_wal_sync.dart | 3442 -> 3444 | Expose the existing initial inventory admission state so the reporter can distinguish an empty queue from an unloaded one. Line-Count-Exception: app/lib/services/wals/ring_storage_sync.dart | 1731 -> 1745 | Tap existing pass and reader lifecycle events at their sources for both scheduler cohorts. Aggregation lives outside the custody implementation. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26677?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/26677?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26677&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.
What changed and why
SCA-4753 prerequisite for the fleet backlog pilot (#26677). Two backend-only changes.
1. Backend GMP sample cap 15,000 → 25,000 (
backend/deploy/cloud_run_gmp_sidecar.yaml). Backend Cloud Run peaked at 14,397 post-relabel samples per instance on 2026-11-28 (ro-prod GMP,max_over_time(scrape_samples_post_metric_relabeling{namespace="backend"}[1d])). Over the limit GMP drops the instance's whole scrape, so every backend metric goes dark for that instance. #26677 raises the fleet exporter's worst case from 3,842 to 8,218 samples (+4,376), which would put a busy instance over 15,000. Ingestion is billed per sample emitted, not by this ceiling; the change only moves the drop point. The sync profile (cloud_run_gmp_sync.yaml, peak 5,346) stays at 15,000.2. Phase 0 upload-trace build bands by floor (
backend/utils/sync/capture_end.py,backend/utils/product_metrics.py). The #26474 allowlist (1367, 1504, 1514, 1515, 1516, 1520) matched none of the builds phones sent on 2026-11-28 (ro-prod GMPomi_listen_accepted_totalbyapp_build: iOS 1597–1650, Android 1500 and 1651), so the "Upload age over 6 h by build" panel shows onlyolder.release_build_bandkeeps an exact build at or above a per-platform floor (iOS 1620, Android 1500) until a process has seen 8 exact builds, thenother; below the floorolder; otherwiseunknown. A stale floor degrades toother, never to a list that matches nothing. Label set unchanged (age,platform,build_band); worst case 2 × 3 × 11 = 66 series per target.Order: this must be serving on backend before #26677's
sync-backlog-fleet-snapshotflag is turned on.Rollback: revert this PR. Both changes are config/label-only; no data path, Firestore, or client change.
Verification
omi-heavy,bash backend/test.shone process per file:test_product_metrics.py(newtest_release_build_band_floors_cap_and_unknowns),test_sync_capture_end.py,test_firestore_attribution_export.py(cap pinned per profile),test_desktop_message_quota_router.py,test_attach_cloud_run_gmp_sidecar.py,test_fleet_deployment.py,test_monitoring_telemetry_contract.py, and the chat-router harness users: 15 files, all passed.product_metricsis widely imported); that full run is CI's.UI-Evidence: none -- backend config and metric labels only
🤖 Generated with Claude Code