{
  "description": "Shared test vectors for the Aroma Recipe 1.0, specified in spec/aroma-recipe.md (section 10, Conformance). Each section is an array of named cases. `structural`: parsing `text` must give `expected` (null = parses; otherwise the exact structural error code and path); `generate` replaces `text` with a built input (oversize = 4 MiB + 1 bytes, deep = 33 nesting levels, deep32 = 32 levels), built from a valid recipe with a padding or nesting `x-` member. `validation`: `document` is a JSON object (the runner serialises it, parses it and validates it) or a JSON string holding the exact text; `expected` is the exact ordered list of {path, code} violations (section 6.3). Runners expand generators inside an object `document`: {\"list\": \"aromas\", \"count\": N} becomes N aromas with keys k0, k1, ... and distinct UUIDs, and {\"repeat\": s, \"count\": N} becomes the string s repeated N times. `conversion`: `recipe` (an object, or a string holding the exact text) is valid, and the ASMF canonical JSON (ASMF section 11) of its conversion (section 5) is exactly the string `asmf`.",
  "structural": [
    {
      "name": "smallest_recipe_parses",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":50}],\"durationMs\":1000}",
      "expected": null
    },
    {
      "name": "not_json",
      "text": "{\"aromaRecipe\":\"1.0\"",
      "expected": {"code": "MALFORMED", "path": ""}
    },
    {
      "name": "top_level_string",
      "text": "\"aromaRecipe\"",
      "expected": {"code": "MALFORMED", "path": ""}
    },
    {
      "name": "duplicate_member_in_a_mix_item",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":50,\"level\":60}],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": ""}
    },
    {
      "name": "oversize",
      "generate": "oversize",
      "expected": {"code": "MALFORMED", "path": ""}
    },
    {
      "name": "too_deep",
      "generate": "deep",
      "expected": {"code": "MALFORMED", "path": ""}
    },
    {
      "name": "deepest_allowed",
      "generate": "deep32",
      "expected": null
    },
    {
      "name": "missing_version",
      "text": "{\"aromas\":[],\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "aromaRecipe"}
    },
    {
      "name": "major_version_2",
      "text": "{\"aromaRecipe\":\"2.0\"}",
      "expected": {"code": "UNSUPPORTED_VERSION", "path": "aromaRecipe"}
    },
    {
      "name": "asmf_document_is_not_a_recipe",
      "text": "{\"asmf\":\"1.0\",\"aromas\":[],\"flows\":[],\"boosters\":[]}",
      "expected": {"code": "MALFORMED", "path": "aromaRecipe"}
    },
    {
      "name": "unknown_top_level_member",
      "text": "{\"aromaRecipe\":\"1.0\",\"flows\":[],\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":50}],\"durationMs\":1000}",
      "expected": {"code": "UNKNOWN_FIELD", "path": "flows"}
    },
    {
      "name": "unknown_members_ignored_in_higher_minor",
      "text": "{\"aromaRecipe\":\"1.4\",\"tags\":[\"calm\"],\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\",\"colour\":\"red\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":50,\"rampMs\":3}],\"boosters\":{\"side\":20},\"durationMs\":1000}",
      "expected": null
    },
    {
      "name": "x_members_ignored",
      "text": "{\"aromaRecipe\":\"1.0\",\"x-app\":{\"zoom\":1.5},\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":50,\"x-colour\":\"#2a7\"}],\"boosters\":{\"x-mode\":\"eco\"},\"durationMs\":1000}",
      "expected": null
    },
    {
      "name": "meta_unknown_member",
      "text": "{\"aromaRecipe\":\"1.0\",\"meta\":{\"title\":\"T\",\"rating\":5},\"aromas\":[],\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "UNKNOWN_FIELD", "path": "meta.rating"}
    },
    {
      "name": "meta_title_not_a_string",
      "text": "{\"aromaRecipe\":\"1.0\",\"meta\":{\"title\":7},\"aromas\":[],\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "meta.title"}
    },
    {
      "name": "missing_aromas",
      "text": "{\"aromaRecipe\":\"1.0\",\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "aromas"}
    },
    {
      "name": "aroma_name_read_before_key",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"name\":{\"en\":1}}],\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "aromas[0].name.en"}
    },
    {
      "name": "aroma_missing_id",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"key\":\"a1\"}],\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "aromas[0].id"}
    },
    {
      "name": "missing_mix",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "mix"}
    },
    {
      "name": "mix_item_not_an_object",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[\"a1\"],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "mix[0]"}
    },
    {
      "name": "mix_level_with_a_fraction",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":40.5}],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "mix[0].level"}
    },
    {
      "name": "mix_level_negative_zero",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a1\",\"level\":-0}],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "mix[0].level"}
    },
    {
      "name": "mix_item_unknown_member_before_missing_level",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[{\"aroma\":\"a1\",\"percent\":40}],\"durationMs\":1000}",
      "expected": {"code": "UNKNOWN_FIELD", "path": "mix[0].percent"}
    },
    {
      "name": "boosters_is_an_array",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[],\"boosters\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "boosters"}
    },
    {
      "name": "unknown_booster_member_in_1_0",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[],\"boosters\":{\"side\":20},\"durationMs\":1000}",
      "expected": {"code": "UNKNOWN_FIELD", "path": "boosters.side"}
    },
    {
      "name": "booster_inner_is_a_string",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[],\"boosters\":{\"inner\":\"80\"},\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": "boosters.inner"}
    },
    {
      "name": "missing_duration",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[]}",
      "expected": {"code": "MALFORMED", "path": "durationMs"}
    },
    {
      "name": "duration_beyond_i64",
      "text": "{\"aromaRecipe\":\"1.0\",\"aromas\":[],\"mix\":[],\"durationMs\":9223372036854775808}",
      "expected": {"code": "MALFORMED", "path": "durationMs"}
    },
    {
      "name": "number_too_large_for_a_double_anywhere",
      "text": "{\"aromaRecipe\":\"1.0\",\"x-n\":-1e400,\"aromas\":[],\"mix\":[],\"durationMs\":1000}",
      "expected": {"code": "MALFORMED", "path": ""}
    }
  ],
  "validation": [
    {
      "name": "three_aromas_with_inner_is_valid",
      "document": {"aromaRecipe": "1.0", "meta": {"title": "Evening garden"}, "aromas": [{"key": "rose", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13"}, {"key": "pine", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "lemon", "id": "6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e"}], "mix": [{"aroma": "rose", "level": 40}, {"aroma": "pine", "level": 30}, {"aroma": "lemon", "level": 20}], "boosters": {"inner": 80}, "durationMs": 3000},
      "expected": []
    },
    {
      "name": "levels_need_not_sum_to_100",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "b", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13"}], "mix": [{"aroma": "a", "level": 100}, {"aroma": "b", "level": 100}], "durationMs": 1000},
      "expected": []
    },
    {
      "name": "aroma_not_in_the_mix_is_allowed",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "b", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13"}], "mix": [{"aroma": "b", "level": 10}], "durationMs": 1000},
      "expected": []
    },
    {
      "name": "limits_are_inclusive",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "a", "level": 1}], "boosters": {"inner": 1, "outer": 100}, "durationMs": 600000},
      "expected": []
    },
    {
      "name": "empty_boosters_object_is_allowed",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "a", "level": 50}], "boosters": {}, "durationMs": 1},
      "expected": []
    },
    {
      "name": "empty_mix",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [], "durationMs": 1000},
      "expected": [{"path": "mix", "code": "OUT_OF_RANGE"}]
    },
    {
      "name": "two_mix_items_for_one_aroma",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "b", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13"}], "mix": [{"aroma": "a", "level": 40}, {"aroma": "b", "level": 30}, {"aroma": "a", "level": 20}], "durationMs": 1000},
      "expected": [{"path": "mix[2].aroma", "code": "DUPLICATE_MIX"}]
    },
    {
      "name": "unknown_key_in_the_mix",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "rose", "level": 40}, {"aroma": "rose", "level": 0}], "durationMs": 1000},
      "expected": [{"path": "mix[0].aroma", "code": "UNKNOWN_KEY"}, {"path": "mix[1].aroma", "code": "UNKNOWN_KEY"}, {"path": "mix[1].level", "code": "OUT_OF_RANGE"}]
    },
    {
      "name": "levels_out_of_range",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "b", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13"}], "mix": [{"aroma": "a", "level": 0}, {"aroma": "b", "level": 101}], "boosters": {"inner": 0, "outer": -9223372036854775808}, "durationMs": 1000},
      "expected": [{"path": "mix[0].level", "code": "OUT_OF_RANGE"}, {"path": "mix[1].level", "code": "OUT_OF_RANGE"}, {"path": "boosters.inner", "code": "OUT_OF_RANGE"}, {"path": "boosters.outer", "code": "OUT_OF_RANGE"}]
    },
    {
      "name": "duration_zero",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "a", "level": 50}], "durationMs": 0},
      "expected": [{"path": "durationMs", "code": "OUT_OF_RANGE"}]
    },
    {
      "name": "duration_beyond_ten_minutes",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "a", "level": 50}], "durationMs": 600001},
      "expected": [{"path": "durationMs", "code": "OUT_OF_RANGE"}]
    },
    {
      "name": "duration_beyond_asmf_range",
      "document": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "a", "level": 50}], "durationMs": 9223372036854775807},
      "expected": [{"path": "durationMs", "code": "OUT_OF_RANGE"}]
    },
    {
      "name": "aroma_rules_as_asmf",
      "document": "{\"aromaRecipe\":\"1.0\",\"aromas\":[{\"key\":\"Rose\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\",\"name\":{\"en\":\"Rose\",\"e\":\"x\"}},{\"key\":\"pine\",\"id\":\"3F2B8C1E-9A47-4D0B-8E6F-1C5A7B9D2E40\"},{\"key\":\"pine\",\"id\":\"00000000-0000-0000-0000-000000000000\"}],\"mix\":[{\"aroma\":\"pine\",\"level\":50}],\"durationMs\":1000}",
      "expected": [{"path": "aromas[0].key", "code": "INVALID_VALUE"}, {"path": "aromas[0].name.e", "code": "INVALID_VALUE"}, {"path": "aromas[1].id", "code": "DUPLICATE_AROMA"}, {"path": "aromas[2].key", "code": "DUPLICATE_KEY"}, {"path": "aromas[2].id", "code": "INVALID_VALUE"}]
    },
    {
      "name": "meta_rules_as_asmf",
      "document": {"aromaRecipe": "1.0", "meta": {"title": {"repeat": "t", "count": 201}, "createdAt": "2026-02-30T09:00:00Z", "language": "e"}, "aromas": [{"key": "a", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [{"aroma": "a", "level": 50}], "durationMs": 1000},
      "expected": [{"path": "meta.title", "code": "INVALID_VALUE"}, {"path": "meta.createdAt", "code": "INVALID_VALUE"}, {"path": "meta.language", "code": "INVALID_VALUE"}]
    },
    {
      "name": "sixty_four_aromas_are_allowed",
      "document": {"aromaRecipe": "1.0", "aromas": {"list": "aromas", "count": 64}, "mix": [{"aroma": "k63", "level": 50}], "durationMs": 1000},
      "expected": []
    },
    {
      "name": "sixty_five_aromas_are_too_many",
      "document": {"aromaRecipe": "1.0", "aromas": {"list": "aromas", "count": 65}, "mix": [{"aroma": "nope", "level": 0}], "durationMs": 0},
      "expected": [{"path": "aromas", "code": "TOO_MANY"}]
    },
    {
      "name": "reporting_order",
      "document": {"aromaRecipe": "1.0", "meta": {"tool": {"repeat": "x", "count": 201}}, "aromas": [{"key": "a", "id": "not-a-uuid"}], "mix": [], "boosters": {"outer": 101}, "durationMs": -1},
      "expected": [{"path": "meta.tool", "code": "INVALID_VALUE"}, {"path": "aromas[0].id", "code": "INVALID_VALUE"}, {"path": "mix", "code": "OUT_OF_RANGE"}, {"path": "boosters.outer", "code": "OUT_OF_RANGE"}, {"path": "durationMs", "code": "OUT_OF_RANGE"}]
    }
  ],
  "conversion": [
    {
      "name": "three_aromas_with_a_fixed_inner_booster",
      "recipe": {"aromaRecipe": "1.0", "meta": {"title": "Evening garden"}, "aromas": [{"key": "rose", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13", "name": {"en": "Rose", "ja": "バラ"}}, {"key": "pine", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40", "name": {"en": "Pine"}}, {"key": "lemon", "id": "6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e", "name": {"en": "Lemon"}}], "mix": [{"aroma": "rose", "level": 40}, {"aroma": "pine", "level": 30}, {"aroma": "lemon", "level": 20}], "boosters": {"inner": 80}, "durationMs": 3000},
      "asmf": "{\"asmf\":\"1.0\",\"meta\":{\"title\":\"Evening garden\"},\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\",\"name\":{\"en\":\"Pine\"}},{\"key\":\"a2\",\"id\":\"6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e\",\"name\":{\"en\":\"Lemon\"}},{\"key\":\"a3\",\"id\":\"b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13\",\"name\":{\"en\":\"Rose\",\"ja\":\"バラ\"}}],\"flows\":[{\"aroma\":\"a1\",\"startMs\":0,\"endMs\":3000,\"concentration\":30},{\"aroma\":\"a2\",\"startMs\":0,\"endMs\":3000,\"concentration\":20},{\"aroma\":\"a3\",\"startMs\":0,\"endMs\":3000,\"concentration\":40}],\"boosters\":[{\"booster\":\"inner\",\"startMs\":0,\"endMs\":3000,\"intensity\":80}]}"
    },
    {
      "name": "no_boosters_leaves_the_inner_booster_automatic",
      "recipe": {"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "e47a1b93-5c6d-4f08-9b2e-0d3c8a6f1e75"}], "mix": [{"aroma": "a", "level": 60}], "durationMs": 1500},
      "asmf": "{\"asmf\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"e47a1b93-5c6d-4f08-9b2e-0d3c8a6f1e75\"}],\"flows\":[{\"aroma\":\"a1\",\"startMs\":0,\"endMs\":1500,\"concentration\":60}],\"boosters\":[]}"
    },
    {
      "name": "both_boosters_and_mix_in_another_order",
      "recipe": {"aromaRecipe": "1.0", "aromas": [{"key": "x", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "y", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13"}], "mix": [{"aroma": "y", "level": 100}, {"aroma": "x", "level": 1}], "boosters": {"outer": 30, "inner": 100}, "durationMs": 600000},
      "asmf": "{\"asmf\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"},{\"key\":\"a2\",\"id\":\"b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13\"}],\"flows\":[{\"aroma\":\"a1\",\"startMs\":0,\"endMs\":600000,\"concentration\":1},{\"aroma\":\"a2\",\"startMs\":0,\"endMs\":600000,\"concentration\":100}],\"boosters\":[{\"booster\":\"inner\",\"startMs\":0,\"endMs\":600000,\"intensity\":100},{\"booster\":\"outer\",\"startMs\":0,\"endMs\":600000,\"intensity\":30}]}"
    },
    {
      "name": "outer_only_and_an_unused_aroma",
      "recipe": {"aromaRecipe": "1.0", "meta": {"author": "@mina", "createdAt": "2026-11-19T10:00:00Z"}, "aromas": [{"key": "p", "id": "6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e"}, {"key": "q", "id": "E47A1B93-5C6D-4F08-9B2E-0D3C8A6F1E75"}], "mix": [{"aroma": "q", "level": 50}], "boosters": {"outer": 40}, "durationMs": 1},
      "asmf": "{\"asmf\":\"1.0\",\"meta\":{\"author\":\"@mina\",\"createdAt\":\"2026-11-19T10:00:00Z\"},\"aromas\":[{\"key\":\"a1\",\"id\":\"6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e\"},{\"key\":\"a2\",\"id\":\"e47a1b93-5c6d-4f08-9b2e-0d3c8a6f1e75\"}],\"flows\":[{\"aroma\":\"a2\",\"startMs\":0,\"endMs\":1,\"concentration\":50}],\"boosters\":[{\"booster\":\"outer\",\"startMs\":0,\"endMs\":1,\"intensity\":40}]}"
    },
    {
      "name": "extensions_are_dropped",
      "recipe": "{\"aromaRecipe\":\"1.1\",\"x-app\":{\"zoom\":2},\"note\":\"future member\",\"aromas\":[{\"key\":\"a\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"mix\":[{\"aroma\":\"a\",\"level\":70}],\"boosters\":{\"inner\":60,\"side\":10},\"durationMs\":2000}",
      "asmf": "{\"asmf\":\"1.0\",\"aromas\":[{\"key\":\"a1\",\"id\":\"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40\"}],\"flows\":[{\"aroma\":\"a1\",\"startMs\":0,\"endMs\":2000,\"concentration\":70}],\"boosters\":[{\"booster\":\"inner\",\"startMs\":0,\"endMs\":2000,\"intensity\":60}]}"
    }
  ]
}
