fix: harden the task write API and share completion semantics #9
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/task-write-api-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #8 after a three-way review.
Broken agent path (live on prod, reproduced):
PATCH /api/tasks/:idre-ran the client-side tool executor, so the epoch-millisecond dates the MCP server and CLI send returned400 Invalid date format, and fields the executor does not model were silently dropped with a 200. It also fell back to fuzzy title search, so a stale ID updated a lookalike task.Changes:
server/src/task-mutations.ts: exact-ID/unique-prefix resolution (no fuzzy), sharedupdateTask()application, read-back of what was storeddeleted/isDeletedmust be booleans, andisDeleted:falserestoresstandupStatus,note, remind and scoring fields,repeatPreservePriorityby-titletreatstitleas the match key, not a renamebusiness/task-completion.tswith a parity matrix test;dueDateis cleared only on the transition into done; a reopen patch that omitsdoneDateclears it;repeatTypewithout an interval persists 1closedmeans finished, documentedupdatedAtdone/doneDate:0rows; storage rewrites are auditedjust checkpasses 9/9.