{"record":{"id":"08f17fd31668734c","repo":"paperclipai/paperclip","slug":"workspace-is-not-ready-to-publish-gate-reason","errorCode":null,"errorMessage":"Workspace is not ready to publish (${gate.reason}${gate.detail ? `: ${gate.detail}` : \"\"})","messagePattern":"Workspace is not ready to publish \\((.+?)(.+?)` : \"\"\\}\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/workspace-runtime.ts","lineNumber":6038,"sourceCode":"      });\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,\n          healthUrl: publishHealthUrl,\n          result: gate,\n        });\n        if (shouldBlockPublicationOnReadiness(gate)) {\n          throw new Error(\n            `Workspace is not ready to publish (${gate.reason}${gate.detail ? `: ${gate.detail}` : \"\"})`,\n          );\n        }\n      }\n    }\n    record.status = \"running\";\n    record.healthStatus = \"healthy\";\n    record.lastUsedAt = new Date().toISOString();\n    record.stoppedAt = null;\n    const serviceOutputExcerpt = await readServiceOutputExcerpt();\n    if (serviceOutputExcerpt && input.onLog) {\n      await input.onLog(\"stdout\", `[service:${serviceName}] ${serviceOutputExcerpt}`);\n    }\n    await touchLocalServiceRegistryRecord(record.serviceKey, {\n      runtimeServiceId: record.id,\n      lastSeenAt: record.lastUsedAt,\n    });\n  }).catch(async (err) => {","sourceCodeStart":6020,"sourceCodeEnd":6056,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/workspace-runtime.ts#L6020-L6056","documentation":"The protected managed-workspace readiness gate (own database, cloned rows, login handoff, identity match) evaluated to not-ok; the workspace is refused publishing as running/healthy and the rejection is logged with gate reason/detail.","triggerScenarios":"Thrown at server/src/services/workspace-runtime.ts:6038 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the logged gate.reason/gate.detail to identify which readiness subject failed","Fix the failing subject (database clone, login handoff, identity match) and let the readiness probe re-run","Verify workspace and instance identity fields agree","Re-provision the workspace if cloned rows are missing"],"exampleFix":null,"handlingStrategy":"retry","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-14T00:17:10.932Z"}