ItemService.Update writes a deadline onto a sub-job #181

Closed
opened 2026-08-23 19:46:07 +00:00 by nalum · 0 comments
Owner

SetDeadline refuses a deadline on an item that has a parent_uid (internal/services/item/setdeadline.go:35-38, domain.ErrSubTaskDeadline), because a sub-job carries no date and would be invisible on every deadline surface.

Update applies the field with no such check (internal/services/item/update.go:57-59), so the same state is reachable through the other door. Found while reviewing the jobs design handoff, which relies on Update for per-field commits.

The guard belongs on both doors. No client sends it today, so this is a latent hole rather than a live defect — but the new job flow commits fields one at a time through Update, which brings the two doors much closer together.

`SetDeadline` refuses a deadline on an item that has a `parent_uid` (`internal/services/item/setdeadline.go:35-38`, `domain.ErrSubTaskDeadline`), because a sub-job carries no date and would be invisible on every deadline surface. `Update` applies the field with no such check (`internal/services/item/update.go:57-59`), so the same state is reachable through the other door. Found while reviewing the jobs design handoff, which relies on `Update` for per-field commits. The guard belongs on both doors. No client sends it today, so this is a latent hole rather than a live defect — but the new job flow commits fields one at a time through `Update`, which brings the two doors much closer together.
nalum closed this issue 2026-08-26 18:33:06 +00:00
Sign in to join this conversation.
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
eagraiclainne/app#181
No description provided.