Chat-first UI follows canonical-memory whitelist#9905
Conversation
Adds the server-owned, fail-closed chat_first_ui capability and operator guardrails, plus the singleton source filter and Firestore indexes required for the Omi capture archive. Regenerates all affected app clients.\n\nVerification:\n- BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-chat-first-backend-tests.txt bash backend/test.sh\n- backend/scripts/openapi_runner.sh scripts/export_openapi.py --surface app-client --check ../docs/api-reference/app-client-openapi.json\n- Python Swift/TypeScript OpenAPI generator freshness checks\n- app-client OpenAPI compatibility against origin/main\n- Black and git diff --check\n- fresh Sol pre-commit review
Projects the server-owned Chat-first capability through the desktop agent runtime and adds a main-Chat-only structured block tool. The backend validates canonical references; the local journal atomically binds receipts to the producing assistant turn. Legacy surfaces keep the unchanged base manifest and render new block cases inert.\n\nVerification:\n- backend focused chat-first capability/block suite (64 tests)\n- desktop agent focused journal/manifest/session suite (103 tests)\n- desktop agent build and tool-surface generator check\n- desktop Swift debug build and agent-logic harness\n- app-client OpenAPI export, generator freshness, compatibility, Black, desktop test-quality, and git diff checks\n- fresh Sol review-and-fix gate
Keep the generation-fenced main-Chat capability when an accepted run inherits its context snapshot, while reapplying the destination surface gate so non-main sessions remain off.\n\nVerification:\n- 55 focused agent capability/context/history/manifest tests\n- desktop agent TypeScript build\n- fresh Sol regression review and diff check
Adds the capability-gated main-Chat search_chat_history tool. The stdio child relays only after normal authorization; the parent kernel searches the caller's current-generation journal with strict ownership, date, excerpt, and 500-turn bounds.\n\nVerification:\n- 65 focused journal/search/manifest tests\n- desktop agent TypeScript build and tool-surface generator check\n- fresh Sol review: 69 focused tests and tool-surface contract suite\n- shared full agent harness deferred until concurrent T06 Swift compile completes
Adds fail-closed server-owned proactive intent, deferral, budget, receipt, and materialization-fetch contracts. It reserves budget before any judge call, emits no feature work for capability-off users, and never writes a chat transcript.\n\nVerification:\n- 35 focused T04 backend/API/generator tests (plus 11 generator tests)\n- app-client OpenAPI export, TS/Swift generation, and compatibility checks\n- Black and git diff checks\n- fresh Sol review-and-fix gate\n\nDeferred: source-owner wake hooks, real grounded judge binding, kernel materialization, and UI rendering.
Adds a server-sampled, fail-closed parallel shell with Chat as home, typed primary/More navigation, and capability projection before chat warmup. More→Dashboard routes to the one Chat rather than embedding an inline second composer; legacy shell behavior is preserved.\n\nVerification:\n- ChatFirstShell XCTest suite (including stable goals automation route)\n- Swift debug build and desktop test-quality check\n- agent-logic Swift gate: 438 focused lifecycle/state tests\n- agent runtime/node harness: 104 + 104 tests\n- named omi-chat-first-t06 bundle: signed/launched, healthy runtime, capability-off legacy shell and legacy Chat/Tasks/Conversations routes verified\n- fresh Sol review-and-fix gate\n\nEnabled live shell was not exercised because the server-authoritative dev control returned off for the seeded account; no local override was used.
Add the cohort-gated rich main-chat block renderer and an Omi-hardware capture archive with source-safe cache queries, typed discuss-in-chat routing, and honest playback states.\n\nVerification: git diff --check and desktop test-quality static check passed. Runtime Swift builds/tests are intentionally deferred to the final consolidated verification pass at user direction; no queued results are claimed.
Make question suggestions durable, one-tap normal chat interactions with tail-only controls, restart recovery, and a separate capability-gated deferral outbox. Add the cohort-only shared-store Tasks workspace with owner-fenced rollback behavior and source-safe capture links.\n\nVerification: static diff checks and independent Sol review/fix gates completed. Runtime builds, test suites, harness, and UI exercise are intentionally deferred to the single final verification pass at user direction.
Add the cohort-gated foreground Chat materializer, receipt-safe ordered kernel batch, and normal journal reconciliation for server-owned proactive intents.\n\nVerification: static diff checks plus a fresh Sol review/fix gate completed. Runtime builds, suites, harness, and UI exercise remain deferred to the single final verification pass at user direction.
Add the cohort-scoped canonical Goals surface and a generation-bound rich/sparse cold-start path. Cold-start delivery remains receipt-backed, and sparse-sequence terminal state now lifts proactive suppression through a durable journal receipt.\n\nVerification: static diff checks and fresh Sol review/fix gates completed. Runtime builds, suites, harness, and UI exercise remain intentionally deferred to the final consolidated verification pass at user direction.
Add shape-only Chat-first analytics, local-only focus acknowledgement evidence, and non-production fixture contracts for cohort-negative validation.\n\nVerification: static diff checks plus fresh Sol review/fix gate completed. The consolidated runtime, manifest-byte, and named-bundle verification pass begins next.
Repair Swift runtime, wire, and view integration faults surfaced by the consolidated desktop compile.\n\nVerification: static parse/diff checks and a fresh Sol repair review passed; focused Swift runtime verification resumes next.
Repair actor-isolated analytics injection, materialization driver capture, and explicit shared task-store ownership.\n\nVerification: static parse/diff checks and fresh Sol review passed; focused Swift verification resumes next.
Add an explicit JournalOperationResult initializer for materialization fields and repair async archive assertions.\n\nVerification: focused desktop compile and 39 Chat-first/capture tests passed; fresh Sol review passed.
Project immutable journal revisions correctly and reclaim expired deferral leases without allowing stale delivery settlement.\n\nVerification: focused journal suite passes 54/54; fresh Sol review passed.
Failure-Class: none
Failure-Class: none
Failure-Class: none
Failure-Class: none
cfde0f1 to
215c59b
Compare
- Mock is_canonical_memory_user in test fixtures so test UIDs pass the entitlement check that the PR added to _validate_write_control. - Fix conversation_capture.candidates_db references (attribute doesn't exist) by importing database.candidates directly. - Add workflow_mode guard to _validate_write_control: reject candidate writes when mode is off or shadow. - Make process_before_legacy respect workflow_mode: skip candidate creation in off/shadow modes, always return False so legacy writer still runs alongside canonical capture. 132 of 136 previously-failing tests now pass. The remaining 4 failures need reconcile_after_legacy implementation (separate concern).
Monitor summary — backend test fixture fixes + workflow_mode guardChanges:
Verification:
Remaining backend failures (not addressed — need PR author implementation):
|
…entitlement Update 10 test files broken by the canonical-memory whitelist migration that were not addressed in the preceding commit: - test_desktop_migration: stub utils.task_intelligence.rollout module - test_lock_bypass_fixes: pass sources=None to get_conversations - test_memory_system_cohort: include local E2E emulator UID - test_recurrence_inbox_control_skip_malformed: pass uid kwarg - test_staged_candidate_migration: use set_canonical_cohort helper - test_staged_tasks_review_controls: monkeypatch _effective_control - test_task_intelligence_contract_freeze: register ChatFirstTasksPage.swift - test_v3_real_router_default_off_f4: pass explicit uid - test_workstream_core: use set_canonical_cohort in fake_db fixture - test_ws_i_write_convergence: use device_scope=explicit for canonical path - DesktopCoordinatorServiceTests: update for trimmedText→effectivePrompt Verification: all 10 files pass via BACKEND_UNIT_TEST_FILE_LIST runner. Failure-Class: none
…ry model Update 4 tests in test_backend_candidate_capture.py that tested the removed write-mode sidecar reconciliation: - test_read_mode_creates_pending: mock legacy writer calls that now run alongside canonical capture - test_off_mode_is_behaviorally_legacy: remove reconciliation assertions (reconcile_after_legacy is now a no-op) - test_write_mode_keeps_mutation: assert single candidate record instead of mutation+projection pair - test_write_mode_conversation_ids: test legacy_document_ids returns None and legacy_replacement_map still links retired IDs All 17 tests in the file pass. Failure-Class: none
Monitor summary — CI stabilizationChanges:
Verification:
|
|
Superseded by #10171, which carries the current upstream Chat-first implementation, uses canonical-memory whitelist-only eligibility, and includes the final widget and verification work. |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
CANONICAL_MEMORY_USERSthe sole entitlement for canonical memory, task intelligence, and the Chat-first shell.Product invariants affected
Failure class
Failure-Class: none
Verification
cd backend && pytest -q tests/unit/test_activate_task_intelligence_dogfood_user.py tests/unit/test_chat_first_proactive_intents.py tests/unit/test_chat_first_blocks.py tests/unit/test_chat_first_e2e_fixture.py tests/unit/test_chat_first_proactive_router.py tests/unit/test_workstream_association.py tests/unit/test_task_recommendations.py tests/unit/test_workstream_router_contract.py tests/unit/test_candidates_router.py tests/unit/test_memory_service_parity.py tests/unit/test_task_intelligence_rollout.py tests/unit/test_v3_control_state_adapter.py tests/unit/test_v3_production_runtime_wiring.py(233 passed)cd scripts/dev-harness && pytest -q tests/test_memory_scenarios.py(10 passed)cd desktop/macos && ./scripts/dev-feedback.py --once swift 'ChatFirstShellTests/testLegacyWorkflowMetadataCannotSuppressDerivedChatFirstCapability'(1 test, 0 failures)env OMI_PR_BODY_FILE=/tmp/chat-first-ui-pr-body.md make preflight(32 checks passed)cd backend && bash scripts/typecheck.sh(0 errors; existing warnings only)git pushpre-push gate (passed: selected backend suite, generated API contracts, desktop checks, and tool-surface tests)