fix(kitchen): stop name collisions in the mise en place split (audit B2) #58

Merged
abiwab merged 1 commit from fix/audit-b2 into main 2026-09-30 17:27:06 +02:00
Owner

Audit B2. A step token gives no hint whether { id: "moule" } is an ingredient or a piece of cookware, so three collisions happened:

  • #moule in one section made it the owner of the @moule ingredient used in another
  • a preparation on cookware sharing a name with an ingredient was labelled "ingredient" (and both merged into one entry)
  • the generic id of an a|b group was read as an ingredient called alternative

Fix: classify by _usageId (unique per usage, shared by the step token and the section's ingredients/cookware lists) instead of guessing from the registry, and ignore the group's own id. No golden changes (conformance 98/98); the three new tests fail on the previous code. The audit fuzzer (5000 recipes) only reports I9c, i.e. the known pre-existing C1.

Audit B2. A step token gives no hint whether `{ id: "moule" }` is an ingredient or a piece of cookware, so three collisions happened: - `#moule` in one section made it the owner of the `@moule` ingredient used in another - a preparation on cookware sharing a name with an ingredient was labelled "ingredient" (and both merged into one entry) - the generic id of an `a|b` group was read as an ingredient called `alternative` Fix: classify by `_usageId` (unique per usage, shared by the step token and the section's ingredients/cookware lists) instead of guessing from the registry, and ignore the group's own id. No golden changes (conformance 98/98); the three new tests fail on the previous code. The audit fuzzer (5000 recipes) only reports I9c, i.e. the known pre-existing C1.
fix(kitchen): tell cookware, ingredients and alternatives apart in the mise en place
All checks were successful
CI / Build, Test & Publish (pull_request) Successful in 2m21s
36022e4093
abiwab scheduled this pull request to auto merge when all checks succeed 2026-09-30 17:25:28 +02:00
abiwab merged commit f18e1dac9f into main 2026-09-30 17:27:06 +02:00
abiwab deleted branch fix/audit-b2 2026-09-30 17:27:06 +02:00
Sign in to join this conversation.
No description provided.