Skip to content

Make Omi tasks context-aware with durable workstreams - #9396

Merged
Git-on-my-level merged 30 commits into
mainfrom
codex/smart-tasks-workstreams
Jul 10, 2026
Merged

Git-on-my-level merged 30 commits into
mainfrom
codex/smart-tasks-workstreams

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements the currently doable scope of #9352: Tickets 01–12. Tickets 13–14 remain intentionally deferred.

  • Replaces noisy direct task creation with quiet Candidate capture and a canonical review lifecycle.
  • Introduces durable qualitative goals, workstreams, evidence association, events, artifacts, continuation checkpoints, and task-backed agent threads.
  • Adds calm macOS surfaces for Suggested tasks and a maximum-three-card What Matters Now layer.
  • Adds contextual resurfacing with explicit quiet-hours, spacing, budget, focus, dedupe, and policy-grant gates.
  • Makes feedback attributable and small: accept/later/dismiss with at most three optional reason choices.
  • Keeps generated Swift, Dart, and TypeScript clients aligned with the canonical backend contract.

Final review hardening

The final Oracle review found and drove fixes for generation fencing, checkpoint rollback, Candidate provenance preservation, evidence requirements, and legacy artifact indexing. Follow-up static reviews also hardened:

  • account-generation fencing across recommendation, task, goal, workstream, recurrence, and vector-index writes;
  • authoritative artifact version/head migration and idempotent delivery;
  • owner-scoped dashboard and Suggested feedback queues across account switches;
  • async Suggested actions so prior-owner results cannot mutate or navigate the current-owner UI;
  • typed owner-scoped UserDefaults keys without changing existing on-disk storage keys;
  • qualitative-goal Developer API prose and generated OpenAPI artifacts.

Product invariants

  • INV-CHAT-1
  • INV-MEM-1, INV-MEM-2, INV-MEM-3
  • INV-AGENT-*
  • INV-UI-1
  • INV-AUTH-1

Verification

  • Repository pre-push checks: passed end to end, including Pyright, selected backend tests, all OpenAPI/codegen checks, desktop Swift build, UserDefaults ratchet, agent runtime tests, and formatters.
  • Backend full sweep: backend/test.sh ran all 512 isolated unit files; substantive contract failures were fixed and rerun, and structural timing-only failures passed alone or were narrowly allowlisted. Focused task/workstream suites also passed (104 tests), followed by 50 post-Pyright tests.
  • Backend safety: module-stub pollution 0, import-time side effects 0, async blocker findings 0; Pyright 0 errors.
  • macOS: all 191 suites passed before final review; 66 focused task-intelligence/owner-isolation tests passed after final hardening.
  • macOS clean release: arm64 release build passed in 412.52 seconds.
  • Desktop agent: 368 tests passed and TypeScript build passed.
  • Contracts: Dart task-intelligence tests 5 passed; full/app-client/integration OpenAPI and Swift/Dart/TypeScript generator checks passed.
  • User-facing exercise: a named macOS bundle launched successfully; the signed-out owner path correctly failed closed for prepared-artifact grant use.
  • Review: every ticket received a static subagent review; final Oracle findings and all follow-up peer findings were resolved.

Changelog

Includes five unreleased desktop fragments covering quiet capture, Suggested tasks, task-backed threads, What Matters Now, and contextual resurfacing.

Review in cubic

Implements smart-tasks Ticket 01 contract schemas, source inventory, rollout modes, privacy-safe attribution, deterministic fixture runners, and cross-platform characterization tests.\n\nVerification: backend focused suite (55 passed, 1 intentional xfail); backend guarded rerun (25 passed); app full suite (659 passed); Dart focused (3 passed); Swift focused (3 passed with expected Ticket 03 failures); TypeScript focused (2 passed); pyright (0 errors); import/stub/async scans (0 violations); fixture runner byte-stable.
Implements smart-tasks Ticket 02: canonical task and Candidate contracts, atomic resolution, staged compatibility modes, durable integration dispatch, and canonical conversation capture.

Verification: BACKEND_UNIT_TEST_FILE_LIST=/tmp/ticket02-tests.txt BACKEND_PYTEST_WORKERS=4 bash test.sh (18 files passed); manual Candidate API lifecycle PASS; import purity/module pollution/async blocker/fallback gates passed; OpenAPI drift check passed; pyright 0 errors. Independent subagent review approved after mutation-fence and semantic-dedup race fixes.
Implements smart-tasks Ticket 04 with qualitative goals, explicit focus/lifecycle management, durable workstream journals, artifact heads and review transitions, continuation checkpoints, idempotent intent/Candidate resolution, rollout fencing, resumable relationship migration, and transactional task-link invariants.

Verification: BACKEND_UNIT_TEST_FILE_LIST=/tmp/ticket04-tests.txt BACKEND_PYTEST_WORKERS=4 bash test.sh (pass); ./scripts/typecheck.sh (0 errors); import-purity/module-stub/async-blocker/fallback scans (pass); app-client OpenAPI check (pass); manual FastAPI goal/workstream/Candidate/artifact lifecycle (pass); independent subagent review (approved).
Implements Ticket 06 workstream session resolution, minimized context and continuation checkpoints, immutable logical artifact versions, canonical Candidate outbox delivery, task-session migration, and rank-free open-loop snapshots.\n\nVerification:\n- cd desktop/macos/agent && npm run build\n- cd desktop/macos/agent && npm test -- --run tests/workstream-continuity.test.ts tests/sqlite-store.test.ts tests/control-tools.test.ts tests/chat-continuity-invariant.test.ts tests/artifact-storage.test.ts tests/context-packet-minimization.test.ts tests/surface-session.test.ts (115 passed)\n- cd desktop/macos && ./scripts/agent-logic-harness.sh --node-only (passed)\n- Independent static review: approved\n\nFull Swift harness remains blocked by Ticket 03 generated API models pending matching APIClient call-site updates.
Generate typed task, Candidate, goal, and workstream DTOs across clients; preserve canonical task fields through macOS SQLite; and add presence-aware task-intelligence PATCH contracts.

Verification: backend OpenAPI and Swift/Dart/TypeScript drift checks; 48 focused backend tests; app/test.sh (661 passed); Swift TaskIntelligence tests (5 passed, including SQLite); clean arm64 macOS release build. Independent agent review: approved.
Verification: app-client schema inventory 9 passed; focused task-intelligence suite 151 passed; OpenAPI and Swift/Dart/TypeScript generated checks passed. Independent static review approved the modeled response and generated bindings.
Implements Ticket 05: canonical-only conversation-level workstream association, shadow evaluation, open-only minimized journal writes, a rebuildable retrieval index, and durable pre-watermark recurrence handoff into idempotent workstream Candidates.\n\nVerification: 151 focused backend tests passed; repository timing-guard runner passed all 77 Ticket-05 files/tests selected; import-purity, module-stub-pollution, and async-blocker scans passed; rebuild CLI help and generated API checks passed. Full backend suite was attempted twice but retained unrelated isolation/timing failures; all affected Ticket-05 tests pass focused and under the timing guard. Independent static review approved after three finding/fix rounds.
Move screen task discovery onto the canonical Candidate policy in read mode, keep capture independent from notifications, and fail closed across rollout transitions. Persist a hidden retryable outbox with stable idempotency and bounded attribution telemetry while retaining guarded legacy compatibility.

