Add the dualpath-as-single-machine site toggle
All checks were successful
CI / backend (push) Successful in 1m13s
CI / naming (push) Successful in 1s
CI / frontend (push) Successful in 7s

Most facilities consider a Dualpath pair one physical dual-bay machine.
New site setting dualpath_single_machine (default on): the machines
list, dashboard counts, machines-by-type report, and floor map collapse
each pair to its primary bay (lower assetnumber), with combined
2007 / 2008 labels; pagination totals stay honest. Detail pages remain
per-bay and always show a dual-bay sibling banner linking the partner.
Pair resolution lives in core services and joins the plugin contract
surface (0.8.0 -> 0.9.0).

On the WJ dataset: 31 pairs collapse, machine counts 262 -> 231, map
470 assets. Toggle verified live in both states, left on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-07-12 06:23:39 -04:00
parent 5a192f3100
commit b130ef43f3
17 changed files with 525 additions and 15 deletions

View File

@@ -12,6 +12,17 @@ ADR-007 and ADR-002.
### Added
- Dualpath "single machine" site toggle (`dualpath_single_machine`, default
on). A Dualpath relationship pair is one physical dual-bay machine (single
controller, bay-selector switch); when on, the machines list, dashboard and
machines-by-type counts, and the floor map collapse each pair to one entry
(the lower natural-sort assetnumber is PRIMARY; the SECONDARY bay is hidden)
and show a combined `2007 / 2008` label. The data model is unchanged (both
bay records always exist); detail pages stay per-bay and always show a
sibling-bay banner regardless of the toggle. Contract surface (plugin
contract bumped 0.8.0 -> 0.9.0, additive): new `shopdb.api` helpers
`resolve_dualpath_pairs` and `dualpath_single_machine_enabled`, consumed by
the machines plugin to collapse pairs contract-purely.
- Relationship propagation, wired and data-driven: relationship types
declare propagation-through pairs (relationshiptypepropagations M:N,
replacing the never-consumed single column); creating a controls link on