Problem
Rack and tray REST responses expose current inventory state but do not indicate whether an operation is already active for the resource. Clients must issue a separate task-list request for every resource, which creates extra requests and can observe a different snapshot.
Proposed API contract
Add the following required field to both rack and tray detail/list response items:
"taskSummary": {
"activeTaskIds": ["<task UUID>"]
}
activeTaskIds contains tasks in Waiting, Pending, or Running state.
- The array is always present and is empty when no task is active.
- IDs are ordered deterministically by task creation time and then task ID.
- A rack summary includes every active task on the rack, including component-scoped tasks.
- A tray summary includes only active tasks that explicitly target that tray.
- The active count is intentionally not stored separately because clients can derive it from
activeTaskIds; this avoids two representations of the same state drifting apart.
Implementation notes
- Fetch summaries in one Flow-side batch per inventory response; do not add per-rack or per-tray REST calls.
- Update both detail and list APIs, the OpenAPI source, generated SDK/reference artifacts, and handler/model tests.
- Keep historical/terminal task IDs out of inventory responses; clients can use the existing task-list endpoints for history.
Acceptance criteria
- Rack and tray detail/list responses return
taskSummary.activeTaskIds.
- Active status, rack/tray targeting, empty-array behavior, and deterministic ordering are covered by tests.
- The public OpenAPI contract and generated artifacts are in sync.
Problem
Rack and tray REST responses expose current inventory state but do not indicate whether an operation is already active for the resource. Clients must issue a separate task-list request for every resource, which creates extra requests and can observe a different snapshot.
Proposed API contract
Add the following required field to both rack and tray detail/list response items:
activeTaskIdscontains tasks inWaiting,Pending, orRunningstate.activeTaskIds; this avoids two representations of the same state drifting apart.Implementation notes
Acceptance criteria
taskSummary.activeTaskIds.