Skip to content

Fit desktop Gemini demand under the Vertex PT cap: evict low-value lanes to Flash-Lite, fix the Pro demotion, cap server-paid output - #11764

Merged
Git-on-my-level merged 9 commits into
mainfrom
desktop/gemini-pt-aggressive-savings
Aug 17, 2026
Merged

Git-on-my-level merged 9 commits into
mainfrom
desktop/gemini-pt-aggressive-savings

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Aggressive Gemini spend reduction: fit desktop demand under the Vertex PT cap

Why

The 5 GSU gemini-2.5-flash Vertex Provisioned Throughput reservation (13,450 tok/s, $290.32/day, sunk to ~2027-05-28) is saturated 24/7: measured desktop demand is 18,431 tok/s = 137% of the cap, and the 27.4% that spills over is billed at PayGo Flash list price — the only avoidable Gemini-Flash cash. There is no overnight trough to defer into (0 of 408 measured hours below cap), downscaling screenshots saves exactly zero tokens (measured, 12/12 frames), and halving every output token in the fleet still would not fit. The only thing that fits is moving whole low-value workloads onto gemini-2.5-flash-lite, which is shared/on-demand on Vertex (measured trafficType=ON_DEMAND, 44/44 calls) and never competes with the reservation.

Evidence base (omi-knowledge-base, projects/vertex-pt-flash-spend/evidence/): 2026-08-17-workload-value-ranking.md (rev 2), 2026-08-17-overflow-destination-bakeoff.md (210 measured calls), 2026-08-17-cache-optimization-analysis.md, 2026-08-17-screenshot-resolution-experiment.md, RCA. The decision record for this PR: 2026-08-17-aggressive-savings-prescription.md.

What

One commit per surface:

  1. fix(backend): over-quota Pro demotes to Flash-Lite, not Flash. The 30/day Pro soft limit rewrote Insight onto gemini-2.5-flash, silently dumping the most expensive tool loop (~11% of the reservation) onto the saturated PT lane within the first hour of use. New _QUOTA_DEMOTION_MODEL constant + regression test that the demotion target can never be the PT pin.
  2. feat(backend): server-paid output cap 8192 → 2048 (default and clamp). No shipped desktop client can send maxOutputTokens, so every request inherited 8192 while output burns the reservation at 9×; realistic per-lane budgets are 64–1024 visible tokens + thinking ≤1024 (thinking counts toward the limit on 2.5 models). Mean output is ~241 tokens — this bounds the paid tail, not typical behavior. BYOK keeps the 8192 default/clamp unchanged.
  3. feat(desktop/windows): memory, insight (model+fallback), goals → Flash-Lite; tasks and focus stay on Flash. modelPins.test.ts ratchets the reservation boundary.
  4. feat(desktop/macos): evict low-value lanes to Flash-Lite via a new ModelQoS.Gemini.lightweight pin: memory extraction, LiveNotes, Goals (generate/progress/insight), task dedup, task prioritization, HomeSuggestions; Insight's client-side transient fallback follows. Also corrects the ModelQoS insight comment whose 2.34% CTR tuple reproduces from no PostHog slice (measured 30d: insight 1.162% vs 0.68% fleet).
  5. feat(desktop/macos): memory extraction default cadence 600s → 1800s. Worst-value lane on both fleet instruments (50.5% of notification volume at 0.240% CTR; ~53 calls per stored memory). User-chosen intervals are respected; 1800 is an existing ladder step.
  6. fix(desktop/macos): hash full captures at preview scale. markCaptured stored a full-resolution dHash into the history that ≤80px preview hashes are compared against; cross-scale aliasing reads as "changed", defeating the preview-skip and triggering unnecessary full captures and the Gemini calls behind them. New previewScaleDHash + behavioral test.
  7. Docs move with the code: backend/docs/vertex-pt-flash.md gains a "keeping the reservation for work that must be Flash" section.

Kept on the reservation, deliberately: task extraction (60% of burndown) — the bakeoff measured Flash-Lite extracting from a chat sidebar at confidence 0.9 against an explicit prompt ban and silently dropping one of two commitments; it has nowhere cheaper to go. Windows focus (small, best lane CTR). macOS Insight's first 30/day stay on Pro. No task-lane cadence cuts: once demand fits under the cap, on-reservation tokens are marginally free — degrading the flagship lane would save $0.

Projected effect

Set #6 arithmetic from the value ranking: PT demand 18,431 → ~10,514 tok/s (78.2% of cap) — PayGo Flash spillover → ~0 at current demand, with headroom for the observed 1.15× intraday peak. Net Gemini cash reduction roughly $100–200/day at current volumes (evicted lanes cost 0.27× on Lite on-demand), plus the memory-lane cadence cut. Absolute $ inherits the RCA's uncertainty; the tok/s arithmetic and cost ratios are measured.

Expected UX degradation (accepted, per David's mandate)

  • Insight after the 30/day Pro quota runs on Flash-Lite (the largest quality risk here — the bakeoff did not exercise Lite on the insight tool loop specifically).
  • Fewer memories: Lite fires ~42% as often as Flash on that lane (measured as prompt-compliant restraint, but genuine coverage will drop) and the timer is 3× slower.
  • Dedup slightly worse (Lite missed 1 of 3 duplicate pairs).
  • Possible extreme-tail truncation at 2048 output tokens; the mean (~241) is unaffected.
  • LiveNotes/prioritization/HomeSuggestions/goals: no detectable delta measured; LiveNotes gets faster.

Verification

  • backend/.venv/bin/pytest tests/unit/test_desktop_proxy.py — 42 passed (includes the new demotion regression test and the 5-case server-paid/BYOK output-cap matrix driven through _proxy with a capturing client).
  • Windows: pnpm test (vitest, Node 22) — 5205 passed, 29 skipped, including the new modelPins.test.ts.
  • macOS: xcrun swift build -c debug --package-path Desktop — clean (Build complete, 258s); xcrun swift test --filter 'ModelQoSTests|PreviewScaleDHashTests|SettingsAssistantControlsTests' — all suites passed (ModelQoSTests 18, PreviewScaleDHashTests 3, SettingsAssistantControlsTests full suite; 0 failures).
  • make preflight — PASS, 34 checks (including swift-format lint, SwiftLint, e2e flow coverage, failure-class protocol, product invariants, changelog contract).
  • scripts/failure-class validate — OK (declaration=new, definition added in this PR).
  • Formatting: black (backend), swift-format wrapper (macOS), prettier (windows) — all clean.
  • Not exercised live: real Vertex traffic shift (requires deploy, out of scope for this PR per the task boundary — do not deploy, do not merge).

Follow-ups (named, not in this diff)

  • Task extraction → gpt-5.6-luna: measurably better than Flash (10/10 vs 9/10, −81% output) but needs the legacy tool-loop contract ported onto the proactivity route; decision gate is a 50-labelled-frame bakeoff (~$1 of calls).
  • Thinking-budget cut (1024 → 256) once the billing export passes the 08-17 restore and the fleet reasoning share is measurable.
  • 2304px defensive resolution cap for external-display captures (~145 tok/s, INFERRED).
  • Prefix-cache restructuring (the byte-identical 4,211-token block; stranded static chars at TaskAssistant.swift:965-975).
  • Dead-code removals: focus_sessions (no writer, still synced/queried) and PTTTranscriptCleanupService.cleanup (zero callers).
  • Windows memory-cadence parity (its default lives in appSettings and is a separate testable surface).
  • usageMetadata + x-omi-workload proxy instrumentation to replace the evidence base's inference layer with measurement.

Failure-Class: new

🤖 Generated with Claude Code

Review in cubic

Git-on-my-level and others added 9 commits August 17, 2026 17:19
…tion

The 30/day Pro soft limit rewrote Insight requests to gemini-2.5-flash — the
one model that burns the saturated 5 GSU Vertex Provisioned Throughput
reservation (13,450 tok/s, pegged 24/7). Insight's 7+5-iteration tool loop
reached the demotion within the first hour or two of use, so ~11% of the
reservation was carrying quota-degraded Pro traffic while paid work spilled
to PayGo Flash.

Demote to gemini-2.5-flash-lite instead: shared/on-demand on Vertex (measured
trafficType=ON_DEMAND, 44/44 calls), already proxy-allowlisted, and 0.27x the
cost. record_fallback to_mode follows the real destination.

Regression tests: the downgrade test now pins the flash-lite path, and
test_quota_demotion_never_targets_the_pt_model guards the constant against
being re-pointed at VERTEX_PT_MODEL.

Evidence: omi-knowledge-base vertex-pt-flash-spend 2026-08-17 workload value
ranking (rev 2) + overflow destination bakeoff.

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

No macOS or Windows code path can emit maxOutputTokens (the Swift
GenerationConfig has three fields, none of them an output budget; the Windows
client sends none), so every desktop request inherited the proxy's 8192
default. Output tokens burn the Vertex PT reservation down at 9x, and the
largest realistic per-lane budget in the shipped prompts is ~1024 visible
tokens plus a thinking budget of up to 1024 (thinking counts toward the
output limit on the 2.5 family).

Server-paid requests now default to and clamp at 2048; BYOK requests keep the
existing 8192 default and clamp unchanged. Mean measured output is ~241
tokens/request — this bounds the paid tail (runaway prose, degenerate loops),
it does not change typical behavior.

Behavioral test drives _proxy end-to-end with a capturing client across
server-paid/BYOK x default/clamped/explicit-value cases.

Evidence: omi-knowledge-base vertex-pt-flash-spend 2026-08-17 workload value
ranking rev 2 (section 4b: every request lands on 8192 and no workload chose
it).

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

Windows pinned every assistant, including Insight, straight onto
gemini-2.5-flash — the model that burns the saturated Vertex PT reservation
(macOS pins Insight to Pro). Move the low-value lanes to
gemini-2.5-flash-lite, which is shared/on-demand on Vertex (measured
trafficType=ON_DEMAND) and ~0.27x the cost:

- memory extraction: worst-value lane on both fleet instruments (50.5% of
  macOS notification volume at 0.240% CTR; ~53 calls per stored memory), and
  the 2026-08-17 overflow bakeoff measured Flash-Lite as more prompt-compliant
  than Flash on this exact lane
- insight (model + fallback): mirrors the backend's over-quota Pro demotion
  target, so no path lands Insight on the PT model
- goals generation: text-only, schema-bounded, nobody waiting

Task extraction and focus stay on gemini-2.5-flash: task extraction is the
one lane Flash-Lite measurably fails (sidebar false-extraction at confidence
0.9; silently dropped second commitment), and focus is small with the best
lane CTR (1.275%).

modelPins.test.ts ratchets the reservation boundary so a lane cannot be
silently re-pinned onto the PT model.

Verified: full Windows suite on Node 22 — 5205 passed, 29 skipped.

Co-Authored-By: Claude Opus 5 <[email protected]>
The failure class behind the over-quota Pro demotion defect: a quota fallback
whose destination is the very budget the quota protects (here, the Vertex PT
Flash reservation). Guard artifact: the demotion-target regression test in
backend/tests/unit/test_desktop_proxy.py. Evidence PR 10686 shipped the
original demotion-to-flash behavior with the Python desktop backend cutover.

Co-Authored-By: Claude Opus 5 <[email protected]>
Add ModelQoS.Gemini.lightweight (gemini-2.5-flash-lite — shared/on-demand on
Vertex, measured trafficType=ON_DEMAND, ~0.27x cost) and route the lanes with
no business on the saturated Vertex PT Flash reservation through it:

- memory extraction: worst-value lane on both fleet instruments (50.5% of
  macOS notification volume at 0.240% CTR; ~53 calls per stored memory), and
  the 2026-08-17 overflow bakeoff measured Flash-Lite as more prompt-compliant
  than Flash on this lane (fires 5/12 vs 8/8 against 'most screens should
  return 0')
- LiveNotes ('a single short note (3-10 words)') — also faster on the one
  lane a user visibly waits on
- Goals (generate / progress / insight), task dedup, task prioritization,
  HomeSuggestions: text-only, schema-bounded, timer-driven
- Insight's client-side transient fallback: flash -> flash-lite, matching the
  proxy's over-quota Pro demotion target, so no path lands Insight on the PT
  model

Task extraction stays on gemini-2.5-flash: the bakeoff measured Flash-Lite
extracting from a chat sidebar at confidence 0.9 against an explicit prompt
ban and silently dropping one of two commitments.

Also corrects the ModelQoS insight comment: its 2.34% / 39.8k / 336 CTR tuple
reproduces from no PostHog slice (measured 30d: insight 1.162% vs 0.68% fleet
average).

Projected with the sibling commits: desktop PT demand 18,431 -> ~10,514 tok/s
(78.2% of the 13,450 cap), eliminating PayGo Flash spillover at current
demand.

Tests: ModelQoSTests gains the lightweight-pin ratchet; existing proxy-side
static checker already admits flash-lite.

Co-Authored-By: Claude Opus 5 <[email protected]>
Memory extraction is the worst-value proactive lane on every instrument that
exists: 50.5% of macOS notification volume at 0.240% CTR (5x worse than the
next-worst lane), ~53 calls per stored memory, ~2% realised dogfood yield.
Cut its default timer from 10 to 30 minutes. 1800 is an existing step on the
Settings interval ladder; a user-chosen interval is respected unchanged.

Test: SettingsAssistantControlsTests normalisation case now pins the 1800
default (external source: 2026-08-17 workload value ranking, PostHog 30d).

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

markCaptured stored the dHash of the full-resolution frame into
previewHashHistory — the history that ≤80px preview grabs are compared
against to decide whether a full capture (and the Gemini analysis behind it)
can be skipped. dHash downsamples straight into a 9x8 grid, and a
full-resolution frame aliases into that grid differently than an 80px preview
of the same screen, so cross-scale comparisons read as 'changed': the
preview-similarity skip was structurally defeated right after every full
capture, triggering unnecessary captures and model calls.

Add RewindOCRService.previewScaleDHash, which downscales to the same ≤80px
envelope the preview path captures at before hashing, and use it on the full
capture path. Images already inside the envelope hash identically to before.

Regression test renders the same synthetic screen at 1638x1072 and 80x52 and
asserts the fixed path lands within 3 bits (the default 0.95 similarity
tier), plus pass-through and determinism cases.

Co-Authored-By: Claude Opus 5 <[email protected]>
TaskDeduplicationService joins the context-buckets-dogfood flow's covers list
(it already covers the sibling prioritization service); RewindOCRService joins
rewind.yaml (its dHash path is exercised by capture/rewind flows).

Co-Authored-By: Claude Opus 5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 03f50eb into main Aug 17, 2026
48 checks passed
@Git-on-my-level
Git-on-my-level deleted the desktop/gemini-pt-aggressive-savings branch August 17, 2026 22:11
Git-on-my-level added a commit that referenced this pull request Aug 17, 2026
The dev deploy refused to route traffic whenever `origin/main` advanced
during the build, so under sustained merge pressure every candidate was
discarded after its Cloud Build and acceptance probes had already run.
Three consecutive runs failed this way on 2026-08-17 (19:15, 22:01,
22:11), stranding #11764 in a built-but-unrouted revision while the
prod job green-checked and re-shipped the last accepted image.

The check was also redundant with the protection it appeared to provide.
Run ordering is already guaranteed by the `desktop-backend-auto-dev`
concurrency group with `cancel-in-progress: false`, and the debounce that
prevents stacked Cloud Builds is the entry guard in `Resolve immutable
candidate identity`, which exits before any build is spent. Re-asking the
same question after the build could only throw finished work away.

Gate the promotion on lineage instead: refuse only when the candidate
does not descend from the release SHA recorded on the revision serving
100% traffic. That keeps the real property — never move desktop-backend
backwards — without requiring that nobody merged. Unknown lineage
(legacy revisions with no recorded SHA, unreachable commits) warns and
admits, so a service already serving a pre-SHA revision cannot deadlock.

Scoped to the dev workflow; `desktop_backend_prod.yml` admits via
`admitted-source` and never carried this guard.

Verification:
  python3 -m pytest .github/scripts/test_check_desktop_backend_traffic_regression.py -q
    -> 11 passed
  python3 .github/scripts/check-desktop-backend-release-policy.py -> OK
  python3 .github/scripts/check-deployment-concurrency.py -> OK
  python3 -m pytest .github/scripts/test_check_desktop_backend_release_policy.py -q
    -> 27 passed

  Replayed the three real failures against the SHA prod serves
  (34bd15d) — 03f50eb, fc458ef and a7ff90a all now ADMITTED.
  Reverse direction (candidate 34bd15d vs serving 03f50eb) REFUSED.
  Empty serving SHA (dev's current pre-SHA revision) ADMITTED with a
  warning.

  Exercised the live discovery path against the prod service:
  extract_single_cloud_run_traffic_revision.py resolved
  desktop-backend-34bd15da499c-32074856543-1 and the jq expression read
  OMI_DESKTOP_BACKEND_RELEASE_SHA=34bd15da499cbfe314f1b5d9014b79611f91736c.
  The dev project was not reachable from the read-only bot
  (run.services.get denied), so that half runs first in CI.

Failure-Class: new
Git-on-my-level added a commit that referenced this pull request Aug 18, 2026
…#11768)

## Problem

The dev desktop-backend deploy refuses to route traffic whenever
`origin/main` advances during the build:

```
ERROR: candidate is stale because origin/main advanced to
0151724; traffic remains unchanged.
```

A desktop-backend deploy takes ~5 minutes. When commits land faster than
that, every run is pre-empted at the last step — *after* Cloud Build and
the acceptance probes have already run. The check cannot prevent a
build; by the time it fires, the build is finished. All it can do is
discard it.

Three consecutive runs failed this way on 2026-08-17:

| Run | main@ | Outcome |
| --- | --- | --- |
|
[32059345833](https://github.com/BasedHardware/omi/actions/runs/32059345833)
| `4f8da45f` | failed (project/URL resolution — different cause) |
|
[32074024600](https://github.com/BasedHardware/omi/actions/runs/32074024600)
| `fc458ef3` | stale: main advanced to `a7ff90a4` |
|
[32074869094](https://github.com/BasedHardware/omi/actions/runs/32074869094)
| `03f50eb1` | stale: main advanced to `01517240` |

The failure mode is worse than a stuck pipeline. Prod promotes the last
**dev-accepted** candidate, so with dev unable to accept anything since
19:06, the prod run at 22:11 reported **success** while re-shipping the
`34bd15da` image. #11764 is merged, built, and sitting in an unrouted
revision — while the dashboard reads green.

It is also self-reinforcing: the more the team merges, the less likely
any deploy ever lands.

## Why the check was redundant

The two protections it appeared to provide are both already in place
elsewhere, and they fight each other:

- **Ordering** is guaranteed by the `desktop-backend-auto-dev`
concurrency group with `cancel-in-progress: false`. A newer run cannot
route while an older one holds the lock. But holding that lock for the
full build is *exactly* what guarantees `main` has moved by the time the
older run reaches the traffic step — a queued run behind it has its
commit on `main` by definition.
- **Debounce against stacked Cloud Builds** is the entry guard in
`Resolve immutable candidate identity`
([:68](https://github.com/BasedHardware/omi/blob/main/.github/workflows/desktop_backend_auto_dev.yml#L68)),
which exits before Google Auth and before any build is spent. **This PR
does not touch it.** Superseded commits still bail out early; a burst of
three merges still builds only the newest.

Re-asking the same question after the build could only throw away
finished work.

## Change

Gate the promotion on **lineage** rather than recency: refuse only when
the candidate does not descend from the release SHA recorded on the
revision currently serving 100% traffic. That preserves the real safety
property — never move desktop-backend backwards — without requiring that
nobody merged during the build.

Unknown lineage (a legacy revision with no recorded SHA, or a commit
unreachable in the checkout) warns and admits. Dev is currently serving
`desktop-backend-00461-qiy`, a pre-SHA revision, so refusing on unknown
lineage would deadlock the pipeline on the very next run.

Scoped to the dev workflow. `desktop_backend_prod.yml` admits via
`admitted-source` and never carried this guard.

## Verification

```
python3 -m pytest .github/scripts/test_check_desktop_backend_traffic_regression.py -q   # 11 passed
python3 .github/scripts/check-desktop-backend-release-policy.py                          # OK
python3 .github/scripts/check-deployment-concurrency.py                                  # OK
python3 -m pytest .github/scripts/test_check_desktop_backend_release_policy.py -q         # 27 passed
make preflight
```

**Replayed the three real failures** against the SHA prod actually
serves (`34bd15da`):

| Candidate | Old guard | New guard |
| --- | --- | --- |
| `03f50eb1` (#11764) | refused | **admitted** — descends from serving |
| `fc458ef3` | refused | **admitted** |
| `a7ff90a4` (#11760) | refused | **admitted** |
| `34bd15da` vs serving `03f50eb1` | admitted | **refused** — would move
backwards |
| serving SHA empty (dev today) | n/a | **admitted** with `::warning` |

**Exercised the live discovery path** against the prod service:
`extract_single_cloud_run_traffic_revision.py` resolved
`desktop-backend-34bd15da499c-32074856543-1`, and the `jq` expression
read
`OMI_DESKTOP_BACKEND_RELEASE_SHA=34bd15da499cbfe314f1b5d9014b79611f91736c`
off it. The dev project was not reachable from the read-only bot
(`run.services.get` denied), so that half runs first in CI.

The unit tests cover the decision function through an injected ancestry
oracle, and the `git` seam itself against a real temporary repository —
including the unreachable-commit path — rather than stubbing it.

## Risk

Traffic shifts become more frequent, because builds that pass acceptance
now actually ship instead of being discarded. That is the intent. If
churn needs bounding, the correct lever is the entry-side debounce, not
discarding completed work at the exit.

Failure-Class: new

Adds `FC-promotion-gate-admits-on-recency-not-lineage` — a gate between
an accepted candidate and its traffic promotion may refuse only
backwards promotions, never merely because the branch advanced during
the build. Guard artifact is the checked-in decision function and its
fixtures.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/11768?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 that referenced this pull request Aug 18, 2026
## Summary

- Raise the Windows memory-extraction **default** interval from 10
minutes (600s) to 30 minutes (1800s), matching the macOS change that
already landed in #11764 (`feat(desktop/macos): memory extraction
default cadence 600s -> 1800s`).
- This is a default change, not a migration: an already-persisted
`memoryExtractionIntervalMin` (including a user who still has the old
10) is kept as-is. Junk/absent values fall back to 30.
- Windows does not surface this interval in Settings (Notifications only
has the memory **toggle**), so there is no picker ladder to extend. 30
is a valid positive-integer minute under the existing sanitizer.

Closes SCA-333

## Why

Memory extraction is the worst-value proactive lane on every instrument
that exists: 50.5% of macOS notification volume at 0.240% CTR (5× worse
than the next-worst lane), ~1.9% dogfood yield (8 stored memories from
~420 calls). Windows is a meaningful share of desktop Gemini traffic
(~23% of flash `generateContent` calls). Tripling the default interval
is a deliberate coverage/cost trade.

External source for the rewritten expected default: 2026-08-17 workload
value ranking (PostHog 30d), same measurement that shipped the macOS
1800s default.

## What

- `sanitizeCooldownMinutes` now takes an optional fallback (Focus/Task
stay at 10; Memory uses 30).
- `memoryAssistant.effectiveIntervalMs` defensive fallback follows the
new default.
- Tests: absent/junk → 30; explicit 10 and 15 survive sanitize; disk
round-trip of an explicit 10 survives an unrelated later write;
assistant cadence uses 30 min → 1_800_000 ms.

## Test plan

- [x] `pnpm exec vitest run src/main/appSettings.test.ts
src/main/assistants/memory/memoryAssistant.test.ts` — 29 passed
- [x] `pnpm test` (Node 22.21.1) — 5220 passed, 33 skipped
- [x] `make preflight` — 11 checks passed
- [ ] Could not exercise the real Windows Settings UI (this run is on
macOS). The interval is not shown in the Notifications tab; only the
memory toggle is. Confirm on a Windows build that a fresh profile
extracts every 30 min and a profile with `memoryExtractionIntervalMin:
10` already on disk stays at 10.

## Commands run

```
export PATH="/opt/homebrew/opt/node@22/bin:$PATH"   # v22.21.1
pnpm install --ignore-scripts --frozen-lockfile
pnpm exec vitest run src/main/appSettings.test.ts src/main/assistants/memory/memoryAssistant.test.ts
# Test Files  2 passed (2) / Tests  29 passed (29)

pnpm test
# Test Files  542 passed | 6 skipped (548)
# Tests  5220 passed | 33 skipped (5253)

make setup
make preflight
# PR preflight passed: 11 checks in 196.25s
scripts/pr-preflight --suggest
# Product invariants affected: none
# No fix: commits; no Failure-Class declaration required
```


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