Repository navigation
chore(desktop): remove the retired Agent VM client surface (SCA-344) - #25050
Conversation
The cloud Agent VM was retired in #11795: the broker endpoints are now tombstones (410 /v2/agent/provision, 200-null /v2/agent/status) and the control plane is gone. The desktop client kept provisioning, polling, gzip-uploading omi.db, and running a 3s sync loop against a VM that no longer exists. Delete AgentVMService and AgentSyncService plus every call site: - Onboarding completion and Home launch warmup no longer start a VM pipeline; the StartupWarmupTaskID.agentVMProvisioning warmup and its delay are gone. - Owner-transition fences in RuntimeOwnerIdentity and AuthService drop their VM/sync drains. - ResourceMonitor no longer pauses/resumes AgentSync under memory pressure, and sleep no longer flushes a final sync. - APIClient loses the v2/agent provision/status wrappers and DTOs. Tests: the four AgentVM/AgentSync suites are deleted. The RewindDatabase pool-rotation test now drives RewindDatabase.reportQueryError directly (the production API AgentSync used to forward to), and the context-bucket egress test drops its AgentSync table-disjointness assertion. Server tombstones and backend/tests/unit/test_desktop_agent_vm.py stay untouched: they exist to cover pre-cutover clients. Refs SCA-344 Co-authored-by: multica-agent <[email protected]>
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 Rollout-lead recovery for SCA-344: please review this PR at unchanged exact head If you approve the current diff, comment: To withdraw that approval, comment: The release owner retains the gate: no merge or deployment until this check passes, the head remains unchanged, and the complete overlap scan is refreshed. |
|
@kodjima33 Gate update for SCA-344: PR #25050 now has merge conflicts, so please do not approve the old head After the resolution is published, we will request independent source review and your fresh UI-author approval at the resulting full head SHA. Please reply here with your disposition/ETA for that review, or tell us if you cannot remain the gate owner. Withdrawal remains |
Resolve the SwiftLint baseline conflict by taking main's regenerated baseline and dropping the four entries for the files this branch deletes (AgentSyncService.swift, AgentSyncBatchQueryTests.swift). The result is a strict subset of main's baseline, so the down-only ratchet stays green, and no baseline entry is left pointing at a deleted file. Co-authored-by: multica-agent <[email protected]>
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 Rollout-lead follow-up to the existing approval request after its 12-hour backstop. The current reviewed head is still Please give an explicit disposition and UTC ETA by 2026-11-16T23:15:00Z: approve this exact diff, reject it, or defer with a review time. This is a requested response deadline, not an assumed approval ETA. If unavailable, please say so. The release owner retains the blocked hold; silence or expiry cannot authorize merge. After reviewing, approval must be a separate exact command: |
|
/approve-ui 8ff90bc |
…ed after #25050) (#25694) Failure-Class: none Co-authored-by: Claude Opus 5.5 <[email protected]>
…parity and exact undo (#25686) * feat(conversations-v3): per-owner backfill and repair runs with live parity and exact undo Turn the v3 backfill into a reusable per-owner repair tool: - Operator plans one owner + window (default 2 days) from an owners file; partitions cut at five-minute silences; run ledger with counts, code SHA and outcome; the sweep starts planned runs only when CONVERSATIONS_V3_BACKFILL=on; one step at a time on a dedicated conversations-v3-backfill queue. - Derive passes hold their own backfill-builder lease and notes marker, so they never make the live builder busy or ride the live queue/sweep. - Backfilled notes take the live CAPTURE_END path (relevance, speaker resolution, meeting context, live floors); process_conversation withholds only derived effects for v3 backfilled rows. - Non-destructive conversion: legacy notes kept, prior field values recorded, undo restores donors exactly and removes derived rows; deleting a backfilled copy never arms the donor audio purge. - Resume and re-derive reuse ids by adoption; legacy manual stops map to the v3 manual end; discarded/imported/private/unreadable rows stay legacy. Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): backfill settle/resume edge cases from self-review Count live-writer terminal failures as failed, keep a start-marker read error from failing the live sweep, resume a run whose start marker was lost, and rename the live backoff local that shadowed the window bound. Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(conversations-v3): classify and register CONVERSATIONS_V3_BACKFILL_QUEUE Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): narrow the backfill start run for the type checker Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(conversations-v3): drop an unused loop index in the backfill operator Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(conversations-v3): keep StrictFirestore DELETE_FIELD semantics; bind historical in the hook harness Revert the fixture change (other suites assert the stored sentinel) and compare the restored donor as Firestore would store it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): answer the backfill panel review - A legacy row no derived window claims stays a visible legacy conversation (counted as sources_unclaimed) instead of being hidden with no replacement. - Start markers move under users/{uid} so account deletion purges them; the sweep reads them with a bounded collection-group list. - The operator refuses a new run while one is blocked; undo/resume exit 1 when no listed owner has the run. - A redelivered committed partition re-dispatches a lost successor (named task, so a duplicate is a no-op). - Re-derive blocks (rederive_mixed_runs) rather than merge rows from two runs, keeping undo run-scoped. - A refused undo records its reason; a drain stopped mid-way reports stopped. - classify_window reports legacy_candidates; the cost model has a test; the runbook documents the row-level partition-gap caveat. Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(conversations-v3): pin the historical gate on owner-recognition telemetry Backfilled v3 rows skip owner-recognition telemetry and capture-loss accounting; legacy processing already observed the same speech. Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(conversations-v3): declare the backfill lifecycle payload sites The run ledger's run/partition status, the re-derive reset of a prior backfilled copy, and undo's donor restore are reviewed entries in the lifecycle writer inventory (restore is a backfill-lease-fenced extra writer). Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(home): import home_feed at collection so the CPU guard measures the test The file-isolated runner charged the cold database.home_feed import to the first feed-read case's call phase, which crossed the 1.00s CPU guard on CI. Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(desktop): drop the retired /v2/agent out-of-scope prefix (main red after #25050) Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * config(conversations-v3): enable the operator-only backfill route on prod backend-sync Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(deploy): omit the stale-head canary uid from the Cloud Run manifest #25679 bound BATCH_PIPELINE_MERGE_STALE_HEAD_UID_ALLOWLIST as a literal in the prod backend-integration overlay. test_rollout_cohort_deploy's contract is that the Cloud Run manifest omits private uid bindings so deploys keep the live value (gcloud preserves undeclared env), so main's backend unit suite went red. Remove the literal and its known-gaps exception; the uid is bound on the service at deploy time. Unchanged: the test, #25673's skip code, #25679's regression case, and the GPU worker Helm value. Helm is declarative, so omitting it there would drop the canary on the next upgrade instead of preserving it; that literal keeps its reviewed no-uid-literals exception. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): undo never resurrects a deletion; fence it with both builders - A donor whose backfilled copy the owner deleted (a post-run deleted span, or no claim left) is kept converted, with every copy it shares and their donors; the restore transaction re-checks, and a deletion that races undo is kept. - Undo holds the backfill and live builder leases before it enumerates the run, so no pass commits or stamps a row while it restores and deletes. - A converted donor that no longer reads blocks the partition (backfill_source_unreadable) instead of retiring its only copy. - undo on a re-derive run id names the original run and exits 1; the dry-run counts donors the owner deleted; classification splits not-completed rows. Failure-Class: FC-irreversible-terminal-hide Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed and why
Removes the desktop client half of the retired cloud Agent VM (SCA-344, follow-up to #11795). The broker endpoints are now tombstones (
410 /v2/agent/provision,200-null/v2/agent/status) and the control plane is deleted, but the macOS app still provisioned a VM, polled its status, gzip-uploadedomi.dbto it, and ran a 3s sync loop against it.Deleted
AgentVMService.swift(587 LOC) andAgentSyncService.swift(754 LOC) plus every call site: the onboarding-completion pipeline, the Home launch-warmup task (StartupWarmupTaskID.agentVMProvisioningand its 20s delay), the owner-transition fences inRuntimeOwnerIdentity/AuthService, theResourceMonitormemory-pressure pause/resume, the sleep-time final flush, and theAPIClientv2/agentwrappers and DTOs.The remaining capture, transcript-persistence and retry-health paths now report successful database operations so removing AgentSync does not change the recovery counter from consecutive failures to cumulative failures. The lifecycle regression exercises a real health read between error groups and still proves that five consecutive errors close the pool. Two stale lint-baseline entries for the deleted sync test are removed.
The server tombstones and
backend/tests/unit/test_desktop_agent_vm.pyare untouched — they exist to cover pre-cutover clients.Product invariants affected
RuntimeOwnerIdentityand the sign-out storage transition inAuthServicelose their VM/sync drains. The remaining fence ordering (file indexer, OCR embeddings,RewindDatabase.retargetEffectiveOwner, storage cache invalidation) is unchanged, and the deleted actors were the only consumers of the removed drains.loadDataIfAdmittedkeeps its admission gate and conversation warmup.desktop/macos/agent/src/runtime/**is not modified; only the retired cloud-VM client is removed.Historical removal verification (85979bc)
xcrun swift build -c debug --package-path Desktop→Build complete!(281s).xcrun swift test --package-path Desktopfiltered to the touched suites:StartupWarmupPolicyTests,ContextBucketSchemaTests,RewindDatabaseLifecycleTests,AuthSessionCoordinatorTests,RewindDatabaseCurrentUserIdConcurrencyTests→ 71 tests, 0 failures.RuntimeOwnerIdentityTests,SignOutStorageInvalidationTests,SleepCaptureRearmPolicyTests,OnboardingFlowTests,SBOnboardingLaunchAtLoginCompletionTests,SBOnboardingSkipPermissionIntentTests,AppStateOwnerFenceTests,AppStateOwnershipTests,EffectiveOwnerDatabaseBoundaryTests,OCREmbeddingServiceOwnerResetTests,DesktopReviewRegressionTests→ all passed.backend/.venv/bin/python -m pytest -q tests/unit/test_desktop_agent_vm.py→ 6 passed (tombstone contract intact)../scripts/swift-format-wrapper.sh linton the 15 changed Swift files → clean../scripts/swiftlint-wrapper.sh lint→ 0 violations in 1912 files.python3 scripts/check_desktop_test_quality.py→ OK.python3 scripts/check-e2e-flow-coverage.py --strict→ exit 0..github/scripts/check_desktop_auth_session.py→ INV-AUTH-1 ratchet passed.grep -rn "AgentVMService\|AgentSyncService\|v2/agent" desktop/macos→ no matches.Not verified: a live named-bundle launch. The removed surface was a background fire-and-forget pipeline with no UI, and the server side is already a tombstone, so there is no user-facing path left to exercise.
Recovery follow-up verification
Follow-up commit
a67f71efcc9f:RewindDatabaseLifecycleTestspasses all 10 tests, including the real health-read reset regression;TranscriptionStorageRecoveryTestsandTranscriptionRetryResilienceTestspass in separate processes (see test receipt). Current-base local preflight passes all 37 checks using this PR body. Desktop test-quality and diff whitespace checks pass. Current-head hosted CI and independent review remain required. No named-bundle install, release, merge or live account verification performed.Tests
AgentVMLifecycleFenceTests,AgentSyncBatchQueryTests,AgentVMCompressionRatioTests,AgentVMWarmupAdoptionTests(~870 LOC).RewindDatabaseLifecycleTests.testAgentSyncDatabaseFailureReportingClosesPoolForRecovery→ renamed totestReportedDatabaseReadFailuresClosePoolForRecoveryand now drivesRewindDatabase.shared.reportQueryErrordirectly, which is the production APIAgentSyncService.reportDatabaseReadFailureonly forwarded to. It now exercises a real TranscriptionStorage health read between error groups to verify the reset, then proves five consecutive errors still rotate the pool.ContextBucketSchemaTestsdrops itsAgentSyncService.syncedTableNamesdisjointness assertion (the sync table set no longer exists); the derived-data egress assertions are unchanged.StartupWarmupPolicyTestsandAuthSessionCoordinatorTestsdrop the assertions that named the removed warmup ID and the removed owner-transition call.UI evidence
UI-Evidence: none -- no user-visible surface changes; this removes a background pipeline.
Failure class (fixes)
Failure-Class: none