{"record":{"id":"fb632947ee799697","repo":"JuliusBrussee/caveman","slug":"caveman-cloud-platform-is-still-in-beta","errorCode":null,"errorMessage":"Caveman Cloud platform is still in beta.","messagePattern":"Caveman Cloud platform is still in beta\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/index.ts","lineNumber":9666,"sourceCode":"      const body = await response.json().catch(() => null) as { error?: { code?: unknown } } | null;\n      const code = typeof body?.error?.code === \"string\" ? body.error.code : `HTTP ${response.status}`;\n      lastError = code;\n      // Invalid/expired grants are terminal. Infrastructure responses remain\n      // retryable so a committed ACK whose response was dropped can converge.\n      if (response.status < 500 && response.status !== 429) break;\n    } catch (error) {\n      lastError = error instanceof Error ? error.message : String(error);\n    }\n    if (attempt < 4) await sleep(Math.min(2000, 200 * 2 ** attempt));\n  }\n  throw new Error(`device credential delivery acknowledgement failed (${lastError}); credentials were persisted locally but the server may revoke them after the delivery window`);\n}\n\n// 0600 credentials file) — never in plaintext config. organization_id is bound\n// from the returned token, never from any local input.\n// Hosted login remains gated; explicit private instances use project access.\nfunction blockCloudLoginWhileBeta(): void {\n  throw new Error(\"Caveman Cloud platform is still in beta.\");\n}\n\nasync function login(argv: string[] = []) {\n  if (!argv.some((arg) => arg === \"--instance\" || arg.startsWith(\"--instance=\"))) blockCloudLoginWhileBeta();\n  const { noBrowser, instance } = validateLoginArgs(argv);\n  const baseURL = instance ?? resolveLoginBaseUrl(argv);\n\n  const codeResp = await fetch(`${baseURL}/api/v1/auth/device/code`, {\n    method: \"POST\",\n    redirect: \"error\",\n    headers: { \"content-type\": \"application/json\" },\n    body: \"{}\",\n    signal: AbortSignal.timeout(5000),\n  });\n  if (!codeResp.ok) throw new Error(`device authorization failed: HTTP ${codeResp.status}`);\n  const code = await codeResp.json();\n  if (!code.device_code) throw new Error(\"device authorization failed: missing device code\");\n","sourceCodeStart":9648,"sourceCodeEnd":9684,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/packages/cli/src/index.ts#L9648-L9684","documentation":"Caveman Cloud hosted login is gated while the platform is in beta. blockCloudLoginWhileBeta() unconditionally throws to block any `login` invocation that does not explicitly target a private instance via --instance. Explicit private instances bypass the gate.","triggerScenarios":"Running `caveman login` (or login()) without any --instance or --instance=... argument while the beta gate is active.","commonSituations":"Developer following pre-beta docs and running plain `login`; CI scripts that omit --instance; expecting hosted cloud login to work before the platform exits beta.","solutions":["Pass --instance=https://your-private-instance to target a private instance","Wait for the Caveman Cloud beta gate to be lifted, then run plain `login`","Check CLI release notes / docs for the current hosted-login availability"],"exampleFix":"// before\ncaveman login\n// after\ncaveman login --instance=https://caveman.example.com","handlingStrategy":"fallback","validationCode":"if (!process.argv.includes(\"--instance\") && !process.argv.some(a => a.startsWith(\"--instance=\"))) console.warn(\"Hosted login is beta-gated; pass --instance\");","typeGuard":null,"tryCatchPattern":"try { await login() } catch (e) { if (e.message.includes(\"still in beta\")) await login([\"--instance=\" + privateInstanceURL]); }","preventionTips":["Always pass --instance for private-instance logins","Track release notes for when hosted login exits beta","Script logins with the instance flag so automation never hits the gate"],"tags":["cli","feature-gate","beta"],"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"}