Skip to content

pm close: completed_at silently defaults to close time, so retroactive closes record delivery days late with no way to tell #1579

Closed

Description

@unbraind

Observed

pm close <id> "<reason>" without --completed-at sets completed_at to the close time, and nothing records that the value was defaulted rather than asserted. Agents that close work retroactively (tracker reconciliation, a sweep after PRs merged, closing a delivered item the next session) almost never pass --completed-at, so the tracker silently records delivery at reconciliation time.

Measured on 2026-10-24/25 in a 31-repository fleet: a reconciliation sweep closed 109 delivered items, every one with completed_at = sweep time although each close reason cited a PR merged 1–20 days earlier. Consumers that read completed_at as the delivery time (cycle time, burndown, Gantt bars, a memory package's recall-utility scoring) were all wrong until each item was corrected with pm update <id> --completed-at <merge time>. A review bot caught it on one repository; the other 30 had passed review.

Expected

The defaulted value should be distinguishable from an asserted one, and the CLI should nudge at the moment the mistake happens. For example:

  1. Provenance: record completed_at_source: "close_time" | "asserted" (or an equivalent history-event flag), so consumers can exclude or flag defaulted completion times.
  2. Hint on retroactive closes: when pm close runs without --completed-at and the item shows no substantive activity for N hours (or the close reason contains an ISO timestamp earlier than now), return a hints[] entry: completed_at defaults to the close time; pass --completed-at <ISO> if the work finished earlier with the exact command.
  3. Optionally pm close --completed-at from-reason to take the earliest ISO timestamp in the close reason.

Why it matters for agents

Agents close items in batches long after delivery much more often than humans do, and completed_at is the field every analytics consumer trusts. A silent default turns one forgotten flag into wrong data in every downstream report, with no way to tell after the fact.

Version: @unbrained/pm-cli 2026.10.24.

Activity

  1. unbraind commented on Oct 25, 2026

    @unbraind
    OwnerAuthor

    Canonical PM owner: pm-gh1579. The completion-time provenance report is recorded with acceptance criteria and related lineage in PR #1582. It remains queued and unclaimed.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions