{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Inspect how an optimistic interface handles state and feedback after a rejected server operation.",
  "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
  "choices": [
    "Recovered with feedback",
    "State unrecovered",
    "Feedback missing",
    "Not optimistic",
    "Need failure path"
  ],
  "actions": {
    "Recovered with feedback": {
      "action": "preview_jev_optimistic_rejection_recovery",
      "payload": {
        "decision": "Recovered with feedback"
      },
      "pending": true
    },
    "State unrecovered": {
      "action": "preview_jev_optimistic_rejection_recovery",
      "payload": {
        "decision": "State unrecovered"
      },
      "pending": true
    },
    "Feedback missing": {
      "action": "preview_jev_optimistic_rejection_recovery",
      "payload": {
        "decision": "Feedback missing"
      },
      "pending": true
    },
    "Not optimistic": {
      "action": "preview_jev_optimistic_rejection_recovery",
      "payload": {
        "decision": "Not optimistic"
      },
      "pending": true
    },
    "Need failure path": {
      "action": "preview_jev_optimistic_rejection_recovery",
      "payload": {
        "decision": "Need failure path"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Restore and explain",
      "expected": "Recovered with feedback",
      "request": {
        "context": "{\n  \"task\": \"Inspect how an optimistic interface handles state and feedback after a rejected server operation.\",\n  \"evidence\": {\n    \"before\": \"Server count is 4. UI temporarily displays 5 before the save resolves.\",\n    \"failure\": \"The complete rejection handler restores 4 and displays a save-failed message.\",\n    \"owner\": \"This handler owns the displayed count; no other writer runs.\"\n  }\n}",
        "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
        "choices": [
          "Recovered with feedback",
          "State unrecovered",
          "Feedback missing",
          "Not optimistic",
          "Need failure path"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Error without rollback",
      "expected": "State unrecovered",
      "request": {
        "context": "{\n  \"task\": \"Inspect how an optimistic interface handles state and feedback after a rejected server operation.\",\n  \"evidence\": {\n    \"before\": \"The UI shows an unconfirmed new title before the server responds.\",\n    \"failure\": \"The complete rejection handler shows an error but leaves the new title visible.\",\n    \"owner\": \"No framework, query cache or other handler restores the title.\"\n  }\n}",
        "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
        "choices": [
          "Recovered with feedback",
          "State unrecovered",
          "Feedback missing",
          "Not optimistic",
          "Need failure path"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Silent rollback",
      "expected": "Feedback missing",
      "request": {
        "context": "{\n  \"task\": \"Inspect how an optimistic interface handles state and feedback after a rejected server operation.\",\n  \"evidence\": {\n    \"before\": \"A temporary liked state is shown before server acceptance.\",\n    \"failure\": \"The complete rejection path restores the server’s unliked state and supplies no visible failure feedback.\",\n    \"owner\": \"No separate error provider is used.\"\n  }\n}",
        "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
        "choices": [
          "Recovered with feedback",
          "State unrecovered",
          "Feedback missing",
          "Not optimistic",
          "Need failure path"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Wait for success",
      "expected": "Not optimistic",
      "request": {
        "context": "{\n  \"task\": \"Inspect how an optimistic interface handles state and feedback after a rejected server operation.\",\n  \"evidence\": {\n    \"before\": \"The displayed value stays unchanged during the request.\",\n    \"failure\": \"On rejection it stays unchanged and shows an error.\",\n    \"success\": \"Only a confirmed successful response changes the displayed value.\"\n  }\n}",
        "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
        "choices": [
          "Recovered with feedback",
          "State unrecovered",
          "Feedback missing",
          "Not optimistic",
          "Need failure path"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Framework owner shown",
      "expected": "Recovered with feedback",
      "request": {
        "context": "{\n  \"task\": \"Inspect how an optimistic interface handles state and feedback after a rejected server operation.\",\n  \"evidence\": {\n    \"before\": \"A temporary view overlays server state during the action.\",\n    \"failure\": \"The supplied provider implementation removes that temporary view on rejection, revealing unchanged server state, and mounts the failure message.\",\n    \"owner\": \"The provider owns both overlay lifetime and error message; implementation is included in the description.\"\n  }\n}",
        "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
        "choices": [
          "Recovered with feedback",
          "State unrecovered",
          "Feedback missing",
          "Not optimistic",
          "Need failure path"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Library name only",
      "expected": "Need failure path",
      "request": {
        "context": "{\n  \"task\": \"Inspect how an optimistic interface handles state and feedback after a rejected server operation.\",\n  \"evidence\": {\n    \"before\": \"The component imports an optimistic update library.\",\n    \"failure\": null,\n    \"owner\": \"Only the library name is supplied.\"\n  }\n}",
        "question": "Inspect the optimistic state, authoritative state and complete rejection path. Recovered with feedback: rejection restores truthful state and shows the failure. State unrecovered: rejection leaves the unconfirmed change visible, even with an error. Feedback missing: state recovers but no failure feedback is provided. Not optimistic: visible change waits for server success. Need failure path: ownership or handling is missing or conflicting; a library name alone is insufficient.",
        "choices": [
          "Recovered with feedback",
          "State unrecovered",
          "Feedback missing",
          "Not optimistic",
          "Need failure path"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
