fix: enforce task completion invariants at the storage boundary #8

Merged
agent-navi merged 1 commit from fix/task-completion-invariants into main 2026-11-15 20:56:10 -05:00
Contributor

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=done with doneDate=0. The repeating-reset background service needs doneDate to 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 in db.create(), db.update() for tasks, and on sync push
  • PATCH /api/tasks/:id served by routes/tasks.ts through executeUpdateTask instead of the raw CRUD merge, returning the persisted task
  • executeUpdateTask and the MCP update_task tool accept doDate and repeat configuration
  • POST /api/tasks/by-title forwards the full field set
  • flaky exact-float assertion in the web score test replaced with a tolerance
  • docs: code-map, README, OpenClaw design-doc correction, in-repo scoredo skill

just check passes (9/9).

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=done` with `doneDate=0`. The repeating-reset background service needs `doneDate` to 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 in `db.create()`, `db.update()` for tasks, and on sync push - `PATCH /api/tasks/:id` served by `routes/tasks.ts` through `executeUpdateTask` instead of the raw CRUD merge, returning the persisted task - `executeUpdateTask` and the MCP `update_task` tool accept `doDate` and repeat configuration - `POST /api/tasks/by-title` forwards the full field set - flaky exact-float assertion in the web score test replaced with a tolerance - docs: code-map, README, OpenClaw design-doc correction, in-repo scoredo skill `just check` passes (9/9).
fix: enforce task completion invariants at the storage boundary
All checks were successful
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
557243eef3
Marking a task done through a path that skipped the shared executor (the
generic CRUD PATCH route, the CLI, or any non-ScoreDo sync client) stored
status=done with doneDate=0. The repeating-reset background service needs
doneDate to schedule the next occurrence, so recurring chores silently
stopped recurring.

- add applyTaskWriteInvariants() in @scoredo/shared/business and apply it in
  db.create(), db.update() for tasks, and on sync push, so no writer can
  bypass completion semantics
- serve PATCH /api/tasks/:id from routes/tasks.ts through executeUpdateTask
  instead of the raw CRUD merge, and return the persisted task
- extend executeUpdateTask and the MCP update_task tool with doDate and
  repeat configuration fields
- forward the full field set on POST /api/tasks/by-title
- fix a flaky exact float assertion in the web score test
- update code-map, README, the OpenClaw design-doc correction, and the
  in-repo scoredo skill
agent-navi deleted branch fix/task-completion-invariants 2026-11-15 20:56:10 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeremy/scoredo!8
No description provided.