FA-96975 / Recipe scaling and nutrition / Member archive
Cooked-yield nutrition per serving: discarded aromatics · case 05
A bay leaf removed before serving still adds weight and calories.
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 |
|---|---|---|---|
| only discarded aromatics | {"kcal": 3, "kcal_per_100g": 348, "serving_g": 1, "sodium_mg": 0} | {"kcal": 0, "kcal_per_100g": 0, "serving_g": 0, "sodium_mg": 0} | 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 ↗