Skip to content

Bug: creating a task directly in Done omits its completion timestamp #3595

Closed

Description

@yannickmonney

Reproduced locally on 44e0dcf254975286c0e9dea443b5cd1ca6b23347 with real services. No production testing.

createTask accepts Done/Cancelled but omits completed_at_ms. All normal terminal transitions stamp it, and even direct Done creation through external-ref stamps now. The direct app creation lane therefore leaves status Done with completedAt null. Daily metrics also differ from the two-step create/move flow; their terminal-at-create policy should be stated explicitly.

Steps:

  1. POST /api/app/tasks with status done.
  2. GET task: status done and completedAt null. GET project: doneTaskCount 1.
  3. GET /api/app/tasks/metrics/by-project/: today tasksCompleted 0 and humanCompleted 0.
  4. Control: create To do task then POST its status done; completedAt is numeric and daily tasksCompleted becomes 1.

Expected: Creating a terminal task should initialize completedAt consistently with a status change to the same state. Decide and document whether a direct terminal creation counts toward daily throughput; do not infer a historical-completion time that the form did not collect.

Actual: Direct-Done task has no completion stamp and does not contribute to completion metrics, while the equivalent two-step task does.

Source:

Evidence: local/task-probe-round1-results.json, local/task-probe-metrics.json, local/task-probe-metrics-after-control.json

Dedup: Cached 931 issue titles plus GitHub task completion metrics query returned no match.

Limits: Local real API proof for Done; Cancelled shares source omission but was not separately claimed as a second finding. Throughput intentionally counts status-change events today; docs do not explicitly define terminal-at-create throughput. Treat the timestamp invariant as the primary defect, metrics as an observed inconsistency needing product judgment.

Acceptance:

  • Direct terminal creation initializes completedAt.
  • Document the chosen direct-terminal creation metrics policy and preserve ordinary To do→Done behavior.
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

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions