{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.",
  "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
  "choices": [
    "Reauth",
    "Changed",
    "Transient",
    "Unclear"
  ],
  "actions": {
    "Reauth": {
      "action": "preview_jev_integration_setup_failure",
      "payload": {
        "decision": "Reauth"
      },
      "pending": true
    },
    "Changed": {
      "action": "preview_jev_integration_setup_failure",
      "payload": {
        "decision": "Changed"
      },
      "pending": true
    },
    "Transient": {
      "action": "preview_jev_integration_setup_failure",
      "payload": {
        "decision": "Transient"
      },
      "pending": true
    },
    "Unclear": {
      "action": "preview_jev_integration_setup_failure",
      "payload": {
        "decision": "Unclear"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Short timeout retry",
      "expected": "Transient",
      "request": {
        "context": "{\n  \"task\": \"Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.\",\n  \"evidence\": {\n    \"reason\": \"Hub request timed out.\",\n    \"configState\": \"setup retry\",\n    \"durationBucket\": \"less than a day\"\n  }\n}",
        "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
        "choices": [
          "Reauth",
          "Changed",
          "Transient",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Revoked token",
      "expected": "Reauth",
      "request": {
        "context": "{\n  \"task\": \"Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.\",\n  \"evidence\": {\n    \"reason\": \"Authentication failed: saved token revoked.\",\n    \"configState\": \"setup retry\",\n    \"durationBucket\": \"1 to 6 days\"\n  }\n}",
        "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
        "choices": [
          "Reauth",
          "Changed",
          "Transient",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Service retired",
      "expected": "Changed",
      "request": {
        "context": "{\n  \"task\": \"Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.\",\n  \"evidence\": {\n    \"reason\": \"This cloud service was permanently discontinued; this endpoint is no longer supported.\",\n    \"configState\": \"setup error\",\n    \"durationBucket\": \"1 to 6 days\"\n  }\n}",
        "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
        "choices": [
          "Reauth",
          "Changed",
          "Transient",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Long timeout",
      "expected": "Changed",
      "request": {
        "context": "{\n  \"task\": \"Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.\",\n  \"evidence\": {\n    \"reason\": \"Device is unreachable.\",\n    \"configState\": \"setup retry\",\n    \"durationBucket\": \"longer than 4 weeks\"\n  }\n}",
        "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
        "choices": [
          "Reauth",
          "Changed",
          "Transient",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Stopped trying",
      "expected": "Changed",
      "request": {
        "context": "{\n  \"task\": \"Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.\",\n  \"evidence\": {\n    \"reason\": \"Service request timed out.\",\n    \"configState\": \"setup error\",\n    \"durationBucket\": \"less than a day\"\n  }\n}",
        "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
        "choices": [
          "Reauth",
          "Changed",
          "Transient",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Unexplained failure",
      "expected": "Unclear",
      "request": {
        "context": "{\n  \"task\": \"Classify an integration’s reported setup failure from explicit reason text, retry state and precomputed duration bucket.\",\n  \"evidence\": {\n    \"reason\": \"Unknown error.\",\n    \"configState\": \"setup retry\",\n    \"durationBucket\": \"1 to 6 days\"\n  }\n}",
        "question": "Using the reported error, state and duration: Reauth for explicit invalid, expired or revoked credentials; Changed for an explicitly removed/unsupported service, or a timeout-type failure lasting over four weeks or stopped in setup error; Transient for a temporary timeout/offline/busy/rate-limit reason still in setup retry for at most four weeks. Use Unclear for vague, conflicting or missing evidence. Reauth takes priority over timeout wording. Duration is supplied, not calculated.",
        "choices": [
          "Reauth",
          "Changed",
          "Transient",
          "Unclear"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
