Usage-based Task intervals #108

Open
opened 2026-11-27 16:43:42 -05:00 by bobby · 0 comments
Owner

Part of #73 (spec: #72)

What to build

A Task on a metered Asset can have a usage interval (e.g. oil every 5,000 mi). The response carries due_at_meter, and the Task falls due on whichever comes first: the calendar date or the usage threshold judged against the latest Reading, with no projection.

Acceptance criteria

  • due_at_meter = the meter value of the last fulfilling Service + the usage interval
  • A Reading crossing the threshold makes the Task overdue before its date
  • A Task with a usage interval on an Asset without a meter is refused
Part of #73 (spec: #72) ## What to build A Task on a metered Asset can have a usage interval (e.g. oil every 5,000 mi). The response carries `due_at_meter`, and the Task falls due on whichever comes first: the calendar date or the usage threshold judged against the latest Reading, with no projection. ## Acceptance criteria - [ ] `due_at_meter` = the meter value of the last fulfilling Service + the usage interval - [ ] A Reading crossing the threshold makes the Task `overdue` before its date - [ ] A Task with a usage interval on an Asset without a meter is refused
bobby added the ready-for-agent label 2026-11-27 16:43:42 -05:00
bobby added a new dependency 2026-11-27 16:43:42 -05:00
bobby added a new dependency 2026-11-27 16:43:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: bobby/hapi#108