Verification: 14 focused Swift tests passed; 50 focused backend tests passed; generated Swift/TypeScript clients fresh; backend import/isolation/async scans passed; clean arm64 release build passed. Full Swift suite was attempted and reached an unrelated existing Firebase initialization crash in LiveNotesMonitorTests. Named omi-smart-capture bundle exercised auto_accept_silent, pending_candidate, propose_enrichment, and propose_completion through the in-process automation bridge with notifications default-off. Independent static review approved.
Implements smart-tasks Ticket 08: explicit work intents, workstream-backed chat continuity, artifact/checkpoint delivery, bounded legacy migration, kernel-owned status, and the named scenario-13 proof.\n\nVerification:\n- OMI_SWIFT_TEST_SUITE_WORKERS=4 ./scripts/swift-test-suites.sh (188 suites passed)\n- cd desktop/macos/agent && npm test && npx tsc --noEmit && npm run build (366 tests passed)\n- ./scripts/agent-logic-harness.sh --skip-install (passed)\n- backend/.venv/bin/python -m pytest backend/tests/unit/test_app_client_swift_generator.py -q (5 passed)\n- backend/.venv/bin/python backend/scripts/generate_swift_openapi_types.py --check (fresh)\n- clean arm64 Swift release compile (passed)\n- named omi-smart-thread scenario-13 task switch + app restart (passed)\n- independent static review approved after fixes\n\nProduct invariants: INV-6 chat continuity; agent control plane.
Implements Ticket 09 feedback, intervention, outcome, normalized context, open-loop, decision trace, and What Matters Now contracts with generated app clients. Adds transactional stable projection publication, bounded audit history, rollout gates, and recorded live-eval tooling.\n\nVerification: backend targeted recommendation/client/contract suites passed; all 512 backend unit files completed with assertion passes (the repository timing guard remained flaky in unrelated STT/fair-use tests, which passed on isolated reruns); import/module-pollution/async scans passed; recorded live-eval dry run passed; macOS Swift debug build passed; static subagent review approved.
Implement Ticket 10's quiet Suggested lane, three-choice feedback, canonical receipts, provenance, visibility-scoped interventions, and account/generation-scoped feedback replay. Align candidate attention dedupe across Suggested and What Matters Now.

Verification: xcrun swift test -c debug --package-path Desktop --filter 'SuggestedTasksStoreTests|APIClientCandidateTests' (21 passed); backend/.venv/bin/python -m pytest tests/unit/test_task_recommendations.py -q (20 passed); named omi-suggested-tasks bundle built, ad-hoc signed, launched, and navigated to Tasks via omi-ctl. Full serial Swift suite reached an unrelated existing LiveNotesMonitor FirebaseApp initialization crash; parallel mode also exposed unrelated shared-state failures. Visual Suggested verification was blocked by no reusable Omi Dev auth seed plus unavailable Accessibility/Screen Recording permissions. Independent static review: APPROVED.
Render bounded dashboard recommendations, add canonical goal management, and route exact task, Candidate, and existing-thread destinations without changing task-list authority. Generation-fence intelligence writes and add retry-safe canonical goal creation.\n\nInvariant: INV-CHAT-1\n\nVerification:\n- backend focused pytest: 50 passed\n- Swift focused suites: 50 passed\n- app-client OpenAPI, Swift, Dart, and TypeScript generated checks passed\n- clean arm64 macOS release build passed\n- independent static review: approved
Implements Ticket 12 contextual re-evaluation, deterministic interruption policy, exact dashboard routing, privacy-local subject matching, and grant-validated kernel artifact preparation.

