[19.0][FIX] ddmrp: drop the unreachable product-UoM-change buffer guard#17
Open
dnplkndll wants to merge 1 commit into
Open
[19.0][FIX] ddmrp: drop the unreachable product-UoM-change buffer guard#17dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
d60029b to
9b2da18
Compare
3e62d49 to
c82575f
Compare
_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.
c82575f to
3e31cc0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #4 (one concern per PR).
_check_buffer_procure_uomcan never raise:procure_uom_idis 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.