Skip to content

fix(reset): incomplete derived data cleanup and no recovery safety net #735

Closed

Description

@Sinity

Problem

The proposed reset design deletes parsed data and re-ingests from raw blobs. But:

  1. Incomplete cleanup: The current delete_conversation_via_backend path does NOT clean up: semantic embeddings (vec0 table), action event FTS entries, rendered output files on disk, or cost-specific rollups. A conversation-level reset would leave orphaned derived data.

  2. No undo: Reset is fully destructive. No recycle bin, no soft-delete, no snapshot. Metadata (tags, annotations, run history) is not derivable from raw blobs and is permanently lost.

  3. Cross-source references break: Resetting a source deletes and re-ingests conversations with NEW conversation_ids. Any cross-references from other sources become dangling.

  4. Cursor store survives database reset: reset --database deletes the main DB but not the cursor store (polylogue.sqlite). After re-ingest, watcher skips files whose fingerprints match stale cursor entries.

  5. Re-deriving insights costs API calls: The insight pipeline uses LLM enrichment. A simple reset-and-reingest of one conversation triggers costly API calls to re-derive session profiles and embeddings.

Acceptance criteria

  • Conversation-level reset must clean ALL derived data: embeddings, action event FTS, rendered output, cost rollups.
  • Consider a soft-delete or recycle-bin mechanism for recovery.
  • Reset should not break cross-source conversation references.
  • Cursor store must be invalidated when the database is reset.

Found by

2026-05-03 red team reset design review (wave 6). Related to #721 (reset redesign).

Activity

  1. Sinity commented on May 3, 2026

    @Sinity
    OwnerAuthor

    Scope absorbed into #721 (reset redesign). The incomplete derived data cleanup and lack of recovery safety net are part of the reset design.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions