Skip to content

Rename ingest to import, add demo mode, and make dev snapshots runnable #1815

Closed

Description

@Sinity

Import command, demo fixture import, parser regression pack

Purpose

Finish the import/demo/parser slice after the public ingest -> import rename. Polylogue should let a new user run a deterministic demo import without private data, and supported source files should fail truthfully when unsupported or malformed.

Current reality

The first slice landed: public command registration uses polylogue import, while internal daemon/process prose may still describe ingestion. Do not re-open that rename unless source inspection shows a public leak.

Remaining work is narrower than the old umbrella implied:

  1. demo mode and approved fixture worlds;
  2. parser regression coverage for supported origins;
  3. truthful import planning/status for unsupported and degraded inputs;
  4. docs/README examples after command surface stabilizes;
  5. residual schema-v1 vocabulary coordination with Schema-v1 terminology sweep: session/origin only #1810.

provider_meta parser-output removal is effectively handled elsewhere and should not be reimplemented here. If live source contradicts that, file a precise SPEC_MISMATCH.

Files and surfaces to inspect

polylogue/cli/commands/import.py
polylogue/cli/click_command_registration.py
polylogue/sources/
polylogue/sources/parsers/
polylogue/pipeline/
polylogue/daemon/
polylogue/api/
polylogue/mcp/
docs/getting-started.md
docs/configuration.md
README.md
tests/unit/sources/
tests/data/ or fixture-world directories

Target behavior

polylogue import PATH...
polylogue import --demo
POLYLOGUE_DEMO_MODE=1 polylogue import --demo

Import must be truthful:

  • missing path fails;
  • unsupported file fails before claiming success;
  • supported file imports or stages with an explicit status;
  • degraded parse returns explicit degraded/caveat status;
  • demo import uses only approved synthetic fixtures and deterministic IDs/timestamps;
  • real user archive/config/cache are not touched by demo tests.

