Skip to content

Attachment failures and interactive archive flows are undercovered #41

Closed

Description

@Sinity

Context

Several high-friction operator workflows in Polylogue still have minimal automated coverage.

The most important gap is around attachment failures during sync/render. The current pipeline treats download failure as a hard stop, which means a single missing or temporarily unavailable attachment can prevent the rest of a conversation from rendering and being indexed.

The second gap is interactive CLI coverage. config init, provider/session selection, and other prompt-driven flows depend on subprocess helpers and terminal behavior, but the suite does not currently exercise those paths with anything close to a real TTY.

The third gap is bulk export idempotency. ChatGPT and Claude exports can be large, but the importer does not yet have a robust way to detect “same raw bytes + same render settings + existing outputs” and skip unchanged conversations. That turns repeated imports into avoidable work.

There is also a usability and snapshot-stability problem in the HTML surface. Attachments are difficult to inspect, image-heavy threads are clumsy to browse, and some anchors / attachment orderings are unstable enough to make HTML snapshots noisy.

Finally, the current archive browse surface is still narrower than it should be. There is no dedicated timeline or analytics view that turns the SQLite state into archive-wide summaries useful for both operators and tests.

Motivation

These gaps all point at the same risk: Polylogue is much better tested for clean, deterministic happy paths than it is for messy operational reality.

Real archives contain flaky network downloads, repeated imports of the same export bundle, prompt-driven selection flows, and HTML transcripts that mix text with attachments. Those are exactly the places where regressions are likely to be noticed by users first, and they are also the places where the current suite has the least leverage.

This matters now because the archive already has enough structured metadata to support partial recovery and stronger skip behavior, but the product code is not exposing it cleanly and the tests are not locking it down. That is leaving both performance and resilience on the table.

Scope

In scope:

  • change attachment failure handling so a partial attachment error does not abort the entire conversation render
  • record failed attachment details in run metadata and add a retry-only path for those failures
  • add import skip logic for unchanged conversations in ChatGPT / Claude bulk exports using both source hashes and render-config state
  • add archive-wide timeline and analytics browse commands
  • improve HTML attachment browsing with previews, filtering, and more stable anchors/orderings
  • add PTY-level coverage for interactive config and sync flows
  • fix correctness issues uncovered by the new tests, especially sync JSON output and watch stall detection ordering

Out of scope:

  • redesigning the overall archive schema
  • broad replacement of the existing CLI prompt stack
  • attachment retry flows for every provider in this pass

Acceptance criteria

  • an attachment download failure records the failed item and still allows the conversation body plus successful attachments to render
  • a follow-up run can retry only previously failed Drive attachments without rerendering the whole conversation
  • unchanged ChatGPT / Claude bulk-export conversations are skipped when raw content, render settings, and output files are unchanged
  • timeline and analytics views exist with machine-readable output suitable for tests
  • HTML transcripts gain attachment previews/filtering and stop producing unstable sidebar/anchor output across identical runs
  • interactive config/sync flows are exercised under a PTY harness with automated pass/fail coverage

Activity

  1. added
    faux-pull-request
    on Apr 7, 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

    area:cliarea:parserarea:pipelinearea:qaarea:storagefaux-pull-requesttype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions