fix(workflows): the BOM roll-up priced components from the wrong articles - #71
Merged
Merged
Conversation
…cles Regression I shipped in #69. Migrating the template off the raw API replaced a path-scoped call — `/products/{id}/purchasePrices`, correct by construction — with `PurchasePrice.list` filtered by `product`. In the flat shape `query: {product: <id>}`, which is what the skill documentation teaches, that filter does nothing: a core reads a filter only as `filter[i][key|op|value]`, and Xentral answers 200 with the UNFILTERED collection for a query param it does not know. So the leaf branch took its "standard supplier base tier" from a pool of arbitrary articles and wrote that as the component's purchase price. No error, no empty result — a confidently wrong number. Measured on mvp, same call, both shapes: flat product=prd_8 -> 50 rows across 11 different products (exactly 1 of them actually prd_8) bracketed product=prd_8 -> 1 row, prd_8 bracketed product=prd_62004 -> 0 rows (that article has no purchase price) My fixture tests did not catch it because they hand the node an already-filtered list — they pin the arithmetic, not whether the filter reaches the wire. That is the same gap I have been flagging in other people's work. The bracketed shape works today and stays correct after agent-os `fix/flat-list-filters-never-filtered`, which makes the flat shape filter too; this does not depend on that landing.
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.
A regression I shipped in #69, found while chasing a silently-ignored
statusfilter.Migrating the template off the raw API replaced a path-scoped call —
/products/{id}/purchasePrices, correct by construction — withPurchasePrice.listfiltered byproduct. In the flat shapequery: {product: <id>}, which is what the skill documentation teaches, that filter does nothing: a core reads a filter only asfilter[i][key|op|value], and Xentral answers 200 with the unfiltered collection for a query param it does not know.So the leaf branch took its "standard supplier base tier" from a pool of arbitrary articles and wrote that as the component's purchase price. No error, no empty result — a confidently wrong number.
Measured on mvp
product=prd_8prd_8product=prd_8prd_8product=prd_62004Why my own tests missed it
The fixture scenarios hand the node an already-filtered list. They pin the arithmetic, not whether the filter reaches the wire. That is precisely the gap I have been flagging in other people's work, and it caught me.
Not dependent on the platform fix
The bracketed shape works today. agent-os
fix/flat-list-filters-never-filteredadditionally makes the flat shape filter properly, but this fix does not wait for it — and stays correct after it lands.validate_graphand the render are clean; the rendered call is now:Seven more templates are affected, differently
They use the same flat shape, but most also name keys that do not exist as filters at all (
maxAgeDays,belowMinStock,invoiced,minOverdueDays,creditNoteCreated), or a value outside the field's options, or — inreturn_to_credit_note— an entity (SalesReturn) that the core does not have. Those need a redesign per template, not a shape swap, so they are deliberately not in here. Detailed per-template map in the discussion.