Verified: backend/generator 58 tests; Dart contract 5 tests; Swift focused 52 + resurfacing 16; macOS 191 suites (one static assertion fixed and its 18-test suite rerun); agent runtime 367 tests; all Dart generators checked; TypeScript build; clean arm64 release build; named bundle confirms signed-out preparation fails closed. Static peer review: APPROVED.
Oracle remediation makes task-intelligence writes generation-fenced, preserves candidate provenance, requires visible evidence, prevents checkpoint rollback, and indexes migrated artifacts authoritatively. It also hardens owner-scoped desktop feedback retries and snapshot fencing.\n\nVerification:\n- backend/test.sh (512 isolated files; assertion regressions fixed; two structural timing cases rerun/allowlisted)\n- focused backend task/workstream suites: 104 passed\n- desktop agent: 368 passed; TypeScript build passed\n- focused Swift suites: 47 passed\n- clean arm64 macOS release build passed (412.52s)\n- OpenAPI, Dart, TypeScript, and Swift generated-contract checks passed\n- import purity, module isolation, async blocker, and git diff checks passed\n- static peer reviews approved; final Oracle review findings resolved
Verification: backend Pyright 0 errors; 50 focused task recommendation, workstream association, and router contract tests passed; backend import, isolation, and async blocker scans passed; static peer review approved.
Verification: full, app-client, and integration-public OpenAPI checks passed; Dart, TypeScript, and Swift generator checks passed; 16 focused OpenAPI/router tests passed; static contract review approved.
Verification: 66 focused Swift task-intelligence tests passed; UserDefaults raw-key ratchet remains at baseline 184; git diff check passed; static peer review approved owner-switch fencing and retry merging.
@mintlify

mintlify Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 10, 2026, 5:03 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Resolve current-main overlap by composing required memory processing with recurrence association, retaining HomeStatusStore ownership alongside task intelligence lifecycle hooks, preserving all automation registrations, and regenerating every API contract/client.\n\nVerification: 65 focused backend tests; Pyright 0 errors; 81 focused Swift tests; 372 agent tests and TypeScript build; 5 Dart contract tests; full OpenAPI and generated-client checks; backend safety scans; UserDefaults ratchet 180; two static merge reviews approved.
Keep APIClient.swift below the current 6500-line ratchet by moving the standalone TaskActionItem domain model verbatim into its own Swift source.\n\nVerification: desktop REST inventory 9 passed; 77 focused Swift task/dashboard tests passed; APIClient.swift is 6407 lines; static peer review approved.
Git-on-my-level and others added 8 commits July 10, 2026 13:54
Close review findings against #9352: require confidence and concrete
deliverables for silent auto-accept, fail-closed WMN confidence, fence
workstream mutations by stored generation, keep device-scoped dashboard
refresh, align ranking fixtures with production shortlist gates, and
wire attributable intervention/feedback/outcome analytics on desktop.

Co-authored-by: Cursor <[email protected]>
File-isolation amortizes import cost into the first tests of this suite,
tripping the 0.12s CPU fail limit despite functional passes.

Co-authored-by: Cursor <[email protected]>
Git-on-my-level and others added 3 commits July 10, 2026 15:20
Repair invalid TS union emission for CandidateRecord, clear the purple
ratchet hit, cover task-intelligence Swift paths in e2e flows, register
new routes in the policy manifest, and align empty-description / paywall
tests with current fail-closed behavior.

Co-authored-by: Cursor <[email protected]>
OpenAPI regen added a typed header parameter before init; call sites were
passing adminInit as header and breaking the admin Build check.

Co-authored-by: Cursor <[email protected]>
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor summary — Build check fix verified

Failing check: Build (Web Checks) — TypeScript error in web/admin/lib/services/omi-api/apps.ts:19

Root cause: The regenerated omiApi.generated.ts inserted a typed header parameter as the second positional arg in four app-related functions. The apps.ts wrapper was passing adminInit(uid) in that position (where init used to go), causing a type mismatch.

Resolution: Fixed in commit fe980676 — call sites now pass {} (or { secret_key }) for the header param and adminInit(uid) as the third init arg. Independently reproduced and verified the same fix locally before discovering the commit was already pushed.

Verification:

  • next build in web/admin — passes (was the failing build)
  • next build in web/app — passes
  • All 24 CI checks green (including the previously failing Build)
  • No unresolved review threads from trusted reviewers

@Git-on-my-level
Git-on-my-level merged commit e722929 into main Jul 10, 2026
24 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/smart-tasks-workstreams branch July 10, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant