fix: enforce task completion invariants at the storage boundary #8
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/task-completion-invariants"
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?
Marking a task done through a path that skipped the shared executor (generic CRUD PATCH, the CLI, or any non-ScoreDo sync client) stored
status=donewithdoneDate=0. The repeating-reset background service needsdoneDateto schedule the next occurrence, so recurring chores silently stopped recurring.This makes the invariant hold no matter which client writes:
applyTaskWriteInvariants()in@scoredo/shared/business, applied indb.create(),db.update()for tasks, and on sync pushPATCH /api/tasks/:idserved byroutes/tasks.tsthroughexecuteUpdateTaskinstead of the raw CRUD merge, returning the persisted taskexecuteUpdateTaskand the MCPupdate_tasktool acceptdoDateand repeat configurationPOST /api/tasks/by-titleforwards the full field setjust checkpasses (9/9).