Repository navigation
fix: offline-harness STT stub + keyless-geocode guard so offline sessions complete end-to-end - #14485
Merged
Merged
Conversation
Offline sessions strip provider secrets by design, so uploaded captures dead-ended at PrerecordedSTTConfigurationError and conversations never finalized. Mirror the OMI_LLM_STUB pattern: a double-gated (OMI_STT_STUB + offline stage) deterministic provider whose transcript text is self-declaring synthetic, selected only inside harness child envs.
Both geocode helpers fired the maps.googleapis.com request even with GOOGLE_MAPS_API_KEY unset — pure egress noise from offline sessions, where the key is stripped by design, and a request that can never succeed anywhere. Return None before any egress.
Git-on-my-level
added a commit
that referenced
this pull request
Sep 18, 2026
…t tripwire (round 3) (#14537) ## Failure-Class Failure-Class: FC-fixture-mock-signature-drift ## Summary Round-3 completion of the #14513/#14485 CI-green restoration (rounds 1–2: #14528, #14533). Three remaining main-wide shard-2 failures: 1. `test_geocoding_cache.py` (13 failures): #14485's keyless-geocode guard returns `None` before the API call when `GOOGLE_MAPS_API_KEY` is unset, so every API-path test now exercises a dead path. Added an autouse fixture setting a dummy key; the explicit no-key cache-hit test keeps its own `clear=True` override, preserving its intent. 2. `test_free_tier_cohort.py::test_coordinator_sites_still_read_the_flag_without_a_uid`: the test documented its own deletion condition ("if the calls now carry uid, delete it and the gap note together") — #14513 met it (both call sites now pass `uid`). Deleted per its docstring, with the now-unused `re` import. 3. `test_gateway_resilience.py`: passes standalone (3/3) — shard-pollution follower, expected green once the real failures clear. ## Verification - All three files: 74 passed from `backend/` - Full sweep of every previously red file this program touched: green ## Product invariants affected - INV-DATA-1 Preserved: test-only changes plus one autouse test fixture; no production behavior, routing, or project binding touched. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/14537?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="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.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.
Summary
Physical-device qualification on the offline harness (SCA-491/C5) found that uploaded phone captures dead-end: offline stages strip provider secrets by design, so pre-recorded STT fails with
PrerecordedSTTConfigurationError(providerparakeet,HOSTED_PARAKEET_API_URLabsent) and the sync job finalizesfailed/config_error— the conversation is created server-side but never completes, and the app shows "Waiting for transcript…" forever (receipted in the workspace run record).backend/utils/stt/prerecorded_stub.py), mirroring the existingOMI_LLM_STUBpattern: selected inget_prerecorded_provideronly whenOMI_STT_STUBis truthy and the provider stage is offline (double-gated; the flag is set solely indev_harness/config.py's offline child env, next to the existingSTT_SERVICE_MODELS=parakeetpin). Transcript text is self-declaring synthetic ([offline stub transcript — no real speech recognized]) so harness output can never be mistaken for real transcription quality — in the app UI or in session evidence. Selection/telemetry still resolve normally; only the provider construction swaps.backend/utils/conversations/location.py): both geocode helpers performed themaps.googleapis.comHTTP call even withGOOGLE_MAPS_API_KEYunset — observed as outbound traffic from aPROVIDER_MODE=offlinesession (offline strips the key). A keyless request can never succeed; both helpers now return None before any egress. Correct in production too, not just offline.Product invariants affected
none
Failure class (fixes)
Failure-Class: none
Test plan
backend/tests/unit/test_prerecorded_stub.py(6): gate inert without the flag; requires offline stage (real/production refused); active only with both gates; word shape satisfies_words_cleaning; self-declaring deterministic output;return_languagevariantbackend/tests/unit/test_geocode_keyless_no_egress.py(2): both helpers return None without HTTP when the key is unset (HTTP layer monkeypatched to assert no egress); existing resilience tests still passscripts/dev-harness/tests/test_env_stage.py: offline child env setsOMI_STT_STUB=1; local mode never doesprerecorded_from_bytes+_words_cleaning; flippingPROVIDER_MODE=realreturns the real provider