Repository navigation
fix(backend): make memory & conversation deletion work again on desktop and mobile - #14691
undivisible wants to merge 5 commits into
Conversation
…on deletion
DELETE /v1/conversations/{conversation_id} shipped to released mobile clients
as 204 No Content. The 2026-07-04 response_model backfill (e22938a) turned
it into a 200 with a StatusResponse body, and the released app
(app/lib/backend/http/api/conversations.dart::deleteConversationServer) gates
delete success on exactly 204 — so every conversation delete there reads as a
failure: the optimistic tombstone is dropped immediately, the server-cursor
rebase and fetch-revision bookkeeping are skipped, and once the server delete
cannot complete (e.g. cascade retraction failing closed) the deleted
conversation resurfaces on the next refresh. This is the recurrence of
BasedHardware#10446 for conversations.
Restore status_code=204 with no body (the folders/mcp convention) and pin the
contract from both sides in backend/tests/unit/test_conversation_delete_wire_contract.py:
the router declaration and the regenerated app-client OpenAPI spec.
Verified: offline harness — cascade delete of a conversation with attributed
memories returned 503 before this change, 204 with an empty body after.
Failure-Class: FC-privacy-delete-fails-on-unprovisioned-derived-store
Amp-Thread-ID: https://ampcode.com/threads/T-01a0b590-2123-744a-9e4a-16706295c2d3
Co-authored-by: Max Carter <[email protected]>
…onfigured BasedHardware#10451 (5fa372e) made Pinecone-unavailable failure handling fail closed: HistoricalMemoryAdapter.cleanup(required=True) raised 503 when vector_db.index is None, and delete_canonical_memory_vectors returned False → RuntimeError → 503 on cascade retraction. Production never provisions Pinecone on most releases (backend/deploy/runtime_env.yaml attaches the key only to llm-gateway releases; desktop_backend_prod.yml explicitly strips it), so every DELETE /v3/memories/{id} and every cascade DELETE /v1/conversations/{id}?cascade=true deterministically 503'd — the desktop app surfaces the error verbatim, and mobile reads the non-200 as a failed delete, drops the tombstone, and the item resurfaces on refresh (BasedHardware#10446 recurrence). Deletion of the user's data is the privacy-preserving direction: when no derived vector store is configured, there is nothing to purge, so cleanup completes successfully; a configured store that errors still fails closed. Tests cover the unconfigured-index deletion path, required historical cleanup completing without a vector authority, and cascade deletion of a conversation with attributed memories completing without a vector store. Verified: offline harness — memory delete returned 503 before this change and 200 afterwards. Failure-Class: FC-privacy-delete-fails-on-unprovisioned-derived-store Amp-Thread-ID: https://ampcode.com/threads/T-01a0b590-2123-744a-9e4a-16706295c2d3 Co-authored-by: Max Carter <[email protected]>
…d-derived-store Registers the definition for the privacy-delete failure class cited by the two fixes in this branch. Failure-Class: none Amp-Thread-ID: https://ampcode.com/threads/T-01a0b590-2123-744a-9e4a-16706295c2d3 Co-authored-by: Max Carter <[email protected]>
…t contract gate The gate treats the merge-base spec as the released-clients truth. That baseline can itself carry a spec-only regression: e22938a (2026-07-04) flipped DELETE /v1/conversations/{conversation_id} from the released 204 No Content to 200 + StatusResponse while every released mobile client still gates delete success on exactly 204 (app/lib/backend/http/api/conversations.dart::deleteConversationServer, BasedHardware#10446 recurrence: desktop delete errors, mobile re-adds on refresh). With the baseline poisoned, the gate blocked restoring the actual released contract, and the July regression shipped precisely because no guard existed to catch it. Add RELEASED_STATUS_RESTORES, patterned on DELIBERATELY_REMOVED_ENDPOINTS: an explicit, evidence-cited (route, method, status) record whose released-client contract predates the baseline regression, so restoring that status is not flagged as a new success status. Entries are narrow — an unrecorded operation cannot borrow the allowance — and both the allow-and-refuse directions are unit-tested. Evidence: app/lib/backend/http/api/conversations.dart:140 in the released app source returns response.statusCode == 204 for this call. Failure-Class: none Amp-Thread-ID: https://ampcode.com/threads/T-01a0b76d-bb38-749d-a0da-1b0837aa8e2e Co-authored-by: Max Carter <[email protected]>
Generators: backend/scripts/generate_ts_openapi_types.py, generate_swift_openapi_types.py (dart --all produced no diffs; the wire schemas are unchanged — only the conversation-delete response status moved back to 204). Failure-Class: none Amp-Thread-ID: https://ampcode.com/threads/T-01a0b76d-bb38-749d-a0da-1b0837aa8e2e Co-authored-by: Max Carter <[email protected]>
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_4bfbbd2e-250d-4c85-9c50-c8ab4d7d6c1e) |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Verified this end to end against main and the PR head — both regressions are real and the fix is sound.
1. Fail-closed privacy delete (primary). Confirmed on main: HistoricalMemoryAdapter.cleanup(required=True) raises 503 when vector_db.index is None (memory_service.py), and delete_canonical_memory_vectors returning False becomes RuntimeError('canonical vector privacy cleanup unavailable') at canonical_memory_adapter.py:3596, so explicit deletes and cascade deletes both 503. The deploy-manifest claim checks out: in backend/deploy/runtime_env.yaml the main backend service has no PINECONE_API_KEY in dev or prod (only pusher and the notifications/memory-maintenance jobs carry it), and desktop_backend_prod.yml strips it. The semantic split in vector_db.py is the right one: index is bound at import time from env, so index is None means 'never configured, nothing to purge' (now logs and returns True), while a configured index that raises at index.delete still fails closed. Deleting the user's data is the privacy-preserving direction here.
2. Wire contract. Confirmed the released client gates on exactly 204 (app/lib/backend/http/api/conversations.dart:143 response.statusCode == 204), so main's current response_model=StatusResponse (200) made every successful server delete read as failure on mobile. Restoring status_code=204 in routers/conversations.py matches the folders/mcp convention.
3. Compatibility gate. RELEASED_STATUS_RESTORES in check_app_client_openapi_compatibility.py is narrow — one evidence-cited (route, method, status) triple consumed only in _check_responses' 'new success status' branch — and both the allow and refuse directions are unit-tested. Good pattern alongside DELIBERATELY_REMOVED_ENDPOINTS.
4. Tests. I ran the new/changed suites locally on this head: test_conversation_delete_wire_contract.py (2), the vector-absence and cleanup-completes tests, test_conversation_delete_cascade_completes_without_vector_store, and the full test_app_client_openapi_compatibility.py — all pass (28 total). The two-layer wire-contract assertion (router declaration + generated spec) is a nice touch.
5. Generated clients/spec. The four TS clients, the Swift client (now returns Void), and docs/api-reference/app-client-openapi.json are consistently regenerated; no bare StatusResponse references remain and nothing non-generated imports the removed type.
CI note. The Backend unit suite failure is not from this PR: test_legacy_summary_source_refs.py::test_flag_off_legacy_composition_validates_all_summary_evidence fails with AttributeError on _detect_duplicate_capture, the identical failure appears on main's own latest run (b930ae1, shard 3/4 vs shard 1/4 here), this PR touches neither that test nor process_conversation.py, and it passes in isolation on this head. That looks like shard-ordering/module pollution on main — worth a follow-up issue. Desktop Swift checks were still queued at review time.
One decision is above automated review: this reverses the #10451 fail-closed hardening so privacy deletes fail open when the vector store was never provisioned. The implementation is verified correct, but the deletion-failure semantics on user-data paths is a maintainer product/security call, so I'm leaving formal sign-off to a human maintainer.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Follow-up on the CI note in the earlier automated review: I pinned the exact root cause, and it is deterministic and pre-existing on main — not shard-ordering/module pollution.
Everything else from the earlier review stands. The one open item for this PR remains the maintainer decision on deletion-failure semantics: it reverses the #10451 fail-closed gate so privacy deletes complete when no vector store was ever provisioned. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Real fix for memory/conversation deletion; CI failure (test_legacy_summary_source_refs.py) looks unrelated to this diff's files, rerun triggered but not yet green at review time - approve only pending clean CI.
|
The red
The fast-unit CPU guard on Confirming the deployment half of the diagnosis from Not verified here: I did not run the offline harness end to end. The above is the code, the deploy config, and those test suites. |
|
Follow-up on the earlier automated review — two updates since then, both resolving the open items: Human sign-off landed. The one decision the earlier review explicitly left to a maintainer — reversing the #10451 fail-closed gate so privacy deletes complete when no vector store was ever provisioned — has been made: kodjima33 approved this exact head. With that, nothing is outstanding from automated review, so I've cleared The two red backend checks are main's breakage, not this PR's. Traced fully this time: main's own Backend Unit Tests run on this PR's merge-base commit ( Everything else from the earlier verification stands: the unconfigured-means-nothing-to-purge semantics in 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Genuine, well-verified backend fix restoring memory/conversation deletion on desktop and mobile: (1) makes privacy-delete cleanup succeed when no vector store is provisioned instead of fail-closed 503ing (most deployments never provision Pinecone on the main backend service per runtime_env.yaml), and (2) restores the 204 status code on DELETE /v1/conversations/{id} that the released mobile client gates success on. Wire-contract regression test, canonical-vector tests, and generated-client updates all included; scoped Line-Count-Exceptions documented and justified. Confidence 5/5 on the fix itself.
Not merging: Backend unit shard 1/4 fails on tests/unit/test_legacy_summary_source_refs.py, which touches neither files this PR changes. I triggered a rerun (gh run rerun --failed) and it failed again with the identical test. Independently verified via the GitHub check-runs API that this same test also fails on main itself (commit b930ae1, shard 3/4, 2026-09-19) — this is a pre-existing, shard-order-dependent flake on main, not a regression from this diff. Per the hard floor a failing required check still blocks auto-merge; leaving approved-only for Nik to merge once the pre-existing main flake is fixed or to override.
|
Verified on The fail-open half is already on current main via merged #15097: What is still unique here is the wire contract: Please rebase onto current main and drop the already-landed fail-open files. Do not resolve the conflicts in the web editor. I am not approving or merging this SHA. It is CONFLICTING/DIRTY. |
kodjima33
left a comment
There was a problem hiding this comment.
Confidence gate ~3/5 (diff exceeds scoped-diff threshold across 16 files; CI shows failing backend unit checks) - approve-only despite well-documented root cause.
kodjima33
left a comment
There was a problem hiding this comment.
Well-documented backend fix but diff >300 lines across many files and CI backend-unit checks failing + DIRTY — approve-only, not merging.
kodjima33
left a comment
There was a problem hiding this comment.
Re-affirmed (backlog reapprove): real backend fix for memory/conversation deletion (#10446 recurrence), root cause well documented. Still DIRTY and Backend unit shard 1/4 + Backend unit suite are failing on current CI — hard floor blocks merge, holding at approve.
kodjima33
left a comment
There was a problem hiding this comment.
fix(backend): memory/conversation deletion — verified independently against origin/main. Root cause #1 (vector-store fail-open on 503) is ALREADY FIXED on main via PR #15097 (commit 6a4928c, merged 2026-09-20, co-authored by this same PR's author, undivisible/Max Carter). Root cause #2 (restoring status_code=204 on DELETE /v1/conversations/{id}, which the released mobile client gates success on) is still NOT on main. This PR bundles both — not closing since the 204 fix is still genuinely needed, not merging since it's DIRTY (likely conflicting with the already-merged #15097) and has a failing required check (Backend unit shard 1/4 + suite). Holding at approve; recommend the author rebase off current main to drop the already-merged half and resubmit just the 204 fix.
|
Two notes for this head, following up on the prior automated review. 1) CI attribution. The only test failing in 2) Supersession state. The fail-open privacy-delete half of this PR ( The earlier verification conclusion stands; leaving the merge/rebase sequencing with the human maintainers already engaged on this PR. by AI on behalf of David — if you need David's attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Detailed root-cause analysis for memory/conversation deletion failing closed; approve-only — mergeStateStatus is DIRTY and Backend unit shard 1/4 + Backend unit suite are failing in CI, so not merge-eligible; not touching the branch.
kodjima33
left a comment
There was a problem hiding this comment.
fix(backend) memory/conversation deletion, stated root cause + tests, but DIRTY (needs manual rebase, left untouched, not merged) and backend unit suite showing a failing check; approve-only.
kodjima33
left a comment
There was a problem hiding this comment.
Genuine scoped backend bug fix (memory/conversation deletion 503s + wire-contract break), not already fixed on main (verified conversations.py still uses response_model=StatusResponse, not 204). Confidence 3/5: diff 329 lines > 300 cap, and Backend unit shard 1/4 fails on CI (even after a rerun) — but the failure is in test_legacy_summary_source_refs.py over process_conversation.py, a file this PR never touches, and that test file no longer exists on current main (likely stale/pre-existing drift). No abuse signals. Approve only, do not merge, per hard floor (failing required check) + confidence gate.
|
Diagnosed the red backend checks on this PR — they are not from this diff. The only failure in Backend unit shard 1/4 is tests/unit/test_legacy_summary_source_refs.py::test_flag_off_legacy_composition_validates_all_summary_evidence, which AttributeErrors while stubbing _detect_duplicate_capture on backend/utils/conversations/process_conversation.py. Neither that test nor that module is touched here. At the time CI ran, the merge commit inherited main's removal of _detect_duplicate_capture while the stale test still referenced it; current main has since deleted that test file outright, so this specific failure self-resolves on the next merge/re-run of the suite. Everything this PR actually changes is green: shards 2/4–4/4 and the guardrails job pass, including the new unprovisioned-store coverage (test_canonical_memory_vectors.py, test_ws_j_delete_privacy.py cascade, the rewritten test_universal_memory_service.py case) and the wire-contract pins (test_conversation_delete_wire_contract.py, test_app_client_openapi_compatibility.py). One caveat: main's backend suite is itself red on rotating shards today (3/4 on the latest run, 2/4 on the one before), so a re-run may still surface unrelated main-side noise. The fix itself remains verified sound: vector_db.py treats an unconfigured index as trivially-confirmed absence while a configured index that raises still fails closed, memory_service.py drops the 503 unprovisioned gate, conversations.py restores the released 204 contract, and the RELEASED_STATUS_RESTORES allowlist in check_app_client_openapi_compatibility.py is narrow and cannot be borrowed by other operations. Feedback generated by the Omi maintainer automation on David's behalf. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Backend bug-fix PR. Root-caused and well-documented, but 2 of its 3 fixes (vector_db.py + memory_service.py unconfigured-index handling) are already merged on main via PR #15097 (same author, co-authored as Max Carter). The remaining fix (restoring 204 on DELETE /v1/conversations/{id}, reverting e22938a's 200+body regression) is real and NOT yet on main. Approve-only: mergeStateStatus UNKNOWN + failing Backend unit suite check (pre-existing drift in test_legacy_summary_source_refs.py, unrelated to this diff) block merge under the hard floor; diff size (329 lines/10 files) also misses the ≤300 scoped-diff criterion.
kodjima33
left a comment
There was a problem hiding this comment.
fix(backend): memory/conversation deletion -- real bug w/ good test coverage, but 'Backend unit shard 1/4' + 'Backend unit suite' required checks FAIL -- hard floor blocks merge; (area corrected from
kodjima33
left a comment
There was a problem hiding this comment.
fix(backend): memory/conversation deletion -- real bug w/ good test coverage, but 'Backend unit shard 1/4' + 'Backend unit suite' required checks FAIL -- hard floor blocks merge; (area corrected from
…tion (#21329) * fix(backend): restore the released 204 delete contract for conversation deletion DELETE /v1/conversations/{conversation_id} shipped to released mobile clients as 204 No Content. The 2026-07-04 response_model backfill (e22938a) turned it into a 200 with a StatusResponse body, and the released app (app/lib/backend/http/api/conversations.dart::deleteConversationServer) gates delete success on exactly 204 — so every conversation delete there reads as a failure: the optimistic tombstone is dropped immediately, the server-cursor rebase and fetch-revision bookkeeping are skipped, and once the server delete cannot complete (e.g. cascade retraction failing closed) the deleted conversation resurfaces on the next refresh. This is the recurrence of Restore status_code=204 with no body (the folders/mcp convention) and pin the contract from both sides in backend/tests/unit/test_conversation_delete_wire_contract.py: the router declaration and the regenerated app-client OpenAPI spec. Verified: offline harness — cascade delete of a conversation with attributed memories returned 503 before this change, 204 with an empty body after. Failure-Class: FC-privacy-delete-fails-on-unprovisioned-derived-store Amp-Thread-ID: https://ampcode.com/threads/T-01a0b590-2123-744a-9e4a-16706295c2d3 Co-authored-by: Max Carter <[email protected]> (cherry picked from commit 21002a8) * fix(checks): allow recorded released-status restorations in app-client contract gate The gate treats the merge-base spec as the released-clients truth. That baseline can itself carry a spec-only regression: e22938a (2026-07-04) flipped DELETE /v1/conversations/{conversation_id} from the released 204 No Content to 200 + StatusResponse while every released mobile client still gates delete success on exactly 204 (app/lib/backend/http/api/conversations.dart::deleteConversationServer, #10446 recurrence: desktop delete errors, mobile re-adds on refresh). With the baseline poisoned, the gate blocked restoring the actual released contract, and the July regression shipped precisely because no guard existed to catch it. Add RELEASED_STATUS_RESTORES, patterned on DELIBERATELY_REMOVED_ENDPOINTS: an explicit, evidence-cited (route, method, status) record whose released-client contract predates the baseline regression, so restoring that status is not flagged as a new success status. Entries are narrow — an unrecorded operation cannot borrow the allowance — and both the allow-and-refuse directions are unit-tested. Evidence: app/lib/backend/http/api/conversations.dart:140 in the released app source returns response.statusCode == 204 for this call. Failure-Class: none Amp-Thread-ID: https://ampcode.com/threads/T-01a0b76d-bb38-749d-a0da-1b0837aa8e2e Co-authored-by: Max Carter <[email protected]> (cherry picked from commit 11cc3c5) * chore: regenerate TS/Swift OpenAPI clients for the restored 204 delete contract Regenerated from the updated app-client spec with backend/scripts/generate_ts_openapi_types.py and generate_swift_openapi_types.py rather than cherry-picking 2fb1f42 from #14691, whose generated files predate current main. Only the conversation delete function changes: Swift returns Void, TypeScript returns without parsing a body. No in-tree code calls either generated function. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(backend): expect no body from conversation delete under the 204 contract test_conversation_tombstones.py (#21000) landed after the 200-with-body regression and asserted the handler's {'status': 'Ok'} return. The route is 204 No Content again, the contract the released mobile client gates on (app/lib/backend/http/api/conversations.dart::deleteConversationServer returns statusCode == 204), so the handler returns None. The tests' subject, tombstone ordering against retraction and cleanup, is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(backend): assert conversation delete answers 204 with an empty body over HTTP The wire-contract test pinned the route declaration and the published spec. This adds the HTTP layer: the real route through FastAPI's TestClient, with only storage side effects stubbed, for cascade=false and cascade=true. Against main's route both requests answer 200 (assert 200 == 204), which the released mobile client reads as a failed delete. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(backend): keep the 204 delete rationale to one line The full reasoning lives in test_conversation_delete_wire_contract.py; the router stays at its line-count baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Amp <[email protected]> Co-authored-by: Max Carter <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
kodjima33
left a comment
There was a problem hiding this comment.
Real, well-documented root-caused fix for memory/conversation delete, but mergeStateStatus is UNKNOWN (stale) and CI shows a failing backend unit shard on this old run — approving only, not merging, until that's resolved.
kodjima33
left a comment
There was a problem hiding this comment.
Rechecked: CI still red (hard floor). Genuine root-caused fix for memory/conversation delete, but mergeStateStatus UNKNOWN (stale) and failing CI shard on old run
|
Current-main supersession note, reviewed November 5, 2026: Both original fix boundaries described here are now present on main Brent's newly supplied Discord thread reports deletion failing again across mobile/desktop for conversations, recordings and memories; a second named participant says “same problem.” This recurrence is tracked in #24719. Exact builds, failed operation/response and deployed revision remain unknown; old fixes on main do not prove this incident resolved or establish its cause. The meaning/storage surface of “recordings” also needs confirmation. This is a support/source-history update, not an approval or closure of this PR. Please use the current-main evidence when assessing remaining PR scope; do not treat this still-open PR as proof that the original two fixes are absent. |
Problem
An end user ([email protected], recurring report, "#10446 recurrence") cannot delete memories or conversations on desktop or mobile:
Root cause (backend; no client changes needed)
5fa372e00d(fix(memories): mirror canonical deletes into the store the user still reads #10451) made deletion fail closed when the vector store is unavailable:HistoricalMemoryAdapter.cleanup(required=True)raised 503 whenvector_db.index is None, anddelete_canonical_memory_vectorsreturnedFalseon an unconfigured index →RuntimeError→ 503 on cascade retraction. Most releases never provision Pinecone (backend/deploy/runtime_env.yamlattachesPINECONE_API_KEYonly to llm-gateway;desktop_backend_prod.ymlstrips it), so everyDELETE /v3/memories/{id}and every cascadeDELETE /v1/conversations/{id}?cascade=truedeterministically 503'd. Desktop surfaces the error verbatim; mobile reads the non-200 as a failed delete, drops the optimistic tombstone, and the item resurfaces on refresh.e22938ac78(Jul 4) turnedDELETE /v1/conversations/{id}fromstatus_code=204intoresponse_model=StatusResponse(200 + body). The released mobile client (app/lib/backend/http/api/conversations.dart::deleteConversationServer) gates delete success on exactly 204, so even successful server deletes read as failure on mobile.Fix
Deleting the user's data is the privacy-preserving direction: with no configured vector store there is nothing to purge, so cleanup completes successfully; a configured store that errors still fails closed.
status_code=204(no body) onDELETE /v1/conversations/{conversation_id}(the folders/mcp convention) and pin the contract from both sides inbackend/tests/unit/test_conversation_delete_wire_contract.py(router declaration + regenerateddocs/api-reference/app-client-openapi.json).backend/database/vector_db.py+backend/utils/memory/memory_service.py: fail deletion open when the vector store is unconfigured.FC-privacy-delete-fails-on-unprovisioned-derived-store(.github/failure-classes/), cited by both fixes.Regression tests would have caught both: wire-contract both-sides test, unconfigured-index canonical vector deletion, required historical cleanup without a vector authority, cascade conversation delete without a vector store.
Product invariants
INV-MEM-1, INV-MEM-3, INV-MEM-4 (per
scripts/pr-preflight --suggest; behavior change preserves the invariants — deletion now succeeds where no derived store exists, instead of erroring).Failure-Class: new
Line-Count-Exception: backend/routers/conversations.py | 2231 -> 2235 | Restores the released 204 contract on DELETE /v1/conversations/{id}; the fix lives at the route declaration where the regression landed.
Line-Count-Exception: backend/utils/memory/memory_service.py | 4310 -> 4312 | HistoricalMemoryAdapter.cleanup must treat an unconfigured vector store as nothing-to-purge; the gate is the adapter's privacy-cleanup boundary.
Verification
From the authoring orb (T-01a0b590-2123-744a-9e4a-16706295c2d3), end to end:
PROVIDER_MODE=offline make dev-up, worktree uvicorn on :8001): with the old codeDELETE /v3/memories/…→ 503 and cascade conversation delete → 503; with the fix memory delete → 200{"status":"ok"}and cascade delete → HTTP 204, empty body; both items gone from subsequent list reads.bash backend/test.sh— full suite passed (1162 files, exit 0).python3 backend/scripts/scan_async_blockers.py --dirs backend/routers backend/utils— 0 findings.scripts/export_openapi.py --surface app-client --check) — up to date;python3 scripts/check_client_compat.py --base origin/main— clean../scripts/failure-class validate—errors [].Re-verified in the PR checkout: all four touched test files pass under
BACKEND_UNIT_TEST_FILE_LIST bash test.sh(172 tests; the one fast-unit CPU guard warning ontest_upsert_canonical_memory_vector_writes_user_scoped_id_and_metadatareproduces identically on unpatchedorigin/main— pre-existing, load-dependent, 0.32–0.44s vs the 0.30s local budget; CI's ceiling is 1.0s). Async-blocker scan on changed paths: 0 findings.black --checkon all changed Python files: clean.Notes / follow-ups
DELETE /v1/action-items/{id},POST /v1/action-items/batch-delete, andDELETE /v1/conversations/{id}/action-items(mobile clients inaction_items.dartandconversations.dart:482expect 204). Not fixed here — will file a follow-up issue.runtime_env.yamlanddesktop_backend_prod.ymlin code, not from live deployed state.