FA-96964 / Recipe scaling and nutrition / Member archive
Cooked-yield nutrition per serving: per-100 g cooked basis · case 04
Energy density of a reduced stew matches the raw ingredients instead of the concentrated dish.
Case contract
Rows [name, raw_g, kcal_per_100g, sodium_mg_per_100g, use]; use "eat" counts fully, "marinade" retains 1/5 of its weight and nutrients, "discard" contributes nothing. Cooked weight = retained raw weight * yield_pct/100 (moisture loss changes weight, not energy or sodium). Return half-up integers: serving_g = cooked/servings, kcal and sodium_mg per serving, kcal_per_100g of cooked dish (0 if nothing is retained). servings < 1 returns an error string.
Why this case matters
Recipe nutrition must account for cooking moisture loss and for marinades and aromatics that are not eaten.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| marinated chicken | {"kcal": 254, "kcal_per_100g": 158, "serving_g": 120, "sodium_mg": 655} | {"kcal": 254, "kcal_per_100g": 211, "serving_g": 120, "sodium_mg": 655} | 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 ↗