Skip to content

done auto-prune should name the archived task ids in its confirm and JSON output #43

Description

@jokim1

Version: tasks-axi 0.2.4

What happens: tasks-axi done <id> auto-prunes the Done section to done_keep, archiving surplus entries to the archive file. The confirmation only prints ; pruned N and the --json payload only carries pruned: <count>. Neither names which tasks were archived, even though MarkdownStore.prune returns ids and tasks-axi prune --json already exposes them.

Why it matters: to an operator (or an agent) watching backlog.md, the routine archival is indistinguishable from silent data loss — an entry simply disappears from the file on an unrelated mutation. A hand-maintained Done entry once "dropped" out of backlog.md on an unrelated done and had to be restored by hand before anyone thought to check the archive file; the ; pruned 1 output gave no hint of what had moved.

Suggested change: include the archived ids in the done confirmation and JSON payload, e.g. ; pruned 2 (old-done-a, old-done-b) and pruned_ids: [...], reusing the ids array store.prune already returns.

Repro:

  1. .tasks.toml with [markdown] done_keep = 1, path = "backlog.md", archive = "done-archive.md".
  2. backlog.md with two - [x] Done entries and one - [ ] queued task.
  3. tasks-axi done <queued-id> --json -> output reports pruned: 1 but not which id; the older Done entry leaves backlog.md (it is correctly present in done-archive.md).

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