{"record":{"id":"e4c8d60ce3d24319","repo":"paperclipai/paperclip","slug":"configuration-incomplete-requiredscopedenvbindi-e4c8d6","errorCode":null,"errorMessage":"configuration incomplete: ${requiredScopedEnvBinding.remediation}; ${detail}","messagePattern":"configuration incomplete: (.+?); (.+?)","errorType":"validation","errorClass":"ConfigurationIncompleteFailure","httpStatus":null,"severity":"error","filePath":"server/src/services/heartbeat.ts","lineNumber":1045,"sourceCode":"function readTaskDrain(now: Date): { startedAt: Date; expiresAt: Date | null } | null {\n  if (taskDrainState && taskDrainState.expiresAt !== null && taskDrainState.expiresAt.getTime() <= now.getTime()) {\n    taskDrainState = null;\n  }\n  return taskDrainState;\n}\n\n/** Compute the drain a start call would apply, without changing state. */\nexport function computeTaskDrain(opts: { ttlMs?: number | null } = {}): { startedAt: Date; expiresAt: Date | null } {\n  const startedAt = new Date();\n  const ttlMs = opts.ttlMs ?? null;\n  const expiresAt = ttlMs === null ? null : new Date(startedAt.getTime() + ttlMs);\n  return { startedAt, expiresAt };\n}\n\n/** Assign the given drain as the current task-drain state. */\nexport function applyTaskDrain(drain: { startedAt: Date; expiresAt: Date | null }): void {\n  taskDrainState = drain;\n}\n\nexport function startTaskDrain(opts: { ttlMs?: number | null } = {}): { startedAt: Date; expiresAt: Date | null } {\n  const drain = computeTaskDrain(opts);\n  applyTaskDrain(drain);\n  return drain;\n}\n\nexport function stopTaskDrain(): { wasActive: boolean } {\n  const wasActive = readTaskDrain(new Date()) !== null;\n  taskDrainState = null;\n  return { wasActive };\n}\n\n/**\n * Report the task-drain state for this process only. `activeRuns` and\n * `pendingWakes` count in-process work. A process restart clears both\n * counters, even when the database still holds `running` rows for runs\n * this process did not finish.","sourceCodeStart":1027,"sourceCodeEnd":1063,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/server/src/services/heartbeat.ts#L1027-L1063","documentation":"Configuration-incomplete sentinel in heartbeat run preparation: scoped-env analysis found missing bindings that intersect the requiredScopedEnvBinding's required keys/scopes (detail enumerates them). The run fails with the binding spec's remediation plus the specific missing-binding detail so the operator knows exactly which secrets to add.","triggerScenarios":"Thrown at server/src/services/heartbeat.ts:1041 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Apply the remediation and additional detail in the message to complete the configuration."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}