{"record":{"id":"80a2d729c6f24732","repo":"paperclipai/paperclip","slug":"managed-workspace-readiness-gate-could-not-resolve","errorCode":null,"errorMessage":"Managed workspace readiness gate could not resolve a health URL","messagePattern":"Managed workspace readiness gate could not resolve a health URL","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/workspace-runtime.ts","lineNumber":6015,"sourceCode":"        // Carry the reason, not just the code: a bare `listener_ownership_mismatch`\n        // in the operation log is what made PAP-17254 undiagnosable (PAP-17256).\n        const code = provisioned.status.lastError ?? \"unknown error\";\n        throw new Error(\n          `HTTPS exposure failed: ${code}${provisioned.errorDetail ? ` — ${provisioned.errorDetail}` : \"\"}`,\n        );\n      }\n    }\n    // Transport readiness only proves a listener answered. A managed workspace\n    // must additionally satisfy the protected readiness contract — own database,\n    // cloned rows, login handoff, and matching instance/workspace identity —\n    // before it may be published as running/healthy (PAP-17572).\n    if (managedWorkspaceIdentity) {\n      const publishHealthUrl = resolveRuntimeServiceHealthUrl(\n        record.port ? `http://127.0.0.1:${record.port}` : rewriteUrlHostToLoopback(record.url ?? backendUrl),\n        { serviceName, command },\n      );\n      if (!publishHealthUrl) {\n        throw new Error(\"Managed workspace readiness gate could not resolve a health URL\");\n      }\n      let gate = await waitForManagedWorkspaceReadiness({\n        healthUrl: publishHealthUrl,\n        identity: managedWorkspaceIdentity,\n      });\n      if (gate.ok) {\n        if (!record.db) {\n          throw new Error(\"Managed workspace readiness gate could not resolve the control-plane database\");\n        }\n        gate = await probeManagedWorkspaceHandoffSubjects({\n          db: record.db,\n          healthUrl: publishHealthUrl,\n          identity: managedWorkspaceIdentity,\n        });\n      }\n      if (!gate.ok) {\n        logManagedWorkspaceReadinessRejection({\n          executionWorkspaceId: managedWorkspaceIdentity.executionWorkspaceId,","sourceCodeStart":5997,"sourceCodeEnd":6033,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/workspace-runtime.ts#L5997-L6033","documentation":"The managed-workspace publish path could not derive a health URL for the service (record port/url and serviceName/command yielded no resolvable probe URL), so the readiness gate cannot even probe the workspace before publishing it.","triggerScenarios":"Thrown at server/src/services/workspace-runtime.ts:6015 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the runtime service config exposes a url or port for the service","Verify the service command names a health endpoint resolvable by resolveRuntimeServiceHealthUrl","Inspect the workspace runtime config for a missing serviceName/command mapping","Re-run provisioning after correcting the service definition"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-21T17:58:32.592Z","contentChangedAt":"2026-08-21T17:58:32.592Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}