Repository navigation
Harden macOS and backend against recurring bug classes - #9437
Merged
Merged
Conversation
Make voice-turn dispatch non-reentrant, replace trapping dictionary construction with an explicit last-write-wins policy, and add a desktop test-quality ratchet plus complete agent test discovery.\n\nVerified: OMI_SWIFT_TEST_SUITE_WORKERS=4 ./scripts/swift-test-suites.sh (219 suites); clean arm64 release build; named omi-systemic-guards bundle PTT flow with zero invalid/stale transitions; full agent tool surface (33 files/406 tests plus 104 extension tests).
Centralize prerecorded-STT provider requirements, validate desired deploy state, lazily construct provider clients, add directional released-client OpenAPI checks, trace blocking calls through sync helpers, and stabilize file-isolated CPU accounting.\n\nVerified: backend/test.sh (525 files); pre-deploy-check.sh (50 tests); dev/prod runtime validation; OpenAPI compatibility against origin/main; import-purity/module-pollution scans; all-category async diff scan; typecheck (0 errors); independent review approved.
Use one rename/delete/type-aware changed-path primitive, fail selective backend testing toward full coverage, run the complete desktop agent suite, dedicate import-isolation gates, and encode failure-class closure in agent and PR guidance.\n\nVerified: workflow/path contract tests (15); actionlint on all changed workflows; shell syntax checks; full desktop/backend component suites; independent final review approved.
Declare the existing apps marketplace flow as coverage for AppProvider and the shared duplicate-key policy.\n\nVerified: desktop/macos/tests/test-omi-harness.sh.
Scrub repository-local Git variables after anchoring the backend test runner so temporary-repository tests cannot reinitialize or inspect the outer worktree.\n\nVerified: injected GIT_DIR/GIT_WORK_TREE test.sh run; backend runner and changed-files tests (4 passed).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
added 2 commits
July 11, 2026 00:07
…ardrails # Conflicts: # AGENTS.md
Current main adds PermissionRequestAuthorizationTests as the 62nd source-reading file and 171st inspection site. Pin the new no-increase guard to that base without admitting any debt from this PR.\n\nVerified: 11 checker fixture tests and repository scan passed.
9 tasks
Skip desktop quality checks in hermetic suite fixtures so parallel timing stays under budget, slim the missing-provider binding test onto the pure STT contract helper, and compare isolation allowlists to the PR merge-base like pre-push. Co-authored-by: Cursor <[email protected]>
Keep reused-manifest workflow extraction from this branch and adopt main's per-workflow sync-backfill co-deploy check. Co-authored-by: Cursor <[email protected]>
Main's agent-control contracts PR added KernelTurnRecordedProjectionTests as another source-reading suite. Raise the no-increase ceilings to 63 files / 172 sites so this branch does not inherit that debt as a false regression. Co-authored-by: Cursor <[email protected]>
The prod GKE/Cloud Run workflow contract tests amortize full-manifest I/O the same way as the already-allowlisted dev variants; pin them so local 0.12s pre-push guards stay deterministic. Co-authored-by: Cursor <[email protected]>
This was referenced Jul 12, 2026
beastoin
added a commit
that referenced
this pull request
Jul 12, 2026
…9549) * fix(backend): use http:// for parakeet ILB URL in Cloud Run services PR #9437 changed HOSTED_PARAKEET_API_URL from http:// to https:// for prod Cloud Run services (backend, backend-sync, backend-integration). The parakeet ILB is HTTP-only (port 80, no TLS), so https:// causes all transcription requests to timeout. Co-Authored-By: Claude Opus 4.6 <[email protected]> * test(backend): add ILB scheme validation and fix https fixtures Add test_repo_ilb_endpoints_use_http_scheme that validates all ILB endpoint env vars (HOSTED_PARAKEET_API_URL, HOSTED_TRANSLATION_API_URL) use http:// scheme across all environments. Also fix test fixtures that incorrectly used https://parakeet.omi.me. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix(test): handle GKE direct service entries in ILB scheme validation GKE services in runtime_env.yaml are direct children of the gke key (not nested under 'services' like cloud_run), so the ILB scheme test was silently skipping GKE entries. Fixed traversal to handle both structures. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
This branch was successfully deployed
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
Recent macOS and backend bug-fix PRs were clustering around the same missing contracts: re-entrant desktop state publication, duplicate external IDs, hidden blocking work, runtime/deploy drift, released-client schema breaks, and selective CI that could silently miss tests. This replaces those one-off repairs with shared policies, behavioral harnesses, compatibility checks, and fail-closed CI selection.
The main durable changes are:
docs/operational/systemic_bug_hardening.md.Product invariants affected
INV-CHAT-1: floating-control-bar, PTT, task-chat, andChatProviderpaths are touched. The shared-transcript/session ownership model is unchanged; the PTT coordinator now publishes transitions atomically under nested callbacks.INV-AUTH-1:ChatProvider.swiftis touched only to adopt deterministic duplicate-key handling. Session invalidation and auth recovery behavior are unchanged.INV-INT-1:MemoryExportService.swiftis touched only to replace a trapping dictionary constructor with the shared duplicate-key policy. Integration ownership and capability behavior are unchanged.INV-MEM-1: the sameMemoryExportService.swiftmechanical migration does not change memory tiers, canonical storage, or read/write routing.How it was verified
cd desktop/macos && OMI_SWIFT_TEST_SUITE_WORKERS=4 ./scripts/swift-test-suites.sh— all 219 Swift suites passed; the desktop quality checker and its 11 fixture tests passed. Its source-inspection ratchet is pinned to current-main debt (62 files / 171 sites) and permits no increase from this PR.cd desktop/macos && rm -rf Desktop/.build && xcrun swift build -c release --package-path Desktop --triple arm64-apple-macosx— clean arm64 release build passed./Applications/omi-systemic-guards.appwith ad-hoc signing. Exercised the real PTT semantic actions through idle → recording → terminal-too-short; automation state reported zero invalid and zero stale transitions.cd backend && bash test.sh— the complete selector-discovered suite of 525 backend test files passed under file isolation and the strict local CPU guard.cd backend && PATH=/tmp/omi-python-bin:$PATH bash scripts/pre-deploy-check.sh— dev/prod runtime contracts and 50 deploy-safety tests passed.origin/main(2a14a9ee78153ac353afc2d5e43ffa328650a6f6); all 19 checker tests passed.bash backend/scripts/typecheck.sh— zero type errors.scripts/pre-push— all commit-aware local gates passed, including OpenAPI/model freshness, actionlint, desktop suites, and the complete desktop agent tool surface.No production deploy was performed.
backend/deploy/runtime_env.yamlchanges checked-in desired state and will take effect only through the normal deployment workflows.Tests
VoiceTurnCoordinatorTestsnow reproduces nested effect/snapshot callbacks and proves FIFO publication without recursion.DictionaryDeduplicationTestsproves the shared collision policy; the static checker rejects future trapping initializers and unreasoned escapes.test_prerecorded_stt_config.py, provider tests, and runtime-validator tests cover dynamic selectors, missing dependencies, BYOK, fallback requirements, and dev/prod surfaces.test_app_client_openapi_compatibility.pycovers request/response directionality, status/media/security changes, enums, arrays, maps, unions, constraints, and recursive references.test_scan_async_blockers.pycovers transitive helpers, cycles, diff scope, and safe executor offload.Root cause and durable guard (bug fixes)
#9402,#9411,#9420,#9424,#9428): synchronous callbacks could advance a half-published transition. The coordinator now owns a non-reentrant event queue, backed by reducer-level behavior tests.#9288and adjacent sites): boundary data was incorrectly assumed unique. A named collision policy replaces every trapping production constructor, and CI rejects recurrence.#9296,#9308,#9358,#9385,#9421,#9422): runtime choice and deploy dependencies had separate owners. One pure provider contract now drives both, with lazy client construction preserving import purity.#9425): schema freshness alone did not prove compatibility. CI now compares contracts in the direction requests and responses actually flow.Scoped cleanups (optional)