Implementation slices

  1. Audit all public ingest command-name references after refactor(cli): rename ingest command to import (#1815) #1875; leave internal daemon “ingestion” prose only when not public command vocabulary.
  2. Define demo fixture world and import command behavior.
  3. Add parser fixture matrix for ChatGPT, Claude web, Claude Code, Codex, Gemini/AI Studio/Gemini CLI if advertised, Antigravity if advertised, and any degraded origins.
  4. Add import-planning/status tests for supported file, supported directory, unsupported file, malformed file, demo fixture, and daemon unavailable.
  5. Update README/getting-started only after Polylogue: final hard-pruned CLI surface #1842 command floor and Enforce single machine-output contract: JSON finite, NDJSON streaming/bulk #1818 output contract stop moving.

Required tests

  • Isolated archive/config roots for every import/demo test.
  • Parser-output invariant tests: normalized session/origin vocabulary and no provider_meta escape hatch.
  • Unsupported input negative tests with typed errors.
  • Demo import test with deterministic output.
  • Docs/README command examples once final command surface lands.

Acceptance criteria

  • polylogue import is the only public import command.
  • Demo import runs without private data and produces deterministic fixture archive state.
  • Parser regression pack covers every advertised supported origin.
  • Unsupported and degraded inputs fail or report caveats truthfully.
  • Public docs use import/session/origin vocabulary.

Non-goals

PR handoff checklist

Every implementing PR must include this exact information in the PR body:

Issue slice:
Files inspected:
Files changed:
Old surface removed or retained:
Contracts/tests added:
Generated artifacts updated:
Verification commands and results:
Known caveats / SPEC_MISMATCH:
Follow-up intentionally not included:

Use SPEC_MISMATCH when source reality contradicts this issue. Do not silently broaden the issue or delete capability to satisfy a prose target.


Coordinator reconciliation (2026-06-15)

Activity

  1. Sinity commented on Jun 13, 2026

    @Sinity
    OwnerAuthor

    Field evidence: import accepted work without enough progress/shape guarantees

    During local dogfood on 2026-06-14, I staged a fresh Claude.ai export through the current polylogue ingest PATH path:

    /realm/data/exports/chatlog/raw/claude/claude-ai-data-2026-06-14-01-20-batch-0000.zip
    sha256=6ca400715e5c103466b0ee58243867c69afd3d3a9d677677039bb5fc4b9c1487
    size=37,140,641 bytes
    zip conversations.json length=989
    

    Observed behavior:

    • polylogue ingest correctly staged the file into ~/.local/share/polylogue/inbox/ and returned an operation id.
    • The daemon then expanded/imported the account export incrementally; raw rows rose over time (421, 515, 691, 707 in successive checks), all with parse_errors=0.
    • While that was happening, status/metrics/read probes could see database is locked; the user-visible state was ambiguous unless manually querying source.db.
    • The command tells the user the daemon accepted scheduling, but does not report expected member count, current imported count, retry/backpressure state, or whether the operation is still active.

    Suggested integration into this issue's AC for polylogue import PATH...:

    • Import should validate the input shape before claiming acceptance: e.g. Claude.ai account export with conversations.json and expected conversation count.
    • The returned operation/status envelope should expose expected member count, parsed count, materialized count, parse errors, and current phase.
    • Accepted-but-not-yet-processed queues should be visible through polylogue status and the web home, not only journal/source-db inspection.
    • Unsupported export shapes should fail early or be classified as unsupported, not enter repeated unknown-export retry/exclusion loops.

    Related ChatGPT finding: the active archive currently has the raw ChatGPT zips under /realm/data/exports/chatlog/raw/chatgpt/, but staged copies in the Polylogue inbox are classified as unknown-export and excluded after repeated failures. I am opening a narrow issue for that so this issue can keep the broader import-command contract.

  2. Sinity commented on Jun 13, 2026

    @Sinity
    OwnerAuthor

    Follow-up created for the concrete ChatGPT data coverage gap: #1870 (fix(import): ingest ChatGPT export ZIPs or reject unsupported shapes). This keeps #1815 focused on the public import command contract while #1870 owns parser/detection behavior for the failing ChatGPT exports.

  3. Sinity commented on Jun 14, 2026

    @Sinity
    OwnerAuthor

    🔒 lane claim (polylogue-orchestrator): starting #1815 as a slice sequence. PR 1 = ingest→import command rename (the public command is already PATH-taking + truthful, so this is a clean rename: registration, help, completions, docs, baselines, contract test, no compat shim). Subsequent PRs: provider_meta elimination (#1858), parser regression pack, demo fixture builder + import --demo. Worktree /tmp/plg-1815.

  4. added
    type:refactor
    theme:command-surface
    theme:ux
    on Jun 14, 2026
  5. Sinity commented on Jun 14, 2026

    @Sinity
    OwnerAuthor

    Wave 3 execution overlay: remaining #1815 is parser/demo truth, not public rename

    The public ingest -> import rename has landed. Do not keep redoing that work. Remaining value in this issue is:

    1. parser regression pack across advertised origins;
    2. demo import behavior and fixture-world integration with Polylogue: demo mode and approved fixture worlds #1843;
    3. truthful unsupported/degraded import status;
    4. docs examples after Polylogue: final hard-pruned CLI surface #1842/Enforce single machine-output contract: JSON finite, NDJSON streaming/bulk #1818 stabilize command/output surfaces;
    5. raw third-party terminology boundaries.

    First remaining PR

    Build the parser regression matrix, not more command renaming. The matrix should name each supported origin, the fixture used, normalized session/origin invariants, degraded flags, and raw artifact preservation.

  6. Sinity commented on Jun 15, 2026

    @Sinity
    OwnerAuthor

    Progress update: PR #1951 landed parser/source dispatch regression coverage. The origin regression fixture table now carries dispatch expectations, exercises detect_provider plus parse_payload, and covers the browser-capture snapshot shape as the closest committed synthetic dev-snapshot fixture. Demo fixture-world behavior remains coordinated under #1843; this slice pins the source/parser routing side of #1815.

  7. Sinity commented on Jun 16, 2026

    @Sinity
    OwnerAuthor

    Landed another coherent phase in #1969: staged import preflight now classifies unsupported/malformed source paths before daemon scheduling, daemon import acks include preflight detail for accepted/degraded inputs, and the CLI renders structured daemon rejection detail. Verification recorded on the PR: focused import/preflight/daemon tests passed, quick gate passed. This advances the import-truthfulness part of the issue; the broader rename/demo/dev-snapshot scope remains open.

  8. Sinity commented on Jun 16, 2026

    @Sinity
    OwnerAuthor

    Close-out AC matrix

    Closing this now that the coordinated demo/import/parser work has landed and the remaining sibling issues are closed.

    AC Status Evidence
    polylogue import is the only public import command. Done #1875 renamed the public command and removed the old public ingest registration. Current command docs and generated references use import.
    Demo import runs without private data and produces deterministic fixture archive state. Done #1934/#1935/#1937 define and materialize the approved fixture world with deterministic IDs/timestamps and relative paths; #1940 proves archive convergence; #1950/#1953 prove the live daemon scheduling/convergence path; #1975 adds deterministic user-tier overlays; #1978 closes the search/read/analyze transcript gap.
    Parser regression pack covers every advertised supported origin. Done #1951 added tests/unit/sources/parsers/test_origin_regression_pack.py, covering ChatGPT, Claude.ai, Claude Code, Codex, Gemini CLI, AI Studio/Drive, Antigravity, and Hermes through parser and dispatch expectations.
    Unsupported and degraded inputs fail or report caveats truthfully. Done #1969 added import preflight/rejection/degraded status coverage for unsupported, malformed, supported file/directory/zip, mixed degraded directory, and daemon rejection details.
    Public docs use import/session/origin vocabulary. Done #1810 closed the schema-v1 public terminology sweep; #1936/#1943/#1978 updated demo docs around polylogue import --demo; the public-surface audit remains in devtools verify --quick.
    ChatGPT account-export ZIP gap from dogfood evidence. Done in sibling issue #1870 was filed from this issue's dogfood evidence and is closed; #1871 fixed Decimal-bearing streamed ChatGPT ZIP import and live archive repair evidence.
    provider_meta parser-output escape hatch concern. Done/tracked by sibling issue #1858 is closed and records that parser-output models are clean post-#1743/#1790; browser-capture-domain residue belongs to #1824, not this import command contract.

    No untracked remainder is being deferred from #1815: demo mode is owned and closed by #1843, ChatGPT ZIP import coverage is closed by #1870, public vocabulary is closed by #1810/#1858, and import preflight truthfulness landed in #1969.

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

    area:cliarea:schematheme:command-surfacetheme:uxtype:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions