Repository navigation
Description
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:
- POST /api/app/tasks with status done.
- GET task: status done and completedAt null. GET project: doneTaskCount 1.
- GET /api/app/tasks/metrics/by-project/: today tasksCompleted 0 and humanCompleted 0.
- 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:
- services/platform/backend/domains/tasks/service.ts:1118
- services/platform/backend/domains/tasks/service.ts:1148
- services/platform/backend/domains/tasks/metrics.ts:211
- services/platform/backend/domains/tasks/external-ref.ts:601
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.
Activity