Skip to content

ui-server: coordinate local chat copies and expose truthful deletion outcomes #3230

Closed

Description

@schlessera

Out of scope

Native-layout implementation, UI design, independent Inbox/effects/journal/content erasure, new authority and provider forgetting.

Context

At source 6fa3ec1305e8b52991252d6a28959a68c56be1c1, createSessionRoutes, packages/ui-server/src/routes/sessions.ts:8-147, only lists/reads. prepareHistory, packages/ui-server/src/ws/host.ts:638-650, joins host projections; publishHistory, packages/ui-server/src/ws/host.ts:564-598, only checks current turn changes. readLiveHistory, packages/ui-server/src/ws/live-history.ts:8-65, freezes startup input. 032_session_drafts.sql contains bound content and shared drafts with independent receipts.

Scope

Join host-owned dialogue/provenance, task/result/local-exchange/retry/failure/display text and positively bound draft/attachment copies to the retired lifecycle. Add the authenticated endpoint and targeted invalidation contract only after native/lifecycle completion semantics are available.

Acceptance criteria

  • Re-inventory selected owner columns/JSON/BLOBs from the proposal against current source. Remove direct content and unnecessary hashes while retaining minimized independent replay/accounting fences and positively preserving unrelated/unbound drafts/chats.
  • Gate all HTTP/WS list/read/recovery/retry/handoff/startup/background consumers and late async writer commits, not just the deletion endpoint. Retired old cursors/provider seeds cannot republish or resume text.
  • Exact owner/principal auth is rechecked across awaits. Agents, unmapped ambient callers, revoked or foreign principals refuse without content/existence leakage; native-only legacy ownership is never guessed.
  • Coordinate per-store receipts, drain and idempotent reconcile; unsupported/busy refuses before retirement, partial/unknown remains honest, completion requires every selected store. Expose no text/raw paths in errors/receipts.
  • Disclose retained independent saved content/effects/provider copies/backups, accepted old-backup text restoration and offline-device limits. No endpoint success implies secure physical erasure or undone effects.
  • Add narrowly targeted client invalidation/capability semantics and server enforcement for old clients; no arbitrary origin clearing or consent reuse. UI stays separately scoped.

Verification

Keyless real file-backed SQLite/worker plus HTTP/WS host tests seed markers in all selected payloads, draft responses/images and unrelated controls. Hold each history/startup/retry/handoff/autosave path across retirement and revocation, then release and assert absence/no replay. Mutate post-await/auth/copy selection gates separately with exact failing assertions and restored receipts. Test restart and failed/unavailable backend partial reconciliation. Run provider-prefix/Start guards when those paths change. Browser consumption remains a dependent issue with real offline-browser proof.

Contract impact

Define exact HTTP/wire outcomes/capability and validation before implementation; update authoritative components/API reports with CONTRACT prefix and minor changeset for additions. The approved explicit deletion exception does not waive breaking labels/named changesets for actual shipped retention or legacy compatibility changes.

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

Blocked by #3229

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

  1. added
    type: featA new capability or a change in user-visible behaviour.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 1, 2026
  2. added
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 1, 2026
  3. schlessera commented on Nov 1, 2026

    @schlessera
    OwnerAuthor

    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.

  4. self-assigned this
    on Nov 2, 2026
  5. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claiming for implementation (claim token wi-3230-c7e1). Branch feat/3230-chat-deletion-outcomes from epic/3234-chat-deletion at e2c22ad84 (includes #3229's historyRemoval capability). PR will target the epic branch. Collision check: closure-only overlaps with open PRs (shared test closures), no path collisions on the cited files.

  6. added this to the 0.45.0 milestone on Nov 2, 2026
  7. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Implementation is in #3338 (base epic/3234-chat-deletion at e2c22ad84, head eb2b4de15), milestone 0.45.0. It covers the endpoint, per-store host cleanup with read-back confirmation, restart reconciliation of unconfirmed stores (including pending native entries), read gates across HTTP/WS/recovery/live startup, draft refusal and the chat_retired capability frame.

    Known gap, filed separately: typed-only chats have no recorded owner and refuse as unavailable (#3337, needs: decision). The issue stays open with Blocked by #3229 until the epic batch lands on main. The satisfied Blocked by #3228 line was removed. The claim stays while the PR is live.

  8. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Delivered to the epic integration branch epic/3234-chat-deletion as d33dec399 via #3338, after ready-candidate proof passed against the exact epic base. This issue closes when the epic batch lands on main.

  9. removed their assignment
    on Nov 2, 2026
  10. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-03), ruled on #3231 D1: A. Add a principal-bound, read-only GET /api/chat-deletions/:operationId that returns the receipt or not_admitted and adds no authority, so the UI's "Check now" for an unanswered deletion is a true read rather than a repeated POST that could admit it.

    This issue closed as completed with the epic's first batch before the ruling could be added to its scope, so it stays closed. The route is filed as #3455, part of #3234, and #3231 is now blocked on it rather than on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.blockedWaiting on another issue or an upstream dependency. Say which in the body.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: featA new capability or a change in user-visible behaviour.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions