{"record":{"id":"8c2bfba4265d64d0","repo":"paperclipai/paperclip","slug":"name-exceeds-the-hard-paperclip-ingestion-cap-o","errorCode":null,"errorMessage":"${name} exceeds the hard Paperclip ingestion cap of ${max} characters.","messagePattern":"(.+?) exceeds the hard Paperclip ingestion cap of (.+?) characters\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":490,"sourceCode":"    requireEnabledProfile: options.requireEnabledProfile,\n  });\n  if (!decision.allowed) throw new Error(decision.message);\n  return decision.space;\n}\n\nfunction assertPaperclipSourceScopePayload(input: { projectId?: string | null; rootIssueId?: string | null }) {\n  if (input.projectId && input.rootIssueId) {\n    throw new Error(\"Paperclip source scope must specify either projectId or rootIssueId, not both.\");\n  }\n}\n\nfunction assertRequestedCharacterLimit(name: string, value: unknown, max: number) {\n  if (value == null) return;\n  if (typeof value !== \"number\" || !Number.isFinite(value) || value < 1) {\n    throw new Error(`${name} must be a positive number.`);\n  }\n  if (Math.floor(value) > max) {\n    throw new Error(`${name} exceeds the hard Paperclip ingestion cap of ${max} characters.`);\n  }\n}\n\nfunction stableSpaceId(input: { companyId: string; wikiId: string; slug: string }): string {\n  const hex = createHash(\"md5\")\n    .update(`${input.companyId}:${input.wikiId}:${input.slug}`)\n    .digest(\"hex\");\n  return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-4${hex.slice(13, 16)}-8${hex.slice(17, 20)}-${hex.slice(20, 32)}`;\n}\n\nfunction normalizeLimit(value: unknown, fallback: number, max: number): number {\n  if (typeof value !== \"number\" || !Number.isFinite(value)) return fallback;\n  return Math.max(1, Math.min(max, Math.floor(value)));\n}\n\nfunction contentHash(contents: string): string {\n  return createHash(\"sha256\").update(contents, \"utf8\").digest(\"hex\");\n}","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L472-L508","documentation":"Error \"${name} exceeds the hard Paperclip ingestion cap of ${max} characters.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:491 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the named value to at most the reported hard cap."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}