Add machine-aware maximum product length

This commit is contained in:
2026-09-26 12:25:04 +02:00
parent 3e13d24405
commit 90c28fb2f5
11 changed files with 765 additions and 5 deletions
+13
View File
@@ -48,6 +48,19 @@ warning. Line speed remains configured but is outside the initial roll-only
scope. Flask and MCP are thin adapters; no machine constraints are duplicated
in those layers or in browser code.
`calculate_machine_max_product_length()` composes the same domains for target
length questions. It resolves the machine only through `MachineRepository`,
uses `calculate_product_length()` with the configured maximum diameter, and
maps its average length to the nominal maximum and its minimum length to the
conservative/no-warning maximum. Material-weight maxima use the shared
`calculate_material_length_for_weight()` inverse; final material weights use
`calculate_material_weight()`. The domain chooses governing constraints,
including deterministic ties, and verifies selected lengths through the
existing direct roll and feasibility services. It never resolves articles,
reads YAML in adapters, duplicates roll mathematics, applies a manufacturing
increment, or implements conditional production rules. Flask and MCP expose
thin adapters; the browser UI remains unchanged.
## Constrained Natural-Language Flow
```text