{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.",
  "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
  "choices": [
    "Blocks loop",
    "Offloaded or async",
    "Other context",
    "Review"
  ],
  "actions": {
    "Blocks loop": {
      "action": "preview_jev_async_blocking_boundary",
      "payload": {
        "decision": "Blocks loop"
      },
      "pending": true
    },
    "Offloaded or async": {
      "action": "preview_jev_async_blocking_boundary",
      "payload": {
        "decision": "Offloaded or async"
      },
      "pending": true
    },
    "Other context": {
      "action": "preview_jev_async_blocking_boundary",
      "payload": {
        "decision": "Other context"
      },
      "pending": true
    },
    "Review": {
      "action": "preview_jev_async_blocking_boundary",
      "payload": {
        "decision": "Review"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Synchronous client in handler",
      "expected": "Blocks loop",
      "request": {
        "context": "{\n  \"task\": \"Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.\",\n  \"evidence\": {\n    \"context\": \"An async request handler executes on the event-loop thread.\",\n    \"call\": \"syncClient.fetch() is called directly.\",\n    \"contract\": \"fetch blocks its calling thread until the network response arrives.\"\n  }\n}",
        "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
        "choices": [
          "Blocks loop",
          "Offloaded or async",
          "Other context",
          "Review"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Explicit worker offload",
      "expected": "Offloaded or async",
      "request": {
        "context": "{\n  \"task\": \"Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.\",\n  \"evidence\": {\n    \"context\": \"Async handler on the event loop.\",\n    \"call\": \"await to_thread(syncClient.fetch)\",\n    \"contract\": \"to_thread runs this blocking call on a separate worker thread.\"\n  }\n}",
        "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
        "choices": [
          "Blocks loop",
          "Offloaded or async",
          "Other context",
          "Review"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Nonblocking client",
      "expected": "Offloaded or async",
      "request": {
        "context": "{\n  \"task\": \"Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.\",\n  \"evidence\": {\n    \"context\": \"Async handler on the event loop.\",\n    \"call\": \"await asyncClient.fetch()\",\n    \"contract\": \"The documented client yields while network I/O is pending and does not perform blocking work here.\"\n  }\n}",
        "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
        "choices": [
          "Blocks loop",
          "Offloaded or async",
          "Other context",
          "Review"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Synchronous job",
      "expected": "Other context",
      "request": {
        "context": "{\n  \"task\": \"Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.\",\n  \"evidence\": {\n    \"context\": \"A dedicated synchronous worker process, with no event loop in this path.\",\n    \"call\": \"syncClient.fetch()\",\n    \"contract\": \"A blocking network client.\"\n  }\n}",
        "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
        "choices": [
          "Blocks loop",
          "Offloaded or async",
          "Other context",
          "Review"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Unknown helper",
      "expected": "Review",
      "request": {
        "context": "{\n  \"task\": \"Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.\",\n  \"evidence\": {\n    \"context\": \"Async handler.\",\n    \"call\": \"loadData()\",\n    \"contract\": null\n  }\n}",
        "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
        "choices": [
          "Blocks loop",
          "Offloaded or async",
          "Other context",
          "Review"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Async spelling around a sleep",
      "expected": "Blocks loop",
      "request": {
        "context": "{\n  \"task\": \"Classify whether a known synchronous blocking operation runs directly on the event loop, is offloaded, or lacks sufficient execution context.\",\n  \"evidence\": {\n    \"context\": \"The function runs on the loop thread.\",\n    \"call\": \"An async-named helper directly calls a synchronous sleep.\",\n    \"contract\": \"The helper has no worker offload; sleep blocks the calling thread.\"\n  }\n}",
        "question": "Review the call and execution contract. Blocks loop means a known synchronous blocking operation runs directly on the event-loop thread. Offloaded or async means the operation uses a documented nonblocking API or explicit worker offload. Other context means a normal synchronous worker with no event-loop execution. Review takes precedence for missing/conflicting call or context facts. An async function name alone proves nothing. Do not run code or estimate latency.",
        "choices": [
          "Blocks loop",
          "Offloaded or async",
          "Other context",
          "Review"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
