{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.",
  "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
  "choices": [
    "Contained",
    "Gap shown",
    "No external path",
    "Review"
  ],
  "actions": {
    "Contained": {
      "action": "preview_jev_file_path_containment",
      "payload": {
        "decision": "Contained"
      },
      "pending": true
    },
    "Gap shown": {
      "action": "preview_jev_file_path_containment",
      "payload": {
        "decision": "Gap shown"
      },
      "pending": true
    },
    "No external path": {
      "action": "preview_jev_file_path_containment",
      "payload": {
        "decision": "No external path"
      },
      "pending": true
    },
    "Review": {
      "action": "preview_jev_file_path_containment",
      "payload": {
        "decision": "Review"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Unbounded concatenation",
      "expected": "Gap shown",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.\",\n  \"evidence\": {\n    \"input\": \"An arbitrary external path string, including directory components.\",\n    \"operation\": \"Concatenate it to the base directory and open.\",\n    \"contract\": \"Complete contract has no normalization, safe-name mapping or containment enforcement.\"\n  }\n}",
        "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
        "choices": [
          "Contained",
          "Gap shown",
          "No external path",
          "Review"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Strict safe-name mapping",
      "expected": "Contained",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.\",\n  \"evidence\": {\n    \"input\": \"External key selected from a fixed safe identifier set.\",\n    \"operation\": \"Map that key to an internally defined filename under the fixed directory.\",\n    \"contract\": \"No input path components are used; final-open and directory controls prevent links or races from escaping the directory.\"\n  }\n}",
        "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
        "choices": [
          "Contained",
          "Gap shown",
          "No external path",
          "Review"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Final resolved containment",
      "expected": "Contained",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.\",\n  \"evidence\": {\n    \"input\": \"External relative path.\",\n    \"operation\": \"A reviewed filesystem helper resolves and opens within the fixed directory.\",\n    \"contract\": \"Full helper contract enforces final containment and rejects escape through links or races; every operation uses it.\"\n  }\n}",
        "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
        "choices": [
          "Contained",
          "Gap shown",
          "No external path",
          "Review"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Fixed internal file",
      "expected": "No external path",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.\",\n  \"evidence\": {\n    \"input\": \"User supplies only the text to write.\",\n    \"operation\": \"Write to one configured internal file.\",\n    \"contract\": \"Input cannot alter the file name, parent path or operation target.\"\n  }\n}",
        "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
        "choices": [
          "Contained",
          "Gap shown",
          "No external path",
          "Review"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "String-prefix check",
      "expected": "Review",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.\",\n  \"evidence\": {\n    \"input\": \"External path.\",\n    \"operation\": \"Checks startsWith(base), then opens.\",\n    \"contract\": \"Normalization, separator, link and final-open semantics are omitted.\"\n  }\n}",
        "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
        "choices": [
          "Contained",
          "Gap shown",
          "No external path",
          "Review"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Unknown helper",
      "expected": "Review",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify external path containment using supplied normalization, filesystem and final-operation semantics without performing file operations.\",\n  \"evidence\": {\n    \"input\": \"External file name.\",\n    \"operation\": \"safeOpen(name)\",\n    \"contract\": \"Helper implementation and filesystem assumptions are absent.\"\n  }\n}",
        "question": "Review the file-operation boundary. Contained means the complete supplied contract enforces final resolved-path containment in the allowed directory, including its stated link/race controls, or uses a strict safe-name mapping. Gap shown means the complete path accepts external traversal without containment. No external path means input cannot influence the file path. Review takes precedence for unknown normalization, links, races or final-open semantics. Do not access files or certify safety.",
        "choices": [
          "Contained",
          "Gap shown",
          "No external path",
          "Review"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
