Skip to content

fix(tasks): promote conversation summary items through canonical candidates - #19815

Merged
aryanorastar merged 10 commits into
BasedHardware:mainfrom
aryanorastar:codex/summary-task-promotion
Oct 5, 2026
Merged

aryanorastar merged 10 commits into
BasedHardware:mainfrom
aryanorastar:codex/summary-task-promotion

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Fixes the conversation-summary Add to Tasks path covered by criterion 1 of #19566. It previously called the offline/manual task writer, left the matching extraction Candidate pending, omitted the conversation/provenance link, and tracked success only in view-local state. Reopening could offer Add again.

This is only the summary-task slice. It does not close #19566 or change floating-bar Execute, TaskPromotionService, mobile, hardware, or the already-merged expiry work (#19603).

Canonical flow

  1. POST /v1/candidates/from-conversation reads the authenticated owner's stored summary row. The client sends a conversation ID, raw row index and expected description—not an authoritative title, owner or due date. Preparation reuses the existing task-create semantic claim and does not write a task.
  2. The existing Candidate accept endpoint optionally accepts summary_item. It rereads the summary and workflow generation inside its existing transaction, validates the semantic match, then commits Candidate resolution, canonical task, conversation_id and summary target_task_id together.
  3. macOS publishes the accepted receipt to the conversation projection/cache. The saved target ID drives Open Task across remounts. It uses existing row controls, keeps loading/retry states visible, refreshes Suggested and Tasks after acceptance, and never falls back to manual creation.

Bodyless Candidate acceptance remains supported. Contract snapshots and generated Swift/TypeScript clients are regenerated. The new route is registered in the route-policy manifest; writer ownership and architecture documentation are updated.

The typed boundary uses concrete owner/evidence enums and explicit optional acceptance arguments. Pyright now resolves the same vendored SDK source path loaded at runtime. That exposes one existing enum-identity mismatch in the deterministic minimum; its CategoryEnum import is aligned with Structured through the existing SDK/fallback module, with no change to serialized category values and no type-check suppression.

Failure and concurrency behavior

  • Concurrent prepare gestures reuse one pending Candidate; simultaneous Suggested/summary accept resolves one task.
  • Lost-response/reopened-summary replay returns the same task even if it was edited or completed.
  • Changed description/due date/owner, deleted or locked conversation, mismatched target, missing task, malformed stored evidence and stale account generation fail without partial writes.
  • Every desktop await is fenced by immutable owner/session authority. Revoked work cannot continue or publish success.
  • In-flight double-clicks are suppressed. Failures leave retry available; disabled or missing control cannot use a legacy writer.
  • Due date, capture owner and transcript provenance are retained. The transaction does not decrypt, rewrite or transmit the transcript payload.

Product invariants affected

INV-TASK-2: capture still proposes only; preparation and acceptance remain separate requests initiated by an explicit reader gesture. No automatic acceptance or manual-writer fallback is added. Regression guards are registered on the invariant.

How it was verified

  • Backend focused contract/capture suites: 183 passed.
    PYTHONPATH=backend backend/.venv/bin/pytest -q backend/tests/unit/test_summary_task_promotion.py backend/tests/unit/test_candidate_lifecycle.py backend/tests/unit/test_candidates_router.py backend/tests/unit/test_app_client_swift_generator.py backend/tests/unit/test_backend_candidate_capture.py backend/tests/unit/test_conversation_suggestion_visibility.py
  • Real loopback Firestore integration: 20 passed, including 4 new summary tests plus 16 expiry regressions. Concurrent accepts use the real SDK/emulator. Synthetic aborted commits prove the retry rereads changed summary/control state and commits nothing.
    FIRESTORE_EMULATOR_HOST=127.0.0.1:10286 PYTHONPATH=backend backend/.venv/bin/pytest -q backend/tests/integration/test_summary_task_promotion_emulator.py backend/tests/integration/test_candidate_accept_expiry_emulator.py
  • macOS focused tests: 27 passed, including 8 new promoter tests, 3 summary composition tests and 16 provenance-state tests.
    cd desktop/macos
    xcrun swift test -c debug --package-path Desktop --filter 'ConversationSummaryTaskPromoterTests|ConversationSummaryCompositionTests|ConversationSummaryProvenanceStateTests'
  • Local backend serves the production Candidate router and Firestore storage on loopback. curl preparation returned the seeded extraction Candidate and left the task collection empty. Other startup/conversation-list projections and auth are synthetic local fixtures; this is not a deployed-backend, OAuth or transcription proof. Reminder/integration side effects are disabled in the fixture.
  • Named macOS bundle com.omi.omi-summary-tasks is locally built/signed with loopback endpoints and Auth emulator; no production account data, normal Omi app, mobile device or pendant is touched.
  • Final make preflight: 51 checks passed with the Node runtime setting described below. History-dependent recurrence checking explicitly skips on the shallow checkout; mobile historical capture/replay reports pending coverage, not an exercised proof.
  • SDK/fallback model and deterministic-minimum tests: 73 passed, run from the backend directory. A root-directory invocation of the source-reading model-split tests initially failed six relative-path lookups; the documented backend working directory passes all of them, without changing those tests.
  • Full enforced backend Pyright: 0 errors (8,427 existing/typed-boundary warnings). The first normal pre-push blocked on five new typing errors; these were corrected, not bypassed.

Mounted macOS button and durable reopen proof

Ran the manual flow on the signed named bundle, whose health endpoint reported clean source 878e292c59c64f7199e13895beba2d2ca5045165. The synthetic row was displayed by the actual conversation detail view. The existing bridge action invoked that mounted row's task handler—not a replacement task-creation stub.

Observation Result
Before the explicit gesture One pending extraction Candidate; zero tasks; no summary target
Actual desktop requests Control read, POST /v1/candidates/from-conversation 200, then existing Candidate /accept 200
After acceptance One accepted Candidate, one canonical task, summary target equals that task ID
Preserved fields conversation_id=summary-proof, owner user, due 2026-10-01T09:00:00Z, canonical conversation provenance with segment-1
Suggested projection Empty; the matching extraction suggestion is no longer pending
Navigate to Chat and reopen Open Task remains rendered; reopening does not prepare or accept again
Click Open Task after reopening Tasks opens the same canonical task ID; the desktop focus acknowledgement is true and no focus remains pending
Explicit HTTP replay Same task ID; newly_resolved=false; task count remains one

Synthetic acceptance replay receipt:

{"candidate_id":"cand_ac193a81573ee1156eafe30ce6d19560","status":"accepted","task_id":"task_7bdd7596a68ba4e107d64f7dcdb384cf","newly_resolved":false}

Window-only PNGs were captured locally for before-acceptance, after-acceptance and reopened states; they are retained with the disposable fixture and are not attached to this PR. They are synthetic local acceptance/reopen evidence, not screenshots of the original reporter's account or a deployed fix. The incumbent Add to Tasks control is hover/focus-only when idle; the accepted Open Task state remains visible.

After the typing-only follow-up, relaunched the signed bundle on clean head 0184d6a5ff52ba446d0ad324fd5a92921e68cef1 and re-exercised the saved link. It navigates to Tasks with the same canonical task ID, reports isFocusedEntityAcknowledged=true with no pending focus, and does not issue another prepare/accept request. For this extended task-view check the fixture also mounts the real action-items and inert legacy-restore routers; conversation/startup/auth projections remain synthetic. The dashboard snapshot counts only Today/Overdue/No Deadline, so this October 1 task is intentionally not included in that counter.

Tests

  • backend/tests/unit/test_summary_task_promotion.py: strict read-before-write transaction fake, separate preparation/acceptance, extraction reuse, durable linkage/replay, preserved fields and no-write rejection cases.
  • backend/tests/integration/test_summary_task_promotion_emulator.py: real transaction concurrency and aborted-commit retry fencing.
  • desktop/macos/Desktop/Tests/ConversationSummaryTaskPromoterTests.swift: call ordering, captured authorization, double-click, session revocation at every await, retry, disabled control and persisted link decoding.
  • desktop/macos/e2e/flows/conversation-summary-task-promotion.yaml: manual repeatable mounted-row/reopen evidence procedure.

Failure class

Failure-Class: FC-split-mutation-authority

The summary writer now converges on the canonical Candidate transaction rather than synchronizing a competing manual task writer. Added behavioral tests to the existing class's reusable guard-artifact list; no class lifecycle or prevention-owner change.

Verification boundaries

No deploy, merge, hardware/mobile test or umbrella issue closure. A fresh local bundle needed its ignored universal ffmpeg runtime resource; it was reused from the verified installed Omi dependency and passed the normal bundle audit. No runtime binary is committed.

The first web-app preflight run under local Node v26.7.0 failed 11 unchanged Sidebar/startup-modal tests because its experimental global localStorage was undefined. All 11 pass with NODE_OPTIONS=--no-experimental-webstorage; no unrelated web UI/test code was changed.

Review in cubic

Failure-Class: FC-split-mutation-authority
Failure-Class: FC-split-mutation-authority
Use concrete owner/evidence enums and typed optional acceptance arguments. Mirror the runtime SDK source path for checked summary models; keep deterministic minimum on the same category enum as its Structured model.

Failure-Class: FC-split-mutation-authority

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Cross-conversation semantic coalescing can persist and navigate to the wrong conversation link.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes summary “Add to Tasks” by routing it through canonical Candidate preparation and acceptance with durable conversation linkage.

Changes:

  • Adds transactional backend summary-task promotion.
  • Updates macOS UI, API client, persistence, and tests.
  • Regenerates API contracts and documents the invariant.
File Description
.github/​failure-classes/​FC-split-mutation-authority.json Registers regression tests.
backend/​config/​task_intelligence_sources_v1.json Registers new Candidate writers.
backend/​database/​candidates.py Atomically accepts and links summary tasks.
backend/​database/​summary_task_links.py Reads and validates summary rows.
backend/​models/​candidate.py Adds summary request models.
backend/​models/​structured.py Aligns SDK enum exports.
backend/​pyrightconfig.json Adds vendored SDK source path.
backend/​route_policy_manifest.yaml Registers the preparation route.
backend/​routers/​candidates.py Exposes prepare and extended accept endpoints.
backend/​scripts/​generate_swift_openapi_types.py Generates Sendable summary DTOs.
backend/​tests/​integration/​test_summary_task_promotion_emulator.py Tests Firestore concurrency and retries.
backend/​tests/​unit/​test_summary_task_promotion.py Tests promotion contracts and rejection cases.
backend/​utils/​conversations/​deterministic_minimum.py Uses the unified category enum.
backend/​utils/​task_intelligence/​ARCHITECTURE.md Documents ownership and transaction flow.
backend/​utils/​task_intelligence/​candidate_service.py Passes summary context into acceptance.
backend/​utils/​task_intelligence/​summary_tasks.py Implements Candidate preparation and replay.
desktop/​macos/​Desktop/​Sources/​Generated/​OmiApi.generated.swift Regenerates Swift API bindings.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Conversations/​ConversationSummaryTaskPromoter.swift Coordinates fenced prepare and accept calls.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​ConversationDetailSections.swift Replaces manual task creation with promotion.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​ConversationDetailView.swift Publishes durable task links locally.
desktop/​macos/​Desktop/​Sources/​Services/​APIClient/​APIClient+SummaryTasks.swift Adds summary promotion API methods.
desktop/​macos/​Desktop/​Tests/​ConversationSummaryTaskPromoterTests.swift Tests promoter behavior and persistence.
desktop/​macos/​changelog/​unreleased/​20260929-summary-task-promotion.json Adds the user-facing changelog entry.
desktop/​macos/​e2e/​flows/​conversation-summary-task-promotion.yaml Documents mounted-row verification.
desktop/​windows/​src/​renderer/​src/​lib/​omiApi.generated.ts Regenerates Windows API bindings.
docs/​api-reference/​app-client-openapi.json Updates the public API snapshot.
product/​invariants/​task-capture-suggestion-only.md Extends invariant paths and guards.
web/​admin/​lib/​services/​omi-api/​omiApi.generated.ts Regenerates admin API bindings.
web/​app/​src/​lib/​omiApi.generated.ts Regenerates web-app API bindings.
web/​personas-open-source/​src/​lib/​omiApi.generated.ts Regenerates personas API bindings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread backend/database/candidates.py Resolved
@Git-on-my-level

Copy link
Copy Markdown
Member

Verified the core design and traced the failing check to a one-line test-stub gap.

What checks out

  • backend/database/summary_task_links.py — owner-scoped read under users/{uid}/conversations with deleted/is_locked/index/deleted-row guards, strict ActionItem parse, expected_description equality check, completed/candidate_action/due-at-tz validation, and StableId validation of any existing target_task_id. The module only prepares a patch/proposal; the Candidate transaction stays the sole writer, as its docstring promises.
  • backend/database/candidates.py — resolve_task_candidate rereads the chosen summary row inside the write transaction and commits Candidate resolution, the canonical task, and summary target_task_id together (SummaryTaskRow.linked_patch), with CandidateConflictError when the candidate is not a task-create. Good transactional shape.
  • backend/utils/task_intelligence/summary_tasks.py — the replay branch re-validates the linked task's candidate (generation, accepted status, result_task_id) and raises SummaryTaskConflictError rather than materializing a second task; the fresh-gesture branch reuses the extraction's semantic claim via row.proposal().
  • backend/routers/candidates.py + backend/route_policy_manifest.yaml — POST /v1/candidates/from-conversation is gated on _require_candidate_write_control and registered with firebase_id_token auth, first_party visibility; SummaryTaskReference (extra='forbid', StableId conversation_id, bounded expected_description) keeps client-authored titles/owners/due-dates off the wire.
  • macOS (ConversationSummaryTaskPromoter, APIClient+SummaryTasks.swift, ConversationDetailView/Sections) — separate prepare/accept, double-click fencing, durable targetTaskID driving "Open Task" across remounts, and no manual-creation fallback; ConversationSummaryTaskPromoterTests cover the fencing and event ordering. Desktop Swift Build & Tests passed.
  • Regenerated artifacts (app-client-openapi.json, four omiApi.generated.ts copies, OmiApi.generated.swift) are consistent with the new DTOs, and the Sendable conformance added in backend/scripts/generate_swift_openapi_types.py is emitted at the declaration rather than hand-edited.

Why "Backend unit suite" is red (3/4 shards)
tests/unit/test_sync_silent_failure.py::TestProcessSegmentReal.setup_class installs a hand-rolled sys.modules['models.structured'] stub that only exposes Structured. This PR's backend/utils/conversations/deterministic_minimum.py:20 now imports CategoryEnum from models.structured (correct alignment — the vendored SDK exports CategoryEnum and Structured.category uses it, and the ModuleNotFoundError fallback still covers conversation_enums). The stub already builds a _CategoryEnum but attaches it only to models.conversation_enums, so exec'ing the real deterministic_minimum raises ImportError: cannot import name 'CategoryEnum' from 'models.structured'. The production path itself is fine; the harness stub just needs _structured_mod.CategoryEnum = _CategoryEnum alongside the existing Structured assignment (or equivalent) before this can merge.

Not asking for a split — the change is cohesive around one gesture/flow, and the backend/desktop/generated files all serve it. Once the stub is patched and the suite is green, this needs a maintainer pass over the new first-party endpoint and the transactional task/link mutation path (route policy, concurrency, replay semantics) before merge.

This review was produced automatically on behalf of the Omi maintainers.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge backend Backend Task (python) labels Sep 29, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend+desktop feature (task promotion flow), 1697-line diff far exceeds the 300-line confidence-gate cap, and required CI (Backend unit shards) is failing. Approve-only, do not merge; DIRTY mergeState also blocks a clean merge.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the careful rework — the prepare/accept split, the strictly parsed SummaryTaskReference (extra='forbid', bounded index/description), uid-scoped reads in read_summary_task_row, and the accept-path transaction in resolve_task_candidate that re-validates the semantic claim and commits task + Candidate + target_task_id together all look right, and the emulator concurrency/replay tests are a strong addition. Acknowledging the approval already on this head — the one item below is a mechanical CI blocker, not a design concern.

Blocking: Backend unit suite fails deterministically from this diff

tests/unit/test_task_intelligence_contract_freeze.py::test_source_manifest_registers_every_known_writer_class fails with:

ValueError: stale writer anchors: [('desktop/macos/Desktop/Sources/MainWindow/Pages/ConversationDetailSections.swift', 'client.createTask')]

This PR removes the last TasksStore.shared.createTask call from ConversationDetailSections.swift (it was at line 98 on the base), but backend/config/task_intelligence_sources_v1.json still registers that writer anchor under the desktop_manual source. The contract-freeze test correctly detects the now-dead registration.

Fix is one line: drop the ConversationDetailSections.swift / client.createTask entry from desktop_manual.writer_anchors in backend/config/task_intelligence_sources_v1.json.

For clarity, the other red tests in the run (test_memory_use, test_sync_v2, test_paywall_reconnect_gate, test_sync_silent_failure timing guard) are in subsystems this PR doesn't touch and match the unrelated-failure pattern seen in other runs the same day — not attributed to this change.

Once the anchor is removed and the Backend unit suite is green, this should be in good shape.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level removed the needs-maintainer-review Needs a human maintainer to sign off before merge label Sep 30, 2026
…omotion

# Conflicts:
#	desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift
#	desktop/windows/src/renderer/src/lib/omiApi.generated.ts
#	web/admin/lib/services/omi-api/omiApi.generated.ts
#	web/app/src/lib/omiApi.generated.ts
#	web/personas-open-source/src/lib/omiApi.generated.ts
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Review follow-up: the cross-conversation coalescing case is now handled at the navigation boundary—each conversation evidence row routes with its own evidence conversation ID instead of the task’s canonical/original conversation ID. The macOS regression suite covers the coalesced multi-conversation case, and the focused backend + TaskDetailPanel suites pass on the current head. Fresh CI is running.

@Git-on-my-level
Git-on-my-level dismissed their stale review October 1, 2026 20:32

Dismissing: the blocking concern (stale client.createTask writer anchor in backend/config/task_intelligence_sources_v1.json breaking the contract-freeze test) is fixed on head 66c91ee — the anchor and owner_path are removed and the Backend unit suite passes.

@Git-on-my-level Git-on-my-level added the positive-signal Automation verified a genuine fix/quality contribution label Oct 1, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Follow-up review on 66c91ee — the prior blocking item is verified fixed, thanks for the quick turnaround.

  • backend/config/task_intelligence_sources_v1.json: the stale ConversationDetailSections.swift / client.createTask writer anchor is now removed (along with its owner_paths entry), so test_source_manifest_registers_every_known_writer_class no longer trips; the Backend unit suite is green on this head.
  • TaskDetailPanelPolicy.swift + TaskDetailPanelTests.swift: routing each conversation evidence ref by its own evidenceID (testConversationEvidenceKeepsItsOwnDestinationAfterTaskCoalescing) is the right fix for the coalesced-provenance navigation concern — later refs now open the correct conversation instead of the task's canonical one.
  • The two new backend typing commits are behavior-preserving as far as I can verify: deterministic_minimum.py swaps a type: ignore for cast(Any, MINIMUM_CATEGORY) on the category boundary, and pyrightconfig.json only adds the vendored SDK extraPath.
  • The core design from my earlier review (strict SummaryTaskReference, transactional accept re-reading the summary row and committing task + Candidate + target_task_id together, replay-safe prepare in summary_tasks.py) is unchanged by the new commits, and the Hermetic merge gate and public API contract checks pass.

I've dismissed my earlier changes-requested review since its specific concern is resolved. The existing approval was on the previous head, so the new commits just need a fresh maintainer once-over before merge — no open concerns from my side.


by AI on behalf of David — if you need David's attention, please @Git-on-my-level.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-affirming: 1771-line cross-cutting fix for conversation-summary task-promotion flow; diff size fails the 300-loc confidence-gate cap and mergeStateStatus is DIRTY -> approve-only, not merging (no rebase per hard rules).

…omotion

# Conflicts:
#	desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift
#	desktop/windows/src/renderer/src/lib/omiApi.generated.ts
#	web/admin/lib/services/omi-api/omiApi.generated.ts
#	web/app/src/lib/omiApi.generated.ts
#	web/personas-open-source/src/lib/omiApi.generated.ts
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Merged current main (1acc7f2).

  • Only the five generated API clients conflicted. Took main's copies and re-ran the TS and Swift generators; both --check clean, and the three OpenAPI specs and Dart models were already up to date.
  • test_summary_task_promotion.py (19) passes on the merged tree.

@Git-on-my-level

Copy link
Copy Markdown
Member

Follow-up verification on this head — the only change since the last maintainer approval is a merge of main, so I re-checked the core paths in detail. Findings, for the record:

Trust model of the new surface holds up.

  • SummaryTaskReference (backend/models/candidate.py) carries only conversation_id, action_item_index, expected_description with extra='forbid' — the client genuinely cannot smuggle a title, owner, or due date. The description acts as an index-drift guard: any mismatch with the stored row fails closed as 409 (read_summary_task_row).
  • prepare_summary_task is prepare-only — it writes a pending Candidate and never a task. Its replay branch returns the previously accepted candidate only after re-checking account_generation, accepted status, and result_task_id == target_task_id, so there's no duplicate-task window on retry or re-open.
  • The authoritative check is inside the accept transaction (resolve_task_candidate in backend/database/candidates.py): the summary row is re-read, pending_candidate_semantic_identity must match the candidate's own proposal, target_task_id must be None or the expected task, and task + Candidate + conversation_id backfill + summary target_task_id all commit atomically. The accepted-status replay branch backfills a missing link idempotently. This is the right shape for the suggestion-only invariant.
  • Route wiring: POST /v1/candidates/from-conversation sits behind get_current_user_uid, _require_candidate_write_control, and the account-generation/idempotency headers, with 404/409/403 mappings mirroring the sibling candidate routes; registered in route_policy_manifest.yaml. One note for maintainers: rate_limit: none matches the sibling candidate routes today, but this is now a user-reachable mutation surface, so worth a glance if candidate-route rate limiting is ever tightened.

Desktop side: ConversationSummaryTaskPromoter keeps separate prepare/accept with a double-click fence and no manual-task fallback; ConversationDetailView projects the accepted receipt into both the loaded and cached conversation so "Open Task" survives remounts. The TaskDetailPanelPolicy change (route each conversation evidence ref to its own destination rather than through task.conversationId) is a real small navigation fix and has a dedicated regression test.

Incidentals: the deterministic_minimum.py cast and pyrightconfig vendored-SDK path are typing alignment, not behavior; the generated Swift/TS/OpenAPI artifacts and the sources-v1 writer-registry updates are consistent with the new owners; ARCHITECTURE.md and the product invariant doc describe what the code actually does.

Test coverage is strong across unit (strict transaction ordering), emulator integration (concurrency/retry), and macOS promoter tests, and the relevant CI lanes pass at this head. Thanks @aryanorastar — this closes out the summary-task slice of #19566 cleanly. Leaving final merge confirmation to the maintainer queue given the new authenticated mutation surface.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

…omotion

# Conflicts:
#	desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift
#	desktop/windows/src/renderer/src/lib/omiApi.generated.ts
#	web/admin/lib/services/omi-api/omiApi.generated.ts
#	web/app/src/lib/omiApi.generated.ts
#	web/personas-open-source/src/lib/omiApi.generated.ts
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Merged current main (191043f).

  • Only the five generated API clients conflicted again. Took main's copies and re-ran the TS and Swift generators; both --check clean, and the OpenAPI specs and Dart models were already up to date.
  • test_summary_task_promotion.py (19) passes on the merged tree.

…omotion

# Conflicts:
#	desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift
#	desktop/windows/src/renderer/src/lib/omiApi.generated.ts
#	web/admin/lib/services/omi-api/omiApi.generated.ts
#	web/app/src/lib/omiApi.generated.ts
#	web/personas-open-source/src/lib/omiApi.generated.ts
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Merged current main (4fac70f).

  • Only the five generated API clients conflicted again. Took main's copies and re-ran the TS and Swift generators under Python 3.11; both --check clean, and the OpenAPI specs and Dart models were already up to date.
  • test_summary_task_promotion.py (19) passes on the merged tree.

@Git-on-my-level

Copy link
Copy Markdown
Member

Verified on the current head (4fac70f) — this is the merge-of-main delta since the 2026-10-03 verification, not a re-litigation of the design.

What I checked on this head:

  • backend/database/summary_task_links.py and backend/utils/task_intelligence/summary_tasks.py are byte-identical to the versions verified earlier: strict owner-scoped row read (deleted/is_locked/index guards, expected_description equality, fail-closed 409s), prepare-only semantics, and a replay branch that returns the previously accepted Candidate only after re-validating account_generation, accepted status, and result_task_id == target_task_id — no duplicate-task window on retry.
  • backend/routers/candidates.py + backend/database/candidates.py: the authoritative checks still live inside the accept transaction (resolve_task_candidate) — summary row re-read, pending_candidate_semantic_identity equality, target_task_id in {None, expected}, and task + Candidate + structured target_task_id committed atomically. Bodyless accept remains supported via the optional CandidateAcceptanceRequest.
  • desktop .../ConversationSummaryTaskPromoter.swift: control → prepare → accept with owner/generation fencing at each await, no manual-task fallback, 409/404 surfaced as refresh guidance.
  • The five regenerated clients (omiApi.generated.ts x4, OmiApi.generated.swift) and docs/api-reference/app-client-openapi.json: diffed against current main they contain exactly the SummaryTaskReference / CandidateAcceptanceRequest types and the /v1/candidates/from-conversation path — nothing else regressed. backend/route_policy_manifest.yaml registers the new route with firebase_id_token auth, first_party surface, data_domain action_items.

Required checks are green on this head (Backend unit suite + shards, Desktop Swift Build & Tests, Hygiene, Formatting). The prior maintainer approvals (0184d6a, 66c91ee) predate the last two main merges, so the current head is still awaiting a maintainer pass over the new first-party endpoint and the transactional link mutation path before merge.

This review was produced automatically on behalf of the Omi maintainers.


by AI on behalf of David — merge of this PR still needs a human maintainer sign-off on the new /v1/candidates/from-conversation endpoint and the transactional task/link write path; please @Git-on-my-level when ready for that pass.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix(tasks): real stated root cause + extensive tests + CI green, but diff is 1687+84=1771 lines across 31 files touching backend API + macOS Swift — far over the 300-line scoped-diff bar; approve-only, not auto-merged

@aryanorastar
aryanorastar merged commit 9d55c06 into BasedHardware:main Oct 5, 2026
56 of 58 checks passed
aryanorastar added a commit to aryanorastar/omi that referenced this pull request Oct 5, 2026
BasedHardware#20003, BasedHardware#19815 and BasedHardware#15669 each regenerated the clients against their own
base and merged cleanly, leaving main's "Total: 478 client methods" header
one short of the 479 the spec now generates. The knowledge-ledger client
schema contract compares the checked-in artifacts and failed on every branch
that merged main. Regenerated; only the five total lines change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
aryanorastar added a commit to aryanorastar/omi that referenced this pull request Oct 5, 2026
main's generated clients carry "Total: 478 client methods" while the merged
spec generates 479 (BasedHardware#20003, BasedHardware#19815 and BasedHardware#15669 each regenerated against their
own base). The knowledge-ledger client schema contract fails on every branch
that merges main. Regenerated; only the five total lines change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 5, 2026
…oggles

