{"record":{"id":"047797a975d818d4","repo":"JuliusBrussee/caveman","slug":"cave-async-jobs-unavailable-job-execution-is-durable","errorCode":"cave_async_jobs_unavailable","errorMessage":"Async job execution is unavailable: durable encrypted request storage, provider credential custody, and a draining worker are not wired. No job was submitted.","messagePattern":"Async job execution is unavailable: durable encrypted request storage, provider credential custody, and a draining worker are not wired\\. No job was submitted\\.","errorType":"error_code","errorClass":"AsyncJobsUnavailableError","httpStatus":null,"severity":"warning","filePath":"packages/sdk/python/caveman_cloud/core.py","lineNumber":1451,"sourceCode":"        super().__init__(\n            \"Async job execution is unavailable: durable encrypted request storage, \"\n            \"provider credential custody, and a draining worker are not wired. No job was submitted.\"\n        )\n\n\nclass JobsClient:\n    \"\"\"Reserved async-job surface that fails locally before network I/O.\"\"\"\n\n    def __init__(self, cave: Cave) -> None:\n        self.cave = cave\n\n    def submit(\n        self,\n        body: dict[str, Any],\n        *,\n        latency_class: str = \"background\",\n    ) -> Job:\n        raise AsyncJobsUnavailableError\n\n    def status(self, job_id: str) -> Job:\n        raise AsyncJobsUnavailableError\n\n    def cancel(self, job_id: str) -> dict[str, Any]:\n        raise AsyncJobsUnavailableError\n\n    def wait(\n        self,\n        job_id: str,\n        *,\n        interval_s: float = 0.5,\n        timeout_s: float = 60.0,\n    ) -> Job:\n        raise AsyncJobsUnavailableError\n\n    def submit_and_wait(\n        self,","sourceCodeStart":1433,"sourceCodeEnd":1469,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/packages/sdk/python/caveman_cloud/core.py#L1433-L1469","documentation":"`_AsyncJobs.submit()` is intentionally not implemented: the backend prerequisites (durable encrypted request storage, provider credential custody, and a draining worker) are not wired, so the method unconditionally raises `AsyncJobsUnavailableError` (code `cave_async_jobs_unavailable`). No network request is made and no job is ever created.","triggerScenarios":"Calling `client.async_jobs.submit(body, latency_class=\"background\")` (any arguments) on any deployment of this SDK version.","commonSituations":"Migrating a batch pipeline that assumed async submission exists, or following documentation for a newer/other SDK release where async jobs are available.","solutions":["Use the synchronous request path (`client.request(...)` or the equivalent completion call) instead of submitting a background job.","Implement your own queue (e.g. persist requests and process them in a worker you control) until async jobs ship.","Check for an SDK/gateway update that wires async jobs, and feature-detect before relying on it.","Catch `AsyncJobsUnavailableError` and fall back to synchronous execution with your own retry policy."],"exampleFix":"// before\njob = client.async_jobs.submit(body)\n// after\ntry:\n    job = client.async_jobs.submit(body)\nexcept AsyncJobsUnavailableError:\n    result = client.request(body)  # synchronous fallback","handlingStrategy":"try-catch","validationCode":"if isinstance(client.async_jobs.submit, type(lambda *a, **k: (_ for _ in ()).throw(AsyncJobsUnavailableError()))):\n    pass  # simpler: wrap the call and catch — the feature is version-gated, not detectable upfront","typeGuard":"def async_jobs_available(client) -> bool:\n    try:\n        client.async_jobs.submit({})\n    except AsyncJobsUnavailableError:\n        return False\n    except Exception:\n        return True  # reachable endpoint means feature exists\n    return True","tryCatchPattern":"try:\n    job = client.async_jobs.submit(body, latency_class=\"background\")\nexcept AsyncJobsUnavailableError:\n    log.warning(\"async jobs unavailable; running synchronously\")\n    result = client.request(body)","preventionTips":["Feature-detect or version-gate async job usage behind a config flag.","Never assume background submission exists; design the pipeline to work synchronously.","Check release notes when upgrading the SDK before enabling async paths."],"tags":["python","not-implemented","async-jobs","feature-gap"],"backgroundTag":"feature-not-enabled","analyzedSha":"3ee70a102609e550bd2e68004bf5990a9341c851","analyzedAt":"2026-09-20T15:53:39.229Z","contentChangedAt":"2026-09-20T15:53:39.229Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}