Skip to main content

Propose planned heads for a path (pure computation, not committed)

POST 

/paths/:pathId/plan-proposals

Two forms (ADR 0043). FROM THE LABOUR PLAN: omit charge and name shiftId (with siteCode): proposedHeads is the planned_heads warehouse-planning published for (siteCode, shiftId, pathId) in LabourPlanCommitted (this service keeps a local copy), resolvedRate its rate_units_per_hour, rateSource is labour-plan and NO idle-share trim applies; nothing published is 404 labour-plan-not-found, never zero heads. CHARGE-BASED (DEPRECATED, unchanged; removed only by a later ADR once no caller sends a charge): a request with charge, even one that also names shiftId, works as described below. Neither charge nor shiftId is 400 missing-charge. Both forms raise ShiftPlanProposed. Computes heads = ceil(charge / plannedRate) for one path and raises ShiftPlanProposed for visibility — it persists nothing and commits nothing. A human must still call POST /shift-plans to commit an actual ShiftPlan. This is why the response is 200, not 201: no resource is created. When a high observed idle share (idleness-as-staffing-signal, fed back from labor-performance via LABOR_PERFORMANCE_MODE=kafka-cache) is available for this path's task type and exceeds IDLE_SHARE_TRIM_THRESHOLD (default 0.30), the computed heads are further trimmed (floored at 1 head minimum) and trimReason explains why — fail-open: no idle-share signal available applies no trim.

Request​

Responses​

Proposed heads for this path, not committed.

Response Headers
    Idempotency-Replayed

    "true" when this answer is the stored replay of an earlier request with the same Idempotency-Key and fingerprint; absent on the first execution.