Repository navigation
security: remove screen activity cloud egress - #11018
undivisible wants to merge 12 commits into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for tightening this privacy boundary — removing the desktop screen-activity cloud sync path and making the cloud chat tools fail closed is the right direction.
I found one blocker before this should move out of draft / toward merge:
- The OAuth scope retirement is not complete yet.
backend/database/mcp_oauth.pystill includesscreen_activity.readinSUPPORTED_SCOPES, so a legacy refresh request that echoesmemories.read screen_activity.readcan still rotate into a token whosescopeincludes the retired screen-activity scope. CI is catching the same issue intests/unit/test_mcp_oauth.py::test_refresh_token_ignores_retired_scopes_echoed_by_client(expected 'memories.read', gotmemories.read screen_activity.read). Please make the token/grant normalization actually drop retired scopes on refresh and from newly issued/default-supported scopes as appropriate.
Also worth keeping this as human-maintainer reviewed given the security/privacy surface and the cross-cutting desktop + backend/MCP behavior change. The current macOS Swift gate is also red (looks like CanonicalGoalsStoreTests timed out in the isolated Swift suite), so please get the required checks green before marking it ready.
No concern that this is malicious; the intended product/security direction looks good, but the scope downscoping bug needs to be fixed first.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Additional automation note: this PR also updates the desktop's embedded Omi memory prompt in by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
478a03b to
2bdce47
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_f02a6fc6-4934-4b85-8747-6fbb8b4c4782) |
There was a problem hiding this comment.
1 issue found across 27 files
Confidence score: 5/5
- In
backend/database/mcp_oauth.py, embedding scope-retirement policy inside_build_token_pair_writescan make future authorization changes harder to reason about or update, risking subtle mismatches in access control behavior over time—consider moving or documenting the policy boundary so it’s enforced consistently at the service layer.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/database/mcp_oauth.py">
<violation number="1" location="backend/database/mcp_oauth.py:696">
P3: The newly added scope-retirement filtering (`requested_scope`/`stored_scopes`) and the `SUPPORTED_SCOPES` intersection in `_build_token_pair_writes` place authorization/retirement policy inside the database layer (`database/mcp_oauth.py`), while the canonical MCP scope allowlist already lives in the business-logic layer `backend/utils/mcp_scopes.py`. This splits the scope policy across two layers and grows the DB layer's business logic. Consider moving the retired-scope normalization/intersection into a util (e.g. extending `utils/mcp_scopes.py`) and calling it from the DB write paths, keeping the persistence layer focused on storage and traceable to the grant/family ids.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| return None | ||
| try: | ||
| stored_scopes = sorted(set(data.get("scopes") or []).intersection(SUPPORTED_SCOPES)) | ||
| requested_scope = " ".join(item for item in (scope or "").split(" ") if item and item not in RETIRED_SCOPES) |
There was a problem hiding this comment.
P3: The newly added scope-retirement filtering (requested_scope/stored_scopes) and the SUPPORTED_SCOPES intersection in _build_token_pair_writes place authorization/retirement policy inside the database layer (database/mcp_oauth.py), while the canonical MCP scope allowlist already lives in the business-logic layer backend/utils/mcp_scopes.py. This splits the scope policy across two layers and grows the DB layer's business logic. Consider moving the retired-scope normalization/intersection into a util (e.g. extending utils/mcp_scopes.py) and calling it from the DB write paths, keeping the persistence layer focused on storage and traceable to the grant/family ids.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/database/mcp_oauth.py, line 696:
<comment>The newly added scope-retirement filtering (`requested_scope`/`stored_scopes`) and the `SUPPORTED_SCOPES` intersection in `_build_token_pair_writes` place authorization/retirement policy inside the database layer (`database/mcp_oauth.py`), while the canonical MCP scope allowlist already lives in the business-logic layer `backend/utils/mcp_scopes.py`. This splits the scope policy across two layers and grows the DB layer's business logic. Consider moving the retired-scope normalization/intersection into a util (e.g. extending `utils/mcp_scopes.py`) and calling it from the DB write paths, keeping the persistence layer focused on storage and traceable to the grant/family ids.</comment>
<file context>
@@ -692,12 +692,14 @@ def _rotate(transaction: Any) -> Optional[Dict[str, Any]]:
return None
try:
+ stored_scopes = sorted(set(data.get("scopes") or []).intersection(SUPPORTED_SCOPES))
+ requested_scope = " ".join(item for item in (scope or "").split(" ") if item and item not in RETIRED_SCOPES)
requested_scopes: List[str] = (
- normalize_scopes(scope, {"allowed_scopes": data.get("scopes")}) if scope else data.get("scopes") or []
</file context>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bdce4752d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7c7541a3-e7b5-441d-bf70-d574138080ba) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_527ae157-49fb-4f57-a596-c14b950fbf15) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 142cc8831a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_91f64406-523f-4f6a-9160-67660c4d3513) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3366ed5dbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "change": "Stopped syncing screen activity OCR text to the cloud; screen captures remain on this Mac only" | |||
There was a problem hiding this comment.
Stop remaining OCR egress before claiming local-only
When Rewind captures a frame containing at least 20 OCR characters, RewindIndexer still queues it through OCREmbeddingService, whose production batch embedder POSTs the raw formatted OCR text in parts.text to the backend Gemini proxy (EmbeddingService.embedBatch, lines 114-140). Thus this change removes the Firestore/Pinecone mirror but does not stop screen OCR from leaving the Mac, making this user-facing privacy statement incorrect; either close that embedding egress or narrow the release note and security claim to persistent cloud synchronization.
AGENTS.md reference: desktop/macos/AGENTS.md:L522-L528
Useful? React with 👍 / 👎.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_eaeccdc4-825e-458f-ab33-08b15d9d38fd) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcc7013a2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return timezone.utc | ||
| SCREEN_ACTIVITY_CLOUD_UNAVAILABLE = ( | ||
| "Screen activity is no longer available from cloud chat. " | ||
| "Captures stay on the user's computer in the Omi desktop app (Rewind). " |
There was a problem hiding this comment.
Stop the remaining Agent VM screen-data sync
For signed-in desktop users, opening the main content still schedules AgentVMService, which uploads the entire local omi.db to a cloud VM and then starts AgentSyncService; that service continuously POSTs the screenshots table while excluding only ocrDataJson, so ocrText and embeddings still leave the Mac. This makes the tool's local-only assurance false for those users. Fresh evidence beyond the previously noted embedder path is this independent full-database and incremental Agent VM sync; strip screen data from both paths or narrow the message.
Useful? React with 👍 / 👎.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d2e87c59-e366-4e25-85bd-aa5c596828e2) |
|
Commit 1f5916f restores the route-policy ratchet comments and keeps the deprecated empty screen-activity endpoint for released OpenAPI/client compatibility. The OAuth retirement tests, SOUL migration, and cloud screen-tool fail-closed behavior pass locally. Full initial database upload, AgentSync screenshot rows, VM screen tools, and OCR embedding egress remain unresolved P1 paths; this PR is not merge-ready. |
|
Commit a42438f retires the stale screen seam from the dev parity README and its fixture, with focused parity and endpoint tests passing. The remaining review blockers are the full VM database bootstrap, incremental screenshot sync, VM screen tools, and OCR embedding egress. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9546b55dd2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| SCREEN_DATA_TABLE_PATTERN = re.compile( | ||
| r"(?:screenshots(?:_[A-Za-z0-9_]+)?|focus_sessions(?:_[A-Za-z0-9_]+)?|observations(?:_[A-Za-z0-9_]+)?|" | ||
| r"ocr_[A-Za-z0-9_]*|proactive_extractions(?:_[A-Za-z0-9_]+)?)", |
There was a problem hiding this comment.
Block context-bucket screen derivatives
For a legacy uploaded omi.db whose matched screenshot/focus/observation rows have aged out or been cleared, this pattern reports no screen data even though ContextBucketRollup independently persists frame-derived text in tables such as bucket_entries.narrative, bucket_facts.evidenceText, and bucket_versions. None of those names match this regex, so /screen-activity-status returns present: false, while database_schema advertises them and execute_sql lets the agent read them. Fresh evidence beyond the prior proactive_extractions finding is this separate context-bucket schema; include every frame-derived context table in the report/query boundary and cover a legacy database with only those rows.
AGENTS.md reference: AGENTS.md:L122-L122
Useful? React with 👍 / 👎.
|
Rebased onto current origin/main + CI reconciled. Ready for re-review. What was doneThe 60-commit branch (253 commits behind, tangled with 17 main-reconcile New head: Privacy/security intent preserved:
CI verdict — 37/38 greenAll suites pass except one main-owned failure, proven non-PR:
OpenAPI artifactsRegenerated Requesting re-review — branch is now mergeable-clean and CI is green apart from |
) Reconstruct the screen-activity cloud-egress removal onto current origin/main (253 commits of drift). The prior 60-commit branch history was entangled with 17 main-reconcile merges + env reverts, so a linear replay conflicted at the opening commit; per the rebase guidance this rebuilds the reviewed net diff (main + this PR's 84-file change) cleanly instead. Preserved privacy/security intent: - (SVG) screen-activity/sync is a tombstone: /v1/screen-activity/sync stores nothing ever (desktop_screen_crisp.py), declared data_domain screen_activity + deprecation active in the route-policy manifest. Current main re-added a live sync handler dumping rows+embeddings to Firestore; that re-egress is dropped. - Kept current main's newer GET /v1/screen-activity, /v1/screen-activity/summary read-back + /v3/speech-profile/status + /v1/stt/transcribe route policies (main's current structure wins on routes this PR does not touch). - AgentSyncService /health (+sync/auth) sends both Authorization: Bearer and ?token= (fail-closed fresh-VM auth). - Regression tests preserved: fresh-VM cursor-reset (AgentSyncBatchQueryTests, valid SyncCursor bytes), AgentSyncBatchQuery force-unwrap removal, agent VM session-startup concurrency, agent VM database privacy, assistant-settings visibility static contract, agent_vm_protocol smoke. Reconstruction approach: took origin/main, applied the PR's 84-file net change; 3-way merged the 8 files overlapping main's drift (route_policy_manifest.yaml, GeneratedToolExecutors.swift manually reconciled; the other six auto-merged); removed the 3 files the PR deletes. Result is 0 commits behind main and mergeable-clearly per gh pr view. Includes commit 41f0046 equivalent (SVG) cursor-reset compile fix.
9546b55 to
06a67ae
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06a67aeca5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| logger.info("Discarding retired screen-activity sync payload uid=%s", uid) | ||
| return {"synced": 0, "last_id": 0} |
There was a problem hiding this comment.
Stop the active Context for Claude uploader
For signed-in Context for Claude users with Airgap Mode off, desktop/context-for-claude/Sources/ContextApp/Engine.swift:388 still starts ScreenActivityUploader, which posts OCR batches to this exact route and treats every 2xx as accepted (ScreenActivityUploader.swift:601-622), advancing its cursor even when synced is zero. This tombstone therefore continues sending newly captured screen text off-device while silently discarding it and reporting the history as synced; disable or migrate that in-tree uploader and its sync UI as part of retiring the endpoint.
AGENTS.md reference: AGENTS.md:L89-L89
Useful? React with 👍 / 👎.
`scripts/pre-push` caps broad backend unit test selection at PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES (40), and on overflow replaces the selector's output with the diff's own changed backend test files. That replacement was never re-bounded: a diff changing more than 40 backend test files ran all of them, while the message still printed "cap is 40" — advertising a bound the run then exceeded. This is the ballooning the cap exists to prevent. PR #11018's 92-file diff stalled its push on this gate repeatedly; that diff had only 15 changed backend test files so it stayed under the cap, but the gate still ran long enough that several agents fell back to documented skip hatches. A diff one size larger would have had no bound at all. The fallback now truncates deterministically to the cap. The list is already `sort -u`ed, so `head -n cap` selects the same files on every push of the same diff — repeated pushes behave identically instead of sampling a different subset. Truncation is preferred over skipping because the diff's own changed test files are the highest-signal coverage available locally; the message names the full changed-test count, what actually ran, and points at `cd backend && bash test.sh` for the remainder. PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES stays the single knob. Regression test `scripts/test-pre-push-backend-test-cap.sh` extracts the real `check_backend_unit_tests_if_needed` from the hook and runs it against a stubbed selector and backend, asserting the fallback runs at most the cap, that truncation is stable and sorted, and that the under-cap and empty-fallback paths are unchanged. Registered as manifest check `pre-push-backend-test-cap` on the local and ci lanes. Verification — mutation test with the bound reverted: FAIL: fallback ran 25 backend test file(s), over the cap of 10 Selector requested broad selector fallout (500 files; running 25 changed backend test file(s) instead; cap is 10). Selected 25 backend unit test file(s): broad selector fallout With the bound restored: `pre-push backend unit test cap tests passed`. Failure-Class: none Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Considering adding "select" screen grabs for meeting notes |
…ninspectable DB, purge legacy frame-derived tables - POST /upload is now a 410 tombstone raised before the request body is read, so an already-shipped desktop provisioning a fresh or reaped VM never transmits its omi.db (screenshots/OCR) at all. The upload machinery (streaming install, integrity gate, rollback journal) is deleted with its protocol tests; nothing may call it anymore. - /screen-activity-status fails closed when omi.db exists but cannot be opened: it reports present=true with reason=database_uninspectable instead of claiming absence while recoverable OCR bytes remain on disk. - The screen-data boundary now covers the full frame-derived surface: proactive_extractions* (incl. FTS shadow tables) and the context-bucket rollup schema (bucket_*, context_buckets, context_visits, subject_bindings, proactive_candidates) are hidden from database_schema, rejected by execute_sql, and reported by /screen-activity-status. - New POST /purge-screen-activity drops every matched table from the retained omi.db (WAL checkpoint + fsync). The reconciler owns calling it before stamping screenPrivacyVersion (next commit). Regression tests: old-schema purge (legacy tables + FTS shadows dropped, non-screen rows kept), uninspectable-database fail-closed, absent-when- missing, and a body-must-not-be-read tripwire on the tombstone route.
…mping the privacy marker The privacy migration was half-built: the proxy refused mobile sessions for VMs without screenPrivacyVersion and queued the reconciler, but the reconciler's ready-state write stamped the marker without deleting anything. A legacy VM whose state disk still held the uploaded omi.db (OCR tables included) therefore got marked migrated while its screen data survived — exactly the state the marker promises is gone. Now the reconciler runs the deletion half itself: when the owner record lacks a current screenPrivacyVersion, it calls the runtime's new /purge-screen-activity after the runtime reports healthy and only a successful purge lets the ready-state CAS persist the marker. A failed purge raises into the ordinary retry path and leaves the marker unwritten, so admission stays closed until the disk is actually clean. VMs already marked skip the purge entirely. Shared the migration-required predicate with the proxy via services.agent_vm_lifecycle.screen_privacy_migration_required so both sides cannot drift on what 'migrated' means. Regression tests: legacy VM purge ordering (wait -> purge -> ready write), no marker in any write when the purge fails, and no purge call when the marker is current.
…et cursors on ambiguous readiness Two live egress/loss holes in the non-screen sync path: - memories, action_items, and staged_tasks can hold rows with source = 'screenshot' — frame-derived extractions carrying screen content/description, context summaries, source app, and window titles. The table allowlist stopped the screenshots table but not these rows in non-screen clothing. They are now dropped from every payload before it is built, and the cursor advances past the RAW page end, so a page that was entirely filtered out is consumed rather than re-read forever. - Sync cursors were kept unless /health affirmatively reported no database. When a replacement VM's health probe timed out, returned a non-2xx, or produced an unparseable body, the cursors of the previous VM survived and the first /sync bootstrapped the new database with only rows newer than those cursors — permanently omitting unchanged memories, tasks, transcriptions, and notes. Readiness is now a tri-state: cursors are reset on an affirmative absent AND on every ambiguous answer; only an affirmative present keeps them. A full re-send is cheap; silently missing rows is not. Tests: payload-level proof that screenshot-sourced rows never reach /sync, a fully-filtered page still advances the scan, and cursor resets for the unreachable / non-2xx / malformed health cases.
… levels The @sendable outer closure captured self strongly while its DispatchQueue body re-captured [weak self]; Swift 6 strict ownership checking (default Xcode Beta toolchain) rejects the mismatch, which broke every local debug build on this branch's base.
…ader Context for Claude still started ScreenActivityUploader on every launch, POSTing OCR batches of newly captured screen text to the retired /v1/screen-activity/sync route. The tombstone's 200 made the client advance its cursor and report the history as synced while every byte had already left the Mac — egress plus a false receipt. The uploader is removed outright rather than tombstoned: Engine no longer starts it, the type, its wire-format tests, and the screen-sync sections of the airgap tripwires are deleted, and NetworkEgress loses its screenActivitySync client so the audited Airgap Mode list matches what the app actually does. Comments that pointed at the retired client are rewritten. Full ContextAppTests suite green (1171 tests, 0 failures).
Retiring the sync route stopped future uploads but left every pre-rollout
user's OCR rows under users/{uid}/screen_activity and their Pinecone
vectors in place — account deletion was the only path that removed them,
so the 'captures stay on this Mac' changelog promise was false for
existing data.
Adds a bounded cleanup pass on the notifications-job cron lane: discover
owners holding screen_activity documents, delete the Pinecone vectors
FIRST, and delete the Firestore documents only when that succeeded — a
failed vector deletion leaves the documents as the durable retry list for
the next hourly pass. Bounded to 200 users per run via
SCREEN_ACTIVITY_CLOUD_PURGE_USERS_PER_RUN (0 disables). Service-map doc
updated in the same change.
Hermetic tests cover both-stores deletion, the vector-failure retry-list
ordering, the disable flag, and loud failure on invalid config.
…processing is off Contextual task interruptions still fire from non-frame events (meeting-state changes, resurfacing) and their only delivery gate is TaskAssistantSettings.notificationsEnabled — hiding the toggle inside the frame-only condition left users receiving interruptions they could not turn off individually. The row now sits outside that gate; the three genuinely frame-driven notification toggles stay hidden.
`scripts/pre-push` caps broad backend unit test selection at PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES (40), and on overflow replaces the selector's output with the diff's own changed backend test files. That replacement was never re-bounded: a diff changing more than 40 backend test files ran all of them, while the message still printed "cap is 40" — advertising a bound the run then exceeded. This is the ballooning the cap exists to prevent. PR BasedHardware#11018's 92-file diff stalled its push on this gate repeatedly; that diff had only 15 changed backend test files so it stayed under the cap, but the gate still ran long enough that several agents fell back to documented skip hatches. A diff one size larger would have had no bound at all. The fallback now truncates deterministically to the cap. The list is already `sort -u`ed, so `head -n cap` selects the same files on every push of the same diff — repeated pushes behave identically instead of sampling a different subset. Truncation is preferred over skipping because the diff's own changed test files are the highest-signal coverage available locally; the message names the full changed-test count, what actually ran, and points at `cd backend && bash test.sh` for the remainder. PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES stays the single knob. Regression test `scripts/test-pre-push-backend-test-cap.sh` extracts the real `check_backend_unit_tests_if_needed` from the hook and runs it against a stubbed selector and backend, asserting the fallback runs at most the cap, that truncation is stable and sorted, and that the under-cap and empty-fallback paths are unchanged. Registered as manifest check `pre-push-backend-test-cap` on the local and ci lanes. Verification — mutation test with the bound reverted: FAIL: fallback ran 25 backend test file(s), over the cap of 10 Selector requested broad selector fallout (500 files; running 25 changed backend test file(s) instead; cap is 10). Selected 25 backend unit test file(s): broad selector fallout With the bound restored: `pre-push backend unit test cap tests passed`. Failure-Class: none Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`scripts/pre-push` caps broad backend unit test selection at PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES (40), and on overflow replaces the selector's output with the diff's own changed backend test files. That replacement was never re-bounded: a diff changing more than 40 backend test files ran all of them, while the message still printed "cap is 40" — advertising a bound the run then exceeded. This is the ballooning the cap exists to prevent. PR #11018's 92-file diff stalled its push on this gate repeatedly; that diff had only 15 changed backend test files so it stayed under the cap, but the gate still ran long enough that several agents fell back to documented skip hatches. A diff one size larger would have had no bound at all. The fallback now truncates deterministically to the cap. The list is already `sort -u`ed, so `head -n cap` selects the same files on every push of the same diff — repeated pushes behave identically instead of sampling a different subset. Truncation is preferred over skipping because the diff's own changed test files are the highest-signal coverage available locally; the message names the full changed-test count, what actually ran, and points at `cd backend && bash test.sh` for the remainder. PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES stays the single knob. Regression test `scripts/test-pre-push-backend-test-cap.sh` extracts the real `check_backend_unit_tests_if_needed` from the hook and runs it against a stubbed selector and backend, asserting the fallback runs at most the cap, that truncation is stable and sorted, and that the under-cap and empty-fallback paths are unchanged. Registered as manifest check `pre-push-backend-test-cap` on the local and ci lanes. Verification — mutation test with the bound reverted: FAIL: fallback ran 25 backend test file(s), over the cap of 10 Selector requested broad selector fallout (500 files; running 25 changed backend test file(s) instead; cap is 10). Selected 25 backend unit test file(s): broad selector fallout With the bound restored: `pre-push backend unit test cap tests passed`. Failure-Class: none Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…est lane ## Why Four independent hygiene fixes to local/CI gates. 1. **The pre-commit hook could reformat files into a shape CI rejects.** When a web directory had no `node_modules`, `scripts/pre-commit` fell back to a floating `npx prettier` — prettier 3 against the `^2.8.8` `web/frontend` pins and CI installs with `npm ci`. That rewrote `getPlatformLink` in `web/frontend/src/app/apps/[id]/page.tsx` into a CI-failing shape (#11304) and polluted four PRs in one day, plus unrelated `app/` Dart files reformatted by a locally-installed Dart SDK that differs from the repo's pinned Flutter. 2. **`web/frontend`'s test suite ran in no lane.** `package.json` has `"test": "node --test src/__tests__/*.test.mjs"` with real guards (`app-detail-not-found`, `case-status`, `shared-conversation-chat-contract`), but `.github/checks-manifest.yaml` never selected them — which is why a deleted frontend test's guards had to be re-homed into a backend pytest to keep running. 3. **`web/admin/AGENTS.md` was 137 bytes from red.** `agents-md-lean` going over budget takes `main` red and blocks every PR touching any `AGENTS.md` (#11409, fixed by #11410). 4. **The pre-push backend test cap had an unbounded escape hatch.** The root `AGENTS.md` push-gate budget says pre-push must "cap broad backend selection at 40 files", and `scripts/pre-push` does cap it — but when the selector overflows, the cap branch swaps in the diff's *own* changed backend test files and never re-applies the cap to that replacement. A diff changing more than 40 backend test files ran unbounded, while the message still printed `cap is 40`. #11018's 92-file diff stalled its push on this gate repeatedly; it had 15 changed backend test files so it stayed under the cap, but slow enough that several agents resorted to documented skip hatches — one size larger and there would have been no bound at all. ## What changed 1. `scripts/pre-commit` resolves the pinned toolchain and **refuses to format** rather than formatting with the wrong one: each web dir's `package.json` prettier major must match `node_modules/.bin/prettier`, and Dart requires the `flutter-version` pinned in `.github/workflows/repo-checks.yml`. Both fallbacks (`npx`, global `prettier`) are gone. Hatches: `OMI_SKIP_WEB_FORMAT=1`, `OMI_SKIP_DART_FORMAT=1`, both documented in the root `AGENTS.md` Formatting section. Web directories are now derived from the staged paths, so `web/admin` (previously skipped entirely) is covered. New regression test `scripts/test-pre-commit-pinned-toolchains.sh`, registered as manifest check `pre-commit-pinned-toolchains`. 2. New manifest check `web-frontend-tests` (`local` + `ci`, triggers `web/frontend/**`) running `node --test 'web/frontend/src/__tests__/**/*.test.mjs'` — the glob picks up test files added later. 3. `web/admin/AGENTS.md` networking and revenue-metrics detail moved verbatim into `web/admin/docs/data-contracts.md`, with the two top-level rules and a pointer left behind. **Budgets untouched.** 4. The `scripts/pre-push` fallback now **truncates deterministically to the cap**. The changed-test list is already `sort -u`ed, so `head -n cap` picks the same files on every push of the same diff rather than sampling a different subset. Truncation beats skipping here because the diff's own changed test files are the highest-signal local coverage available; the message now names the full changed-test count, what actually ran, and points at `cd backend && bash test.sh` for the remainder — it never prints a cap the run then exceeds. `PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES` stays the single knob. New regression test `scripts/test-pre-push-backend-test-cap.sh`, registered as manifest check `pre-push-backend-test-cap` (`local` + `ci`). Distinct lane from #11361, which narrows `flutter-codegen` selection in `scripts/pre_push_ci_prediction.py` — same class of problem, no overlapping files. ## Verification **Mutation test of the new guard** — with `scripts/pre-commit` reverted to `origin/main`, `scripts/test-pre-commit-pinned-toolchains.sh` fails and the output shows the exact hazard: ``` FAIL: missing pinned prettier — hook exited 0 instead of refusing Formatting staged web files with Prettier... npm warn exec The following package was not found and will be installed: [email protected] web/frontend/src/a.ts 34ms ``` With the fix applied: `pre-commit pinned-toolchain refusal tests passed` (refusal cases for missing prettier, prettier major mismatch, no flutter, flutter version mismatch; positive cases for the pinned versions; and both hatches). **Manifest selection** (`run_checks.py --list`): | Diff | `web-frontend-tests` | |---|---| | `web/frontend/src/app/apps/x.tsx` | SELECTED | | `web/frontend/src/__tests__/new-thing.test.mjs` | SELECTED | | `backend/main.py` | not selected | `run_checks.py --lane ci --check-id web-frontend-tests` → **47 tests pass, 0 fail**. **AGENTS.md headroom** after this PR (`python3 .github/scripts/check_agents_md_lean.py` → `ok: 7 AGENTS.md files within budget`): | File | Bytes | Headroom | |---|---|---| | `web/admin/AGENTS.md` | 457 / 1500 | **1043** | | `AGENTS.md` | 17082 / 18000 | 918 | | `.github/AGENTS.md` | 3825 / 4500 | 675 | | `app/AGENTS.md` | 10606 / 11500 | 894 | | `backend/AGENTS.md` | 38936 / 39000 | 64 | | `desktop/macos/AGENTS.md` | 45531 / 47000 | 1469 | | `omi/firmware/AGENTS.md` | 853 / 1500 | 647 | `backend/AGENTS.md` remains 64 bytes from the same failure and still needs its own PR. **Mutation test of the pre-push cap bound** — the regression test extracts the real `check_backend_unit_tests_if_needed` from the hook and runs it against a stubbed selector and backend, so it exercises production control flow rather than scraping source. With the bound reverted: ``` FAIL: fallback ran 25 backend test file(s), over the cap of 10 Selector requested broad selector fallout (500 files; running 25 changed backend test file(s) instead; cap is 10). Selected 25 backend unit test file(s): broad selector fallout ``` With the bound restored: `pre-push backend unit test cap tests passed` (over-cap truncation, stable + sorted truncation across repeated runs, the unchanged under-cap fallback message, and the unchanged empty-fallback skip). `make preflight` passes. ## Product invariants affected none ## Failure class (fixes) Failure-Class: none The pre-push cap fix is likewise `none`: no registered class covers "a bound's own fallback path must re-apply that bound", and one instance does not justify opening one. The nearest existing class, `FC-dev-fallback-masks-install-defect` (a development-only fallback must never be the reason a check passes), is scoped to packaged-app resource resolution on desktop; this is the same shape in a different subsystem but the registry transition belongs in its own PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/11413?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. --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Changes are limited to git hooks, check manifest entries, and devDependency/docs wiring; no production runtime or auth paths are modified. > > **Overview** > Tightens local git hooks and CI manifest guards so formatting and pre-push selection cannot silently diverge from what CI enforces. > > **`scripts/pre-commit`** now **refuses** to auto-format when toolchains do not match repo pins: web Prettier (and `prettier-plugin-tailwindcss`) must match `package-lock.json` via local `node_modules`; Dart uses the Flutter version from `.github/workflows/repo-checks.yml` and that SDK’s `dart` binary. Floating `npx`/global Prettier fallbacks are removed. Web dirs are inferred from staged paths (so `web/admin` is included), `*.generated.ts` is skipped, and format-and-add is blocked when a file has unstaged edits. Escape hatches `OMI_SKIP_WEB_FORMAT=1` / `OMI_SKIP_DART_FORMAT=1` are documented in root **`AGENTS.md`**. > > **`scripts/pre-push`** re-applies **`PRE_PUSH_MAX_BACKEND_UNIT_TEST_FILES`** when the broad-selector fallback runs changed backend test files from the diff—deterministic sorted truncation and clearer logging instead of an unbounded run that still claimed a cap. > > **`.github/checks-manifest.yaml`** adds **`pre-commit-pinned-toolchains`**, **`pre-push-backend-test-cap`**, and **`web-frontend-tests`** (`scripts/run-web-frontend-tests.sh` → `node --test` on `web/frontend`). > > **`web/admin/AGENTS.md`** is trimmed for the lean budget; networking/revenue detail moves to **`web/admin/docs/data-contracts.md`**. **`web/admin`** and **`web/app`** pin Prettier ^2.8.8 (+ tailwind plugin) so the hook can format them safely. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 44dcc98. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
# Conflicts: # backend/AGENTS.md # backend/agent-proxy/main.py # backend/agent_vm/main.py # backend/database/mcp_oauth.py # backend/database/screen_activity.py # backend/database/vector_db.py # backend/jobs/agent_vm_reconciler.py # backend/route_policy_manifest.yaml # backend/routers/desktop_agent_vm.py # backend/routers/desktop_screen_crisp.py # backend/routers/mcp.py # backend/routers/mcp_sse.py # backend/services/agent_vm_lifecycle.py # backend/tests/unit/test_agent_proxy_async_boundaries.py # backend/tests/unit/test_agent_proxy_startup_client_gone.py # backend/tests/unit/test_agent_vm_protocol.py # backend/tests/unit/test_agent_vm_reconciler_job.py # backend/tests/unit/test_desktop_agent_vm.py # backend/tests/unit/test_desktop_screen_crisp.py # backend/tests/unit/test_mcp_data_endpoints.py # backend/tests/unit/test_mcp_search_date_utc.py # backend/tests/unit/test_screen_activity_search_utc.py # backend/tests/unit/test_screen_activity_tool_result_bound.py # backend/utils/mcp_context.py # backend/utils/mcp_scopes.py # backend/utils/other/jobs.py # backend/utils/retrieval/tools/screen_activity_tools.py # desktop/context-for-claude/Sources/ContextApp/Backend/NetworkEgress.swift # desktop/context-for-claude/Sources/ContextApp/Engine.swift # desktop/context-for-claude/Tests/ContextAppTests/SettingsTests.swift # desktop/macos/Desktop/Sources/Generated/GeneratedRealtimeTools.swift # desktop/macos/Desktop/Sources/Generated/GeneratedToolCapabilities.swift # desktop/macos/Desktop/Sources/Generated/GeneratedToolExecutors.swift # desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift # desktop/macos/Desktop/Sources/Generated/OmiToolManifest.generated.swift # desktop/macos/Desktop/Sources/MainWindow/Pages/Settings/Sections/SettingsContentView+Advanced.swift # desktop/macos/Desktop/Sources/MainWindow/Pages/Settings/Sections/SettingsContentView+NotificationsPrivacy.swift # desktop/macos/Desktop/Sources/MainWindow/ShellClickThrough.swift # desktop/macos/Desktop/Sources/Onboarding/OnboardingView.swift # desktop/macos/Desktop/Sources/Rewind/Services/OCREmbeddingService.swift # desktop/macos/Desktop/Sources/ScreenActivitySyncService.swift # desktop/macos/Desktop/Sources/StartupWarmupCoordinator.swift # desktop/macos/agent/src/omi-tools-http.ts # desktop/macos/agent/src/runtime/desktop-tool-policy.ts # desktop/macos/agent/src/runtime/omi-tool-manifest.ts # desktop/macos/agent/tests/fixtures/tool-manifest.json # desktop/windows/src/renderer/src/lib/omiApi.generated.ts # docs/api-reference/app-client-openapi.json # docs/doc/developer/mcp/tools.mdx # web/admin/lib/services/omi-api/omiApi.generated.ts # web/app/src/lib/omiApi.generated.ts # web/personas-open-source/src/lib/omiApi.generated.ts
…11018) Review follow-ups on the merged head: - Purge retired screen-activity vectors from BOTH Pinecone indexes (memories-backend and memories-backend-dev) before the Firestore ids go away: the dev memory-maintenance job shares the production Firestore project, so a single-index purge orphans the sibling's vectors forever (review thread on database/screen_activity.py). - Stop queueing captured OCR for the retired hosted embedder: the production batch embedder returns no embeddings, so a queued batch was deferred and requeued on every flush — unbounded growth for no output. On-device retrieval is served by LocalEmbeddingIndexer. - Purge legacy screen-derived cassettes from the dev parity-pack bucket via ensure_dev_parity_pack_bucket (capture gate already refuses screen surfaces; existing exports needed removal). - Reconcile main's Dart wire generation with the retired sync contract: FrameRequestDelivery/ScreenActivitySyncResponse left the app-client spec with the drain endpoint, so the screen_activity group now generates only the surviving request models. - Reconcile main's strict scope-doc invariant with retirement: an explicitly empty issued scope stays empty (no silent grant re-expansion) and then fails validation closed. - Update the agent manifest test for the retired semantic_search surface.
…ted by the main merge The merge of origin/main reintroduced the lossless screen-sync rollout that this PR's egress removal had already deleted: the ScreenActivityLosslessSyncFeature gating in OCREmbeddingService (five-minute bucket compaction, per-bucket eligibility, lossless dedupe bypass), the compaction backfill helpers in RewindDatabase+Embeddings, and the two guard test files that only exercise the removed cloud-sync path. All of it references symbols (ScreenActivitySyncService, ScreenActivityLosslessSyncFeature) that no longer exist, so the merged tree did not compile and the feature-flag registry flagged three now-unread entries. - OCREmbeddingService: restore the PR-head behavior (recent-hash skip, in-batch dedupe with duplicate-group fan-out); drop the lossless flag plumbing, bucket helpers, and the now-unused clock injection. - RewindDatabase+Embeddings: take the PR-head version (no compaction SQL) and keep main's independent completedAt NULL fix in the backfill status update. - Delete OCREmbeddingLosslessTests and ScreenActivityLosslessSyncTests (they pin the removed delivery path) and BetaDogfoodRolloutTests' retired feature tuple. - feature-flags.yaml: drop screen_activity_lossless_sync(+_kill), SCREEN_ACTIVITY_KEYWORD_FALLBACK_ENABLED, and the OMI_FORCE_LOSSLESS_SCREEN_SYNC ignore entry; regenerate the registry doc. - Retire FC-high-water-cursor-skips-unready-row and FC-cte-filter-on- unprojected-column: both guard only the deleted lossless machinery (same treatment as main's agent-vm retirement in c0437da). - desktop/macos/AGENTS.md + retrieval ARCHITECTURE.md: drop retired-flag notes. Co-authored-by: Max Carter <[email protected]> Amp-Thread-ID: https://ampcode.com/threads/T-01a0d8ec-3f15-7649-8bf8-82cf32ae025d
Review follow-up: merge + fixes pushed (
|
Git-on-my-level
left a comment
There was a problem hiding this comment.
Since my last review: addressed — the fresh-VM health-probe blocker is fixed and verified on this head: AgentSyncService.swift now sends both the Authorization: Bearer header and the token= query on /health, and AgentSyncBatchQueryTests.swift::testStartResetsCursorsWhenTheVMReportsNoDatabase asserts both auth forms before accepting the cursor reset · still open — nothing from the last round · newly introduced — this head fails five required checks, all root-caused below.
The egress-removal design itself is in good shape, but this head needs work before it can leave draft: five required checks are red, and four of the five are defects in the PR's own changes (each verified from the CI logs at 249d340).
Blocking findings:
backend/utils/mcp_server/handlers/other.py— 10 unused imports left behind after the screen-activity handler removal (lines 3–30:Counter,datetime,TypedDict,FailedPrecondition,end_of_day_utc,MCP_SCREEN_ACTIVITY_OBSERVATION_GAP_SECONDS,MCP_SCREEN_ACTIVITY_TOP_TITLES,decode_cursor,keyset_position,parse_mcp_date). This is what fails Backend unit suite (pyrightreportUnusedImport, all four shards). Please delete them.desktop/macos/Desktop/Sources/Rewind/Core/LocalEmbeddingStore.swift:203still callsRewindDatabase.compactedScreenshotRankingSQL, which was deleted along withRewindDatabase+Embeddings.swift— Desktop Swift Release Compile fails withtype 'RewindDatabase' has no member. Debug builds compile, so this only surfaces in the release configuration; remove the call site or keep the ranking helper.desktop/macos/Desktop/Tests/AgentSyncScreenshotRowExclusionTests.swift— Desktop Swift Static & Test Contracts (and, through the same phase, Desktop Swift Build & Tests) fails on SwiftLint violations (force unwraps at :33/:205, implicitly unwrapped optionals at :16/:17, inline UserDefaults key at :25) and the @mainactor test contract (super.setUp()at :22,super.tearDown()at :47).- Hygiene fails
backend-module-isolation:backend/tests/unit/test_apps_exception_hardening.py:26performs a module-scopesys.modulesmutation. That pattern pre-dates this PR on main, but touching the file brings it into the preflight's checked set — please move it behind the sanctionedtesting.import_isolation/ monkeypatch seams perbackend/docs/test_isolation.md.
What looks right (sampled at this head): the /v1/screen-activity/sync drain in backend/routers/desktop_screen_crisp.py accepts authenticated POSTs and persists nothing (a correct tombstone so released clients stop re-POSTing); backend/database/mcp_oauth.py retires screen_activity.read fail-closed (an explicitly empty scope issues an empty-scope token rather than silently widening to the grant; retired-only refresh echoes push back through re-authorize); the new purge lane (backend/utils/other/screen_activity_cleanup.py wired via utils.other.jobs) deletes Pinecone vectors first — fanning out to both memories-backend and memories-backend-dev — and keeps the Firestore documents as the durable retry list, bounded at 200 users/run with an env kill switch; backend/testing/parity_pack_v0/live_capture.py refuses screen/OCR surfaces at capture time and the dev-bucket cassette purge is pinned by hermetic tests.
Security / blast radius: this PR deletes production user data (historical users/{uid}/screen_activity Firestore documents plus Pinecone vectors, fleet-wide) and retires an OAuth scope. Both are the right privacy direction, and the vectors-first ordering plus fail-closed rotation mitigate the two failure modes (orphaned vectors, broken legacy tokens) — but if the purge is wrong it is unrecoverable over-deletion, so it warrants maintainer sign-off before merge.
UX: screen captures stop leaving the Mac and pre-existing cloud copies are purged; MCP get_screen_activity returns empty; legacy connectors requesting the retired scope are filtered, not rejected.
Cost: net reduction — no more OCR uploads/embedding spend; the purge is bounded per run.
Agent-behavior note: this PR intentionally changes what AI agents are told and can do — backend/AGENTS.md, desktop/macos/AGENTS.md, and docs/doc/developer/mcp/tools.mdx drop screen-activity from agent-facing docs, docs/api-reference/app-client-openapi.json removes the endpoints, the MCP tools fail closed with a "no longer available from cloud chat" result, screen_activity.read is retired, and the desktop SOUL prompt no longer instructs agents to call omi-memory__get_screen_activity. The guidance matches the new code (no stale promises), so it looks safe and accurate — but because it redirects agent behavior repo-wide, it should get explicit human maintainer sign-off alongside the data-deletion lane.
USER IMPACT: Screen activity (OCR / window history) stops syncing to Omi's cloud and existing cloud copies are deleted; chat, memories, and action items keep syncing as before.
Still wanted from a reviewer: the four fixes above; a maintainer decision on the purge pace (200 users/run) and whether the dual-index Pinecone fan-out delete should stay permanent; and one more look at the oldest released desktop client to confirm it treats the drain's 200 as terminal success rather than "keep uploading".
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
{"message": "Dismissing this stale automated review: its blocking concern — the /health probe in AgentSyncService.remoteDatabaseIsAbsent was sent without VM auth, so fresh-VM cursor reset never fired — is verified resolved on head 249d340. The probe now sends both the Authorization: Bearer header and the token= query, and AgentSyncBatchQueryTests.swift::testStartResetsCursorsWhenTheVMReportsNoDatabase pins both auth forms. Current blockers on this head are separate CI failures tracked in the latest review."}
Summary
Verification
backend/.venv/bin/python -m pytest backend/tests/unit/test_screen_activity_tools_cloud_unavailable.py backend/tests/unit/test_desktop_screen_crisp.py backend/tests/unit/test_mcp_oauth.py backend/tests/unit/test_mcp_sse_pagination_bounds.py— 31 passed--checkpassedgit diff --checkReview follow-ups (this push)
AgentSyncService.remoteDatabaseIsAbsentnow sends the VM token as both the/health?token=query andAuthorization: Bearerheader, matching the schema-recovery probe and the backend's new/healthauth requirement. The cursor-reset regression test asserts both auth forms on the probe (it fails if the token is missing). This fixes the replacement-VM recovery path where a fresh/reaped VM was never detected and old cursors silently suppressed the sanitized non-screen resync.database.screen_activity+database.vector_db(heavy Pinecone) inside the test body to patch functions the drain route never calls; CPU time blew past the 0.12s guard. The tombstone route returns a fixed payload and imports neither module, so the test now asserts the drain response and a labelled static tripwire that the router does not import the persistence layers.origin/maininto the branch (ratchet baselines, release-guard manifest, assistant-settings gate, OCR embedding/search conflict hunks resolved;chatFirstManifestDigestregenerated against the merged manifest). Branch is now MERGEABLE.Review note
This PR is a draft because the broader outbound-egress primitive and the remaining MCP/app-tool endpoint audit are separate follow-ups.
Product invariants affected
Failure-Class: none
Note
High Risk
Touches privacy-sensitive screen/OCR data with production deletion, OAuth scope retirement, and agent VM migration behavior; incorrect purge or scope handling could leak stale data or break connectors.
Overview
Screen activity no longer leaves the Mac. The desktop cloud sync service and
POST /v1/screen-activity/syncare removed; agent VM sync drops screenshots/focus/observations tables, blocks related SQL, adds/purge-screen-activity, and strips cloud-side semantic search/recap tools. Desktop provisioning now purges the VM before sessions, skips DB upload when local screen tables exist, and removessemantic_search/ hubsearch_screen_historyfrom generated tool surfaces.Cloud APIs and OAuth are tightened. MCP REST/SSE screen-activity reads return empty deprecated responses;
screen_activity.readis retired at authorize/refresh/token issue. Cloud chat screen-activity LangChain tools always return a fixed “unavailable” message. A one-shot prod purge (Firestore + batched Pinecone) runs from the memory maintenance job; parity capture refuses screen/OCR surfaces.Release guards now expect internal mobile builds via
mobile_internal_build.yml+dispatch_mobile_internal_builds.py(Codemagic keepsapp/**changeset guards only). Ready agent VMs with an olderscreenPrivacyVersionare stop/restarted to pick up the privacy migration.Reviewed by Cursor Bugbot for commit 3b0bc4a. Bugbot is set up for automated code reviews on this repo. Configure here.
Line-Count-Exception: backend/routers/apps.py | 2515 -> 2521 | merge of origin/main: black reformatting of two HTMLResponse error returns (no semantic change)
Line-Count-Exception: desktop/macos/Desktop/Sources/ProactiveAssistants/ProactiveAssistantsPlugin.swift | 1786 -> 1789 | gate assistant frame processing behind the screen-privacy capability flag
Line-Count-Exception: desktop/macos/Desktop/Sources/Rewind/Core/RewindDatabase.swift | 3450 -> 3470 | fail-closed upload eligibility when screen tables exist