{"record":{"id":"d61c56ef9ec504c8","repo":"deepseek-ai/deepseek-harness","slug":"message-feedback-maxnotebytes-must-be-a-positive","errorCode":null,"errorMessage":"message-feedback: maxNoteBytes must be a positive safe integer, got ${String(value)}","messagePattern":"message-feedback: maxNoteBytes must be a positive safe integer, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/feedback/message-feedback/src/index.ts","lineNumber":66,"sourceCode":"/** Required deployment policy for optional notes. */\nexport interface Config {\n  /** Maximum UTF-8 byte length accepted for one note. */\n  readonly maxNoteBytes: number\n}\n\ndeclare module '@deepseek-ai/cordis' {\n  interface Context {\n    messageFeedback: MessageFeedbackService\n  }\n}\n\n/** Immutable empty list reused only as an input to caller-owned copying. */\nconst EMPTY_ITEMS: readonly MessageFeedbackItem[] = Object.freeze([])\n\n/** Validate the one deployment-varying limit at the configuration boundary. */\nfunction resolveMaxNoteBytes(value: number): number {\n  if (!Number.isSafeInteger(value) || value < 1) {\n    throw new TypeError(\n      `message-feedback: maxNoteBytes must be a positive safe integer, got ${String(value)}`,\n    )\n  }\n  return value\n}\n\n/** Copy and freeze one item before it crosses the service boundary. */\nfunction snapshotItem(item: MessageFeedbackItem): MessageFeedbackItem {\n  return Object.freeze({\n    messageId: item.messageId,\n    rating: item.rating,\n    ...(item.note === undefined ? {} : { note: item.note }),\n    version: item.version,\n    createdAt: item.createdAt,\n    updatedAt: item.updatedAt,\n  })\n}\n","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/feedback/message-feedback/src/index.ts#L48-L84","documentation":"Error \"message-feedback: maxNoteBytes must be a positive safe integer, got ${String(value)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/feedback/message-feedback/src/index.ts:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}