Reconcile the action-item flows with main's canonical candidate promotion
(#19815): Add-to-Tasks now goes through ConversationSummaryTaskPromoter,
whose accept path persists target_task_id server-side, replacing the
offline TasksStore.createTask add path whose task link lived only in
page state. The completion toggle stays, and a cached task is re-read
from SQLite before toggling so a local_<rowid> id can never reach
toggleTask after its create-sync finished (its local-only branch would
skip the backend and desync the surfaces).

Also keep the action-item metadata (owner, due, certainty, context)
when linking a conversation to its promoted task, and restrict owner
suppression to email-shaped names so a handle like @alex stays
visible, matching the Flutter and web adapters.
Git-on-my-level added a commit that referenced this pull request Oct 6, 2026
ConversationSummaryTaskPromoter.linkedConversation, merged from
origin/main (#19815), is a @mainactor static method; calling it from a
nonisolated synchronous test failed the desktop Swift compile. Mark the
test class @mainactor like ConversationSummaryTaskPromoterTests.
Git-on-my-level added a commit that referenced this pull request Oct 12, 2026
…mbient listening (#11801)

* feat(desktop): hands-free wake word to command the assistant during ambient listening

Add an opt-in Wake Word feature: say "Omi" followed by a command while
ambient listening is active and the assistant runs the command hands-free.

- WakeWordService: parses and gates wake-word triggers (cooldown, segment
  dedup, user-speech and busy-conversation guards) and submits the stripped
  command to the assistant
- WakeWordSegmentParser: extracts wake phrase + 2-word-minimum command
- Wire incoming transcript segments from AppState+ListenEvents
- Settings > General: opt-in Wake Word toggle with dynamic subtitle
- AssistantSettings: persisted wakeWordEnabled/Phrase/Cooldown (default off)
- Tests: WakeWordServiceTests + WakeWordSegmentParserTests (15 cases green)

* style(desktop): format WakeWord sources with pinned swift-format; add e2e flow coverage

Fix the two Desktop Swift CI failures:
- desktop-e2e-flow-coverage: cover WakeWordService.swift and
  WakeWordSegmentParser.swift under capture-lifecycle.yaml (the
  capture_test_transcript seam drives the same AppState+ListenEvents
  funnel the wake word observes).
- desktop-swift-format-lint: add missing trailing newlines to the four
  WakeWord source/test files per pinned swift-format 602.0.0.

Verified: run_checks.py macos lane passes e2e-flow-coverage,
swift-format-lint, and swiftlint; WakeWord 15 tests pass
(WakeWordSegmentParserTests 7 + WakeWordServiceTests 8).

* fix(desktop): match speech-to-text renderings of the wake phrase

The wake word only matched the literal string "omi", but speech-to-text
spells the phrase by sound. A live mic session transcribed "Omi, how are
you?" as "Oh me, how are you?" (Parakeet v3, conf=0.92) and the wake word
silently never fired -- the recognizer heard the user correctly and the
parser rejected it.

Accept the renderings recognizers actually emit ("oh me", "omni", "ohmi",
"oh mi", "omee", "o me", "oh-me") as the same phrase, expanded through the
existing greeting prefixes so "hey oh me, ..." works too. The downstream
guards (user speech only, 2+ word command, cooldown, segment dedup) still
bound the false-positive cost of the wider match.

The existing unit tests passed before and after this change because they
fed the parser the string "Omi" -- which is exactly what the microphone
never produces.

Verification
- swift test --filter WakeWordSegmentParserTests -> 10 passed
- Added the exact failing string from the live session as a regression test,
  plus negatives proving the wider match does not swallow ordinary speech
  ("Omnibus schedule changed" and a bare "Oh me" still do not fire).

* fix(desktop): make the wake word survive the real ambient transcript

Three defects found by running the feature against a live ambient session
rather than constructed segments. Each failed silently, so a wake word that
never fired was indistinguishable from one that was never spoken.

1. Diarization attribution. The trigger required `segment.isUser`, but the
   backend only sets `is_user` once a speech profile is enrolled. A live
   session logged `Speaker 0: "Omi, what's the weather?"` with is_user=false,
   so the wake word was structurally dead for every user without an enrolled
   profile. VoiceBargeInPolicy already gates on `isUser || speaker == 0` and
   documents speaker 0 as the primary user; the two entry points disagreed
   about what "the user" means. Align on the sibling's contract.

2. Segment dedup. The backend re-delivers one growing segment under a single
   id (observed: [206.0s-217.1s] -> [206.0s-228.9s]). Deduping on the id alone
   dropped every later command that landed inside an id that had already
   fired. Key on the id plus the extracted command so a re-sent segment is
   still suppressed but a new instruction inside it runs.

3. Cooldown. The cooldown exists to swallow a rapid repeat of the same
   utterance, but it gated on elapsed time alone. The ambient transcript lane
   runs ~35s behind live speech (measured over 11 segments, 34.3-36.6s), so
   several genuinely distinct commands routinely arrive inside one 30s window
   and were discarded as "repeats" -- two consecutive "what time is it"
   attempts were both lost this way. Gate on a repeat of the same command.

Also name the reason a segment was ignored. Every guard returned silently;
the diagnostics are what located defects 1 and 2, and the demo runbook
depends on the log explaining a beat that did not fire. Only segments that
actually carry the wake phrase are reported, so ordinary speech stays quiet.

Verification
- swift test --filter WakeWordServiceTests -> 11 passed
- Regression tests added for each defect, carrying the live values that
  exposed them (speaker 0 with is_user=false, a reused segment id, a distinct
  command inside the cooldown).
- Confirmed live after the fix: `WakeWord: submitting 'can you order food for
  me?' to the assistant`, and the re-delivered segment correctly suppressed.

Honest gaps
- The ~35s ambient latency is server-side (client ships audio every 100ms via
  audioBufferSize=3200); it is not addressed here and needs the realtime lane.
- Not verified against an account with an enrolled speech profile.

* fix(desktop): speak the assistant's reply to a wake word

The wake word dispatched with `fromVoice: false`, which is the flag that
decides whether the assistant speaks its answer or only renders text. A wake
word is a hands-free entry point by definition -- the user's hands and eyes
are elsewhere -- so a silent reply strands the interaction the feature exists
to enable. Observed live: the trigger fired and answered correctly, and the
user heard nothing.

PushToTalkManager already passes `fromVoice: true` for the same reason.

Verification
- swift build -> clean
- swift test --filter 'WakeWordServiceTests|WakeWordSegmentParserTests' -> 21 passed

Honest gaps
- Voice follow-up is still unavailable from the wake word. `sendFollowUpQuery`
  exists and PushToTalkManager uses it with a voiceTurnID, but the wake word
  always opens a fresh query, and `guard !isConversationActive` suppresses the
  trigger while a turn is live. Wiring multi-turn to the wake word needs the
  realtime lane, not the ~35s ambient lane; tracked separately.

* fix(desktop): accept aspirated renderings of the wake phrase

On-device recognition has no keyword list, so it fronts the vowel with an
aspirate. Observed live from one speaker in a single session:

    "Homi what's the weather? outworking."
    "Homie, can you order food for me? Street drive to children dance."

Adds "homi" and "hommi". Deliberately excludes "homie": it is an ordinary
English word, and accepting it as the wake phrase would fire on real speech.

Scope note: this list is a safety net, not the fix. `TranscriptionService`
already seeds ["Omi", "OMI"] into the STT keyword boost, and on the cloud lane
the phrase transcribes exactly every time. These misses only occur on the
on-device lane, which takes no keyword list -- the durable fix is keyword
boosting on the recognizer, not a longer list here.

Verification
- swift test --filter WakeWordSegmentParserTests -> 10 passed

* fix(desktop): stop a growing transcript segment re-firing the wake word

A backend segment is re-delivered as it grows, in place and under one id. The
previous dedup keyed on the exact extracted command, so every growth counted as
a new instruction and fired again with a longer string. Worse, the assistant's
own spoken reply is captured by the microphone and appended to the same
segment, so each re-fire submitted a more polluted command. Observed live:

    12:41:32  submitting 'what time it is? You speak English. Got it.'
    12:41:33  submitting 'what time it is? You speak English. Got it. Handed you this'
    12:41:39  Transcript [ADD] Speaker 1: Handed you this An agent is getting started on that.

The query actually dispatched was the polluted string, which is not what the
user asked and cannot be answered usefully.

Deduping on the id alone is also wrong -- it drops a genuinely new instruction
that lands in a reused id. Treat a command that extends one already fired for
that segment as the same instruction, and anything else as new.

Verification
- swift test --filter WakeWordServiceTests -> 12 passed
- Regression test carries the live growth case.
- Confirmed live: one clean `submitting 'what time it is?'`, and the following
  re-delivery correctly `ignored — already fired`.

Honest gaps
- The microphone capturing the assistant's own speech is a separate defect and
  is not addressed here; this change only stops it corrupting the command.

* fix(desktop): restore wake word dispatch broken by fromVoice

An earlier commit on this branch switched the wake word to
`openAIInputWithQuery(command, fromVoice: true)` so the assistant would speak
its answer. That silently disabled the feature end to end.

`openAIInputWithQuery` gates the voice path on a turn it does not mint:

    if fromVoice {
      guard let voiceTurnID,
        VoiceTurnCoordinator.shared.requireCurrentOwner(for: voiceTurnID) != nil
      else { return }

`fromVoice: true` with no `voiceTurnID` fails that guard and returns with no log
and no user-visible effect. Every wake word therefore logged `submitting` and
dispatched nothing -- the trigger looked healthy in the log while the assistant
was never invoked.

`fromVoice: true` belongs to callers that own a voice-turn lifecycle:
PushToTalkManager begins a turn and passes both arguments. The wake word submits
an already-transcribed command and owns no turn, exactly like
DesktopAutomationBridge, which passes `fromVoice: false` for the same reason.

Verification
- swift build -> clean
- swift test --filter 'WakeWordServiceTests|WakeWordSegmentParserTests' -> 22 passed
- Confirmed live: `WakeWord: submitting 'what time is it?'` followed 1.3s later by
  `WakeWord: ignored — assistant already busy`, i.e. the turn actually engaged.
  With `fromVoice: true` that second line never appeared on any attempt.

Honest gaps
- The reply is no longer spoken aloud; it renders in the floating bar. Restoring
  spoken replies requires minting a VoiceTurnID via
  `VoiceTurnCoordinator.begin(intent:)` before dispatch and threading it through,
  which is a separate change and is not attempted here.

* fix(desktop): require a pause after a homophone wake phrase

Review feedback on this PR: with "oh me" accepted as the wake phrase, an ordinary
sentence like "oh me and my friend went hiking" parses to the 2-word command
"and my friend went hiking" and auto-sends it. That false-positive surface was
introduced by the homophone table earlier in this branch.

The homophones and the literal spelling are not the same kind of evidence. Saying
"Omi" is deliberate -- nobody produces it mid-sentence by accident -- so
"Omi order food" needs no corroboration. A homophone is the recognizer guessing,
and its guesses are ordinary English, so it needs something more.

A bare homophone now has to be followed by a punctuation break: the recognizer's
own signal that the speaker addressed something and then paused. Every homophone
hit observed live carried one ("Oh me, how are you?"). A greeting prefix is
corroboration in its own right -- "hey oh me" is not said by accident -- so those
forms keep the ordinary word boundary.

    "Omi order food"                    fires    (literal, unchanged)
    "Oh me, how are you?"               fires    (homophone + break)
    "hey oh me order pizza"             fires    (greeting corroborates)
    "oh me and my friend went hiking"   ignored  (bare homophone, no break)
    "o me it has been a long day"       ignored

This only ever makes the wake word fire less, so the risk it carries is a missed
trigger, never a spurious one.

Verification
- swift test --filter 'WakeWordSegmentParserTests|WakeWordServiceTests' -> 25 passed
  (13 parser + 12 service; 3 new, every prior case still green)
- New cases use the reviewer's example sentence and the exact strings observed live.
- Confirmed live on the dev serving plane after the change, both forms in one session:

      20:44:35  Transcript: "Hey Omi what's the time"
                WakeWord: submitting 'what's the time' to the assistant
      20:44:37  Transcript: "Omi, what is the time?"
                WakeWord: ignored — assistant already busy

  The second line is the trigger being correctly suppressed while the turn opened
  by the first was still live, which is also proof the dispatch engaged.

Honest gaps
- Punctuation is a proxy for a spoken pause and depends on the recognizer emitting
  it. A homophone rendered without punctuation will now be missed rather than
  misfire, which is the safer direction but is still a miss.
- Does not address a wake phrase transcribed in a non-Latin script (the socket runs
  language=multi); matching remains ASCII-only.

* fix(ci): bypass stalled Azure apt mirror

The hosted runner's Azure Ubuntu mirror repeatedly stalled Redis setup until the 20-minute gauntlet deadline. Use the existing archive.ubuntu.com fallback directly for each Redis-dependent gauntlet.\n\nVerification:\n- actionlint -config-file .github/actionlint.yaml .github/workflows/backend-hermetic-e2e.yml\n- python3 backend/scripts/check_workflow_contracts.py --changed-files .github/workflows/backend-hermetic-e2e.yml\n- git diff --check\n\nFailure-Class: none

* fix(ci): bypass stalled Azure apt mirror in Linux package helper smoke

Same stall as backend-hermetic-e2e's Redis install (69e5a9e): the
hosted runner's Azure Ubuntu mirror hangs InRelease fetches, this time
in desktop-windows-ci's Linux runtime dependency install, until the
job's 6-hour default timeout cancels it. Drop the mirror the same way,
falling back to archive.ubuntu.com directly.

Verification:
- actionlint -config-file .github/actionlint.yaml .github/workflows/desktop-windows-ci.yml
- git diff --check
Failure-Class: none

* chore(ci): retrigger hermetic suite after a scope-detect runner cancellation

Detect Hermetic Backend Scope was cancelled mid-run by a runner race, so
Backend Hermetic Merge Gate read SCOPE_RESULT: cancelled and failed
closed. Distinct from the apt-mirror stall in #11848 — this one never
reaches a package fetch. No code change; the branch has no admin rights
to rerun the workflow directly.

* feat(desktop): recognize evidence-backed Omie wake-word transcripts

* fix(desktop): end an on-device transcription window when the speaker pauses

The wake word's latency was not the cloud ambient lane. On Apple Silicon
`STTSessionState.resolveMode` picks the on-device Parakeet path by default, and
`LocalTranscriptionService` only closed a window on a fixed 10s boundary — so a
spoken command waited for wherever it happened to land in that window.

Measured live on a MacBook Air, real microphone, identical utterances:

  before   1.08s / 6.18s / 7.65s   (~5s expected, ~10s worst case)
  after    0.66s / 0.76s / 0.82s / 0.89s / 0.89s / 1.04s

Three changes, all in the on-device path:

- A window closes early once the buffer holds a second of voiced audio followed
  by 0.6s of quiet. The minimum is measured in voiced samples, not buffer
  length: a mostly-quiet window with one blip in it is what Parakeet answers
  with a hallucinated word (a 1.1s window at rms 0.0067 decoded to "Yeah.").
- Silence ahead of the first speech is dropped, advancing the emitted-seconds
  cursor over it so absolute timestamps stay exact. Otherwise quiet counted
  against the 10s cap and the window filled partway through the next sentence —
  observed cutting "Omi, what time is it now" down to "Now".
- The pump ticks at 0.5s rather than 1s, since it is now the floor on how soon
  a finished utterance can be transcribed rather than a poll for a full window.

The 10s cap is unchanged and still bounds continuous speech.

Verification:
- xcrun swift test --package-path Desktop --filter
  'LocalTranscriptionEndpointTests|LocalTranscriptionDuplicatePolicyTests|WakeWord'
  -> 42 tests, 0 failures
- Eight timed utterances through the real microphone on a named dev bundle,
  wake word enabled, on-device Parakeet: every one dispatched, full text, in
  0.66-1.04s from the end of speech.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(desktop): speak the wake word's answer and keep the conversation going

Two things a hands-free trigger needs that it did not have: the answer came
back as text only, and every command opened a fresh conversation.

Both came from one boundary being drawn in the wrong place.
`openAIInputWithQuery` selected the `.voiceOnly` surface on `fromVoice`, and
that surface requires a `VoiceTurnID` — so a voice query that owns no turn was
dropped with no diagnostic, which is why the wake word had to pass
`fromVoice: false` and therefore stayed silent. Selecting `.voiceOnly` on
`voiceTurnID` instead says what the branch actually means. Push-to-talk owns a
turn and is unchanged; the wake word falls through to the visible surface,
where `fromVoice` still marks it a voice query and the answer is spoken.
`sendFollowUpQuery` had the same guard and now applies the turn-optional rule
`routeQuery` already uses, so a second command continues the conversation.

`WakeWordService` dispatches through the new `submitSpokenCommand`, which is
both: spoken answer, conversation continuity.

Speaking the answer creates a feedback path that did not exist before — the
microphone hears Omi and it lands in the transcript as the user's own speech.
Observed live: `Transcript [ADD] Speaker 0: It's 8 57 p.m. on Sunday...` was
Omi. An answer carrying the wake phrase would command the assistant with its
own words, so the trigger is suppressed while playback is active. That is not
a wall in front of the user: `VoiceBargeInPolicy` halts playback the moment
they speak, so `isSpeaking` is already false when their transcript arrives.

`handleBackendSegments` now reads `isSpeaking` once, before the barge-in check.
Reading it afterwards reports false for the very segment that stopped playback.

Verification:
- xcrun swift test --package-path Desktop --filter
  'WakeWord|LocalTranscriptionEndpoint|VoiceBargeIn|LocalTranscriptionDuplicate'
  -> 51 tests, 0 failures
- Live on a named dev bundle, real microphone, on-device Parakeet:
  "Omi, what time is it now" -> answered aloud (the mic transcribed Omi's own
  reply back: "It's 8 57 p.m. on Sunday, August 23rd, 2026, in India, IST"),
  then "Omi, and what about tomorrow" -> "Tomorrow is Monday, August 24, 2026".
  A bare anaphoric follow-up resolved against the previous answer, and the
  telemetry surface moved from floating_text to floating_voice with a tts_start
  stage in both traces.
- A six-turn spoken session ordering food held one conversation throughout
  (cache_read 29953 -> 40968 -> 52003).

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): stop ambient capture treating Omi's own voice as the user

Omi speaks into a room Omi is also recording. Ambient capture returns the
playback as a transcript segment attributed to the primary speaker — observed
live, `Transcript [ADD] Speaker 0: It's 8 57 p.m. on Sunday...` was Omi, not a
person. Four consumers then act on it as if the user had spoken:

- barge-in halts the very playback that produced it. Three times in one
  six-turn session, which is why a long answer stops partway: "I can help, but
  I need two details first. 1. Maya's delivery address" and no item 2.
- the wake word can be commanded by an answer carrying the wake phrase
- the conversation record gains speech nobody said
- memory extraction reads it

One guard at ingest, where all four route through, rather than four guards.

Dropping the whole segment is not enough. While Omi is talking there is no
pause to close the transcription window on, so a barge-in lands inside the same
window as the playback — measured: `1. Ganges Ganga, India's most sacred river,
and a vital water source. Omi, stop that and tell me the time is.` One
9-second window, two speakers. Discarding it would eat the interruption, which
is the one utterance that must never be lost. `VoicePlaybackEchoPolicy`
consumes the playback off both ends and keeps what the user said in between,
sliced from the original string so the punctuation the wake-word parser reads
survives.

Matching is loose about wording and strict about length, because speech-to-text
does not return what the synthesiser was handed: "Omi open my tasks now" came
back as "Only open my tasks now", "8:57 PM" as "8 57 p.m.", and a numbered list
goes out as "1." and returns as "One." It errs toward not-echo throughout — a
missed echo costs what the app already does today; a false echo deletes
something the user said.

Verification:
- xcrun swift test --package-path Desktop --filter
  'VoicePlaybackEcho|WakeWord|LocalTranscription|VoiceBargeIn' -> 68 tests,
  0 failures. Every echo string in the new suite was captured live.
- Full desktop suite: 5790 tests, 2 failures, both pre-existing order
  dependence unrelated to this change (FloatingBarNotificationPreviewPolicy,
  RewindCaptureExclusionGeneration) — they fail identically on the merge base
  under the same filter and pass in isolation.
- Live, named dev bundle, real microphone, wake word answering aloud:
  "Omi, list five major cities in India with one short fact each" dropped seven
  echo segments across both the microphone and system-audio channels, logged
  zero barge-ins where the previous build logged three, and spoke all five
  cities through to "Five, Chennai, a key center for automobiles, culture, and
  South Indian cinema" instead of stopping at the first.
- Speaking over a live answer still interrupts it and still dispatches:
  `WakeWord: submitting 'stop that and tell me the time instead.'` with
  `Transcription [BARGE-IN]` on the same segment.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): recognize a wake word spoken after something else, and stop deleting the user's speech

Three defects, all from one live session of twelve spoken attempts of which
only four fired.

The wake phrase had to open the segment. Windows now close on the speaker's
pause rather than a fixed boundary, so a segment is no longer one utterance and
whatever was said in the same breath shares it: `It's not working man. Omi what
time it is?` carried a literal wake phrase and a valid command and matched
nothing. The parser now also tries each sentence inside the segment. A sentence
boundary, not any position — the phrase has to *open* an utterance, which is
the same evidence class the punctuation-break rule already uses and keeps
`I told Omi to order food` from parsing to "to order food".

Echo suppression deleted something the user said. `Sorry my mistake it's
taking` was dropped as playback. Two causes: one shared deadline kept the whole
300-word history alive and refreshed it on every chunk, so several turns of
speech stayed matchable at once and a few hundred words of ordinary English
align with almost any short sentence; and discarding a segment did not require
the match to actually cover it. Words now expire individually after 15s — an
echo arrives a second or two behind the audio, so that is all it has to outlive
— and a whole-segment drop requires 0.8 coverage, which real echoes measured
0.80–1.00 against. The same eviction also explains a leak in the other
direction: Omi's own error copy, "Omi's AI service didn't respond...", was
heard back, parsed as a wake word, and submitted as a command, twice.

The wake word's own "assistant is speaking" guard is removed. It blocked a real
barge-in — `Omi you are not picking my messages now`, spoken while Omi was
talking, was refused and had to be repeated. Whether Omi is speaking is not the
question; whether *this segment* is Omi is, and `VoicePlaybackEchoPolicy`
answers that directly.

Verification:
- xcrun swift test --package-path Desktop --filter
  'WakeWord|VoicePlaybackEcho|LocalTranscription|VoiceBargeIn' -> 70 tests,
  0 failures
- Live, named dev bundle, real microphone, all four in one session:
  "It's not working, man. Omi, what is today's weather?" ->
  `WakeWord: submitting 'what is today's weather?'`;
  "Sorry my mistake it's taking" reached the transcript instead of being
  dropped; the spoken time answer was dropped as echo on both the microphone
  and system-audio channels; and "Omi's AI service didn't respond..." was
  dropped instead of commanding the assistant.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): anchor echo matching to the sentence, not to the ends of the history

Two failures from a twenty-utterance measurement run, both from the same
assumption: that an echo begins where the playback history begins.

Parakeet returned "Your current save task appears to be testing the protocol
product." twice in one segment, and the second copy survived as if the user had
said it — the backward walk started at the end of the history, and Omi had kept
talking past that sentence. Both walks now try every position where the
utterance's first word occurs and take the best alignment, so an echo of
something said in the middle of an answer is still recognised as one. That also
recovers a command spoken over playback: the user's words are isolated between
the matched runs instead of being dropped with them.

Speech-to-text mangles the tail of a long answer, so it stops matching what was
synthesised and was kept as the user's words: Omi's own "Based on today's
recording active for roughly about one hour" reached the transcript as
speech the user never said. A garbled continuation runs straight on from the
matched text; a person interrupting starts a new sentence, and the recognizer
marks that, so a surviving residue now has to begin one.

A single word matching on its own is coincidence, not the echo continuing —
"the" and "and" occur in every answer. Committing the match on one word let the
backward walk eat "the time" off the end of a user's command; two in a row is a
run.

Verification:
- xcrun swift test --package-path Desktop --filter
  'VoicePlaybackEchoPolicy|WakeWord|LocalTranscription|VoiceBargeIn'
  -> 74 tests, 0 failures. The four new cases are the captured strings above.
- Twenty spoken utterances through the real microphone across five voices, the
  same script and 16s pacing as the run before this change:
  10 of 20 dispatched, against 9 of 20; the two segments where Omi's own words
  had been kept as the user's are now correctly dropped (0 of 20, was 2 of 20);
  and two commands that the previous build lost inside a dropped echo window
  were recovered by residue extraction ("Your ten most recent memories. Only
  open my rewind time line." -> "Only open my rewind time line.").
  Every remaining miss is the recognizer writing something other than the wake
  phrase, five of them "Only".

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): stop "ok"/"okay" corroborating a misheard wake phrase

Raised in review: a homophone needs a punctuation break to fire on its own, but
a greeting prefix waived that — and the greeting list included "ok" and "okay".
So "okay oh me and my friend went hiking" fired with the command "and my friend
went hiking", which is the exact false positive the punctuation rule exists to
prevent.

"hey" is a vocative: "hey <name>" addresses someone, and nobody produces it in
front of a misheard word by accident. "ok" and "okay" are discourse markers
people open sentences with constantly. Only "hey" corroborates a homophone now.
Both still corroborate the literal spelling, where the phrase is already the
evidence.

This only ever makes the wake word fire less.

Verification:
- xcrun swift test --package-path Desktop --filter WakeWord -> 33 tests,
  0 failures, including the reviewer's sentence in both "ok" and "okay" forms
  and the two forms that must still fire.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(desktop): route a wake word into the realtime session behind a flag

Maintainer request: try the realtime model instead of the text path, on the
grounds that it should be a more natural interaction. Off by default —
`wakeWordUsesRealtime` — so the measured text path is untouched and the two can
be compared on the same machine.

Detection does not move. Both paths read the same ambient transcript, so this
changes nothing about the 60% recognition ceiling documented earlier. What
moves is the exchange: the model speaks its own answer instead of TTS reading a
text reply, and the session keeps conversational context across turns.

Push-to-talk owns a physical hold, so it streams audio and commits on release.
A wake word owns no hold and its audio is long gone by the time the transcript
fires, so it mints an `.automation` turn — the shape the headless harness
already uses — and hands over the transcribed command.

Two ordering constraints, both found by running it:

- The Gemini activity window is opened by `beginInputTurn`, which runs inside
  `commitTurn()`, not at `beginTurn`. Waiting for the window before sending
  simply times out; the send has to happen first and be flushed by the commit.
  Before this was understood the text sat in the buffer and no answer came.
- A turn with no route is refused at commit as a stale physical commit
  ("rejected duplicate/stale physical commit before provider side effects"), so
  `.selectRoute(.hub)` has to be published before `beginTurn`.

Gemini also rejects a pure-text activity window with a 1007 precondition, so
two 100 ms silence frames open it, matching the harness.

Verification:
- xcrun swift test --package-path Desktop --filter
  'WakeWord|VoicePlaybackEcho|Realtime' -> 306 tests, 0 failures
- Live on a named dev bundle, real microphone, flag on:

    WakeWord: submitting 'tell me one interesting fact about the ocean.'
    RealtimeHub[gemini:gemini-3.1-flash-live-preview]: turn begin (activityStart)
    RealtimeHub[gemini:gemini-3.1-flash-live-preview]: wake word command sent (45 chars)
    Transcript [ADD] Speaker 0: The pressure at the bottom of the ocean is so intense...

  The last line is the microphone hearing Gemini speak its own answer. ~1.2s
  from end of speech to the command reaching the model. A second command 51s
  later ran the same path, so the turn terminalizes and does not wedge the
  trigger behind `activeTurnID`.

Known gap on this path: `VoicePlaybackEchoPolicy` does not cover it. The hub
plays its audio natively rather than through `FloatingBarVoicePlaybackService`,
so nothing records what was said and Gemini's spoken answer lands in the
transcript as the user — visible in the trace above. The same defect the echo
policy fixes for the TTS path, reappearing on this one. Left as a known gap
while the path is off by default and under evaluation.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): give the realtime wake-word turn a real user message and a silent echo

