{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Identify the source of trusted actor identity in a shown server action.",
  "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
  "choices": [
    "Server",
    "Client",
    "Unclear"
  ],
  "actions": {
    "Server": {
      "action": "preview_jev_server_action_actor_source",
      "payload": {
        "decision": "Server"
      },
      "pending": true
    },
    "Client": {
      "action": "preview_jev_server_action_actor_source",
      "payload": {
        "decision": "Client"
      },
      "pending": true
    },
    "Unclear": {
      "action": "preview_jev_server_action_actor_source",
      "payload": {
        "decision": "Unclear"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Session actor",
      "expected": "Server",
      "request": {
        "context": "{\n  \"task\": \"Identify the source of trusted actor identity in a shown server action.\",\n  \"evidence\": {\n    \"code\": \"\\\"use server\\\"; const session=await requireSession(); await db.note.create({data:{ownerId:session.user.id,text}});\",\n    \"helper\": \"requireSession verifies the server session\"\n  }\n}",
        "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
        "choices": [
          "Server",
          "Client",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Caller owner",
      "expected": "Client",
      "request": {
        "context": "{\n  \"task\": \"Identify the source of trusted actor identity in a shown server action.\",\n  \"evidence\": {\n    \"code\": \"\\\"use server\\\"; async function addNote(ownerId,text){return db.note.create({data:{ownerId,text}})}\",\n    \"context\": \"Complete function; ownerId comes from action arguments\"\n  }\n}",
        "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
        "choices": [
          "Server",
          "Client",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Caller role",
      "expected": "Client",
      "request": {
        "context": "{\n  \"task\": \"Identify the source of trusted actor identity in a shown server action.\",\n  \"evidence\": {\n    \"code\": \"\\\"use server\\\"; async function remove(id,role){if(role===\\\"admin\\\")return db.note.delete({where:{id}})}\",\n    \"context\": \"No other authorization guard\"\n  }\n}",
        "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
        "choices": [
          "Server",
          "Client",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Target is separate",
      "expected": "Server",
      "request": {
        "context": "{\n  \"task\": \"Identify the source of trusted actor identity in a shown server action.\",\n  \"evidence\": {\n    \"code\": \"\\\"use server\\\"; const s=await requireSession(); const note=await db.note.findUnique({where:{id:targetId}}); if(note.ownerId!==s.user.id)throw Error(\\\"Denied\\\");\",\n    \"helper\": \"requireSession verifies the session\"\n  }\n}",
        "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
        "choices": [
          "Server",
          "Client",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Database role",
      "expected": "Server",
      "request": {
        "context": "{\n  \"task\": \"Identify the source of trusted actor identity in a shown server action.\",\n  \"evidence\": {\n    \"code\": \"\\\"use server\\\"; const s=await requireSession(); const actor=await db.user.findUnique({where:{id:s.user.id}}); if(actor.role!==\\\"admin\\\")throw Error(\\\"Denied\\\");\",\n    \"helper\": \"requireSession verifies the session\"\n  }\n}",
        "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
        "choices": [
          "Server",
          "Client",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Unknown identity resolver",
      "expected": "Unclear",
      "request": {
        "context": "{\n  \"task\": \"Identify the source of trusted actor identity in a shown server action.\",\n  \"evidence\": {\n    \"code\": \"\\\"use server\\\"; const actor=await resolveActor(input); await saveFor(actor.id);\",\n    \"helper\": \"resolveActor implementation not provided\"\n  }\n}",
        "question": "Trace actor identity and privileges used by this server action: Client if any trusted actor ID, role or tenant comes unverified from the caller; otherwise Server if all come from a verified session bound to the current caller or database records selected through it. Use Unclear for missing identity-helper or trust-boundary behavior. A client-selected target ID checked against the verified actor is not a client-selected actor. This checks provenance, not full authorization.",
        "choices": [
          "Server",
          "Client",
          "Unclear"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
