Repository navigation
Description
Out of scope
Native file removal, public endpoint/UI, new auth authority, expiry and independent content/effect erasure.
Context
At source 6fa3ec1305e8b52991252d6a28959a68c56be1c1, bindDialogue, packages/ui-server/src/ws/dialogue-storage.ts:169-212, merges aliases and provisional owners; saveConversationTask, packages/ui-server/src/ws/conversation-storage.ts:35-71, retains independently consumed identities. restoreInboxSnapshot, packages/ui-server/src/inbox/snapshot.ts:350-433, restores an operational image but cannot know deletions after its recovery point.
Scope
Implement the internal serialized lifecycle/identity ledger and gate shared by subsequent removal owners. Cover native-only and provisional chats, exact authenticated ownership, aliases, generation retirement, permanent minimized replay facts and crash/restart/export/restore. This layer does not advertise completed content deletion.
Acceptance criteria
- Atomically compare actual owner/backend/generation, refuse unknown ownership and busy effect holders, persist content-free intent and terminal generation before accepting cleanup; never infer authority from history read/title.
- Admission and writer commits reject retired identities and racing adoption; earlier successful adoption expands the exact set, later adoption refuses. Auth is checked after awaits, including revocation during admission.
- Minimized fences survive content cascades, process restart and post-deletion backup/restore; consumed task/native/request/revision identities cannot execute again. Unrelated chats/accounting remain intact.
- Restore preserves surviving fences; demonstrate and disclose text restoration from a pre-deletion image without claiming a no-resurrection guarantee. No external deletion ledger.
- Busy/unsupported/unauthorized refuse before retirement without existence leakage. Pending/partial/unknown cleanup is durable and idempotent, never a success acknowledgement.
Verification
Use actual file-backed SQLite/write workers and synthetic Odysseus fixtures, no provider/network. Failing-first cases block adoption/commit/auth awaits, retire, then release; assert no late writes or replay and preserved unrelated controls. Mutate post-await generation/auth checks and permanent fence retention separately; named assertions must fail, restore and record receipts. Exercise real snapshot children with exit-code checks and distinct pre/post-deletion images. Later transport/browser layers owe their own runtime proof.
Contract impact
Internal lifecycle does not by itself add HTTP/wire/API. Assess migrations/backup compatibility against current contract; any actual contract change gets same-commit contract docs and CONTRACT prefix, minor changeset for additive surfaces, breaking label/named changeset for a shipped retention break within the recorded ruling. Do not advertise deletion until all selected owners complete.
Policy and ownership
Follow-up to #3180 and its binding ruling. Read docs/decisions/chat-history-deletion.md and docs/plans/chat-history-deletion.md now delivered by #3232. Authenticated owners delete only their own chat with exact principal fences; agent/cross-principal deletion is forbidden. Ambient mode needs explicit owner mapping, otherwise refuse. Independent saved content/effects/provider copies/backups remain and are disclosed. Minimized non-content identity/replay fences are permanent; old-backup restoration is accepted. No outside-image ledger, secure-erasure promise, automatic expiry or routine live cutoff. Busy effects refuse with existing stop/reconcile paths. Priority p2 records wanted, unscheduled work under the approved policy; it does not commit a runtime release.
Dependencies
The policy prerequisite #3180 is completed by merged #3232.
Readiness reconciliation — 2026-11-01
Part of #3234. The approved policy is delivered by #3232; cited product-source files are unchanged between the source-audited 6fa3ec1305e8b52991252d6a28959a68c56be1c1 and actual delivery e0584b7f277f42a18b029e9c0bb6852993cfb946. The implementation/dependency scope has not changed. The implementation brief is complete and no needs label remains. Agent-ready is appropriate; existing open implementation dependencies remain authoritative. This triage does not start implementation, infer urgency or assign a release milestone.
Activity
schlessera commentedon Nov 1, 2026
Unblocked: #3180 is closed, so
scripts/sync-project.tsis removing theblockedlabel.schlessera commentedon Nov 1, 2026
2026-11-01 readiness reconciliation: approved local-deletion policy delivered by #3232; native membership in epic #3234 verified. Priority p2 means wanted and unscheduled, with no runtime release commitment. The implementation brief is complete and no needs label remains. Agent-ready is appropriate; existing open implementation dependencies remain authoritative. Source applicability and the current specification are folded into the body; no implementation started.
schlessera commentedon Nov 2, 2026
Claimed for implementation (token
claim-3228-22683), branchfeat/3228-retire-chat-identities.Collision report for the cited files (
dialogue-storage.ts,conversation-storage.ts,inbox/snapshot.ts): closure-only overlaps with open PRs #3054, #3056, #3059, #3069, #3116, #3277, #3278, #3279; no direct path collision.feat(ui-server): retire chat identities with permanent replay and res…
docs: record the chat retirement ledger and its old-backup limit
feat(ui-server): refuse new work, retries and projections for a retir…
feat(ui-server): retire chat identities with permanent replay and res…
schlessera commentedon Nov 2, 2026
Delivered by #3284, squash
557b01bc1f7de67e8daaa34d0233c08f1c6a8400on main (parentabd5fd6c8dd848e370a9c56442f491ceb8c7808d, tree078a5d442d2e776900e39fe7855bb25f815176da, equal to the confirmed candidate checkoutcbbbf94fd960e1330effe9caf28ca37116348b79). Candidate run 41451124471 passed every selected job, including unit, runtime, runtime_host, browser, layout, endurance, pack, captures and verify. Milestone 0.45.0.What exists now: migration
073_chat_lifecycle.sqlandpackages/ui-server/src/ws/chat-lifecycle.ts.retireChatre-reads owner authority in the serialized writer and resolves the exact identity set. Unauthorized, unknown, foreign, stale, unsupported and busy targets are refused before retirement, with no existence leak. A retirement persists permanent, content-free fences and pending per-store intent. Dialogue, conversation and session-keyed writers and readers then refuse the retired identities. Receipts for both adoption orders, revocation during admission, cascades and restart, and post- and pre-retirement backup restores are in the PR, along with eight recorded mutations.For the dependants:
recordChatCleanup.chatRetired. Until those stores confirm removal, every retirement stayspending. Nothing advertises deletion.