Two defects in the realtime path, both visible in the chat panel and both found
by watching it rather than by reading the code.

The assistant's own answer was recorded as the user. `VoicePlaybackEchoPolicy`
reads what this app has recently said out loud, and that history was only ever
written by `FloatingBarVoicePlaybackService`. The realtime session plays its
audio natively, so nothing recorded it, the microphone heard it, and ambient
capture attributed Gemini's reply to the user — the same defect the echo policy
exists to prevent, reappearing on a path it could not see. Text emitted by the
session is now recorded there too. It arrives as a stream and providers differ
on whether each event is the new fragment or the whole reply so far, so only
the part that extends what was already recorded is kept: a padded history
matches more of what a person says, which is the direction that deletes real
speech.

The user's message was whatever the provider imagined. A wake-word turn hands
over already-transcribed words and only enough silence to satisfy Gemini's
non-empty activity window, so the provider has no user speech to transcribe and
journals its own hallucination. Live, `¿Qué es el número de serie?` appeared as
the user's message on two consecutive turns; nobody said it. What was asked is
not in doubt, so it is supplied rather than recognised, reusing the existing
transcript-override policy through a production-scoped property that push-to-
talk clears alongside the test one.

Verification:
- xcrun swift test --package-path Desktop --filter
  'WakeWord|VoicePlaybackEcho|Realtime|LocalTranscription' -> 324 tests,
  0 failures
- Live on a named dev bundle, real microphone, realtime path on:

    WakeWord: submitting 'tell me one short fact about the moon.'
    RealtimeHub[gemini]: wake word command sent (38 chars)
    Transcription [ECHO]: dropped Omi's own playback heard back:
      The moon is slowly moving away from Earth by about an inch a...

  The echo line was a `Transcript [ADD] Speaker 0` before this change. On the
  following turn the chat panel showed "tell me one short fact about volcanoes."
  as the user's message where the previous turn still shows the Spanish
  sentence.

Known limit, not fixed here: the provider forms its own input transcript from
the silence regardless of what we journal, and Gemini Live keeps session
context, so a hallucinated transcript persists — after the Spanish turns the
model kept offering to reply in Spanish. Supplying the text fixes the record,
not the model's memory of the turn. The real remedy is a text turn that opens
no audio activity at all (`clientContent` rather than `realtimeInput`), which
is a wire-format change and out of scope while this path is off by default.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): warm the realtime session before a wake-word turn

The warm session tears itself down after an idle period, so a wake word
arriving in a quiet stretch found nothing to talk to and fell through to the
chat path. Observed live as the third of three consecutive commands answering
in a text box while the first two spoke aloud.

Warming and waiting briefly before minting the turn also avoids creating a turn
that cannot be used, which would otherwise leave `activeTurnID` set and make
`defaultIsConversationActive` refuse every later wake word.

Verification:
- xcrun swift test --package-path Desktop --filter
  'WakeWord|VoicePlaybackEcho|Realtime|LocalTranscription' -> 324 tests,
  0 failures
- Live on a named dev bundle, real microphone: three consecutive commands
  ("how are you today", "tell me one fact about rivers", "name one famous
  painter") each reached `wake word command sent` with no fallback, where the
  previous build dropped the third to the chat path.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(desktop): answer a wake word from the notch instead of opening a panel

Hands and eyes are elsewhere — that is the premise of a wake word — so growing
the bar into a response panel covered a fifth of the screen for no one's
benefit. The response glow already signals that Omi is working and the answer
is spoken, so the exchange is recorded without being put in front of the user.
The panel remains the fallback when the hands-free path cannot run.

Two things made this harder than it looks, both found by instrumenting rather
than reading:

The panel is opened from four places — the query starting, the answer arriving,
the content-height observer, and the agent-chat resize. Suppressing any one of
them left it showing, because whichever was missed put it straight back. The
guard is now at `resizeAnchored`, the single point they all reach, and blocks
only expansion so collapsing back to the pill still works.

`prepareVisibleQueryState` runs twice for one query: once from `routeQuery` to
show the thinking state, once from `sendAIQuery`. A one-shot latch consumed by
the first call meant the second reset the flag and reopened the panel —
`presentsSurface=false` immediately followed by `presentsSurface=true` in the
same millisecond. It may now only ever set quiet; the entry points that do want
a panel (typed follow-ups, `submitSpokenCommand`) clear it.

Verification:
- xcrun swift test --package-path Desktop --filter
  'WakeWord|VoicePlaybackEcho|FloatingControlBarState|Realtime' -> 335 tests,
  0 failures
- Live on a named dev bundle, real microphone, two consecutive commands:
  the bar stays at 62px throughout (`resizeToFrame to (351.0, 62.0)`), no
  `430x381` expansion, and both answers were spoken — the microphone
  transcribed Omi saying "The capital of Portugal is Lisbon." and "The sun
  contains about 99.86% of the total mass in our solar system."
  The previous build logged `resizeToFrame to (430.0, 381.0)` on every command.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* test(desktop): repin the beginVisibleMainQuery contract to its wrapped signature

ccaaebb7 added `presentsSurface: Bool = true`, which pushed the parameter list
onto its own line under swift-format. The contract test pinned the declaration
as one string:

    func beginVisibleMainQuery(_ message: String, fromVoice: Bool, animated: Bool = true)

so it stopped matching and took both required Desktop Swift checks red. The
production behavior was never affected -- the view's call site still passes
defaults.

Pinned in two parts so a wrap cannot break it again, and `presentsSurface:
Bool = true` is now pinned with the rest: that default is what keeps a typed
send presenting the panel, which is the load-bearing behavior of this surface.

Checked the pin still guards rather than passing vacuously -- flipping the
expected default to false fails the assertion at line 1088; restoring it
passes. AgentPillLifecycleTests 84/84.

Failure-Class: none

* feat(desktop): recognize the wake word on the default on-device path

The wake word is only as good as the recognizer that hears it, and on the
default path the recognizer cannot be told its own name. Ambient transcription
runs on-device on Apple Silicon, and `AsrManager.transcribe(_:decoderState:
language:)` takes a language hint and nothing else — no keyword or vocabulary
parameter. The cloud lane does not have that problem: `/v4/listen` prepends
"Omi" to the STT keyword vocabulary server-side in
`backend/utils/listen_session_bootstrap.py`.

Measured on one machine, same script and voices, only the lane changed: the
phrase was usable in 12 of 20 utterances on-device against 19 of 20 on the
cloud lane. Seven of the eight on-device misses came back as "Only".

Two changes, both aimed at that gap.

`WakeWordSegmentParser` gains a third corroboration class. "Only" cannot ride
the existing punctuation-break rule: a scan of 1,919 stored local segments
found 15 sentence-initial "Only", every one a misrendered wake word, and not
one carried a break after it — they read "Only what is on my calendar", "Only
open my rewind timeline". The same scan found 8 ordinary uses of "only", all
mid-sentence. So `.commandHead` gates on what follows instead: an interrogative,
or a request verb aimed at the speaker's own things ("show me", "open my",
"remind me"). Every imperative reads fine under a restriction — "only do that
once", "only tell him if he asks" — but none of them ask for the speaker's own
calendar.

