Skip to content

[19.0][FIX] ddmrp: drop the unreachable product-UoM-change buffer guard#17

Open
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-remove-dead-uom-guard
Open

[19.0][FIX] ddmrp: drop the unreachable product-UoM-change buffer guard#17
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-remove-dead-uom-guard

Conversation

@dnplkndll

Copy link
Copy Markdown

Split out of #4 (one concern per PR). _check_buffer_procure_uom can never raise: procure_uom_id is a stored compute depending on the product UoM, so a template-UoM write re-derives every buffer's procurement UoM before the constraint reads it — proven empirically (an earlier revision with a corrected predicate still couldn't make it fire on CI). Its 19.0 predicate (_compute_quantity(..., raise_if_failure=False), which never fails) was doubly inert. The test pins the auto-follow invariant that actually protects buffers. Issue-first for upstream — removal needs maintainer buy-in.

@dnplkndll dnplkndll force-pushed the 19.0-fix-remove-dead-uom-guard branch 5 times, most recently from d60029b to 9b2da18 Compare June 19, 2026 16:11
@dnplkndll dnplkndll force-pushed the 19.0-fix-remove-dead-uom-guard branch 3 times, most recently from 3e62d49 to c82575f Compare July 7, 2026 13:33
_check_buffer_procure_uom can never raise: procure_uom_id is a stored
compute depending on the product UoM, so writing a new UoM on the
template re-derives every buffer's procurement UoM before the
constraint reads it — an incompatible pair is unobservable. On top of
that, its 19.0 predicate (_compute_quantity with raise_if_failure=False,
which never fails) was doubly inert. The auto-follow recompute plus the
buffer-side _check_procure_uom constraint and the valid_uom_ids view
domain are the effective guards; pin the auto-follow behavior with a
test instead.
@dnplkndll dnplkndll force-pushed the 19.0-fix-remove-dead-uom-guard branch from c82575f to 3e31cc0 Compare July 9, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant