From 41218d9b97e6803a2c4c6b80b49f1f1bc5a4625b Mon Sep 17 00:00:00 2001 From: sauterbe <49244843+sauterbe@users.noreply.github.com> Date: Fri, 7 Aug 2026 17:06:28 +0200 Subject: [PATCH] fix(workflows): the BOM roll-up priced components from the wrong articles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: }`, 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. --- library/workflows/bom_cost_rollup_recursive.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/workflows/bom_cost_rollup_recursive.json b/library/workflows/bom_cost_rollup_recursive.json index 6c6c176..5b49964 100644 --- a/library/workflows/bom_cost_rollup_recursive.json +++ b/library/workflows/bom_cost_rollup_recursive.json @@ -351,7 +351,9 @@ "params": { "list": { "query": { - "product": { + "filter[0][key]": "product", + "filter[0][op]": "equals", + "filter[0][value]": { "mode": "ref", "from": "n_pid", "path": ""