Skip to content

tracking: backfill replay planner (resurrected from #871) #996

Closed

Description

@Sinity

Children (decomposed 2026-05-17)

Dependency order: #1196 → (#1195, #1197) in parallel; #1198 any time; #1200 last.

Context

#871 was closed 2026-05-09 although PR #980 explicitly declared "op implementations are explicit OUT OF SCOPE." Only CLI route scaffolding landed. The typed contract and derived-rebuild dispatch landed subsequently via #1144/#1147, but the full feature acceptance remains open as the children above.

Acceptance criteria — all open

(Pull verbatim AC text from #871 when starting work — list above is reconstructed from audit notes.)

Source

Activity

  1. added
    type:feat
    type:tracking
    on May 9, 2026
  2. Sinity commented on May 11, 2026

    @Sinity
    OwnerAuthor

    Strengthening pass — backfill replay planner

    This issue should be framed as a real operation-planning feature, not CLI scaffolding. It depends on #861 for operation result contracts and on #844/raw-failure surfacing for failed records, but it can define its own planning semantics now.

    Required planner semantics:

    • Enumerate candidate replay scopes by source root, raw artifact, provider/source family, failure kind, parser/materializer version, time range, and insight product dependency.
    • Produce a dry-run plan with counts, estimated cost/risk, affected raw IDs/conversations/products, and destructive/non-destructive classification.
    • Execute idempotently and resumably. A partially completed replay should be restartable without duplicating raw rows, blobs, FTS rows, or insight products.
    • Route failures through the existing raw failure/quarantine/status surfaces with redacted context.
    • Expose the same plan/run outcome via CLI, daemon HTTP, and MCP if those surfaces support maintenance operations.

    Implementation anchors:

    Acceptance should include tests for plan generation, dry-run output stability, partial-failure resume, idempotent rerun, and cross-surface result parity. Close only when actual replay execution exists, not just route registration.

  3. Sinity commented on May 17, 2026

    @Sinity
    OwnerAuthor

    Decomposed into 5 child issues

    Decomposed against current master (existing scaffolding: polylogue/maintenance/{planner,replay,preview,envelope,registry-missing}.py, CLI maintenance plan/run/preview, daemon /api/maintenance/{plan,run}, MCP maintenance_preview/execute). What landed is the typed contract and the derived-rebuild dispatch; what is missing maps 1:1 to the 7 ACs in this umbrella body.

    Child Scope AC coverage Size
    #1195 Wire BackfillKind.SOURCE_REPLAY to bounded ingest_batch re-acquisition; idempotent + resumable per-artifact AC #1 (enumerate scopes), AC #3 (idempotent/resumable) M
    #1196 Typed MaintenanceScopeFilter plumbed through CLI/HTTP/MCP — conversation_ids, provider, source family, source root, raw artifact, date range, failure kind AC #1 (enumerate scopes), AC #2 (preview) M
    #1197 Persistent operation registry + polylogue maintenance status, GET /api/maintenance/status/<op_id>, MCP maintenance_status/maintenance_list AC #4 (CLI/daemon/MCP surfaces) M
    #1198 Route per-record replay failures to _raw_failure_info() + _check_raw_failures_medium (the #844 surface) AC #5 (route failures to #844) M
    #1200 docs/maintenance.md: when to use replay vs reset, scope filter usage, resume pattern, status/failure surfaces AC #7 (documentation) S

    AC #6 (tests for plan generation, dry-run, partial-failure resume) is distributed across #1195/#1196/#1197/#1198 — each child carries its own test suite as part of acceptance. No standalone test issue is needed.

    Dependency order: #1196 (scope filter shape) → #1195 (source-replay needs the source_root filter) and #1197 (registry shape stable for status surface) can run in parallel. #1198 can run any time. #1200 lands last so it describes the shipped surface.

    This umbrella stays open until all 5 children close.

  4. Sinity commented on May 25, 2026

    @Sinity
    OwnerAuthor

    All five children (#1195-#1200) are closed. Closing this umbrella as complete.

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:clitype:feattype:tracking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions