{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Check the runtime validation boundary between externally supplied data and domain logic.",
  "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
  "choices": [
    "Validated",
    "Asserted",
    "Unclear"
  ],
  "actions": {
    "Validated": {
      "action": "preview_jev_external_data_validation",
      "payload": {
        "decision": "Validated"
      },
      "pending": true
    },
    "Asserted": {
      "action": "preview_jev_external_data_validation",
      "payload": {
        "decision": "Asserted"
      },
      "pending": true
    },
    "Unclear": {
      "action": "preview_jev_external_data_validation",
      "payload": {
        "decision": "Unclear"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Cast after JSON parse",
      "expected": "Asserted",
      "request": {
        "context": "{\n  \"task\": \"Check the runtime validation boundary between externally supplied data and domain logic.\",\n  \"evidence\": {\n    \"code\": \"const user = JSON.parse(raw) as User; sendWelcome(user.email);\",\n    \"context\": \"No validation occurs inside sendWelcome\"\n  }\n}",
        "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
        "choices": [
          "Validated",
          "Asserted",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Schema before use",
      "expected": "Validated",
      "request": {
        "context": "{\n  \"task\": \"Check the runtime validation boundary between externally supplied data and domain logic.\",\n  \"evidence\": {\n    \"code\": \"const user = UserSchema.parse(JSON.parse(raw)); sendWelcome(user.email);\",\n    \"helper\": \"UserSchema.parse verifies required fields and throws before returning invalid data\"\n  }\n}",
        "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
        "choices": [
          "Validated",
          "Asserted",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Typed fetch response",
      "expected": "Asserted",
      "request": {
        "context": "{\n  \"task\": \"Check the runtime validation boundary between externally supplied data and domain logic.\",\n  \"evidence\": {\n    \"code\": \"const user: User = await response.json(); sendWelcome(user.email);\",\n    \"context\": \"No response validator is configured\"\n  }\n}",
        "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
        "choices": [
          "Validated",
          "Asserted",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Known validated client",
      "expected": "Validated",
      "request": {
        "context": "{\n  \"task\": \"Check the runtime validation boundary between externally supplied data and domain logic.\",\n  \"evidence\": {\n    \"code\": \"const user = await client.readUser(); sendWelcome(user.email);\",\n    \"helper\": \"readUser validates the response schema and never returns invalid records\"\n  }\n}",
        "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
        "choices": [
          "Validated",
          "Asserted",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Unknown parser",
      "expected": "Unclear",
      "request": {
        "context": "{\n  \"task\": \"Check the runtime validation boundary between externally supplied data and domain logic.\",\n  \"evidence\": {\n    \"code\": \"const user = parseUser(raw); sendWelcome(user.email);\",\n    \"helper\": \"parseUser may cast or validate; its contract is unknown\"\n  }\n}",
        "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
        "choices": [
          "Validated",
          "Asserted",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Check occurs too late",
      "expected": "Asserted",
      "request": {
        "context": "{\n  \"task\": \"Check the runtime validation boundary between externally supplied data and domain logic.\",\n  \"evidence\": {\n    \"code\": \"const user = JSON.parse(raw) as User; sendWelcome(user.email); UserSchema.parse(user);\"\n  }\n}",
        "question": "Inspect the external-data path: Validated if an explicit runtime check or documented validating wrapper checks the value before domain use; Asserted if a type cast or declared type is the only shown assurance; Unclear if validator behavior or ordering is missing. A check after use does not qualify. Judge the supplied runtime contract, not a trusted-sounding function name.",
        "choices": [
          "Validated",
          "Asserted",
          "Unclear"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
