Repository navigation
harden(app): forward capture composition seams into CaptureProvider (defaults kept) - #14367
Git-on-my-level wants to merge 10 commits into
Conversation
composeCaptureProvider now passes WAL, mic, auth, clock, scheduling, connectivity, preferences, BLE, and socket through CaptureProvider into CaptureController. Production no-argument defaults stay; composeProductionCaptureProvider refuses FLUTTER_TEST before any singleton. Co-authored-by: Cursor <[email protected]>
…_TEST Builder tests lock the cut-1 lazy passes: openSocket/WAL/mic must actually be forwarded, and the production composer cannot construct ConnectivityService with the health URL under test. Retires only the two composition spine markers this cut satisfies. Co-authored-by: Cursor <[email protected]>
Formatting only; required by the pre-push dart format gate. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Architect conformance review: conforms, with required changesReviewed at Required change: Scope note, not a defect in this PR: the architect's own socket seam omits geolocation while Two honesty notes from the review, worth reading before you respond:
|
Store the supplied SharedPreferencesUtil and route later reads and writes through it so batchMuted and the rest of the seam are not the global singleton, while ordinary construction still defaults. Co-authored-by: Cursor <[email protected]>
Architect conformance review, round 2: conformsReviewed at The required preference fix is present and behavioral, not cosmetic: Two things the review confirms are allowed rather than overlooked: keeping production defaults It also records, so nobody mistakes it for a defect here, that this PR sits on an older 🤖 Generated with Claude Code |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
|
Auto-closed when base branch was deleted after its parent squash-merged. Head unchanged at |
What changed and why
C1 cut (2):
composeCaptureProvidernow forwards every seamCaptureControlleralready accepts (WAL, mic, batch flag, auth, clock, scheduling, connectivity, preferences, BLE listeners, socket open, location, codec, mic permission, telemetry, segment store) throughCaptureProvider'ssuper.constructor. Production no-argument defaults stay, includingCaptureConnectivityBoundary.production().composeProductionCaptureProviderrefusesFLUTTER_TEST(process env or--dart-define) before resolving any singleton, and still does not constructConnectivityService.ownerandensureDeviceConnectionremain onCaptureDependenciesfor later cuts.main.dart's twoProxyProviderarms are untouched.Stacked on #14361 (
task/msd-core-c1-lifetime).CaptureBleListeners/CaptureSocketOpenmoved tocapture_seams.dartso composition can construct a provider without a composition↔controller import cycle.capture_controller.dartstays at 2710 lines. Custom STT polling helpers moved tostt_mode_resolver.dartto pay for the new fields. The file is not dart-format-clean at HEAD (dart formatof HEAD alone is 2711 lines / ~169-line reflow); this PR does not reflow it.Product invariants affected
none
How it was verified
Not exercised as a live device recording session. Production construction is unchanged:
main.dartstill callsCaptureProvider(...)directly, and no-argument defaults remain.Commands run:
python3 scripts/check_spine_contracts.py— 47 pending markers; 17 protected files. Diff ofapp/test/spine/c1_composition_test.dartis only the twopendingContract('C1');lines removed from the FLUTTER_TEST-refuse and construct-with-every-seam tests. ABA codec and keepalive markers stay (those needCaptureSessionOwnergeneration / join;runContractswallows their failures while pending).python3 scripts/check_mobile_boundaries.py --config app/contracts/capture/boundary-baseline.json— 63 changed paths; 0 errors.TZ=UTC flutter test test/spine/c1_composition_test.dart test/services/capture/capture_composition_test.dart— 7 passed.TZ=UTC bash app/test.sh— exit 0 (1020+ tests).make mobile-verify ARGS="fast --paths app/lib/services/capture/capture_controller.dart app/lib/providers/capture_provider.dart"— executed 20, passed 20, failed 0.capture_provider.dartis outside the capture-wal path rule so the selector used the full-suite fallback; j5_capture_interruption_reconnect ran and passed.OMI_PR_BODY_FILE=.local/pr-body-c1-composition.md make preflight— 21 checks passed in 274.56s.capture_controller.darttouched line ranges (working-tree, no format reflow):_bleListeners/_openSocketOverridefieldscustomSttBufferingDurationdelegates to extracted helperspreferences/bleListeners/openSocketpreferences(default stillSharedPreferencesUtil())BleBridge.instanceopenConversationSocketuses_openSocketOverrideelseServiceManager(production still passesgeolocation)BleBridge.instanceCaptureConnectivityBoundary.production()remains the no-argument connectivity default (line 234)._startAndroidLocationForegroundTaskstays.Tests
Spine
app/test/spine/c1_composition_test.dart(markers retired, not re-edited): production composer refuses underFLUTTER_TESTbefore resolving defaults;composeCaptureProviderconstructs with every seam and no initialized globals.Builder regressions in
app/test/services/capture/capture_composition_test.dart:composeCaptureProvidersource-routes wal/mic/auth/clock/scheduling/connectivity/prefs/ble/socket, andCaptureProviderhas matchingsuper.params (the helper existed in cut 1 and was not forwarded)CaptureConnectivityBoundary(isConnected: false)is what the constructed provider uses — notConnectivityServicecomposeProductionCaptureProviderthrowsUnsupportedErrorcontainingFLUTTER_TEST, and its source contains neitherConnectivityService,.production(), norhttps://api.omi.me/v1/healthNot migrated: the ~90 existing test constructions that still use no-argument defaults.
Failure class (fixes)
No
fix:commits. This is aharden:composition cut with production defaults kept.Failure-Class: none
Part of the mobile self-driving program (App core lane, C1 step 2). Stacked on #14361, which is stacked on #14327. Implemented by Cursor Grok 4.6 against tests written by Codex. Coordinator: owner/device-lookup are on the aggregate but not forwarded yet; ABA and keepalive spine tests stay pending until generation/join land.
Part of the mobile self-driving program (App core lane, second C1 PR). Stacked on #14361. Implemented by Cursor
cursor-grok-4.6-highagainst tests written by Codexgpt-6-astra. Coordinator verification on the head: the only edits to protected spine tests are two pending-marker removals (spine check passes, 47 pending); the composition spine test and the 5 builder tests pass (7 total). I read thecapture_controller.dartdiff: production defaults are all retained (preferences ?? SharedPreferencesUtil(), theBleBridge.instancelistener fallback, theServiceManagersocket fallback), so behavior is unchanged when nothing is injected; the file stays at 2,710 lines. Two explanatory comments were dropped to hold the line count (why a persisted device mute is restored; why the custom-STT polling socket surfaces buffering state); they will be restored in the next step rather than lost.🤖 Generated with Claude Code