Skip to content

cold-store: atlas Turso export fails to rebuild (duplicate chunk_id in vec table dump) #12000

Open

Description

@dezren39

Problem

cold-store-nightly on the laptop (device amd) has failed its export-turso step on Nov 17 and Nov 18, so the nightly run reports FAILED steps: export-turso. Every Turso database exports except the large atlas database:

  • Nov 17 03:26 CST: turso export: ERROR: atlas: dump download failed (the /dump download for atlas).
  • Nov 18 04:19 and 05:11 CST: Error near line 458145: UNIQUE constraint failed: vec_snowflake_m_v2_768_f32.chunk_id, then turso export: ERROR: atlas: dump did not rebuild into a SQLite file. Both attempts fail on the same dump line.

The Nov 18 prune listing keeps no atlas export at all, so this database has no cold-store copy in the retained set. All other databases (the atlas-core-* shards, fleet-mirror, muse-meta, notes-submissions) filed normally.

What is known

  • vec_snowflake_m_v2_768_f32 is a plain table with chunk_id INTEGER PRIMARY KEY in the repo's fixtures. A primary-key collision on rebuild means the /dump text carries the same chunk_id twice. That fits a dump paginated over a table that was being written during the dump, or a schema on the live atlas database that differs from the fixtures. It has not been confirmed.
  • export-turso.sh deletes its work dir on exit, so the failing dump is not kept for inspection.

Ask

  1. Keep the failing dump (or at least the table name, the duplicated chunk_id and how many dump lines carry it) when the rebuild fails, so the cause can be read off the next run.
  2. Fix the cause: a consistent dump for atlas, or a rebuild that tolerates a key repeated by a non-snapshot dump only where the repeated rows are identical. Do not drop rows silently.
  3. Acceptance: one nightly run files an atlas export that passes the existing integrity and user-table checks.

Found while checking laptop backups for #10296. Related: #1391 (dump repair filter).


Generated by Claude Code

Activity

  1. developing-today commented on Nov 19, 2026

    @developing-today
    Contributor
  2. removed their assignment
    on Nov 20, 2026
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