Skip to content

Fix desktop explicit web search intent routing - #9384

Merged
Git-on-my-level merged 3 commits into
mainfrom
codex/fix-explicit-web-intent
Jul 10, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
codex/fix-explicit-web-intent

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

  • add a typed, deterministic retrieval policy that distinguishes required public web search from private Omi retrieval
  • force Anthropic web_search before generation for explicit, freshness-sensitive, and public anaphoric requests such as “look it up”
  • suppress public web search for explicitly private lookups and constrain generated search queries to public context unless the user requests a mixed lookup
  • add source-selection prompt guidance, structured routing telemetry, regression coverage, and a desktop changelog fragment
  • migrate the adjacent chat-draft owner lookup to its existing typed UserDefaults key, repairing a pre-existing repository ratchet failure in a separate commit

Why

The desktop proxy previously exposed server-side web search only when the client already supplied tools, then left selection on automatic. At the same time, the desktop prompt strongly emphasized private Omi sources. A short follow-up such as “look it up” could therefore be interpreted as a private-history lookup and incorrectly report that nothing was found without ever searching the public internet.

This PR turns high-confidence retrieval intent into an enforceable pre-generation contract while preserving automatic behavior for ordinary questions and respecting an explicit tool_choice=none.

Verification

  • cargo test: 319 passed
  • xcrun swift test --package-path Desktop --filter ChatDiscoverabilityTests: 22 passed
  • xcrun swift test --package-path Desktop --filter ChatDraftStoreTests: 9 passed
  • ./scripts/agent-logic-harness.sh: passed all four stages
  • repository pre-push checks: passed, including full desktop Swift build, Rust check, changelog validation, and UserDefaults ratchet
  • isolated omi-web-intent named bundle built, installed, and launched with ad-hoc signing

A signed-in live chat E2E was not completed: this worktree had no seeded Omi Dev session, and the local harness was unavailable without Docker and provider credentials. The routing and translation boundary is covered by deterministic regression tests.

Product invariants affected

  • INV-CHAT-1 checked and unchanged: this does not alter chat persistence, canonical write paths, or timeline projection behavior.

Review in cubic

@Git-on-my-level
Git-on-my-level force-pushed the codex/fix-explicit-web-intent branch from 5b51f93 to 576ba45 Compare July 10, 2026 08:30
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor follow-up for PR #9384:

  • Added ChatPrompts.swift to the chat-hermetic e2e flow coverage list so the desktop strict e2e coverage guard covers both changed Swift files.
  • Updated the PR body to name the required INV-CHAT-1 product invariant.
  • Rebased/synced the PR branch onto current upstream main and pushed 576ba4516.

Verification:

  • python3 desktop/macos/scripts/check-e2e-flow-coverage.py --strict --base origin/main passed.
  • python3 .github/scripts/check_product_invariants.py --changed-files /tmp/pr-9384-changed-files.txt --pr-body-file /tmp/pr-9384-body.md passed.
  • python3 .github/scripts/test_check_product_invariants.py passed (14 tests).
  • CI re-scan passed: Desktop Swift Build & Tests, Hygiene, desktop-core-e2e-t0, contracts, Rust Backend, Desktop Swift Release Compile, and rust are all green; skipped checks remain skipped.
  • Post-push trusted review-comment re-scan found no unresolved trusted bot inline comments.

@Git-on-my-level
Git-on-my-level merged commit 8d2d3a2 into main Jul 10, 2026
20 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/fix-explicit-web-intent branch July 10, 2026 16:51
Git-on-my-level added a commit that referenced this pull request Jul 15, 2026
## Summary
- Add a diff-scoped 1,500-line ratchet for Python, Swift, and Rust
product sources.
- Seed the committed snapshot with the 47 currently oversized files and
provide a downward-only updater for splits.
- Fold `RealtimeHubController.swift`'s overlapping size guard into the
shared ratchet; its extracted-type ownership guard remains.

## Root cause and durable guard
Oversized product files repeatedly concentrate collisions and costly
navigation (#9838; notably #9836 and #9384/#9638/#9692). The new shared
boundary freezes further growth, rejects smaller files that cross the
threshold, and makes any exceptional raise exact-count,
source-diff-bound, and one-line-justified.

## Verification
- `python3
.github/scripts/test_check_product_file_line_count_ratchet.py`
- `python3 desktop/macos/scripts/check-hub-controller-ratchet.py
--self-test`
- `make preflight` (rerun after applying the internal-only
`no-changelog-needed` label)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9851?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. -->
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…#9851)

## Summary
- Add a diff-scoped 1,500-line ratchet for Python, Swift, and Rust
product sources.
- Seed the committed snapshot with the 47 currently oversized files and
provide a downward-only updater for splits.
- Fold `RealtimeHubController.swift`'s overlapping size guard into the
shared ratchet; its extracted-type ownership guard remains.

## Root cause and durable guard
Oversized product files repeatedly concentrate collisions and costly
navigation (BasedHardware#9838; notably BasedHardware#9836 and BasedHardware#9384/BasedHardware#9638/BasedHardware#9692). The new shared
boundary freezes further growth, rejects smaller files that cross the
threshold, and makes any exceptional raise exact-count,
source-diff-bound, and one-line-justified.

## Verification
- `python3
.github/scripts/test_check_product_file_line_count_ratchet.py`
- `python3 desktop/macos/scripts/check-hub-controller-ratchet.py
--self-test`
- `make preflight` (rerun after applying the internal-only
`no-changelog-needed` label)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9851?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. -->
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