Skip to content

chore: remove dormant flag cleanup code - #19157

Merged
Git-on-my-level merged 1 commit into
mainfrom
chore/flag-cleanup-wave3
Sep 26, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
chore/flag-cleanup-wave3

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Remove unreachable macOS persistent-stream capture code, dormant mobile experiment infrastructure, and the disjoint workstream-pooling and reconciler portions of the macOS context-bucket candidate experiment. PR #18968 already disabled these paths in every checked-in bundle and environment. Production behavior is unchanged: macOS capture still uses the one-shot path; context buckets and the per-bucket director remain active; mobile has no registered experiments.

K1 is partial. ContextBucketsFeature.isWorkstreamPoolingEnabled is a constant false; this PR removes the pooled-delivery branch and the unused background reconciler actor and store entry points. Candidate delivery code remains behind the constant-false isProactiveCandidatesEnabled because PR #11804 changes the same ContextProactivityEngine hunks. The original GRDB migrations and candidate tables remain because the dormant candidate code and historical data still reference them. There is no new migration.

K2 is done. WindowCaptureStreamEngine had no source caller; ScreenCaptureService.captureActiveWindowCGImage uses the one-shot path. The engine and its engine-only tests are removed.

K4 is skipped: web/frontend/src/components/memories/chat/chat.tsx calls the server action that requests /v1/conversations/shared/chat. The backend currently returns 503 with the checked-in mode off; deleting the route would change that observable HTTP contract to 404. Its route, gateway policy, tests, and registry keys remain.

K5 is done. MobileExperiments.all was an empty immutable list and the master flag was read only by that framework. The framework, provisioning script, docs, and on-state tests are removed. Existing experiment_context_verified event metadata and PostHog settings are retained. No l10n key was removed.

K6 is skipped: the required unmodified test_neo_desktop_grandfather.py and test_trial_metadata.py deliberately enable TRIAL_PAYWALL_ENABLED and assert the on-state grandfathering and metadata path. Removing that path would violate the explicit test constraint. The subscription.py code also stays disjoint from PR #15513. Desktop paywall state remains in place because it clears stale persisted state and supports other quota admission; ConversationUploader.swift has only a comment about this trial.

The diff deletes 1,704 lines under app/ and 1,545 under desktop/macos/ (3,249 total in those areas). The registry source config/feature-flags.yaml retires the removed isWorkstreamPoolingEnabled and mobile-experiments-enabled keys; the rendered registry is updated. The only code replacements preserve existing off-state values: an empty volatile context suffix after removing pooling, the selected recent-context list without an always-empty pooled-ID filter, and a direct telemetry emit after removing always-empty experiment attribution. Historical migrations are unchanged.

Product invariants affected

  • INV-DATA-1 — app/lib/main.dart only loses the dormant experiment refresh call; production data-plane routing is unchanged.

How it was verified

  • python3 scripts/check_feature_flag_registry.py — passed.
  • python3 scripts/test_check_feature_flag_registry.py — passed.
  • xcrun swift build -c debug --build-tests --package-path Desktop — passed.
  • bash app/test.sh test/unit/analytics_manager_fail_open_test.dart test/unit/physical_qualification_test.dart — passed, 31 affected tests.
  • bash app/scripts/analyze_ratchet.sh — passed.
  • python3 app/scripts/l10n.py check — passed (49 locales, 3389 keys).
  • xcrun swift test -c debug --package-path Desktop --filter 'ContextWorkstreamPoolingTests|ContextProactivityEngineTests|ContextWorkstreamReconcilerTests' — passed (55 tests).
  • make preflight — passed (40 checks). OMI_PR_BODY_FILE=/tmp/omi-wave3-pr.md scripts/pr-preflight --lane local --pr-body-file /tmp/omi-wave3-pr.md — passed (40 checks) before first push.
  • BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-wave3-backend-tests.txt bash backend/test.sh was attempted for the two required K6 tests; the worktree has no backend pytest environment (python3.14: No module named pytest). No backend production Python file changed.

Tests

Removed tests for deleted stream and mobile experiment code, and removed tests of deleted macOS pooling/reconciler methods. The retained context-bucket and analytics tests compile and run as listed above. No on-state tests were removed from the skipped K4 or K6 items.

Review in cubic

@Git-on-my-level
Git-on-my-level merged commit 17cb27d into main Sep 26, 2026
66 checks passed
@Git-on-my-level
Git-on-my-level deleted the chore/flag-cleanup-wave3 branch September 26, 2026 10:33
summersmile1984 added a commit to summersmile1984/omi that referenced this pull request Sep 27, 2026
… re-record eleven owners

Review of bf7f4f6..8d1f8e2 per owner, then re-record. Where upstream's
change was semantic for the staged artifact the fork replacement moved with
it — re-recording alone would have shipped upstream identity behavior:

- AndroidManifest.xml (BasedHardware#14296, BasedHardware#5221): FOREGROUND_SERVICE_DATA_SYNC,
  foregroundServiceType shortService and the sync keep-alive service. No
  package, permission-identity or intent change; the new service name is
  already absolute, so native_android()'s namespace pass is untouched.
- main.dart (BasedHardware#15956, BasedHardware#15883, BasedHardware#19157): startup moved behind
  PhysicalQualification.startupStage. _init is replaced wholesale by the
  stage anyway; the two crash fallbacks became
  "if (!PhysicalQualification.enabled && Firebase.apps.isNotEmpty) {
  unawaited(FirebaseCrashlytics...catchError(...)) }" so their reviewed
  replacement regex moved to that shape and still yields a Firebase-free
  Logger.debug fallback.
- auth_service.dart (SCA-486/SCA-488): the token gateway gained a debug-only
  harness seam, so _tokenGateway is non-final — the stage strips the seam and
  keeps the field final; isSignedIn now routes through the gateway (the stage
  replaces its body, and NativeIdentity has no anonymous principal, so the
  reviewed semantics hold); a transient refresh failure now schedules
  _scheduleLocalDevRecovery, an Auth-emulator re-mint that cannot exist in a
  Firebase-free stage, so the kept refreshIdToken loses that call and keeps
  its reviewed retry-on-the-next-request behavior.
- change_name_widget.dart / name_widget.dart (BasedHardware#18436): both collapsed into
  _save()/_submit(). The replacements were re-anchored so the staged app
  still awaits updateGivenName before success or advancing, still ships the
  identity_name_edit / identity_name_error keys gateway_test taps, and still
  never writes given/family name itself — only the auth-provider projection
  does. The dialog error moved into the content column the rewrite left
  behind.
- settings: BasedHardware#18618/BasedHardware#18723 extracted the confirmed sign-out out of
  settings_drawer.dart into lib/pages/settings/sign_out.dart (now clearing
  through clearPreferencesForSignOut so device preferences survive). The
  completeNativeSignOut transaction owner moved with it — one owner instead
  of two — and sign_out.dart enters the registry as a reviewed input.
- wrapper.dart: onboarding was restructured and gained a "Use a Different
  Account" path; both firebase_auth anchors (the import and the three
  FirebaseAuth.instance.currentUser! calls) still hold, and the staged
  AuthService.signOut still revokes remotely before the secure credential is
  cleared.
- logger.dart / platform_manager.dart / platform_service.dart /
  crashlytics_manager.dart: PhysicalQualification gates. The stage still
  replaces the three reviewed members with the fork's false/no-op bodies and
  still overlays crashlytics_manager wholesale.
- New upstream file lib/env/physical_qualification.dart reads
  Env.firebaseAuthEmulatorHost/firebaseAuthEmulatorPort, which the fork's
  env overlay did not expose: both are added there as compile-time inputs
  (the lane is iOS dev/local_dev only and never enabled in this artifact).

Re-record: sha256 of the eleven stale paths plus the new sign_out.dart owner
written into app/fork/source-owners.json, base moved to the reviewed tree.

Verification: bash app/fork/test.sh exit 0 with the pinned Flutter 3.44.5 —
test_stage.py 5/5, both targets staged, 20/20 staged Dart tests per target
including gateway_test's failed-name-save contract, and flutter build bundle
for both targets. python3 scripts/fork/check-overlay-owners.py exit 0.

Failure-Class: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant