bambuddy/backend/tests/unit/utils
maziggy 9f4f16e5bd fix(spoolman): split mid-print usage across AMS backup switch (#1793)
usage_tracker's tray-switch split has never had a Spoolman peer.
An AMS same-material runout switch mid-print charged the whole slot
to the origin spool via the (via tag) path and double-credited the
backup via remain-delta — origin exceeded initial_weight.

Extract the segment-math into utils/tray_split.compute_tray_split_grams
and call it from both writers so the two inventory backends attribute
mid-print switches identically. spoolman_tracking gains
_report_spool_usage_split_by_tray_changes; the Path 2 remain-delta
fallback now skips trays the split path covered, killing the
double-count.
2026-07-01 09:50:30 +02:00
..
test_tray_split.py fix(spoolman): split mid-print usage across AMS backup switch (#1793) 2026-07-01 09:50:30 +02:00