Skip to content

reconcile-metadata drain pagination reports repeated scans as forward progress #941

Description

@chubes4

Problem

Time-budgeted reconcile-metadata --apply repeatedly scans offset zero while reporting cumulative inspected rows greater than the inventory total, an incomplete cursor, and no clear unique-progress metric.

Evidence

studio wp datamachine-code workspace worktree reconcile-metadata --apply --limit=100 --offset=0 --until-budget=240s --format=json

Returned:

  • pagination.total: 245
  • summary.inspected: 500
  • five pages each with offset: 0, scanned: 100
  • pagination.complete: false
  • next_offset: 0
  • final page scanned 0 while the next command was unchanged

The drain did write 37 records, so repeated offset-zero scanning may be intentional after rows leave the candidate set. The diagnostics do not distinguish unique rows, repeated probes, remaining candidates, or a no-progress stop.

Expected

Pagination/progress evidence should make draining semantics explicit and terminate cleanly when a pass makes no progress.

Acceptance criteria

  • Report unique rows inspected separately from total probes.
  • Report candidate count before/after each pass.
  • Mark completion when no candidates remain.
  • Return a reasoned no-progress state instead of an unchanged offset-zero continuation.
  • Keep continuation deterministic across time-budget boundaries.

AI assistance

  • AI assistance: Yes
  • Tool: OpenAI gpt-5.6-sol via OpenCode/Kimaki
  • Used for: Live cleanup diagnosis and issue drafting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions