gram/conformance/cases/058-empty-section-header/analyzed.json
abiwab adffeb7d01
All checks were successful
CI / Build & Test (pull_request) Successful in 5m53s
fix(parser): keep an empty section header or anchor a section once formatted
2026-11-21 23:51:27 +01:00

515 lines
9.8 KiB
JSON

{
"meta": {},
"registry": {
"ingredients": {
"eggs": {
"id": "eggs",
"name": "eggs"
},
"batter": {
"id": "batter",
"name": "batter",
"is_intermediate": true
},
"flour": {
"id": "flour",
"name": "flour",
"default_unit": "g"
}
},
"cookware": {
"bowl": {
"id": "bowl",
"name": "bowl"
}
}
},
"shopping_list": [
{
"id": "eggs",
"name": "eggs",
"_usageIds": [
"1"
],
"qty": 2
},
{
"id": "flour",
"name": "flour",
"_usageIds": [
"3"
],
"qty": 100,
"unit": "g",
"normalizedMass": 100,
"isEstimate": false,
"conversionMethod": "physical"
}
],
"cookware": [
{
"id": "bowl",
"_usageId": "2",
"fixed": false
}
],
"sections": [
{
"title": "",
"ingredients": [
{
"id": "eggs",
"_usageId": "1",
"qty": 2
}
],
"cookware": [
{
"id": "bowl",
"_usageId": "2",
"fixed": false
}
],
"steps": [
{
"type": "step",
"content": [
"Whisk ",
{
"id": "eggs",
"_usageId": "1",
"qty": 2
},
"in a ",
{
"id": "bowl",
"_usageId": "2",
"fixed": false
},
"."
],
"timings": {
"start": 0,
"end": 2,
"activeDuration": 2
}
}
],
"metrics": {
"totalMass": 0,
"massStatus": "incomplete",
"missingMassIngredients": [
"eggs"
]
}
},
{
"title": "Batter",
"ingredients": [
{
"id": "flour",
"_usageId": "3",
"qty": 100,
"unit": "g",
"conversionMethod": "physical",
"isEstimate": false,
"normalizedMass": 100
}
],
"cookware": [],
"steps": [
{
"type": "step",
"content": [
"Fold ",
{
"id": "flour",
"_usageId": "3",
"qty": 100,
"unit": "g",
"normalizedMass": 100,
"conversionMethod": "physical",
"isEstimate": false
},
"into the eggs."
],
"timings": {
"start": 2,
"end": 4,
"activeDuration": 2
}
}
],
"intermediate_preparation": "batter",
"retro_planning": {
"raw": ""
},
"metrics": {
"totalMass": 100,
"massStatus": "precise",
"missingMassIngredients": []
}
},
{
"title": "Bake",
"ingredients": [
{
"type": "reference",
"id": "batter",
"name": "batter",
"_usageId": "4"
}
],
"cookware": [],
"steps": [
{
"type": "step",
"content": [
"Bake ",
{
"type": "reference",
"id": "batter",
"name": "batter",
"_usageId": "4"
},
"for ",
{
"type": "timer",
"raw": "20 min",
"quantity": {
"type": "single",
"value": 20,
"text": "20"
},
"unit": "min",
"minutes": 20
},
"."
],
"timings": {
"start": 4,
"end": 24,
"activeDuration": 20
}
}
],
"metrics": {
"totalMass": 0,
"massStatus": "incomplete",
"missingMassIngredients": []
}
}
],
"warnings": [
{
"code": "MISSING_UNIT",
"message": "Retro-planning offset for \"Batter\" requires a strictly negative duration (e.g. -2h, -30min).",
"item": "Batter",
"loc": {
"start": 54,
"end": 57
}
},
{
"code": "UNKNOWN_MASS",
"message": "Cannot calculate mass for \"eggs\" — omitted from nutritional totals."
},
{
"code": "MISSING_INGREDIENT",
"message": "Ingredient \"flour\" not found in database — nutritional metrics and density conversions unavailable."
}
],
"metrics": {
"totalTime": 28,
"totalBreakdown": [
{
"label": "section_active:unnamed",
"duration": 2
},
{
"label": "section_active:Batter",
"duration": 2
},
{
"label": "section_active:Bake",
"duration": 20
}
],
"idleTime": 0,
"activeTime": 24,
"activeBreakdown": [
{
"label": "section_active:unnamed",
"duration": 2
},
{
"label": "section_active:Batter",
"duration": 2
},
{
"label": "section_active:Bake",
"duration": 20
}
],
"preparationTime": 4,
"prepBreakdown": [
{
"label": "ingredients_overhead",
"duration": 3
},
{
"label": "cookware_overhead",
"duration": 1
}
],
"totalMass": 100,
"massStatus": "incomplete",
"missingMassIngredients": [
"eggs"
],
"nutrition": {
"total": {
"calories": 0,
"fat": 0,
"carbs": 0,
"protein": 0
},
"isEstimate": false,
"coverage": 0,
"warnings": [
{
"code": "UNKNOWN_MASS",
"message": "Cannot calculate mass for \"eggs\" — omitted from nutritional totals."
},
{
"code": "MISSING_INGREDIENT",
"message": "Ingredient \"flour\" not found in database — nutritional metrics and density conversions unavailable."
}
]
}
},
"miseEnPlace": [
{
"section": 0,
"duration": 2,
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 1,
"duration": 1
},
{
"kind": "gather",
"target": "cookware",
"count": 1,
"duration": 1
}
]
},
{
"section": 1,
"duration": 1,
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 1,
"duration": 1
}
]
},
{
"section": 2,
"duration": 1,
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 1,
"duration": 1,
"intermediates": 1
}
]
}
],
"tasks": {
"tasks": [
{
"id": "s0.prep",
"kind": "prep",
"section": 0,
"duration": {
"nominal": 2
},
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 1,
"duration": 1
},
{
"kind": "gather",
"target": "cookware",
"count": 1,
"duration": 1
}
],
"after": []
},
{
"id": "s0.0",
"kind": "step",
"section": 0,
"step": 0,
"duration": {
"nominal": 2
},
"after": []
},
{
"id": "s1.prep",
"kind": "prep",
"section": 1,
"duration": {
"nominal": 1
},
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 1,
"duration": 1
}
],
"after": []
},
{
"id": "s1.0",
"kind": "step",
"section": 1,
"step": 0,
"duration": {
"nominal": 2
},
"after": []
},
{
"id": "s2.prep.batter",
"kind": "prep",
"section": 2,
"intermediate": "batter",
"duration": {
"nominal": 1
},
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 1,
"duration": 1,
"intermediates": 1
}
],
"after": [
"s1.0"
]
},
{
"id": "s2.0",
"kind": "step",
"section": 2,
"step": 0,
"duration": {
"nominal": 20
},
"consumes": [
"batter"
],
"after": [
"s1.0"
]
}
],
"sections": [
{
"day": 0
},
{
"day": 0,
"intermediate": "batter"
},
{
"day": 0
}
]
},
"schedule": {
"miseEnPlace": "perSection",
"rests": "shortest",
"totalTime": 28,
"activeTime": 24,
"preparationTime": 4,
"idleTime": 0,
"blocks": [
{
"kind": "prep",
"task": "s0.prep",
"section": 0,
"start": 0,
"end": 2
},
{
"kind": "step",
"task": "s0.0",
"section": 0,
"step": 0,
"start": 2,
"end": 4
},
{
"kind": "prep",
"task": "s1.prep",
"section": 1,
"start": 4,
"end": 5
},
{
"kind": "step",
"task": "s1.0",
"section": 1,
"step": 0,
"start": 5,
"end": 7
},
{
"kind": "prep",
"task": "s2.prep.batter",
"section": 2,
"start": 7,
"end": 8
},
{
"kind": "step",
"task": "s2.0",
"section": 2,
"step": 0,
"start": 8,
"end": 28
}
],
"days": [
{
"day": 0,
"start": 0,
"end": 28,
"sections": [
0,
1,
2
]
}
]
}
}