Decide the flow-balancing recommendation for a process path
POST/paths/:pathId/rebalance-decisions
Inspects a process path's live buffer telemetry (backlog vs. plan) and recommends ThrottleUpstream (a flow-fed path over its alarm threshold — slow admission upstream, Drum-Buffer-Rope with CPT as the drum), ReassignLabor (a release-fed path saturated at its WIP limit with backlog remaining — flag for headcount reassignment), or NoActionNeeded — the RebalanceDecision use case. This is a keyed POST because the decision has an effect: the first execution publishes PathThrottled or LaborReassignmentFlagged when a non-default action is recommended. The request has no body. The decision is computed, not stored as a resource, so there is no Location and no GET for it. A replay of the same Idempotency-Key returns the stored decision with Idempotency-Replayed: true and publishes nothing again; every new decision (for example each poll of a dashboard) must send a new key. When a labor plan has been observed for this path (see Labor Plan View), the response additionally includes it as extra context under laborPlan — this is additive and does not change the throttle/reassign decision logic itself.
Request
Responses
- 201
- 400
- 404
- 409
- 500
The computed rebalance decision (not a stored resource; no Location).
Response Headers
Present, with value true, only when this answer is a replay of a stored earlier answer for the same Idempotency-Key.
Malformed request body (invalid JSON), a missing required field (silently-defaulted zero values are never accepted), an invalid field value (e.g. negative quantity, empty path id), a pathId outside the deployment's declared process-path families (unknown-path-id), or a malformed query parameter (e.g. empty or non-RFC3339 cutoffAt), or a NUL character (U+0000) in the body or the query string (malformed-request-body: Postgres text cannot hold it, ADR-0044).
No resource exists at this path/id (a NUL character, U+0000, in the path never names a resource and answers the same 404).
The Idempotency-Key was already used with a different request (idempotency-key-reused; fingerprint = method + path + body hash).
An unexpected server-side failure (e.g. a repository or event-publisher error).