0034. A process path declares its intake: which demand sources may route work onto it
Status
Accepted (2026-10-14). Decision E5 of the 2026-10-13 decision log. Amends ADR 0033 (RELOCATE keeps customer order lines off through its intake, not through an eligibility attribute) and adds a field to the ADR 0010 capability contract. Companion to order-management's path-selection-intake ADR, which consumes the field.
Context
order-management's PathSelectionPolicy routes each customer order line to the
eligible active path with the shortest known cycleTimeP95, ties broken on the
lower path id. Its catalogue cache (ListActive) returns every active path,
so every path is a candidate entry point for an order line.
The live catalogue holds PACK, PICK, REBIN and SLAM, all at the migration
default of 2h with permissive eligibility. Every one ties, and the lowest id
wins, so a customer order line resolves to PACK, a downstream stage that
only PICK's output should reach. No order lines have flowed yet, so nothing
has been misrouted. Adding paths makes it worse: ADR 0008's families
(AMNESTY sorts before PICK) and RELOCATE (ADR 0033) are candidates too.
The first draft of ADR 0033 kept order lines off RELOCATE with a fake
eligibility attribute (requiredProductAttributes: ["slot-relocation"]) that
no product may ever carry. That encodes a routing rule as a product
attribute, and every new family would have to repeat the trick.
The root cause is a missing concept. Which demand may enter a path is routing policy, and the catalogue never declared it.
Decision
ProcessPath gains intake: the set of demand sources allowed to route
work onto the path.
| Demand source | Who routes work with it |
|---|---|
CUSTOMER_ORDER | order-management, for customer order lines (its PathSelectionPolicy) |
STOCK_TRANSFER | network-inventory-planning transfer legs, planned through wes-work-planning |
SLOT_RELOCATION | approved slot-plan moves from slotting-optimization, planned through wes-work-planning |
INVENTORY_CONTROL | internal inventory work: amnesty, damage, problem solve |
REPLENISHMENT | pick-face top-ups from pick-face-replenishment, planned through wes-work-planning (added by ADR 0036) |
-
Shape. A set: values are distinct and kept in canonical (sorted) order. An unknown, blank, lower-case or repeated value is rejected (
422 invalid-intakeon REST). The vocabulary is closed and owned by this service. -
Empty set. Valid, and the default. Such a path is routed only by an explicit path id from an upstream stage (PACK, REBIN, SLAM are fed by PICK's output); no demand source selects it.
-
Mutability. Intake is policy, not identity, so
PUT /process-paths/{pathId}revises it likeeligibility. A change of intake alone is a real revision and raisesProcessPathUpdated. OnPUTthe field is optional: absent ornullkeeps the current intake, so a client that predates the field (the console's revise form, an older seed) never clears it;[]clears it. -
Contracts, all additive.
- REST: optional
intakeonPOST /process-paths(absent means[]) and onPUT; always present on everyProcessPathresponse. - MCP:
get_process_pathandlist_process_pathscarryintake. - Events:
ProcessPathCreated/ProcessPathUpdatedcarry snake_caseintake, always present ([]for the empty set, never omitted), and absent onProcessPathDeactivatedlike every other definition field. A consumer that sees nointakeis reading a producer older than this ADR and must treat it as unknown, not as[]. - Storage: migration
0009_intakeaddsprocess_paths.intake TEXT[] NOT NULL DEFAULT '{}'. Existing rows read as the empty set. The default stays so a pod of the previous release can still insert during a rolling deploy. The repository re-validates the stored value on read and fails loudly on an unknown one rather than routing on a guess.
- REST: optional
-
Declared catalogue.
catalogue/paths.json(ADR 0033) declares anintakearray for every path,[]included:Path Intake PICK["CUSTOMER_ORDER"]PACK,REBIN,SLAM[]RELOCATE["SLOT_RELOCATION"]RELOCATE drops the fake
slot-relocationeligibility and returns to the permissive{}.scripts/seed_catalogue.pytreats intake as a revisable field compared as a set, so a path stored before this ADR (intake[]) is converged withPUT, which publishesProcessPathUpdated. A declaration without anintakearray is rejected at load. -
Consumer rule (order-management, its own ADR): consider only active paths whose intake contains
CUSTOMER_ORDER. If no path declares it (catalogue not yet seeded, or an older producer), fall back toshared.DefaultPathId(PICK) exactly like the empty-catalogue rule today. It must fail open to PICK, never to PACK.
Consequences
Easier
- Each path declares where its work comes from in one explicit field. A new
family states it in
paths.json, and the declared-catalogue tests require it. - order-management's selection stops treating downstream stages and internal paths as order entry points. Once seeded, PICK is the only CUSTOMER_ORDER path, so the PACK-wins tie disappears.
- ADR 0008's families (AMNESTY, DAMAGE, ...) default to
[]and are no longer candidates for customer orders, which closes ADR 0033's follow-up without touching them.
Harder
- Ordering across contexts: until the seed has run in an environment, no path
declares
CUSTOMER_ORDER, and order-management falls back to PICK. That is the intended fail-open behaviour, not an outage. Seeding is a data step (make seed-catalogue) and is held for the operator. - wes-work-planning and network-inventory-planning do not yet filter on
STOCK_TRANSFER/SLOT_RELOCATION. They route by explicit path id today, so this is not a misroute risk; the values are declared now so those consumers can adopt them without another contract change. - The vocabulary is closed. A fifth demand source needs a code change and an
ADR here, which is intended for a routing-policy enumeration. (ADR 0036 added
the fifth,
REPLENISHMENT, by exactly that route.)