FAILURE MAP
← Case archive

FA-97243 / Recipe scaling and nutrition / Member archive

Sub-recipe allergen roll-up: diamond versus cycle · case 03

A glaze used by both the filling and the topping is reported as a cycle.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

recipes maps name -> {allergens, may_contain, uses}. Walk root and every used sub-recipe (depth first, in order). Names canonicalize: trim, lower, synonyms dairy->milk, peanuts->peanut, tree nuts->tree nut, eggs->egg. Result {contains, may_contain (minus contains), error: None}, both sorted. A shared sub-recipe reached twice (diamond) is fine; a cycle returns error "cycle: name" and an unknown name "unknown: name", with empty lists, stopping at the first error.

Why this case matters

Menu allergen matrices must propagate through nested sub-recipes without false cycle errors.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: diamond versus cycle{"contains": [], "error": "cycle: topping", "may_contain": []}{"contains": [], "error": "unknown: mystery", "may_contain": []}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