Repository navigation
Improve Smart Tasks signal quality and isolation - #9591
Merged
Git-on-my-level merged 2 commits intoJul 13, 2026
Merged
Git-on-my-level merged 2 commits into
Git-on-my-level merged 2 commits into
Conversation
Raise shared capture floors, coalesce exact Candidate creates, bound Suggested and What Matters Now output, and preserve suppression across retries. Fence backend reads and desktop async state across account generation and owner changes; keep product surfaces composed with the canonical-memory cohort. Verification: 163 timing-harness backend tests; full desktop launcher/Rust/251-suite Swift harness; OpenAPI and client generators; recorded ranking eval; import, stub, async, formatting, and diff checks; named-bundle real-account exercise.
7 tasks
Declare directly imported markdown and fake_async packages and remove a redundant typed_data import.\n\nVerification:\n- PATH=/Users/dazheng/fvm/versions/3.44.6/bin:\u0024PATH bash app/scripts/analyze_ratchet.sh\n- flutter test app/test/backend/task_intelligence_contract_fixture_test.dart app/test/unit/native_mic_recorder_service_test.dart
Git-on-my-level
added a commit
that referenced
this pull request
Jul 13, 2026
## Summary Review-swarm findings from a 10-agent code review of the last 2 days of merged PRs (62 PRs / 1072 files). Seven isolated bugs were found and fixed; no behavior change beyond the fixes. Each commit is independent and reviewable on its own. ### High-severity correctness - **`fix(chat)`: tz-aware `created_at` sort sentinel** — `get_chat_files_desc` (>30 file_ids merge path) used naive `datetime.min`, which TypeError-compares against tz-aware Firestore dates and 500s. Last instance of the #9571 failure class; all four `datetime.min` sort sentinels in `backend/` are now tz-aware. - **`fix(agent-control)`: derive consent for `request_permission` in PTT/voice mode** — both voice paths never built a `PermissionRequestAuthorization`, so the consent gate always silently denied `request_permission` while the system prompt told the model to call it. The feature was non-functional in voice mode. Fixed by deriving authorization from the spoken turn transcript (mirrors the text path; fail-closed). ### Medium - **`fix(translation)`: NLLB native-language-code case resolution** — `_resolve_nllb_code` lowercased input before checking the mixed-case `NLLB_TO_BCP47` keys, making the native-code passthrough dead. README documents `eng_Latn` as valid input. - **`fix(nllb)`: autoscale on active requests instead of CPU-only** — the NLLB GPU HPA scaled only on CPU, which stays low during GPU inference, so it never scaled past minReplicas. Added a concurrency-based External metric on the existing `nllb_active_requests` gauge (`requestsPerPod: 4` in prod), mirroring the parakeet pattern, and wired the adapter rule into the cluster-wide prometheus-adapter (dev+prod). CPU retained as a secondary floor. - **`fix(firmware)`: propagate `t5838_aad_init` failure from `mic_start`** — the init powers the 1.8V mic rail; on failure it only logged and returned 0 (false-ready at the caller: mic "starts" but captures silence). `main()` already handles a nonzero `mic_start` return via `error_microphone()`, so propagate the failure. Closes the #9048 false-ready goal at the caller level. ### Low / defense-in-depth - **`fix(tasks)`: re-add defensive newest-first sort for suggested candidates** — #9591 removed the client-side sort, leaving the top-5 slice dependent on backend return order with no test. Re-added the sort as defense-in-depth. - **`fix(ci)`: drop duplicate isinstance-ratchet exempt entry** — two commits registered the same script in the manifest `exempt:` list. ### Desktop changelog Fragments added for the two user-visible desktop fixes (PTT permission consent, suggested-tasks ordering). ## Product invariants affected - INV-CHAT-1 ## Verification - Each fix reviewed hunk-by-hunk by a dedicated reviewer; the chat.py fix was cross-confirmed by two reviewers (sync/memory found it, API owner fixed it). - Pre-push manifest checks pass (check-manifest-contract, diff-hygiene, architecture-guardrails, product-invariants with this citation, desktop-changelog-entry, brand-ui INV-UI-1, backend-import-purity, backend-async-blockers). - No new tests added in this PR; the underlying behavior is covered by the existing suite for each touched area. The tz-sentinel and consent fixes are the kind of regression a follow-up test should pin (noted below). ## Notes / follow-ups - The NLLB HPA active-requests metric requires the documented prometheus-adapter helm upgrade (same manual step parakeet needs) before it takes effect in-cluster. - Reported-but-not-fixed concerns from the review (out of scope here): NLLB model re-downloaded every pod restart (emptyDir), gateway 13-label metrics cardinality monitoring, a static guard to prevent recurrence of the naive-`datetime.min` sort class. 🤖 Generated with Claude Code <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/9600?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Git-on-my-level
added a commit
to Git-on-my-level/omi
that referenced
this pull request
Jul 13, 2026
…es — review swarm PR BasedHardware#9591 removed the client-side .sorted { createdAt > } from SuggestedTasksStore.load(), leaving the top-5 slice dependent on the backend return order with no test asserting that order. Re-add the sort as defense-in-depth so a backend ranking regression can't silently show stale candidates. ISO8601 createdAt strings sort correctly lexicographically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make Smart Tasks substantially calmer and more trustworthy for daily use while keeping every user-facing intelligence surface behind the composed canonical-memory cohort plus
readworkflow gate.capture.v2Supports the dogfood and quality work in #9530. This PR does not close the issue because the post-deploy two-day precision gate is still outstanding.
Product invariants affected
Root cause and recurrence evidence
The existing system had several reinforcing failure classes rather than one bad ranking prompt:
The dogfood account showed the product impact without exposing private task text: 129 active local tasks, a bounded UI snapshot of 61 items (10 overdue, 1 today, and 50 capped no-due/recent items), no canonical provenance or confidence on that bounded set, and zero useful Suggested/What Matters Now cards because the currently deployed API is returning server failures.
Durable guards
capture.v2freezes the concrete-owner and dual0.8confidence floors across transcript, screen, Python, Swift, TypeScript, and Dart fixtures.Rollout and user impact
No cohort was broadened. Suggested and What Matters Now remain available only when the user is on canonical memory and task workflow mode is
read; outside that composition the product surfaces return a calm404. As canonical memory eventually becomes universal, the same composition naturally makes Smart Tasks universal without a second whitelist.The desktop now shows fewer grounded cards, preserves backend ordering, reports real service errors instead of false empty success, keeps Later/Dismiss hidden during retries, and never fabricates a workstream-success outcome merely because a recommendation was opened or a Candidate accepted.
Real-path exercise
/Applications/omi-smart-tasks-quality.app(com.omi.omi-smart-tasks-quality) as a separate named bundle.Verification
BACKEND_UNIT_TEST_FILE_LIST=/tmp/smart-tasks-backend-tests.txt bash backend/test.sh— 163 changed backend tests passed under the repository timing guard.OMI_SWIFT_TEST_SUITE_WORKERS=4 bash desktop/macos/test.sh— launcher contracts, 319 Rust tests, and 251 isolated Swift suites passed.backend/scripts/task_intelligence_fixture_runner.py— capture/association/ranking fixtures passed.backend/scripts/task_recommendation_live_eval.py— all five recorded ranking cases passed, including compound kind+ID validation.markdown/fake_asyncimports; the Flutter contract fixture plus native-mic unit suite passed 12/12.Remaining gate
After deployment, continue #9530 for at least two days and at least ten presented/accepted items. The release gate remains at least 80% useful precision, at most 10% not-useful feedback, zero notification-bypass violations, stable repeated evaluations, and verified attribution. Until that evidence exists, this is a high-confidence implementation PR, not a claim that the production rollout is already green.