Repository navigation
feat(app): implement the typed analytics event registry (C7) - #14398
Git-on-my-level wants to merge 39 commits into
Conversation
Use the compiler-recommended explicit capture expression in three nested closures without changing their weak ownership. This allows the complete app and hosted summary tests to compile with the installed Swift 6.4 toolchain under warnings-as-errors. Verified: full macOS app build and 84 focused Swift tests passed. The release-pinned Xcode 26.6 is not installed on this host. Failure-Class: none
Stub the user data-protection policy lookup at its Redis boundary while exercising the real lifecycle decorators and Firestore writes. This closes an unintended external request exposed by the summary mutation verification. Verified: all 53 Typesense tests and the 418-test focused backend suite pass using the locked backend environment.
Select one primary document with explicit app provenance; preserve user edits, source evidence and cached sections; render native Markdown blocks without duplicated projections. Align mobile, web, exports and daily recap eligibility using a shared 17-case contract. Verification: 84 focused Swift tests and complete app compilation; 418 backend tests across 18 affected files; 36 Flutter tests; web TypeScript, 498 Vitest tests and 5 Bun smoke tests. Hosted views cover actual source activation, selection/resize and SQLite persistence. Release-pinned Xcode and installed-device acceptance are not claimed. Failure-Class: FC-split-mutation-authority
Match the server mutation by clearing generated sections during a first-party summary edit and restoring them on failure. Capture the edited objects so a failed request cannot roll back a refreshed conversation or changed content. Verified: 41 focused Flutter parity, provider and widget tests passed, including successful edits, preserved evidence on rollback, endpoint arguments, and refresh/newer-content races. Failure-Class: FC-split-mutation-authority
Keep the free-tier entrypoint and client-processing acceptance fixtures compatible with the new structured-reference validator while preserving their isolated LLM boundary. Verified: both affected backend files pass through backend/test.sh after reproducing their missing-import failure. Production validator behavior is covered by the dedicated source-reference tests.
Transcript segment identities are declared as Iterable[str]; retain empty-ID filtering without an unnecessary isinstance assertion rejected by the typed boundary. Verified: backend typecheck passes with zero errors, and all 669 tests in the 23-file focused suite pass. Failure-Class: none
The isolated conversation-processing fixture now loads the pure summary-selection module required by the production import, while preserving its dependency sandbox. Verified: action-item date validation suite passes all 26 tests. Failure-Class: none
…-contract # Conflicts: # desktop/macos/Desktop/Sources/AppState/AppState+Transcription.swift
Remove startup Firebase/BYOK copies, refresh_token IPC, and the bridge refresh loop. Resolve owner-fenced request headers lazily and retry one managed HTTP 401 before exposing response bytes. Carry typed authentication through the runtime, Sign in recovery, journal status, and telemetry. Keep the full Swift HTTP relay as an explicit follow-up; per-request credentials still cross IPC. Failure-Class: new New class: FC-expiring-authority-copied-into-worker Verification: agent npm build/test (885 tests); extension npm test (143 tests) and direct tsc; Swift build --build-tests and focused credential/chat tests (170 tests), installed Swift 6.4. The pinned Xcode 26.6 is unavailable. Hermetic expiry/offline/recovery, owner fencing, bare 401, BYOK, SSE/cancel, Unix-pipe, and synthetic shell/ps environment probes. No app launched or production request made. Full preflight and harness evidence is in the PR.
…nts (#14311) Meeting summaries repeated their sections in macOS and mobile because `overview` already contained the complete section projection. This PR renders one primary document across macOS, mobile, web, copy/share, and daily recap generation. Existing edited overviews remain authoritative; identical generated projections use sections once so source links remain available. - Adds a shared 17-case selection contract covering whitespace, legacy and edited notes, sections-only records, repeated/blank headings, and missing/duplicate app IDs. Display and export share the same policy; secondary cards exclude the selected result by index. - Makes summary edits transactional, removes obsolete sections, and advances the server revision. Ambiguous app-result edits return 409; mobile also rejects stale or unattributed edit targets. Mobile clears old sections optimistically, restores their evidence on failure, and protects refreshed state from late rollback. - Validates generated section/action evidence against real transcript segment IDs, including legacy generation paths. Transcript edits atomically clear affected reference sets; macOS source links resolve only loaded transcript IDs and refresh when references change. - Persists sections and evidence through the actual SQLite migration/cache path. A stale response cannot restore intentionally cleared sections. - Renders settled macOS summaries and app results with heading hierarchy, nested/ordered lists, and hanging indents using the existing selectable AppKit view. Streaming chat retains its parser and separate cache key. Unknown app output keeps explicit app attribution. Verification before PR creation: - macOS: complete app/test-bundle compilation and **84 focused Swift tests passed**, including hosted production composition, a real mouse event activating the source Button, secondary app cards, text selection/resize, and actual SQLite round trips. Command: `xcrun swift test --package-path desktop/macos/Desktop --skip-update --filter 'ConversationSummary|ConversationDetailRequest|MeetingSummaryPersistence|TranscriptionSessionRecord|SummaryDocumentProse|ChatProseRenderCache|ChatSelectableProse|OmiMarkdown'`, with isolated `CFFIXED_USER_HOME` and `TMPDIR`. - Backend: **669 tests across 23 affected files passed** through `BACKEND_UNIT_TEST_FILE_LIST=<file-list> BACKEND_PYTEST_WORKERS=1 bash backend/test.sh`, using Python 3.11.15 and the locked environment. Includes transaction/read-before-write, source validation, exports, daily generation, lifecycle, and Typesense wiring checks. - Mobile: **41 focused Flutter tests passed** through `app/test.sh` for parity, provider editing, regular/sliver summaries, attribution, and bottom-bar behavior. - Web: `bun run check` passed TypeScript, **498 tests in 89 files**, and **5 Bun smoke tests**. - Independent review was completed and its confirmed findings were fixed. **All 45 repository manifest checks and the complete bounded pre-push gate passed on `64b4c79e92` before PR creation**, including backend typing (0 errors), affected backend tests, OpenAPI/Flutter generated-code checks, and the macOS debug build. The macOS tests used the installed Swift 6.4 toolchain. A separate three-line prerequisite commit applies explicit weak-capture syntax required by that compiler, preserving weak ownership. Release-pinned Xcode 26.6 is unavailable on this host. These checks exercised synthetic hosted views and isolated storage; installed-app acceptance, a physical mobile device, production services, and release packaging were not exercised. The updated conversation-detail e2e flow was statically validated, not run against an installed app. <details> <summary>Backend file list and mobile command</summary> Backend file-list entries are relative to `backend/`: ```text tests/unit/test_summary_selection.py tests/unit/test_conversation_summary_mutation.py tests/unit/test_conversation_notes_v2.py tests/unit/test_conversation_notes_v2_beta_rollout.py tests/unit/test_conversation_structure_provider_timeout.py tests/unit/test_conversation_structure_timezone.py tests/unit/test_process_conversation_usage_context.py tests/unit/test_process_conversation_free_tier_branch.py tests/unit/test_process_conversation_duplicate_capture.py tests/unit/test_share_email.py tests/unit/test_share_email_routes.py tests/unit/test_conversations_to_string.py tests/unit/test_transcript_segment.py tests/unit/test_conversation_revision_contract.py tests/unit/test_conversation_typesense_index.py tests/unit/test_client_processing_finalize.py tests/unit/test_legacy_summary_source_refs.py tests/unit/test_daily_summary_generation.py tests/unit/test_free_tier_entrypoint_matrix.py tests/unit/test_client_processing_acceptance.py tests/unit/test_compact_speaker_transcript.py tests/unit/test_wake_word.py tests/unit/test_summary_lab.py ``` From `app/`: ```sh bash test.sh test/parity/conversation_summary_selection_test.dart test/providers/conversation_detail_summary_selection_test.dart test/widgets/app_result_summary_source_label_test.dart test/widgets/conversation_summary_sections_test.dart test/widgets/conversation_bottom_bar_summary_test.dart ``` </details> The revised decoder expectations follow the existing backend `get_conversation_notes` projection, which writes `render_sections_markdown(structured.sections)` into overview. The shared fixture and contract record that actual wire behavior. This is a compatibility repair; a versioned document/variant migration remains a separate architecture proposal. Product invariants: INV-AUTH-1, INV-CHAT-1, INV-MEM-4, INV-TASK-2. Auth and chat mutation ownership, memory promotion, and task capture authority remain with their existing owners; this change controls summary representation and reference invalidation. Failure-Class: FC-split-mutation-authority The canonical selection policy and shared parity vectors prevent competing summary projections from being composed independently. Behavioral composition, persistence, and mutation tests guard the duplicate-summary incident; no additional static checker is introduced. Line-Count-Exception: backend/database/conversations.py | 2375 -> 2442 | Keep atomic summary edits and transcript evidence invalidation at the existing Firestore mutation owner; extract the pure selection policy separately. Line-Count-Exception: backend/routers/conversations.py | 2227 -> 2231 | Map ambiguous app-result mutation to an explicit 409 at the existing endpoint. Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3167 -> 3190 | Supply actual segment identities and validate references at the existing final structured-output boundary. Line-Count-Exception: backend/utils/llm/conversation_processing.py | 1873 -> 1903 | Share reference validation across notes and legacy generation paths while moving Markdown projection into the standalone policy module. Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Components/OmiMarkdown.swift | 1716 -> 1728 | Thread document parsing mode through existing Markdown composition; implement block parsing in a separate small file. Line-Count-Exception: desktop/macos/Desktop/Sources/Rewind/Core/RewindDatabase.swift | 3636 -> 3646 | Register the additive sections cache migration in the existing migration owner. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/14311?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. -->
## Problem and change Beta v0.12.356 retained a startup Firebase token inside pi-mono for about 15 hours. One offline refresh ended the 45-minute bridge timer; the app recovered its own credentials but the worker kept sending the old token. Its bare `HTTP 401 status code (no body)` became an unclassified runtime error and invited futile resends. This PR takes the authorized request-scoped stepping stone. Every pi-mono HTTP attempt obtains current Authorization and usable BYOK headers from Swift/AuthService through the existing Unix pipe. The kernel checks the live run capability before dispatch and after reply; Swift fences the owner session and process generation, including a final same-owner session-generation check immediately before IPC. No token is retained in adapter configuration or the subprocess environment. The 45-minute timer, refresh_token IPC, and token-driven subprocess restart are removed. All four harnesses share the scrubbed Swift launch environment; external harnesses retain their own provider authentication. The installed pi SDK catches and ignores before_provider_headers exceptions. Credential acquisition therefore runs at fetch, where it can prevent network I/O on failure; the existing header hook supplies correlation/context. Managed 401s force-refresh and replay once before response bytes are exposed. Numeric status is carried over pi JSONL as a typed failure; the existing Swift refresh/retry safety net recognizes managed authentication only. BYOK/third-party 401s do not refresh or invalidate the Omi session. Auth failures show “Your session expired” with Sign in; typed journal metadata renders “Session expired” after reload. Telemetry carries the authentication code. The existing relay is a tool/control JSONL transport, not an HTTP streaming server. A Swift SSE relay with cancellation, backpressure, header fidelity, and all-harness lifecycle coverage is a larger independent boundary. This PR removes expiry correctness from process lifetime without adding a second live credential path or a migration flag. Credentials still cross IPC and exist in per-request Node memory: this is **not full subprocess credential isolation**. ## Product invariants affected - INV-AGENT-*: capability/owner admission remains kernel-owned; the new request exchange revalidates authority and the startup handshake rejects old runtimes missing request_scoped_model_credentials. - INV-AUTH-1: AuthService remains credential authority; transient network failure preserves the session, same-owner replacement revokes stale replies, and provider 401s do not masquerade as managed-session failure. - INV-CHAT-1: failure classification is metadata on the existing canonical journal row, with a behavioral write/decode/presentation round trip; no second transcript store. Failure-Class: new New class: FC-expiring-authority-copied-into-worker The new static tripwire supplements behavioral expiry/owner/HTTP tests. It is intentionally scoped to the managed desktop agent boundary, including its explicit request-scoped IPC exception, rather than a general secret scanner. It would have rejected the measured v0.12.356 startup credential copy and refresh-driven restart. The new failure class has no merged evidence PR yet; this incident and this PR are its initial evidence. Existing assumed-lifetime and owner-mutation classes do not describe a correctly issued credential copied into a long-lived worker. Obsolete source assertions requiring token propagation/timer startup were removed; the supplied Beta incident is the external evidence for replacing them with request-time behavioral tests. Line-Count-Exception: desktop/macos/Desktop/Sources/AuthService.swift | 2867 -> 2868 | Inject the credential clock at its existing owner for the expiry/offline regression Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Components/ChatBubble.swift | 2158 -> 2162 | Render the typed session-expired row status at the existing status switch Line-Count-Exception: desktop/macos/Desktop/Sources/Providers/ChatProvider.swift | 7362 -> 7365 | Carry the bounded failure code through the existing failure marker and journal projection ## Verification - `npm --prefix desktop/macos/agent run build` — passed TypeScript compilation and runtime packaging copy. - `npm --prefix desktop/macos/agent test` — 71 files / 885 tests passed, including numeric status propagation with exact `HTTP 401 status code (no body)` and capability-fenced reply routing. - `npm --prefix desktop/macos/pi-mono-extension test` — 143 tests passed, including injected-clock expiry/offline/recovery, one 401 replay, BYOK/third-party isolation, request-body replay, SSE body preservation, cancellation, and a real Unix-socket exchange. - `desktop/macos/agent/node_modules/.bin/tsc --noEmit --module nodenext --target es2022 --allowImportingTsExtensions --skipLibCheck desktop/macos/pi-mono-extension/index.ts` — passed; the extension has no separate package typecheck script. - `desktop/macos/scripts/run-swift-ci.sh --select-toolchain` — unavailable: current checkout pins Xcode 26.6 at /Applications/Xcode_26.6.app; that installation is absent. Installed toolchain is Apple Swift 6.4 / macOS 27 SDK. - `xcrun swift build --build-tests --package-path desktop/macos/Desktop` — passed on the installed toolchain (app plus all test targets). - `xcrun swift test --skip-build --package-path desktop/macos/Desktop --filter 'AgentModelCredentialsTests|AuthRefreshResilienceTests|AgentRuntimeProcessTests|ChatTurnFailureNoticeTests|ChatTurnFailurePresentationTests|ChatQueryTelemetryTests|ChatErrorStateTests|AgentRuntimeFailureTests'` — 170 tests passed, including the real AuthService expiry/offline/recovery seam and typed journal round trip. - `desktop/macos/scripts/agent-logic-harness.sh` — 803 selected Swift tests passed on retry. The first XCTest run stalled while exiting and was stopped by its own PIDs. The retry's Node stage hit one existing Unix-socket test timeout (884/885 passed) under default parallelism. - `VITEST_MAX_WORKERS=4 desktop/macos/scripts/agent-logic-harness.sh --node-only` — passed all 885 agent tests, generated-tool-surface verification, and all 143 extension tests. This uses the harness's supported concurrency setting without skipping tests or changing timeouts. - `OMI_PR_BODY_FILE="$PWD/.local/pr-body.md" make preflight` — all 36 selected local manifest checks passed (881.33 seconds), including both-lane credential tripwire registration, Swift formatting/lint, runtime conformance, and dead-code checks. - `scripts/pr-preflight --pr-body-file .local/pr-body.md --metadata-only` — all four metadata checks passed on the committed head; the new class uses the protocol's literal `Failure-Class: new` declaration. - `VITEST_MAX_WORKERS=4 OMI_PR_BODY_FILE="$PWD/.local/pr-body.md" git push -u origin fix/agent-credential-relay` — all 36 committed-head manifest checks and the complete outer pre-push gate passed, including desktop debug compile and full tool-surface tests. GitHub closed the idle SSH connection; push exited 141 and `git ls-remote` returned no branch. Only then, as authorized, `git push --no-verify -u origin fix/agent-credential-relay` transferred the unchanged verified commit. Remote SHA matches `8a13184bfbc62b627a91bc98b2d7b493be0e13c0`. - `python3 desktop/macos/scripts/check-agent-credentials.py` — passed tripwire and mutation self-tests; registered in both local and CI manifest lanes. - `python3 desktop/macos/scripts/check_desktop_test_quality.py` — passed. Security measurement: pi's installed `createLocalBashOperations` calls `getShellEnv`, which spreads process.env. A synthetic local child probe using that actual helper confirmed OMI_AUTH_TOKEN, OMI_API_KEY, and OMI_BYOK_OPENAI are inherited and visible via `/bin/ps eww -p <synthetic-child-pid>` before scrubbing, and absent afterward. Only inert values were used; no real process environment or credentials were printed. Existing user-MCP stdio servers already use an allowlist. Adapter spawn tests also exercise scrubbing of injected ambient keys. No app was launched, installed, or driven, and Omi Beta was untouched. No production host was contacted. Hermetic tests/builds are not live app acceptance. No backend code or .github workflow was modified. ## Follow-ups 1. Replace model_headers IPC with a Swift-owned loopback HTTP relay. Keep both Firebase and BYOK values entirely in Swift; test byte-identical SSE/header forwarding, backpressure, cancellation, owner revocation, per-launch capability authentication, and one pre-stream 401 replay. Remove the request-credential IPC when that relay lands. 2. Add bounded in-process recovery for repeated non-auth failures of the whole Node daemon. Current kernel code already recycles failed pi workers and can retry a safe turn; it does not implement a repeated-failure policy for the entire daemon. Verify journal/session continuity and exclusion of auth/quota errors. 3. Give managed backend 401s machine-readable token_expired/token_revoked provenance, distinct from BYOK upstream authentication. Until then a 401 with an LLM BYOK header is conservatively provider_setup_needed and never signs the user out. 4. Run the named com.omi.omi-fault app flow and pinned-toolchain CI before treating this as shipped-app acceptance. This task explicitly prohibits launching the app. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/14368?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. -->
Auto-generated: consolidates unreleased changelog fragments into v0.12.360 and regenerates CHANGELOG.json.
…els and drop leftover ARB keys (#14314) * feat(app): add a one-command localization tool Agents were editing 49 ARB files by hand with jq; this writes every locale, validates ICU placeholders, regenerates, and formats in one step so a new string cannot land half-translated. * feat(app): localize the memory baseline-status error The memory edit sheet showed a hardcoded English snackbar; adding the string through the new l10n tool is the proof that one command writes every locale and regenerates cleanly. * fix(app): honor l10n.yaml use-escaping in the ICU parser Apostrophes are ICU quotes only when Flutter's use-escaping is true. This repo leaves it unset (false), so What's New in {version} still declares {version}. The old parser always quoted, so check flagged every locale that used the placeholder and add refused a matching translation. Failure-Class: none Co-authored-by: Cursor <[email protected]> * fix(app): make l10n check freshness compare in-place Generating into a temp output-dir rewrites the import comment in app_localizations.dart and formats at 80 columns, so check could never exit 0 on a clean tree. Re-run gen-l10n in the real output-dir, compare, then restore. Failure-Class: none Co-authored-by: Cursor <[email protected]> * fix(app): fill missing memory-use labels and drop leftover ARB keys memoryAllowUse and memoryDontUse were English-only. Extra keys English no longer has (wantDifferentName, leftover model/onboarding strings) were unreferenced in app/lib and are removed. Italian selectedCount had a fake {s} placeholder that leaked into the generated signature. Failure-Class: none Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]>
…the mobile harness and pre-push gates (#14349) * fix(app): refuse remote APIs and non-dev pairings in hermetic tests app/test.sh skipped writing .dev.env when generated files already existed, so a leftover API_BASE_URL or mobile_beta/prod pairing could silently survive. Fail closed at the checker, test.sh, and doctor without rewriting the file. Failure-Class: new Co-authored-by: Cursor <[email protected]> * feat(dev-harness): add lane-bootstrap that skips the full backend lock A linked worktree can run cheap pre-push gates and app/test.sh after one idempotent command: pinned Flutter, shared PUB_CACHE, Python 3.11 via uv, and yaml+dotenv only. An incomplete .venv directory is no longer treated as ready. Failure-Class: none Co-authored-by: Cursor <[email protected]> * fix(dev-harness): keep fixture venvs passing the cheap-gate import probe Manifest-contract stubs only accepted `import yaml`. The resolver now probes `import dotenv, yaml` so an empty .venv is not treated as ready, and those stubs were skipped. Failure-Class: none Co-authored-by: Cursor <[email protected]> * feat(dev-harness): make setup-backend the fast wheel install, not pylock sync uv pip sync of pylock.macos.toml lists hashed sdist+wheel for av/llvmlite/scipy/pyarrow and stalled ~20 minutes; uv pip install -r requirements.txt takes index wheels (69s here) and covers uvicorn/pyright/yaml/dotenv/google.auth for session start and the pre-push typecheck. Lock-faithful sync stays in sync-python-deps.sh. Co-authored-by: Cursor <[email protected]> * fix(dev-harness): keep setup-backend as the lock sync; add opt-in lane-backend make setup-backend is the contributor lock-synced entrypoint; pointing it at unlocked requirements.txt broke scripts/test-make-setup.sh. The fast wheel install is make lane-backend. generate-app-env runs build_runner without the flags that deleted tracked manifest.g.dart. Co-authored-by: Cursor <[email protected]> * docs(backend): keep AGENTS.md under the lean budget while naming lane-backend Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]>
…invocation is owned by its window (#14393) The completed-day reader returned `incomplete` whenever a day exceeded max_conversations or max_summary_characters, so the scheduler reported source_incomplete, never advanced the cursor, and gave no reason. One over-bound day stopped that user's memory sweep permanently. Measured on the isolated JIT QA plane: the sweep processed 2026-09-10 and 09-11 then stopped for good at 09-12 before any model claim. Making that safe required owning the at-most-once identity properly, because a bounded selection is a mutable input: - Eligibility is observed across the whole window via a bounded projection scan before any content is read, so a still-processing row beyond the selection page keeps the day incomplete instead of being skipped while the cursor advances. Bounds are driven by eligible rows, so a day of mostly-discarded rows cannot stall an account. - A 15-minute admission lease keyed on (uid, window, generations) alone is committed before any identity is computed, and the identity is then durably bound. Mutating rows afterwards cannot mint a second invocation. Onboarding gets the same treatment, with its transcript digest supplied as input_digest. - Locked rows never reach the provider, and are re-checked immediately before dispatch. - Permanent fence states carry distinct allowlisted reasons instead of all collapsing to invocation_indeterminate. Rollout: an old-code worker derives its id from its own snapshot, so no point-in-time check can block it. The admission lease protects every future version, not this transition. Production has never run this job (verified three ways), so its first deploy is atomic; the dev hourly scheduler must be paused and drained before deploying. Paid-unlock replay was written and removed: publishing unlock in 100-row chunks was non-atomic and could dispatch a day twice under different generations, and it coupled the payment path to sweep metadata. Its design is preserved in backend/docs/doc/developer/daily-sweep-admission-and-unlock.md for its own PR. Co-Authored-By: Claude Opus 5 <[email protected]>
* fix(app): cancel HomePage announcement timer on dispose A 2s Future.delayed survived unmount and failed flutter_test invariants; hold a Timer on the State and cancel it in dispose. Co-authored-by: Cursor <[email protected]> * fix(app): declare firebase_core_platform_interface as a dev dependency The HomePage timer widget test added in this PR imports firebase_core_platform_interface/test.dart for setupFirebaseCoreMocks. That package is a transitive dependency of the already-declared firebase_core and does not re-export the test helper, so the analyzer ratchet counted a new depend_on_referenced_packages occurrence (5 found, baseline 4) and Dart Analyze & Tests failed. Declaring it changes no resolved version and adds no package to the tree: pubspec.lock moves the same 5.4.2 from "transitive" to "direct dev". This follows the existing convention in dev_dependencies, where async and stream_channel are declared for the same reason. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Four exemplar events now reach the existing queue, including the pre-init flush path, without copying caller-mutated property bags. Co-authored-by: Cursor <[email protected]>
…sweep code requires (#14402) #14393 raised QA_SWEEP_MAX_MODEL_CANDIDATES to 3 in both backend/utils/memory/daily_memory_sweep.py and backend/scripts/jit_qa_sweep_operator.py, but jit_qa_manual_operator.yml still hardcoded 1 in the job env block and in the --update-env-vars string. validate_qa_sweep_environment compares the running job's env against the code constant, so every sweep-verify dispatch failed before doing any work: ValueError: QA sweep requires MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES='3' Observed on execution daily-memory-sweep-qa-job-8kqzc against the QA plane at 0694d6b. The fail-closed validator worked as designed; this moves the two stale literals. check_workflow_contracts.py passed on #14393, so nothing pins this workflow's sweep env to the code constants. Four values are duplicated between the validator's required dict and the workflow; deriving them would close the class. Co-Authored-By: Claude Opus 5 <[email protected]>
…nt (#14377) On a basic (free) account, LiveNotes called the managed AI-notes endpoint on every transcript segment and logged an error each time, producing a request per sentence for a capability the plan does not include and no retry can satisfy. It now consults the existing entitlement seam, SubscriptionEntitlement.decision(plan:features:isByokActive:), where BYOK and unknown plans fail open and only .basic is .planGated, and latches a typed server plan_gated denial so the loop stops. The latch carries a bounded 10-minute lifetime for a specific reason: a cached unknown plan fails open to allow, so when such a user upgrades the decision never changes and nothing else would ever clear the latch. One probe per lifetime is the cost of noticing that upgrade without an app restart. Verified: 22 LiveNotes tests pass; pre-push gates 44 PASS / 0 FAIL. Known follow-up: the latch has no account identity, so switching from an unknown-plan account to a paid one can briefly suppress notes until the lifetime expires. LiveNotes re-evaluates per transcript segment, so it self-heals within the window. Converging this onto the shared owner-aware ManagedPlanGateLatch from the realtime-hub fix is tracked separately. Co-Authored-By: Claude Opus 5 <[email protected]>
* docs: inventory the eight remaining B1 surfaces for B2 Co-authored-by: Cursor <[email protected]> * docs: make the B2 inventory's file references repo-root-relative The agent-doc-references gate rejected app-relative pointers such as pages/home/page.dart, correctly: an agent reading the doc cannot resolve them. It also caught that the memories row widget is at app/lib/pages/memories/widgets/memory_item.dart, not widgets/. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Map today's Recording/Device/Memory/Upload emits to the four F1 intents so the design turn can reuse join keys instead of inventing toggles. Co-authored-by: Cursor <[email protected]>
Offsets whose role defaults sit 2700 apart derive the same TCP port, so exclusive-locking the offset identifier lets two sessions share 10080. Claim the actual port numbers, including cross-role intersections, and assert that property across the whole offset space. Failure-Class: new Co-authored-by: Cursor <[email protected]>
…14388) * fix(app): stop sending raw wearable identity on device analytics Device Connected and Device Paired were spreading BtDevice.toJson() onto PostHog beside the hashed fields. Name the payload explicitly. Failure-Class: new Co-authored-by: Cursor <[email protected]> * fix(app): define FC-analytics-payload-copies-model-dump Register the analytics model-dump class for the Device Connected/Paired spread. The defect is copying a serialized model onto an event payload. Failure-Class: new Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]>
…14392) Memory Created was reading getTranscript() on the analytics path to emit length, word, and speaker counts. Those are not a product numerator. Keep memory_id and memory_result. Failure-Class: none Co-authored-by: Cursor <[email protected]>
…ys (#14396) * test(app): hermetic semantics-tree baseline before B2 identifier work B1 requires real VoiceOver/TalkBack improvement, not just keys. Dump per-surface unnamed controls now so B2 cannot bake omi.* grammar into spoken labels — Flutter already keeps identifier off the announcement. Co-authored-by: Cursor <[email protected]> * test(app): clear the analyzer ratchet in the semantics harness Dart Analyze & Tests failed on three new occurrences introduced by the harness: prefer_const_constructors (1 vs baseline 0), unnecessary_brace_in_string_interps (15 vs 13) and unnecessary_import (13 vs 11). Fixed rather than baselined: dropped the redundant braces in two interpolations, removed the two imports that schema.dart already provides, and made the GetMemoriesResult fixture a const declaration. The one remaining hint is the pre-existing pipelineOwner deprecation, which is inside its baseline. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Ruling 5 sat open because "read-only" is not a scope. Name the narrowest ASC, Play, and Crashlytics BigQuery grants, and recommend deferring the two store APIs until C7 lands. Co-authored-by: Cursor <[email protected]>
… engine (#14400) sdkmanager --list_installed exiting nonzero was reported as engine present. A missing emulator binary, a successful empty listing, and a failed look are three different findings; cmdline-tools 23 slash paths still prove an image is installed. Failure-Class: none Co-authored-by: Cursor <[email protected]>
…tory globs (#14401) prepare matched scope_hints with fnmatch, so a prefix like app/lib/pages/home/ never hit files under that directory. Eight committed definitions already use that form. Co-authored-by: Cursor <[email protected]>
Auto-generated: consolidates unreleased changelog fragments into v0.12.361 and regenerates CHANGELOG.json.
…e port, dark (#14395) The free tier replaces cloud conversation summarization with an on-device summary. That pipeline (S10/S11) already shipped dark and complete, but its only registered engine was an OpenAI-compatible loopback client defaulting to 127.0.0.1:11434 (Ollama), which ordinary users do not run — so a free-tier conversation never got a summary at all. LocalInferenceEngineID.afm already existed with the comment "S12 lands the adapter"; this is that. AFMLocalInferenceAdapter conforms to LocalInferenceService; AFMJSONSchemaBridge walks the port's JSON Schema into DynamicGenerationSchema/GenerationSchema, since this SDK has no jsonSchema: initializer. Unsupported keywords throw capabilityUnavailable rather than being dropped, and nesting is depth-capped. Availability is fail-closed: anything other than .available becomes engineUnavailable(.afm) and the runtime degrades to the deterministic minimum. Dark: the default engine is still .localServer and OMI_FORCE_LOCAL_INFERENCE_ENGINE=afm is the only way to select AFM. Context window is read at runtime from SystemLanguageModel.contextSize (8192 on macOS 27), not hardcoded; an earlier revision pinned 4096, which would have doubled the summarizer's map passes. Out-of-range values fall back to a labelled constant, because a zero window yields a nominal 64-token budget and Int.min would trap in the chunker, bypassing the fail-closed ladder. Known limitation: LanguageModelError is @available(macOS 27.0) and cannot be named under the pinned Xcode 26.6 toolchain, so a 26.6-built binary on macOS 27 classifies a refusal as retryable. This is documented rather than hidden behind a compiler gate; check-desktop-compiler-gates.py reports none found. Verified live against the real on-device model: runtime=local model=afm, with a real overview, 2 sections and 1 action item — not the deterministic minimum. Note: this engine alone does not deliver a free-tier summary. The desktop client drops wire.clientProcessing in ServerConversation.init and never renders the projection it uploads. That is pre-existing and tracked separately. Co-Authored-By: Claude Opus 5 <[email protected]>
…4378) * ci(app): upload the debug APK and run Android JVM tests in parallel The APK build stays android-arm64 on every event, matching main since c8f3506. Extra ABIs still OOM ubuntu-latest. Co-authored-by: Cursor <[email protected]> * docs: document the APK artifact and parallel Android jobs CI wiring lives in MOBILE_VERIFY.md so app/AGENTS.md stays inside its lean budget. Co-authored-by: Cursor <[email protected]> * fix(ci): drop Gradle configuration cache that broke AGP 8.11.1 Warn mode does not downgrade a cache-state serialization failure of builtInKotlinServices. Generate the gitignored wrapper with --config-only so the parallel JVM job can run without an APK compile. Failure-Class: none Co-authored-by: Cursor <[email protected]> * ci(app): report debug APK zip size without gating compile smoke --analyze-size needs a second release compile (~10-15 min). The zip breakdown of the APK this job already builds is a coarse, fork-safe signal in under a minute, never a gate. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]>
* fix(app): name conversation-detail icon-only AppBar and tab controls Back, star, share, search, and overflow currently announce nothing; keep the custom circle chrome and give each a localized or platform tooltip. Page-covering search-dismiss GestureDetectors leave the semantics tree. Failure-Class: none Co-authored-by: Cursor <[email protected]> * fix(app): name remaining unnamed activate-controls and ratchet the dump Memories graph/management, conversations calendar, settings search, and devices back now have spoken names. The tasks no-op GestureDetector is excluded from semantics rather than named. dumpSemanticsTree asserts unnamed-controls stay at zero on every pumped surface. Failure-Class: none Co-authored-by: Cursor <[email protected]> * test(app): clear the analyzer ratchet in the semantics harness Same three new occurrences the harness introduced on the baseline PR: prefer_const_constructors, unnecessary_brace_in_string_interps and unnecessary_import. Fixed rather than baselined. This branch carries its own extended copy of the harness, so the fix is applied here directly instead of merged. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
* fix(app): cancel HomePage announcement timer on dispose A 2s Future.delayed survived unmount and failed flutter_test invariants; hold a Timer on the State and cancel it in dispose. Co-authored-by: Cursor <[email protected]> * fix(app): declare firebase_core_platform_interface as a dev dependency The HomePage timer widget test added in this PR imports firebase_core_platform_interface/test.dart for setupFirebaseCoreMocks. That package is a transitive dependency of the already-declared firebase_core and does not re-export the test helper, so the analyzer ratchet counted a new depend_on_referenced_packages occurrence (5 found, baseline 4) and Dart Analyze & Tests failed. Declaring it changes no resolved version and adds no package to the tree: pubspec.lock moves the same 5.4.2 from "transitive" to "direct dev". This follows the existing convention in dev_dependencies, where async and stream_channel are declared for the same reason. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> * fix(app): cancel HomePage tab prewarm timers on dispose The 350ms-staggered IndexedStack prewarm Timers survived unmount the same way the announcement delay did. Hold them on the State and cancel in dispose. Failure-Class: FC-timer-after-dispose Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Auto-generated: consolidates unreleased changelog fragments into v0.12.362 and regenerates CHANGELOG.json.
…istory (#14408) * harden(dev-harness): define V1 live-session and V8 spine contracts Add strict Python/Dart pending contracts and introducing-commit protection. Reserve the live-session CLI, wire, ownership/attachment seams and failing builder acceptance tests. Add live attribution before freezing evidence v1. Verification: - bash scripts/dev-harness/run-tests.sh: 287 passed, 7 existing skips, 40 strict xfailed (24 pending V1 markers), Python 3.11.15. - make preflight: 16 checks passed, using supported PYTHON selection. - make mobile-verify fast --paths harness/session contract inputs with an absolute evidence directory: 20 executed, 20 passed, no failures/skips. - bash app/test.sh: 2014 passed, 5 skipped, one unchanged UTC+7 search_rank_grouping_test failure; affected baseline inputs match main. - Real module CLI refusals exit 2 without traceback; regression covered. - Dart SDK probe proves ext. prefix required; marker-removal formatter probe proves no incidental Dart diff. Runtime is intentionally unimplemented. App UI must repair current invalid VM extension names before live acceptance; unsupported journeys block. Simulator/emulator latency and detached-process acceptance remain V1 work. make setup installed hooks but full backend wheel sync stalled; isolated Python 3.11 harness dependencies ran the owner checks without any skip flag. Failure-Class: none * harden(dev-harness): scope the spine-contracts check to spine paths The check protects files under the spine roots and their registry, so it only needs to run when those change. A repo-wide trigger would run it, and its full-history requirement, on every unrelated contributor PR. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(dev-harness): clarify the live journey adapter boundary V1 must refuse live journey execution until a shared executable adapter exists; B1 addressability alone cannot attach Dart integration tests. Pure admission contracts remain valid with injected supported IDs. Verification: harness 287 passed, 7 skipped, 40 strict xfailed; make preflight passed 20 checks. * harden(dev-harness): pin reviewed spine revisions and align B0 capabilities Coordinator turn-4 review authorizes the V1 fixture correction. Exact before/after digests pin the revised oracle; immutable revision records do not permit builder assertion edits. Active tests reject missing/tampered records and prove the fake machine response. Verification: full harness 289 passed, 7 skipped, 40 strict xfailed; UTC app 2020 passed; spine 24 pending/7 protected; make preflight 16 passed. No live device acceptance claimed. * harden(dev-harness): preserve marker retirement across spine revisions Track retained marker occurrences rather than counts so retiring a second test cannot restore the first test's retired marker. The active regression covers this swap and legitimate continued retirement. Verification: full harness 290 passed, 7 skipped, 40 strict xfailed; spine 24 pending/7 protected; make preflight 16 passed. Dart sources unchanged after the earlier UTC app 2020-pass run. * harden(dev-harness): retain corrected spine oracles through squash merges A squash can introduce a corrected contract and its review records in the same commit. Absorb only the revision prefix ending at that introducing file's exact digest, preserving immutable records and later marker-only edits. Active temp-repo regression covers multiple corrections in one squash and rejects restoring old or altered assertions. Verification: harness 291 passed, 7 skipped, 40 strict xfailed; B1 make preflight 20 passed; final B1 journeys 20/20. Dart unchanged after UTC app 41 opt-in and 2051 ordinary passed. * test(dev-harness): revise live session acceptance after builder review * test(dev-harness): bind machine fixture to actual child identity * harden(dev-harness): separate oracle revisions from implementations Use the actual PR base and immutable exact scaffolding snapshots to reject mixed revision/implementation diffs. Exercise a real squash and child merge. Correct local_dev wire spelling from the simulator RPC and add adversarial V1 conformance oracles after reviewing the first broker. Verification: UTC app 2064 passed; full harness 303 passed, 7 skipped, 55 strict xfailed; spine 37 pending/9 protected; preflight 16 checks passed. Isolated reviewed-broker probes failed 9/9 as documented in the conformance report. No real app/device launch. * harden(dev-harness): retain pinned corrections after older parent merges * harden(dev-harness): pin oracle content across shared runners and merge orders Keep exact oracle digests and immutable revision records. Traverse full reachable history and match revision payloads by digest. Shared runner metadata requires direct fail-fast suite invocation instead of pinning shared file bytes. Both new regressions fail on the old checker. UTC app 2064 passed; final harness 306 passed, 7 skipped, 59 strict xfailed; spine 39 pending/10 protected; preflight 16 passed. No protected oracle bytes or legacy scope pins changed. * harden(dev-harness): distinguish authorized revisions from rejected history Rejected mixed proposals can be reverted without losing exact oracle protection. Scope is checked over the whole proposal; exact retired renderings require an immutable reviewed digest.\n\nVerified: full harness 309 passed, 7 skipped, 59 strict xfailed; Dart 2064 passed; spine check clean; make preflight 16 checks passed. Real chat tree 9f5548474f passes against its addressability contract target. * test(dev-harness): pin V1 formatted oracle renderings Preserve all eleven pending markers and the executable AST. Exact retired digests cover the builder's already-introduced unused-import cleanup without granting general edit permission. Full harness and preflight pass; AST evidence is recorded in .local/t11-v1-format-evidence.json. * docs(app): consolidate duplicate code generation guidance Retain every generator instruction beside the existing table and free 180 bytes for the queued contract pointers. Do not change the guide budget. make preflight passed all 16 checks. --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Bring in #14408 (AGENTS.md budget), #14388 (device identity), and #14392 (Memory Created). Spine conflicts take main; analytics_manager keeps both the C7 emit seam and main's newer payload contracts. Co-authored-by: Cursor <[email protected]>
|
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! |
What changed and why
TypedEvents.emitnow forwards the four C7 exemplar events throughAnalyticsManager().track, so the existing queue, flush, and missing-config no-op are the only sink. Call-site mutation of a property bag cannot put transcript or other user content onto the adapter payload.Product invariants affected
none
How it was verified
TZ=UTC bash app/test.sh— 2071 passed, including the five retired C7 contract tests (byte-identical names/properties, pre-init queue flush-once, missing-config no-op, emission-privacy initialized and queued).python3 scripts/check_spine_contracts.py— 39 pending markers, 13 protected files (four C7pendingContract('C7')source markers retired; remaining pending are V1).python3 scripts/check_event_registry.py --base origin/main—C7: 4 registered events, executable consumers, generated output current.dart format --line-length 120 --set-exit-if-changedon the three touched Dart files — 0 changed.OMI_PR_BODY_FILE=.local/pr-body-c7-registry.md make preflight— 19 checks passed in 75.76s (harness 320 passed, 7 skipped, 59 xfailed).Did not call
api.omi.me, PostHog, or any warehouse. Did not emit live. Did not touchanalytics_manager.dartevent-name literals (C8).EventCorrelation.mintstill throws (F1). Built against contract SHAd0111eddbb; a finish re-fetch showedorigin/task/msd-spine-a-event-registryat the same SHA.Tests
Core path:
c7_registry_test.dart(typed emit matches legacy names/properties through the existing queue; pre-init queue flushes once). Main error/no-op path: missing configuration queues nothing and drops nothing. Emission-privacy oracle:c7_emission_privacy_test.dartdrivesTypedEvents.emitwith a synthetic private transcript on both the initialized and pre-init queue paths and asserts the adapter payloads. Constructor/property-bag checks inc7_privacy_test.dartwere already live and stay unchanged.Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code