Skip to content

Import hardening: ChatGPT export schema, privacy, and idempotency fixtures #186

Description

@joshyorko

Outcome

Harden the ChatGPT export importer with schema probes, privacy gates, idempotency, and synthetic regression fixtures.

This should land with or immediately after #185 so imported archives are safe to preview and repeat.

Acceptance

  • Add schema detection for the expected conversations payload.
  • Fail with a clear error when the export shape is unknown.
  • Never log raw message content on parse errors.
  • Reuse existing content screening before any visible turn is stored.
  • Reject or redact secrets using the same policy path as /v1/turns.
  • Reject unsupported message roles by default.
  • Preserve enough metadata for provenance without storing unrelated account data.
  • Stable idempotency keys prevent duplicate turns across repeated applies.
  • Add synthetic fixtures for:
    • normal two-turn conversation
    • conversation with missing title
    • unsupported role
    • secret-like content rejection
    • duplicate apply
    • malformed export
  • Tests must prove preview writes nothing.

Non-goals

  • No real ChatGPT user export fixture in the repo.
  • No raw private conversation data in tests.
  • No hidden/internal message preservation.

Activity

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