`AssistantSettings.wakeWordPrefersCloudSTT` is the opt-in for users who would
rather buy the remaining accuracy with cloud transcription. Off by default: it
trades on-device transcription for cloud transcription while the wake word is
enabled, which is a privacy and cost decision, not a technical one. FluidAudio
does ship term biasing, but only on `SlidingWindowAsrManager`, which is a
different streaming architecture and pulls a second set of CTC models — that is
the upgrade path out of this flag.

Verified on the running app through the hermetic capture seam, which reaches
`WakeWordService.observe` on the real path: 14 ordinary uses of "only" injected,
zero fired; 3 verbatim misrenderings injected, 3 parsed. The cloud opt-in was
confirmed live by the lane actually switching — `TranscriptionService:
Connecting to wss://api.omiapi.com/v4/listen` in place of on-device Parakeet.

Tests: 26 in WakeWordSegmentParserTests, 14 in STTSessionStateTests, and the
full 716-suite run, all passing.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): stop a re-delivered segment from interrupting the answer to it

A backend segment is re-delivered as it grows, in place and under one id, and the
re-delivery arrives whether or not the speaker added anything. `VoiceBargeInPolicy`
treated any non-empty user text as speech, so an unchanged re-delivery counted as
the user talking over the assistant.

Observed live: the second turn of a conversation was cut off 4.4s into playback by a
re-delivery of the very segment that asked the question, byte-identical to the copy
already stored.

    13:16:41.117  Chat response complete
    13:16:45.491  BARGE-IN: User spoke mid-playback; interrupting voice output
    13:16:45.501  Transcript [UPDATE] Speaker 0: I'm fine. What about you? Omi, I'm fine. What about you?

The first turn escaped only by timing — its answer finished speaking before the
re-delivery landed. From the second turn on, the re-delivery falls inside the playback
window every time, which is why it reads as "the second question always gets cut off".

`shouldInterrupt` now takes the text already stored for that segment id and interrupts
only on what the segment gained. Growth that adds nothing but punctuation or spacing is
the recognizer tidying up, not speech. A segment that no longer extends what was stored
counts as new in full: there is no way to tell a revision from a continuation, and
missing a real barge-in is the worse failure.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): count a garbled word inside an echo as part of it

Omi's own answer was reaching the transcript as a second speaker, so the reply was
heard once from the speakers and again as if a person had said it.

`walk` only commits a matched word once two match in a row — a guard that exists
because a single common word ("the", "and") matching by coincidence once let the
backward walk eat "the time" off the end of a user's command. But an utterance's
closing word can never reach two-in-a-row when the word before it was garbled, so
the last word of a short answer was permanently uncountable.

Measured live: Omi said "I don't know the details of Wake Word yet." and the
microphone returned "WakeMore" for the product name. The trailing "yet" followed
that one mismatch and could not commit, so coverage came out 6 of 8 = 0.75, under
the 0.80 floor, and the segment was kept.

    19:37:59.241  Transcript [ADD] Speaker 1: I don't know the details of WakeMore yet.
    19:38:00.576  ECHO: dropped ... I don't know the details of WakeMore yet. Feature you design

Confirmed against the real strings before and after: `keep` became `drop` for every
rendering of what was actually spoken.

The final token may now commit on a single match, but only after `minimumWordCount`
words have already matched in a run, so a lone coincidental word still cannot start
or extend an echo. Forward walk only: the reversed walk measures the playback that
follows a barge-in, where the "final" token is the first word the user said, and
committing it on one match would eat the start of the interruption.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* chore(desktop): drop the changelog fragment that already shipped

`20260823-local-transcription-pause-endpointing.json` is byte-identical to the entry
released in v0.12.221, which shipped through #12181 when pause endpointing was split
off this branch. Leaving it here would re-announce an already-released change at the
next consolidation.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): stop an abandoned hands-free command from quieting the next query

`suppressNextVisibleSurface` is a one-shot latch consumed only by
`prepareVisibleQueryState`. Three exits from `openAIInputWithQuery` return before
reaching it — no window, no active provider, and the `.voiceOnly` branch, which
renders nothing and so never consumes it at all. A wake word that fires while the
bar is torn down or unprovisioned therefore leaves the latch set, and the next
typed question is silently answered in the notch.

Clear the latch on every exit that abandons the query.

Separately, `beginVisibleMainQuery` only ever *sets* `answersQuietly` (clearing
there would let the second `prepareVisibleQueryState` call undo the first), so the
reset has to live at the query entry points. The closure re-wired in
`openAIInputWithQuery` does it; the default wiring installed at setup did not, so a
quiet wake-word answer leaked its silence into the next typed question on that path.

Verification: `swift build` in `desktop/macos/Desktop` — clean. No behavioral test
added: both paths run through `FloatingControlBarWindow` (an NSPanel) with no
injectable seam, and the existing coverage here is source-scrape pins, which
AGENTS.md calls a static tripwire rather than behavioral coverage.

Failure-Class: none

* test(desktop): re-pin the quiet-answer latch after the typed-send rewrite

My merge resolution took main's side of `AgentPillLifecycleTests.swift` wholesale.
That was right for the file — main retired `AskAIInputView` and the test source-pinned
against it — but it silently removed the only guard this feature has. Nothing in the
678 test files on that head pinned `presentsSurface`, `answersQuietly`, or
`suppressNextVisibleSurface` any more, so the wake word's notch behavior could be
refactored away without failing anything.

The replacement pins the same contract against `FloatingControlBarWindow.swift`, where
the logic actually lives, rather than a view that has now been retired twice:

- `presentsSurface` defaults true, so an ordinary typed send presents the panel
- `beginVisibleMainQuery` only ever sets quiet, never clears (it runs twice per query)
- the one-shot latch is armed by the wake word and consumed by the visible path
- all three abandoning exits clear it, asserted by count
- both `onSendQuery` wirings reset `answersQuietly`

Verification: passes on this head. Mutation-checked rather than assumed — deleting the
`.voiceOnly` latch clear fails it with `("2") is not equal to ("3")`, and restoring it
returns green.

Failure-Class: none

* docs(desktop): name the real path that opens the Gemini activity window

Review on #11801 caught the comment in runWakeWordTurn still pointing at
`beginInputTurn` as the thing `commitTurn()` calls. Main's voice-handoff rework
moved that: `commitTurn()` now reaches the window through
`commitClaimedHubInput` -> `beginLiveInputTurn`, the controller wrapper, which
then calls the session's `beginInputTurn`.

The old wording was not wrong about which primitive opens the window, but a
reader following it into `commitClaimedHubInput` would not find the name it
gave. Both names are now in the comment, in the order the calls actually happen,
so neither reads as stale next time the wrapper is renamed.

Comment only; no behavior change. 339 tests, 0 failures across the WakeWord,
RealtimeHub, VoicePlaybackEcho and Interject suites.

* fix(desktop): end a quiet wake-word answer's latch with the answer, not never

The wake word's quiet answer matched PTT's notch geometry while it ran — the
same 386x62 glow island, the same spoken delivery, the same idle settle — but
the state it left behind did not. Two leaks, both measured live on a named
bundle (omi-wwnotch-11801, head b82eff7157):

1. The answer's own presentation sites — the sendAIQuery streaming sink and
   the completion tail — called present(.mainResponse) while the quiet latch
   blocked only the resize. The bar settled with showingAIConversation=true
   against a 362x62 island: the hover menu was dead
   (NotchHoverSurfacePolicy.allowsMenu), notification cards stopped mounting
   (the view gates them on !showingAIConversation), and #13337's surface floor
   deferred as conversationOpen indefinitely. PTT never leaves this state.

2. answersQuietly outlived its query. Nothing cleared it after the answer
   completed — the typed-send resets the PR pinned are automation-only now —
   so the next agent chat opened through the pills-observer fallback
   (430x148, resizable=false) instead of its own surface (430x400,
   resizable=true; the clean-state counterfactual on the same bundle).

The fix keeps the latch per-query at the same choke points the PR already
used: the quiet answer's two presentation sites now skip presenting entirely
(like their adjacent resize guards), and present(_:) — the single authority
for opening a surface — clears quiet, so an agent chat, a tapped
notification, or a restored conversation can never inherit a dead answer's
silence. The latch cannot clear mid-answer: the quiet path presents nothing.

Verification:
- desktop/macos/Desktop: xcrun swift build -c debug — clean.
- xcrun swift test --filter FloatingControlBarStateTests|AgentPillLifecycleTests
  — 114 tests, 0 failures (incl. the new behavioral
  testPresentingAnOpenSurfaceEndsAQuietAnswer and the extended latch tripwire).
- xcrun swift test --filter WakeWord|VoicePlaybackEcho|VoiceBargeIn|
  STTSessionState|LocalTranscription — pass; FloatingBarSurfaceFloorTests|
  VoiceTurnCoordinatorTests|PushToTalk — 94 tests, 0 failures.
- ./scripts/agent-logic-harness.sh --swift-only — passed (158.7s).
- swiftlint 0 violations; pinned swift-format adds 0 new findings (175
  pre-existing on the synced head, unchanged); check_desktop_test_quality.py
  at baseline.
- Live, named bundle omi-wwnotch-11801 (worktree
  pr-11801-sync-20260910): wake word via the capture seam answered quietly —
  submit glow 386x62 at 17:30:46, settle 362x62 with showingAIConversation
  false and surfaceFloorSatisfied true — then open_seeded_subagent produced
  resizeToFrame to (430.0, 400.0) resizable=true (pre-fix: 430x148
  resizable=false). A second wake word stayed quiet, and a PTT turn
  (ptt_manager_turn) kept its 474x62 → 386x62 → settle lifecycle with
  conv=false.

* docs(desktop): say the parser recovers an "Only" misrendering

The resolveMode doc comment and its test's doc comment both said the
on-device "Only" misrendering "cannot be accepted as a rendering". The
same commit that wrote that (21f1e50ff2) also added
WakeWordSegmentParser.commandShapedRenderings, which does accept "Only"
when a command follows it (an interrogative, or a request verb aimed at
me/my), pinned by the "Only" cases in WakeWordSegmentParserTests.

Both comments now describe what the parser does, and say the 12 of 20
on-device measurement was taken before that recovery existed.

Comment-only change, no behavior change.

Verification:
- desktop/macos/scripts/swift-format-wrapper.sh lint on both files:
  exit 0, no findings.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): stop Omi's own first words from cutting off its answer

Live, on-device lane, noisy room: "Omi, tell me a fun fact" was answered
"Fun fact: A day on Venus is longer than a year on Venus—it rotates so
slowly…", and playback stopped after the first sentence. The microphone
window closed on the answer's first two words, and `Fun fact.` reached
barge-in as the user speaking:

  14:43:13.369 Transcription [BARGE-IN]: User spoke mid-playback;
               interrupting voice output
  14:43:13.375 Transcript [ADD] Speaker 0 [200.0s-210.0s]: Fun fact.

VoicePlaybackEchoPolicy.classify will not attribute fewer than four words
to playback, because deleting a short utterance from the transcript risks
deleting the user. Barge-in carries the opposite risk, so it now also asks
whether an utterance under that floor is an exact, contiguous run of what
playback said in the last few seconds. Transcript handling is unchanged.
A short interruption that is not a run of the answer ("Stop.", "Wait,
what?"), or answer words out of order, still interrupts.

Verification:
- Xcode 26.6 (17F113): VoiceBargeInPolicyTests (16, six new from the live
  strings), VoicePlaybackEchoPolicyTests (23), WakeWordServiceTests (12):
  51 tests, 0 failures.
- Mutation: with the new check replaced by `return true`, exactly the two
  live-case tests fail (VoiceBargeInPolicyTests.swift:121, :127).
- Live, named bundle, capture_test_transcript seam, real playback:
  before the fix, injecting the answer's first two words during playback
  interrupted it 3 of 3. After the fix, injected once playback had
  started speaking: no interruption 3 of 3, and a "Stop." injected right
  after interrupted 3 of 3. Same result on an instrumented build that
  logged spokenWords=15/21/28 at each check.
- swift-format lint clean; check_desktop_test_quality.py at baseline.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): hear "Oh me", "Owe me" and "How me" said without a pause

Live, on-device lane, real voice: 3 of 6 spoken commands were dropped
without a trace. The recognizer wrote the wake word as

  Oh me what time it is.
  Owe me what time it is.
  How me what day is it today?

"oh me" only counted with a punctuation break after it, and "owe me" and
"how me" were not accepted at all.

The stored local segments show this is the common case, not a one-off:
of 1,961 unique segments, 29 distinct sentences open with "oh me",
"o me", "owe me" or "how me", every one of them the user addressing Omi,
none of them ordinary speech. 15 have no break after the phrase, so all
15 were dropped.

These renderings now join "only" in commandShapedRenderings: said
without a pause, they count when what follows opens like a command (a
question, or a request aimed at the speaker's own things). 14 of the 15
pass. The one that does not is "O me order Thai food for Maya.", because
"order" is not a self-addressed request. "oh me" and "o me" are still
homophones, so with a comma they need no command shape, as before.
"oh my" stays out: the same scan found it once, as "Oh my god."

Verification:
- Xcode 26.6 (17F113): WakeWordSegmentParserTests (28, two new from the
  live strings), WakeWordServiceTests (12): 40 tests, 0 failures.
- Mutation: without the four new renderings, only the live-miss test
  fails (7 of 7 strings). With the command-head check switched off, the
  new ordinary-speech test fails along with four existing ones.
- Live, named bundle built with this commit and the next (which only
  adds a log line), capture test seam (speaker 0, the path live speech
  takes): "Owe me what time it is.", "How me what day is it today?",
  "Oh me what time it is." and "O me who am I?" each fired and were
  answered correctly, 5.5-8.9 s after the command. "O me order Thai food
  for Maya.", "How me and my brother met is a long story." and "Owe me a
  favor and we're even." did not fire and never reached the chat.
- swift-format lint clean; check_desktop_test_quality.py at baseline.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(desktop): log a wake word the parser turned down

A sentence that opened with a rendering of the wake phrase but carried
no accepted command left no trace, so a missed "Omi" looked exactly like
one that was never said. Finding the misses fixed in the previous commit
took a scan of the stored transcripts; the app log had nothing.

WakeWordService now logs the rendering, and only the rendering, never
the words after it:

  WakeWord: ignored — 'o me' opened a sentence, but no command followed it

The rejections that were already logged (disabled, busy, not the user,
dedup, too short, cooldown) are unchanged.

Verification:
- Xcode 26.6 (17F113): WakeWordSegmentParserTests (30, two new),
  WakeWordServiceTests (12): 42 tests, 0 failures.
- Mutation: with openingRendering never naming anything, only its test
  fails (2 assertions).
- Live, named bundle, capture test seam: "O me order Thai food for
  Maya.", "How me and my brother met is a long story." and "Owe me a
  favor and we're even." each logged the line above with 'o me',
  'how me' and 'owe me', and did not fire.
- swift-format lint clean; check_desktop_test_quality.py at baseline.

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>

* chore(desktop): fold the wake word's changelog entries into what ships

The branch carried seven entries for one unreleased feature. Five of
them described states nobody outside this PR ever saw: answers that
opened a panel before they moved to the notch, a realtime path behind a
setting with no UI, and a fix for a notch bug that only existed on this
branch. The release notes would have listed the feature and then
corrections to it.

Two entries remain: the wake word as it ships, and the echo fix, which
also changes push-to-talk answers heard during ambient listening.

Verification: desktop-changelog.py validate OK; check-desktop-changelog.py
finds the fragment.

Co-Authored-By: Claude Opus 5 <[email protected]>

* test(desktop): inject wake-word settings instead of mutating shared defaults

main's desktop-test-quality ratchet caps direct UserDefaults.standard mutations
in tests at 323 -- #13260 showed suites racing on shared auth domains -- and
WakeWordServiceTests added ten, all in setUp/tearDown plus one in the disabled
test. That blocked the push at 333.

The test wrote to .standard only because WakeWordService read its settings
through AssistantSettings.shared, which reads .standard directly. The service
already injects `now` and `onTrigger` as closures, so its three settings now
follow the same pattern: isEnabled, wakePhrase and cooldown, each defaulting to
the same AssistantSettings.shared property read at call time. Production
behaviour is identical. The test injects plain values and touches no defaults.

Not an integration-boundary waiver: this suite exercises parsing, triggering
and cooldown, not the defaults integration, so the annotation would have been
the wrong escape hatch.

Verified: desktop-test-quality back to the 323 baseline with zero sites in this
suite; swift build clean; WakeWordServiceTests 12 passed. Mutation-checked --
making the service ignore the injected isEnabled fails the disabled-setting
test, so the injection is what the suite actually exercises.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(desktop): close wake-word review gaps

* fix(desktop): hand a wake word command back when the realtime commit is not accepted

runWakeWordTurn waited only for a session object, and discarded commitTurn's
result before returning true. A reconnecting or replaced transport keeps the
session but defers the commit, replaying buffered audio only, so the command
text was lost while WakeWordService believed it was handed off and skipped
the chat fallback.

- Wait for a usable transport with waitUntilActive, not just a session.
- Treat the command as handed off only when the commit is accepted or
  already owned; otherwise cancel the turn and return false so the caller
  answers on the chat path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(api): regenerate client method totals after concurrent merges

#20003, #19815 and #15669 each regenerated the clients against their own
base and merged cleanly, leaving main's "Total: 478 client methods" header
one short of the 479 the spec now generates. The knowledge-ledger client
schema contract compares the checked-in artifacts and failed on every branch
that merged main. Regenerated; only the five total lines change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(desktop): track wake word UI evidence in the repository layout

Main now requires UI screenshots for changed UI source under
.agent-artifacts/ui-evidence/<pr>/ with an evidence.json manifest. Copy the
existing before/after screenshots from the docs-assets branch unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(desktop): keep wake word commands with the account that spoke them

The realtime path waits up to five seconds for its transport, then sends the
command or falls back to chat. An account switch in that window could send
account A's command as account B. Capture the runtime-owner authorization
when the wake word fires and re-check it after the warm-up, before the
command is sent to the realtime session, and before the chat fallback.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(desktop): carry the wake word's account through the chat route

The default (non-realtime) wake-word route went through the floating bar's chat
path, which can queue a command behind an in-flight reply and dispatch it later
with no account check. Pass the authorization snapshot captured when the wake
word fires through submitHandsFreeCommand/submitSpokenCommand, sendFollowUpQuery,
openAIInputWithQuery, routeQuery and the pending follow-up queue, and re-check
it at each send (dispatchChatQuery and the direct sendAIQuery hop). Other
callers pass no snapshot and are unchanged.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(desktop): scope wake-word requests through the bar's queue and latch

- HandsFreeRequest carries the speaking account and a request id through the
  chat route in place of a bare snapshot.
- The pending follow-up becomes RequestBoundSlot: a queued hands-free query is
  handed out at most once, and only while its account is still current
  (including after a same-account sign-out and sign-in).
- The global "next query is quiet" flag becomes QuietSurfaceLatch, armed and
  consumed per request. A request rejected before presenting releases only its
  own arm, so it can no longer hide the next typed answer, and an older request
  can never clear a newer one's.
- After the awaited realtime send, WakeWordSendOutcome re-checks the account
  and the turn: a stale completion neither commits nor cancels a replacement.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(desktop): re-pin the quiet-answer latch to the request-scoped QuietSurfaceLatch

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: David Zhang <[email protected]>
Co-authored-by: David Zhang <[email protected]>
Git-on-my-level added a commit that referenced this pull request Nov 4, 2026
…nce (#24485)

* feat(notes): action-item owner, due and context on every surface

Meeting-note action items now read the same on web, macOS and mobile:
the item, then owner and due date on one line, then the context on its
own line. An unknown owner or due date is left out instead of saying
"Unknown".

- web share page: drop "Due Unknown" and the unknown-owner avatar; the
  context moves to its own line. The agent Markdown export keeps its
  explicit Unknown markers.
- macOS: ActionItem now decodes and caches owner_name, due_at and
  context; the row shows them, and Add to Tasks keeps the due date.
- mobile: the summary shows the note's tasks again (read-only, after the
  sections, as on the Mac) with the same metadata. The reader's own
  items say "You".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* changelog(app): meeting-note tasks fragment

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(web): share HTTP test pins the omit-unknown action-item rule

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(desktop): avoid force unwraps in action-item metadata fixture

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(notes): action-item owner, due and context on every surface

Meeting-note action items now read the same on web, macOS and mobile:
the item, then owner and due date on one line, then the context on its
own line. An unknown owner or due date is left out instead of saying
"Unknown".

- web share page: drop "Due Unknown" and the unknown-owner avatar; the
  context moves to its own line. The agent Markdown export keeps its
  explicit Unknown markers.
- macOS: ActionItem now decodes and caches owner_name, due_at and
  context; the row shows them, and Add to Tasks keeps the due date.
- mobile: the summary shows the note's tasks again (read-only, after the
  sections, as on the Mac) with the same metadata. The reader's own
  items say "You".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* changelog(app): meeting-note tasks fragment

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(web): share HTTP test pins the omit-unknown action-item rule

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(desktop): avoid force unwraps in action-item metadata fixture

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(notes): add action item due certainty and mobile actions

* feat(desktop): reuse linked tasks when toggling action items

* fix: keep action-item metadata across cache encoders; pin due/owner coverage

Structured.toJson() wrote description-only strings, so the Flutter
conversation cache dropped owner/due/context on every restart; it now
emits the full action-item objects while the legacy String branch still
decodes old caches. Structured.encode(to:) on macOS rebuilt items with
dueAt: nil and no ownerName/context; it now maps all three fields, and a
new Structured-level round-trip test pins it.

The widget test now covers a due-dated row (keeping the no-Unknown
assertions), the share HTTP test asserts the owner inside .sn-owner, and
the meta separator rides at the owner's tail so a wrapped due date never
starts a row with a stray dot.

* test(app): update action task provider mock

* changelog(notes): mention action-item cache metadata

* docs(api): expose shared action-item due certainty

* fix(api): regenerate clients for action item due certainty

* fix(notes): completed creates, confirmed toggles, unique item identity

Address review feedback on the action-item task flows:

- TasksStore.createTask now inserts completed creates into completedTasks
  and passes 'completed' to the backend create, so a checked-off summary
  item no longer resurfaces as an open task after refresh.
- TasksStore.toggleTask reports whether the mutation took effect;
  ConversationActionItemsSection only patches the conversation summary
  after a confirmed task mutation (or a completed create), so the two
  surfaces can no longer disagree.
- Action-item session identity binds segments + description + due date on
  both macOS and mobile: segment IDs are evidence references, not unique
  identities, and one segment can carry several commitments.

* fix(notes): persist promoted action-item task links across sessions

The promoted task id and its idempotency key lived only in the page's
in-memory session, so navigating away or restarting left the summary
item unlinked and a later Add or check-off minted a duplicate task.

- ConversationActionItemTaskSession now takes the conversation id and
  derives the create idempotency key from it plus the item's content
  identity, so a retry from any session lands on the same task (the
  backend returns the task an equal key already created).
- The identity -> task id map is persisted per conversation
  (SharedPreferences, bounded to the 50 most recent conversations) and
  restored before the first mutation, so a reopened note addresses the
  existing task instead of creating another.
- New tests cover cross-session restore and deterministic keys.

* test(desktop): pin metadata retention on link and handle-shaped owner names

* fix(app): drop a dead null check flagged by the analyzer ratchet

segment.id is non-nullable, so 'segment.id != null' is always true and the
unnecessary_null_comparison lint (baseline 0) failed the Mobile App Checks
analyzer ratchet at 0ebf66b.

* fix(desktop): pass recurrenceRule before completed to match createActionItem

The origin/main merge moved recurrenceRule ahead of completed in
APIClient.createActionItem's parameter list; this call site kept the
pre-merge order, so the desktop Swift compile failed with
'argument recurrenceRule must precede argument completed'.

* fix(desktop): isolate ActionItemRowMetadataTests on the main actor

ConversationSummaryTaskPromoter.linkedConversation, merged from
origin/main (#19815), is a @mainactor static method; calling it from a
nonisolated synchronous test failed the desktop Swift compile. Mark the
test class @mainactor like ConversationSummaryTaskPromoterTests.

* fix(desktop): assert toggleTask's effect result in owner boundary tests

This PR made TasksStore.toggleTask return whether the completion
mutation took effect; the three Task-wrapped call sites in
TasksStoreOwnerBoundaryTests still discarded the result, which the
Swift compiler rejects as an unused Bool expression. Assert the
outcome at each site: false when the owner lease was revoked mid-flight,
true when the toggle completed under the captured lease.

* fix(notes): address action-item review round — row identity, rollbacks, canonical promotion

Trusted-bot review round on the action-item metadata work:

- Mobile: task-session identity now includes the row index, so identical
  extracted twins keep separate pending state, idempotency keys, task links
  and widget keys; a conversation PATCH failure compensates the task it just
  created (delete) or toggled (restore); the row is re-resolved against the
  provider's current items before patching so a reprocessed note cannot
  redirect the write onto another row.
- macOS: completion-created tasks go through ConversationSummaryTaskPromoter
  (durable target_task_id link, backend-addressable id — no local-only ids),
  the conversation PATCH failure rolls the task back, and completion
  overrides key by row identity instead of the description.
- Apple Reminders: a completed create propagates isCompleted/completionDate
  to the new EKReminder instead of appearing open in Reminders.
- Web: the Markdown export marks tentative due dates, matching the page.
- Backend: a linked row (target_task_id) mirrors exactly its task instead of
  every standalone task sharing the description; unlinked rows keep the
  legacy description mirror.
- Tests: hermetic mirror regression suite; twins/rollback/reprocess mobile
  tests; tentative-export test; manifest registers the two new writer files;
  the owner-boundary assertion now matches toggleTask's stale-lease bail.

* fix(notes): include action items in the Summary tab's search

The section's rows now take part in the tab's search: the page counts
matches in each row's description, verbatim owner name and context (the
localized "You" label, email-shaped names and deleted rows are not
searchable), passes the section its offset into the tab's results, and
the rows highlight their matches and scroll to the tab's current result
exactly like the note's own paragraphs.

* test(backend): give the events-bounds action-item fake a target_task_id

set_action_item_status now reads the row's target_task_id to scope the
standalone-task mirror; the fake predating that field made the route's
mirror raise inside its except and skip the mirror entirely, so the two
reminder tests failed with mark_action_item_completed called 0 times.

* Keep notes-model meeting identities provisional and persist inferred bindings

* fix(notes): corroborate provisional identities and fence speaker bindings

Require exact textual or attendee corroboration for names and emails; only
screen/background or attendee corroborated names can become provisional people.
Preserve owner speech, existing non-notes matches, and manual receipts, and remove
rejected identifiers from the saved participant list. Correct the identity-write
and late-refresh types without adding teaching or another admission scanner.

Validation: backend/test.sh selected identity, rich-context, screen-evidence,
admission, people and speaker suites: 308 passed. Hook-configured targeted
Pyright: 0 errors.

Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3571 -> 3577 | Expose the existing notes generator as a public accessor for late refresh; this round adds only three lines at that seam.
Line-Count-Exception: backend/utils/llm/conversation_processing.py | 1961 -> 1969 | Retain the notes evidence gate while removing the name-validation waiver; this round reduces the file from 1971 lines.

* fix(notes): retain late-evidence timing without identity context

Record the existing note-save timestamp and zero-frame count when a completed
note has no identity context. This preserves the already approved one-time late
evidence refresh after gating transcript-only identity work, without creating
people, assigning speakers, or attaching _notes_identity on the flag-off path.

Validation: backend/test.sh identity file: 57 passed, including a synthetic
transaction test that the context-free note admits only one later marker.

* chore(api): export provisional participant fields

The notes identity model adds alias, speaker_bindings, and a screen source. The app-client OpenAPI document has to match or pre-push rejects the branch.

* fix(api): keep participant source on the released enum

Released app clients only decode roster or transcript. Screen and background evidence still creates the person; the wire value folds to transcript.

* chore(app): mark provisional identity wire regen as internal

The generated conversation wire gained alias and speaker binding fields. Released clients still decode participant source as roster or transcript.

* test(web): polyfill localStorage for Node 25+

Node 25 omits the experimental localStorage global. The web app check calls clear() in setup, so the gate failed before any identity assertion.

* test(notes): expect released participant source after screen fold

Screen evidence still keeps the name and email. The stored source is transcript because released clients cannot decode a new enum value.

* fix(notes): keep notes validation free of the notes-identity persistence graph

meeting_notes_validation imported identifier_in_text from
database.notes_identity, whose person_aliases dependency pulls Firestore
module-level imports into every isolated-environment test that loads the
validation module. That broke three stubbed-environment suites at
collection/setup on CI shards (timezone, action-item date validation,
conversation archive filter contract).

identifier_in_text is a pure regex used only by this validation module,
so keep a local copy; notes_identity retains its own for persistence-side
use. The archive filter contract stub already faked FieldFilter for the
same reason — teach it transactional, which person_aliases now needs via
notes_identity.

The TTS rate-limit and shared-action-items failures on these shards are
main's known red suite, repaired separately in #20748.

* feat(speakers): exclude media speakers with Not a Person

* chore: add not-a-person speaker label changelog

* feat(speakers): complete exclusion controller regression fixture

* fix(speakers): reapply not-a-person exclusions across conversation refreshes

* fix(speakers): record ignored voices for live not-a-person, forward the exclusion seam, and document the wire map

- Bulk assign-bulk not_a_person now records the same ignored-voice marker
  (fenced by assignment generation) that the reject route and tag-prompt
  answers write, so live exclusions appear under Settings > Ignored Voices
  and can be restored from there.
- listen_pusher_pipeline.mdx documents the speaker_assigned assign_type
  field and the bulk exclusion path per the backend wire-contract rule.
- CaptureDependencies/CaptureProvider/composeCaptureProvider forward the
  excludeSpeaker seam so the production composition stays hermetically
  testable (C1 contract); composition tests pin the forwarding and the
  routed exclusion behavior.

* fix(speakers): import voice_profiles the way the router's hermetic stubs resolve

`import database.voice_profiles` fails in unit shards that stub the database
package with an AutoMockModule (no submodule), while `from database import
voice_profiles` resolves through the stub — the form every other router uses.

* fix(speakers): make live not-a-person exclusions restorable and retire markers on positive assignment

Address review threads on _assign_manual_speaker:

- remove_ignored_voice now also drops generation-matched segment-scoped
  exclusion decisions, so restoring an ignored voice actually clears the
  manual decision that kept the speaker prompt-suppressed (thread 1).
- A later person/user assignment clears the ignored-voice marker it
  supersedes via new clear_ignored_voices, so the voice leaves Settings >
  Ignored Voices and rejoins matching once reassigned (thread 2).
- Router test drives the bulk path end-to-end; unit tests cover the
  segment-scoped restore and the superseding positive assignment.

* test(speakers): keep marker retirement on the hermetic store in app-level fixtures

Positive assignments now retire ignored-voice markers through
voice_profiles.clear_ignored_voices; the match-scores and taught-persistence
fixtures drove those routes without stubbing that module's Firestore client,
so hermetic shards blocked on the GCP metadata server. Patch the client seam
the same way test_speaker_rejections already does.

* test(speakers): stub the voice-profiles client in owner-teaching route tests

Speaker-scoped is_user assignments retire ignored-voice markers even when the
assignment transaction is stubbed; keep that Firestore write hermetic.

* fix(speakers): fence ignored-voice markers by generation and reconcile newer assignments

Address review threads on the live not-a-person exclusion:

- record_ignored_voice now checks, inside the marker transaction, whether a
  newer whole-voice positive decision already won the receipt; stale-generation
  markers are not recorded, so a reassign during an in-flight exclusion cannot
  re-ignore the voice (segment_only range entries do not unseat it).
- Positive reassignment only retires markers for speakers whose rejection no
  longer wins the receipt, so a range-only reassignment keeps the remaining
  whole-voice exclusion restorable from Settings > Ignored Voices.
- Marker record/clear failures after the assignment transaction committed no
  longer 500 the endpoint: the decision is durable, the response stays
  authoritative, and the failure is logged for reconciliation.
- The capture controller retires a local exclusion when the incremental socket
  path delivers a persisted manual positive label for that speaker (the
  receipt projects exclusions as unlabeled, never manual); automatic labels
  still cannot unseat a fresh exclusion.

* fix(speakers): fence marker retirement by generation, share it across writers, and surface degraded persistence

Address review threads on the not-a-person exclusion loop:

- clear_ignored_voices now takes assignment_generation and retains markers
  recorded by newer decisions, so a delayed clear from an older positive
  request can no longer remove a newer exclusion's marker (the voice would
  silently leave Settings > Ignored Voices).
- Marker record/retire bookkeeping moves to utils/ignored_voice_markers.py
  shared by the live sheet router and tag-prompt card answers; a card
  Me/person answer now retires a prior live exclusion marker instead of
  leaving the positively assigned voice listed as ignored.
- Both post-commit marker persistence handlers fail open with shared
  fallback telemetry (record_fallback, component=speaker_assignments)
  instead of log-only, per the backend fallback contract.
- The conversations import in voice_profiles moves to module scope
  (database -> database edge verified cycle-safe).
- The app's same-conversation refresh retires a local exclusion when the
  snapshot carries a newer manual positive label, mirroring the socket path.

Verification: 384 backend tests across 12 affected suites; black clean;
import-cycle smoke OK; 46 Dart tests across 4 suites; no desktop changelog
entry required.

* fix(speakers): keep lazy conversations imports, fence re-recorded markers, and gate range-exclusion markers

- Restore function-local database.conversations imports in voice_profiles:
  the module-level import broke test collection via the
  utils.speaker_identification import order (Backend unit shard 1/6).
- record_ignored_voice now retains an existing marker whose assignment
  generation is newer than the write being recorded, so a delayed older
  exclusion cannot strand a newer exclusion's restore linkage (Codex P2).
- record_exclusion_markers records a whole-voice marker only when the
  committed receipt has a winning whole-voice rejection at this write's
  generation; range (segment_only) exclusions no longer record markers
  that suppress segments outside the range (Codex P2).
- Live capture keeps a WS manual-positive conflict excluded and reconciles
  via one coalesced authoritative in-progress snapshot instead of inferring
  ordering from label provenance, which the socket cannot order (Codex P2).
- Tests: delayed-older-exclusion regression, range-exclusion no-marker,
  import-order probe, and reconcile-semantics rewrite of the WS retire test.

* fix(speakers): fence exclusion retirement by request epoch and bind reconcile to capture session

Review follow-up for the live 'Not a person' exclusion (Codex round):

- Exclusions now record a monotonic decision epoch at acknowledgement and
  REST refreshes record the epoch at request start, so a same-conversation
  refresh whose request predates the exclusion acknowledgement can never
  retire it: only a refresh that started after the ack — and therefore saw
  the committed exclusion server-side — may retire it via a persisted
  manual positive.
- The 300 ms exclusion reconcile is now bound to the capture lifetime and
  the active capture session: a stop/replace/dispose during the delay or
  the load cancels the install instead of mutating a later session.
- ListenReceiver._handle_speaker_assigned clears the speaker-wide
  inference map (speaker_to_person, voice/segment identity status) for
  winning not_a_person rejections, so newly arriving segments of the
  rejected speaker are not relabeled from the stale map.

Regression tests: stale-request fence, session-cancelled reconcile, and
socket rejection clearing the speaker map.

* fix(speakers): fence reconcile by per-recording token, queue mid-refresh conflicts, retire full matcher state and superseded markers

Review follow-up round 2 (Codex):

- The exclusion reconcile is now fenced by the CaptureSessionOwner token
  (per-recording identity) instead of activeCaptureSessionId, which the
  controller docs define as unchanged across sequential phone-mic
  stop/next-start; a recording roll mid-delay or mid-load cancels the
  install. A conflict arriving while a reconcile is in flight now queues
  one follow-up refresh instead of being discarded.
- ListenReceiver._handle_speaker_assigned delegates the rejected voice's
  cleanup to the new SpeakerMatcher.retire_excluded_voice seam so the full
  matcher state retires (mapping origin, candidates, suggestions), letting
  a restored ignored voice match automatically again.
- retire_exclusion_markers now distinguishes rejection kinds: only a
  still-winning not_a_person keeps its ignored-voice marker, so a newer
  not_me / not_person / unnamed card answer supersedes an earlier
  exclusion and clears the stale marker; the tag-prompt whole-voice
  branch calls the shared retirement for every answer.

Regression tests: per-recording fence across a phone-mic restart,
mid-refresh conflict queueing, full matcher-state retirement, and
kind-distinguishing marker retirement.

* test: warm-up phase instrumentation for perf harness

* perf(app): offload cold recording scans from UI isolate

* perf: mount Tasks tab on demand instead of 350ms prewarm

* perf: decode app catalog once; stop blocking hydration on Intercom

* perf: quiet dependency wiring notifications and shortcut publication during startup

* fix: fence stale task loads and preserve optimistic creates across the demand load

Address review races in the demand-mounted Tasks workstream:

- fetchActionItems: guard the typed projection, loading-flag retirement and
  final notify by session generation, so a fetch that started before sign-out
  cannot project error/locked state onto the next account or hide its shimmer.
- createActionItem/_applyFetchedActionItems/_fetchHomeWidgetPreview: preserve
  optimistic creates across wholesale list replacement. Temp rows and rows
  that settled while a fetch was in flight survive exactly the replacements
  of fetches that predate them; later fetches stay authoritative. Temp rows
  are excluded from the Siri/Spotlight mirror while their final server
  identity is unknown.
- UsageProvider.fetchSubscription: single-flight onto the real in-flight
  request so the unlimited deep link's _subscriptionReady await cannot pass
  while the fetch onboarding started is still unresolved (fail-open paywall
  flash). clearUserData detaches the in-flight future for the next account.

Verified: dart analyze clean; new demand-load race tests (3), subscription
single-flight tests (3), plus action_items/usage/siri suites all pass.

* fix: address round-2 review — dedupe preserved creates, pagination offset, bounded waits

- createActionItem: when a concurrent list response already observed the
  committed server row, replacing the temp row could leave a duplicate; the
  confirmed row now replaces both the temp row and any earlier copy.
- loadMoreActionItems: offset counts server-backed rows only; preserved
  optimistic/shadowed creates stay out of the offset until a server page has
  contained them, so pagination never skips a server task.
- Home widget freshness: admit the preview refresh after a bounded deadline
  even while repeating animations keep the scheduler busy; the timer no
  longer spins 4x/second indefinitely.
- Quick actions: a failed shortcut publication now schedules a bounded
  delayed retry (still clearing the dedupe cache for natural republish),
  canceled by any successful publish or reset.
- Conversation detail projection: replace full ServerConversation/App
  toJson encoding per notification with a cheap fingerprint of rendered
  fields (identity covers final heavy lists; structured title/overview and
  mutable catalog fields are included explicitly).

Verified: dart analyze clean; demand-load race suite (now covering dedupe
and pagination offset), quiet detail wiring, quick actions, and related
action-items/usage/conversation-detail suites: 57/57 pass.

* fix: address round-3 review — retire server-observed creates, runnable shortcut retry, screen-vs-preview readiness, app metadata fingerprint

- _withPendingCreates retired _preservedCreateIds only when a create also
  needed preserving; the common no-fetch-in-flight settle path never retired
  the id, so a confirmed create stayed excluded from the pagination offset
  forever and loadMore could stall on repeated already-visible pages.
- The scheduled shortcut retry guarded against the dedupe cache the failure
  path had just cleared, so it never ran. Failed projections are now tracked
  separately; a successful retry restores the dedupe cache.
- The Tasks first-load shimmer consulted hasLoaded, which the Home widget
  preview also satisfies; a completed zero-task preview could flash the
  empty state on first visit. The screen now tracks its own readiness.
- The detail change fingerprint omitted app description/image, which the
  attribution row renders; catalog-only metadata edits were suppressed.

* fix: ignore superseded shortcut publication failures instead of retrying them

A late failure from an older setShortcutItems call unconditionally re-armed
its obsolete projection for retry even after a newer projection had already
published, so the 5s retry could overwrite the current iOS shortcuts with
stale connect/mute actions. Guard the failure path with the same ownership
check the retry path already uses: if this call no longer owns
_publishedShortcuts, the failure is superseded and is ignored.

* fix: keep task pagination and staged deletes correct across demand-load races

- loadMoreActionItems retires preserved creates observed in the page's
  server response, mirroring _withPendingCreates: a create ordered beyond
  the initial page no longer stays excluded from the offset forever.
- A Home preview that loses the navigation race prunes its fetch ordinal
  from shadowed creates in its finally block; previously an aborted
  preview never released the shadow, so a server-confirmed row kept
  lagging the pagination offset.
- A staged delete of a temp row transfers to the confirmed server row
  when the create settles instead of reinserting it; undo/commit resolve
  the temp-id alias, and a failed create dissolves the staged delete.

Each path has a regression test in the demand-load races suite.

* fix: generation-fence stale load-more cleanup and skip preserving fetched creates

- loadMoreActionItems only resets _isFetching and notifies for its owning
  session generation, so a sign-out-mid-flight load-more cannot clear the
  successor account's fetch state or admit overlapping pagination.
- _settlePendingCreate no longer marks a create as offset-excluded when a
  concurrent fetch already placed its confirmed row in the visible list:
  a server page has contained it, so it is server-backed immediately
  instead of undercounting the pagination offset until some later page
  happens to retire it.

Both paths have regression tests in the demand-load races suite.

* fix: release fetch shadow ordinals on aborted refreshes and re-arm Undo preservation

Codex review round 4 on the demand-load races:

- fetchActionItems aborted (typed outage, sign-out discard, or throw)
  without running its _withPendingCreates replacement, but its finally
  only removed the ordinal from _wholesaleFetchesInFlight. The shadow
  kept excluding the server-confirmed row from _serverBackedRowCount
  forever, so pagination repeatedly re-requested overlapping pages.
  Prune the ordinal via _dropFetchShadowOrdinal exactly like the Home
  preview abort path.

- _settlePendingCreate skipped registering fetch threats when the
  settled row was hidden by a staged delete. Undo restores the row, but
  the older in-flight response's replacement then dropped it from the
  list until the next refresh. Register the threats regardless of
  visibility and enforce deletion intent at replacement time instead:
  _withPendingCreates now skips preserving rows whose ids sit in
  _pendingDeletionIds, so committed/outright deletes are never
  resurrected while Undo re-arms preservation.

Regression tests: aborted refresh releases its shadow; Undo before the
fetch returns keeps the confirmed row; a committed staged delete stays
deleted across the replacement.

* fix: hide transferred staged-delete rows, clear stale wholesale ordinals, fold speaker-identity revision

- Thread 1 (action_items): a concurrent fetch that observed the confirmed
  server row mid-toast admitted it into the visible lists because the
  tombstone still held only the temp id; the transfer branch now removes
  the observed row everywhere a fresh stageDeleteActionItem would, so the
  task cannot reappear during the Undo window or outlive a successful
  commit.
- Thread 2 (action_items): clearUserData now clears _wholesaleFetchesInFlight
  so a stuck signed-out generation's ordinals cannot shadow a successor
  account's confirmed creates out of the pagination offset.
- Thread 3 (conversation detail): applySpeakerPromptIdentities mutates
  transcript segments in place with no container-identity change; the
  conversation provider now bumps a speakerIdentityRevision and the detail
  fingerprint folds it in so owner answers re-render Speaker N rows.

Regression tests for all three paths.

* fix: preserve settled edits across wholesale list replacements

A settled complete/description/due-date mutation could be silently
reverted when a wholesale list fetch that started earlier (the Home
preview or the first Tasks demand load) applied its stale replacement:
the response predates the mutation and restores the pre-edit server
row, so a completed task showed incomplete until another refresh.

Mirror the fetch-shadowed-create machinery for edits: record the
server-confirmed row with the set of wholesale fetches still in flight
when the mutation settles, and re-apply it over exactly those
replacements. Fetches that started after the settle see the edit
server-side and stay authoritative; aborted fetches and sign-out
release their threat like create shadows.

* fix: close round-4 optimistic-UI races in the Tasks provider

- updateActionItemState now splices the settled server row back into the
  visible list, so a wholesale fetch that applies mid-mutation cannot
  leave the pre-completion row on screen (Codex PRRT NnpK).
- Drag-reorder and indent changes are tracked as uncommitted layout and
  re-applied over wholesale replacements until their debounced batch
  write settles, with the same in-flight-ordinal threat semantics as
  edit shadows; failures retire so a later refresh restores server truth
  (Codex PRRT NnpR).
- Bulk delete captures optimistic temp rows instead of sending temp ids
  to the bulk endpoint: the row hides behind a tombstone and the deletion
  completes with a follow-up single delete of the confirmed server id
  once the create settles; failed creates dissolve their capture and
  failed bulk requests roll back only the real rows (Codex PRRT Nnpu).
- ensureHomeWidgetPreviewLoaded refreshes through refreshActionItems
  once the Tasks screen has loaded, restoring resume-time widget
  freshness behind the shared 30s cooldown (Codex PRRT sEMXt).

* fix(speakers): fence markers against newer rejection kinds, clear rejected segment mappings, retire markers on not_me, harden reconcile fetch and wire Settings restoration

- voice_profiles: the stale-generation fence now treats any newer whole-voice
  decision as superseding — not only positives — so a delayed not_a_person
  write cannot recreate a marker after a newer not_me/not_person answer.
- receiver: a winning whole-voice rejection now also drops per-segment
  person mappings for every segment of the rejected speaker; a segment
  absent from the socket payload kept its stale mapping otherwise, and
  process_speaker_assigned_segments prefers segment_assignments.
- conversations router: every non-exclusion assignment reconciles
  ignored-voice markers (assign_type=is_user&value=false commits a whole-voice
  not_me that previously skipped retirement via the elif person/user guard).
- capture controller: the reconcile refresh uses getConversationsResult and
  skips installation when the fetch failed, instead of converting a
  transport failure into a destructive null install mid-capture.
- capture/settings: restoring a voice from Settings > Ignored Voices now
  forwards to the live capture (onIgnoredVoiceRestored) — restoration writes
  no positive label, so no snapshot could ever satisfy the manual-positive
  retirement condition and the local exclusion would outlive the restore.

* fix: keep non-layout mutation echoes from flattening task hierarchy

The settled-row splice and fetch-shadow introduced in round 4 could
replace the visible row with a mutation echo that omits sort_order and
indent_level (the wire schema defaults both to 0), flattening an
indented task on complete/description/due-date settle — exactly what
the upstream gesture contract (hub #4) forbids. Non-layout mutation
echoes now merge the visible row's layout before splicing or shadow
registration, so layout truth keeps flowing only from list fetches and
layout mutations.

- Partial bulk-delete rollback now filters captured temp rows like the
  null-response path: the bulk request never carried their ids, so a
  partial response cannot report them deleted and must not resurrect
  them (Codex PRRT sTqiZ).
- Layout batch settlement is revision-aware: each debounced batch
  snapshots the per-id revisions it submitted, so an older batch
  response can no longer retire a newer edit the user staged while the
  request was in flight; the newer edit keeps protecting the visible
  rows until its own batch settles (Codex PRRT sTqip).
- Regression tests for all three races in the demand-load race suite.

* fix(speakers): preserve whole-voice exclusions across range-only labels

A manual positive snapshot only retires the local exclusion when it
carries whole-voice authority: the receipt's speaker entry projects onto
every segment of the speaker. A range-only decision (segment_only /
time_range) deliberately keeps the whole-voice not_a_person rejection
authoritative outside the range — its in-range manual label must not
drop the speaker-wide local exclusion while the server still considers
the voice excluded.

Retire per speaker only when the entire cluster in the snapshot carries
the manual positive (and the refresh started after the exclusion's
acknowledgement); otherwise keep blanking labels and suppressing
suggestions. Update the reconcile tests to model whole-voice snapshots
and add a range-only regression.

* fix: close round-5 Tasks provider races (completion splice, atomic layout batch, shimmer join)

- updateActionItemState now splices the confirmed server row when a
  wholesale fetch already applied mid-mutation, so a completion that
  settles after an intervening list response still lands (PRRT sNnpK).
- Sort and indent share one debounce and one batch request: a drag that
  changes both commits atomically, and the shared layout revision can no
  longer be settled by whichever single-field flush finished first
  (PRRT sTqip, sZ2hW).
- The Tasks screen joining a non-screen first load upgrades the
  presentation to the shimmer instead of flashing the false empty state
  (PRRT sZ2hf).
- Regression tests for the atomic combined batch and the older-batch
  settle guard in action_items_demand_load_races_test.dart.

* fix(speakers): reconcile exclusions against receipt authority via excluded_speakers

A selected-segment superseder (assign-bulk with explicit segment ids)
retires the whole-voice not_a_person exclusion in the manual receipt, but
only its segments project a manual label — a partial projection identical
to a range-only (segment_only) label, which deliberately keeps the
exclusion. The controller's whole-cluster-positive heuristic therefore
re-blanked valid assignments and kept suppressing suggestions after the
server had already retired the exclusion.

Project the receipt's still-winning whole-voice not_a_person voices as
'excluded_speakers' on the Conversation payload (shared pure walker in
models/speaker_exclusion.py; the receipt itself never serializes), and
reconcile against it (epoch-fenced) with the projection heuristic kept
only as the fallback for older servers. Strip the projection from the
integration redactor, pin the field classification, regenerate the
app-client spec and first-party clients, and document the wire map.

* fix: fence joined shimmer cleanup and superseded completion responses

- Generation-fence the joined-load shimmer cleanup so a stale completion
  from the signed-out account cannot clear the successor account's
  shimmer (Codex PRRT_kwDOLkKqys6sf5P1).
- Track a per-item completion mutation revision: only the latest done/
  undone attempt may settle its row, register its fetch shadow, revert
  the visible state on failure, or project to Siri/Apple Reminders, so
  out-of-order PATCH responses cannot resurrect superseded completion
  state (Codex PRRT_kwDOLkKqys6sf5P9).
- Regression tests in the demand-load race suite (round 6).

* fix: keep Home widget freshness unfiltered while the Tasks screen filters

Codex review (round 7): after the Tasks screen loaded, resume-time widget
freshness delegated to refreshActionItems(), whose fetch carries the
screen's _startDate/_endDate and replaces _actionItems with only matching
rows. HomeWidgetsPublisher derives Up Next and the open-in-all count from
that list, so the iOS widget dropped tasks outside the screen filter until
the filter cleared.

- ensureHomeWidgetPreviewLoaded: with an active date-range filter, refresh
  a widget-only unfiltered snapshot instead (single-flight, shared 30s
  cooldown, generation-fenced, never replaces _actionItems); without a
  filter the authoritative screen refresh is already unfiltered and shared.
- incompleteItems/todayPreviewTasks read the snapshot only while a filter
  is active, so the screen keeps its filtered list.
- setDateRangeFilter/clearDateRangeFilter kick/invalidate the snapshot at
  the source-flip transition; clearUserData resets snapshot state.
- Regression tests: round-7 group in action_items_demand_load_races_test.

* fix(speakers): authoritative empty exclusion projection, shared reject-route markers, stacked-generation restore, reconcile release window

- excluded_speakers now projects [] whenever a manual receipt exists: a
  selected-segment superseder or cross-client restoration must read as an
  authoritative empty set, never null (null = old server heuristic that
  can never retire the exclusion). Doc updated to pin the contract.
- The reject endpoint records/retires ignored-voice markers through the
  shared helpers (record_exclusion_markers / retire_exclusion_markers):
  not_me / not_person answers now retire a superseded exclusion marker,
  and a post-commit marker failure fails open with shared telemetry like
  every other writer.
- Settings restore drops every not_a_person decision no newer than the
  marker's generation (stacked whole-voice + selected-segment exclusions);
  explicit not_me/not_person answers and genuinely newer decisions survive.
- The exclusion reconcile completion frees the in-flight slot and schedules
  any queued follow-up synchronously before its first await, closing the
  release-window race that could strand a conflict's queued refresh.

Verified: 139 backend tests (6 focused suites) and 14 capture tests pass;
black and dart format clean.

* fix(app): fix the trial paywall and Pocket onboarding arms in code

Both experiment flags already serve one arm at 100%. Reading them is what
blocks the release that stops clients loading flags from PostHog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(flags): serve client flags only from Omi

Disable PostHog flag preloads, explicit and implicit requests while preserving event capture and mobile replay. Keep missing-key defaults and account-bound snapshots; prepare the pending chat and replay store migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(flags): distinguish fixed client arms from legacy experiments

Preserve the Coordinator-owned #24370 fixed trial and Pocket arms and make their exposure-only role explicit for new builds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(flags): keep unused SDK survey initialization disabled

The app has no PosthogObserver survey surface. Disable SDK surveys in Dart and the first native setup so the transport bootstrap cannot install native survey UI in place of Flutter delegation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(flags): verify both SDK flag endpoint path forms

Normalize trailing slashes in the request-path recorder; pinned SDK capture uses /batch and flag requests use /flags. Exercise both forms of flags and decide locally.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(flags): retain the registered local-capability kill key

Use the established killSwitchFlag constant convention so the registry checker tracks this Omi-only read after the SDK bypass is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(flags): update the screen-task flow for Omi-only authority

Replace the retired PostHog fallback expectation and add a hermetic SDK request-path step covering the new transport while verifying analytics batch delivery.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(flags): preserve iOS SDK attribution at the first setup

PostHog snapshots its SDK context during setup. Seed Flutter attribution before native initialization and pin the declared version to pubspec.lock with a regression test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(app): block unsafe pendant firmware updates

* fix(app): keep firmware battery readings current

* fix(app): require 30% battery for pendant firmware updates

* feat: stage explicit reminders with date precision and creation evidence

* harden: retain each reminder source revision across retries

* harden: align reminder types across generated clients

* harden: clear speech-only date basis after manual edits

* harden: preserve task wording and explicit null date compatibility

* harden: validate reminder due through the shared storage boundary

* chore: record internal reminder wire compatibility update

* harden: narrow the validated reminder due payload

* harden: keep unresolved reminder date gestures all day

* harden: preserve reminder provenance and validate additive contracts

* test: keep reminder policies importable in processing fixtures

* chore: avoid competing feature flag registry insertions

* test: make backend CI fixtures deterministic

Keep the synthetic slow drain row first and release every wait during cleanup. Give independent jobs separate owners and preserve void transaction results. Settle recovery discovery pages and assert exact probe counts, following 9e166a6 from PR #24503. Stub unrelated episode I/O in owner-recognition witnesses. No production code, timing budgets, markers, or durable-outcome assertions change.

* test: serialize ownerless record drain fixtures

Paging and privacy fixtures share the missing-owner key, so drain them with one worker instead of racing the per-owner admission guard. Parallel admission tests retain their explicit worker counts. Keep assertions, CI selection and timing budgets unchanged.

* test: reconcile drain fixtures already fixed upstream

Let upstream #24503 supply the shared drain fixture setup so GitHub can form the PR test revision. Keep the serial paging default and bounded cleanup. All test functions and assertions remain unchanged.

* ci(mobile): re-time Dart Analyze & Tests at 40 minutes

The analyzer ratchet plus the full flutter test suite now needs 27-30
minutes of wall time on ubuntu-latest (the suite alone is ~26); the
30-minute job timeout cancelled a run whose every step had already
succeeded — the suite printed "All tests passed" and the cancellation
landed during cache post-steps (PR #24370, 30:07 elapsed). Recent green
runs of the same job sit at 26:54-29:21, so the ceiling, not the suite,
was the flake. The same suite under far timezones
(dart-tests-kiritimati) already runs with 60 minutes.

* ci: raise Dart Analyze & Tests ceiling above the measured cold path

Main's healthy runs measured 27-29.6 min (run 41736391155: 29:36 for
8207 tests) against the 30-min cap; run 41693050609 was cancelled at the
cap with all 7842 executed tests passing and ~360 unexecuted, failing
Mobile Release Eligibility downstream. Same cold-path ceiling problem
test_mobile_ci_infra_guards.py documents for ios-compile-check; 40 keeps
~10 min headroom and the CI budget counts p50, not the ceiling.

* fix(flags): require the public chat switch and unblock the native test build

Read the public mobile-chat-apps switch before the private all-channels key
so the allowlist alone can never turn the surface on, and update the gate and
provider key-sequence assertions to the new read order.

Drop the two redundant URLProtocol @unchecked Sendable conformances that the
pinned toolchain rejects as already unavailable, and satisfy the blocker
capture expectation only when the decoded batch carries the requested event.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(mobile): reword the Dart re-time comment off the kiritimati job id

test_mobile_kiritimati_dart_suite_is_a_parallel_second_pass asserts the
analyze-and-test job body never mentions dart-tests-kiritimati (a blunt
substring guard against a needs: edge lengthening the critical path), and
the timeout rationale comment tripped it; name the far-timezone second
pass by role instead.

* Restore main's safe_mode.c blob (24434's delta was clang-format dialect only)

* Regenerate app-client openapi, wire schemas and TS/Swift clients over the folded tree

* Fold fixes: port 21380 exclusion reconcile into snapshot path, quiet first-time external-actions binding, drop tests for superseded 21364 provider machinery

* Fix updateExternalActions ordering so mutated adapters propagate

* Fold adaptations: fixture stubs for main's newer module graph, provisional-identity test imports, drop old-pipeline notes tests, adopt no-placeholder share-note meta

* Drop next-autogenerated web/frontend/AGENTS.md; the agents-md-lean ratchet has no budget for it

* Restore the folded mobile-chat-apps-all-channels registry row, drop the retired rich-context env gate, and re-render the flag registry doc

* Allow-list updateExternalActions proxy notify: quiet-ness is the mutable projection comparison, not adapter identity

* Place the proxy-hook-notify allow comment on the line directly above the declaration

* Drop unused datetime import and orphaned transcript-name helper from the 20766 union

* Drop regenerated web/frontend/AGENTS.md again

* Gate fixes from the latest main re-merge: move notes-identity attach into the extracted finisher via inputs, restore main's screen-frame evidence tests, extend mirror fixture stubs for the newer router import graph

* Mirror the reminder sync from the in-list row (main's no-refetch contract) with the survivor's status/deleted fields

* Keep main's post-write reminder-sync refetch; adapt the folded mirror test's fetch assertion

* Adapt the folded mirror test's fetch-count assertions to main's reminder-sync refetch

* Pass the folded row identity into taskState after the main re-merge brought the identity-based overrides

* CI fixes: analyzer dead code from the saveString union, citation-contract participant fields, people-generation re-audit for the notes-identity writer

* CI fixes for the folded survivor: participant alias/bindings in the citation contract, people-generation re-audit for the notes-identity writer, lifecycle payload-site declarations (outbox note writer, evidence refresh, diarization scorecards), linear share-email shape check, analyzer dead code from the saveString union

* Keep main's summary recovery affordance beside the folded action-items section; un-orphan its widget

* Restore the fold-lost contracts: screen_evidence as a valid decision trigger, the detail page's resume re-read lifecycle hook, DeviceProvider setProviders notify-on-change, and main's adapter-identity updateExternalActions (drop the projection layer that suppressed real installs and read strict mocks); remove the widget-snapshot fetch path whose extra page fetches broke the task ownership counts

* Give DeviceProvider a silent reference-binding path: setProviders keeps main's notify-on-change for real installs and capture swaps, bindProviders wires action targets by reference without device-state notifications (quick actions setup)

* Reconcile the flag budget count field to its 244 declared names (merge took the count from one side and the names from the other)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: David Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend Task (python) positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tasks overhaul: finish desktop gaps, decide suggestion expiry, and propose the mobile "AI never adds tasks" scope

4 participants