Repository navigation
fix: surface conversation delete outcomes and clear stale rows - #25610
Conversation
Keep failed deletes visible with shared shell retry feedback. Retry busy requests within a bounded budget and clear already-absent rows locally. Skip backend gate/obligation work for tombstoned, absent conversations. Require matching active local capture when preserving in-progress cache rows. Failure-Class: FC-refused-mutation-bool-confirmed-as-success
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
/approve-ui b37c098 |
…elete-reminders suite #25610 made delete_conversation read conversation_tombstones.is_deleted first; this suite never patched it, so it reached a real Firestore client and failed in CI (no ADC) once selected. Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Main at this merge (7df9d68) fails 8 backend unit tests that this PR's selective CI did not run. Reproduced on a clean detached checkout of 7df9d68 with the backend venv:
|
…ed webhooks for derived rows (#25661) * fix(conversations-v3): commit live-appended sources and deliver created webhooks for derived rows Live capture: the projection commit fenced every loaded source recording on its exact update_time, so an owner who was still recording failed every reconcile pass with source_changed (HTTP 500, a burned Cloud Tasks attempt) and got no live tile or derived conversation while wearing the device. A source that only received more speech (fence fields unchanged: deletion, merge, privacy, lock, claims, identity) now commits the windows planned from the snapshot, merges its claims onto the re-read document, stays v3_pending and wakes the owner at the next minute. Derived rows and any other source change keep the strict fence. Remaining source_changed/lease_lost races answer the task with outcome 'raced' and a coalesced next-minute wake instead of raising (raise only if the wake cannot be scheduled). Webhooks: source finalization suppresses the legacy conversation-created fanout and the derived worker never called it. A notes settle on a visible, completed, unsuppressed derived row (or a hidden row with notes that becomes visible) arms a durable v3_created_pending marker; the builder drain delivers it once through trigger_external_integrations with a stable idempotency key, require_delivery and a bounded attempt budget. Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): arm created delivery on on-open notes, bound drain pages, keep private rows out Scope-panel follow-ups: the on-open summary write arms the same single conversation-created obligation; a saturated delivery page schedules a continuation wake; private-level rows never arm; the final delivery attempt is counted apart from a clean delivery; the eligibility predicate lives in the pure v3 policy module. Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(conversations-v3): classify the created-delivery conversation reader Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): import the created-delivery fanout lazily from the drain process_conversation imports the v3 service at import time; a top-level import of the webhook fanout pulled app_integrations and its LLM graph into that graph and broke test_selfheal_recovery's stubbed import (CI shard 3/8). Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(conversations): stub the tombstone read added by #25610 in the delete-reminders suite #25610 made delete_conversation read conversation_tombstones.is_deleted first; this suite never patched it, so it reached a real Firestore client and failed in CI (no ADC) once selected. Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(conversations-v3): recheck created-delivery eligibility on the sent payload Panel review follow-ups: drop a claimed row that turned private/hidden/locked before fanout, keep an unreadable payload owed instead of counting it delivered, fail the task when a delivery wake cannot be scheduled, record fallback telemetry on deferred Retry/on-open wakes, and pin the drain-to-delivery wiring. Failure-Class: FC-content-write-omits-implied-obligation Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…nxruntime SwiftPM wrapper (#25669) * fix(test): restore main unit tests broken by #25610 Stub the new tombstone short-circuit in the account-gate 409 delete test, and move deleteConversation and its retry helper verbatim into APIClient+ConversationDelete.swift so APIClient.swift is back under the 1500-line ratchet. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(desktop): move APIClient+ConversationDelete into Services/APIClient Panel review-20261118t081048-8e66 F1: new Swift sources belong in a feature directory (desktop/macos/AGENTS.md); sibling APIClient extensions already live in Sources/Services/APIClient/. Flow coverage path updated. Failure-Class: layout-rule Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(desktop): vendor onnxruntime-swift-package-manager after upstream 404 github.com/microsoft/onnxruntime-swift-package-manager returns "Repository not found" since 2026-11-18, so every desktop build without a warm SwiftPM cache fails to resolve (Desktop Swift CI on any PR that touches desktop/macos). Vendor the wrapper at the pinned revision b7fb7f7 (1.24.2, MIT) under desktop/macos/vendor/ and depend on it by path. The ONNX Runtime binary is still downloaded from download.onnxruntime.ai with its upstream SHA256 checksum. Verified: cold `swift package resolve` with an empty cache, `swift build`, and APIClientConversationDeleteTests (8 pass). Rollback: restore the .package(url:) line, re-resolve, delete the vendor dir. Failure-Class: external-dependency-removed Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(desktop): exempt the vendored onnxruntime wrapper from whitespace checks Upstream files carry trailing whitespace; keep them byte-identical to the pinned revision instead of reformatting third-party sources. Model files are marked binary. Failure-Class: external-dependency-removed Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed and why
Desktop conversation delete failures were invisible: the row/⋯ menu discarded the result and the detail page only acted on success, so a 409, a client timeout, and a successful 204 all looked like "nothing happened." The support trace for #24719 found the customer's Nov 4 conversation had already been deleted on Nov 6; his Nov 10 click was a repeat delete of an absent row.
This returns typed delete outcomes, shows shared retry feedback from both entry points, retries 409/503 with
Retry-Afterfor up to 30 seconds, treats 404 as success, and evicts local state after success. The backend now fast-paths a tombstoned, absent conversation to 204already_deletedbefore gate acquisition or obligation re-arm, and marks normal/deferred outcomes withX-Omi-Delete-Outcome. Reconciliation preserves a missing in-progress row only while a matching local session is actively capturing; cache eviction failures are logged.Fixes #24719.
Product invariants affected
How it was verified
make preflight: 59 checks passed.desktop/macos/e2e/flows/conversation-delete-feedback.yaml; not executed in this change.Not verified here: CI, installed-app acceptance, deployed behavior.
Tests
Regression tests added for:
Retry-After, 404-as-success, and a hard failure that keeps the row and reports it.UI evidence
UI-Evidence: none -- desktop error/feedback states need a live signed build; behavior is covered by the focused Swift tests and the added e2e flow (not executed).
Failure class (fixes)
Failure-Class: FC-refused-mutation-bool-confirmed-as-success
Line-count exceptions
Line-Count-Exception: backend/routers/conversations.py | 2891 -> 2900 | the already-deleted fast path is ten lines inside the existing delete route; splitting that route now would widen this fix's review surface
Line-Count-Exception: desktop/macos/Desktop/Sources/APIClient.swift | 1474 -> 1521 | the bounded delete retry needs its request loop beside the existing delete transport; the next APIClient split can absorb it
Line-Count-Exception: desktop/macos/Desktop/Sources/DesktopAutomationBridge.swift | 5267 -> 5269 | two added lines report the typed delete outcome from the existing bridge action