Skip to content

Define and test backward compatibility for legacy version-less backups #1159

Closed

Description

@d-oit

Problem

The latest import/backup review notes that legacy backups without an explicit version are now rejected. Fail-closed handling is correct for unknown or malformed formats, but previously supported user backups may become unrestorable if there is no explicit compatibility path.

Scope

First establish the actual historical formats that were publicly emitted or accepted. Do not infer compatibility from arbitrary unversioned JSON.

  • Inventory historical backup/export formats and identify whether version-less files were officially supported.
  • Add representative fixtures from known historical formats (sanitized and minimal).
  • If compatibility is required, implement a dedicated legacy parser/migration path that identifies the format structurally and converts it to the current validated import model.
  • Keep the current strict path for malformed, ambiguous or unsupported data.
  • Preview all changes before applying; never overwrite canonical data on parse failure.
  • Document the supported compatibility window and deprecation policy.

Acceptance criteria

  • Historical format inventory and compatibility decision are documented.
  • Supported legacy fixtures restore successfully with expected entity/claim/link counts.
  • Ambiguous or malformed unversioned inputs are rejected with actionable errors.
  • Import remains staged and non-destructive until explicit confirmation.
  • Round-trip and corpus fingerprint tests cover supported legacy imports.
  • No silent defaulting of unknown versions to the current schema.

Decision note

If no released format needs this path, close this issue as not planned with evidence rather than adding speculative compatibility code.

Activity

  1. d-oit commented on Nov 19, 2026

    @d-oit
    OwnerAuthor

    Implemented in #1178 (90246d1).

    • Legacy version-less backups are validated and imported with a defined compatibility window (packages/dks-core/src/backup.ts, MIN_SUPPORTED_SCHEMA_VERSION), plus a README Import-compatibility note.
    • Round-trip pinned by src/lib/import/ legacy v1 fingerprint test against scripts/corpus-fingerprint.mjs canonicalization.
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions