{"record":{"id":"17cc9dddea5363ff","repo":"deepseek-ai/deepseek-harness","slug":"terminal-bash-name-must-be-a-positive-safe-int","errorCode":null,"errorMessage":"terminal-bash: ${name} must be a positive safe integer","messagePattern":"terminal-bash: (.+?) must be a positive safe integer","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/terminal/terminal-bash/src/config.ts","lineNumber":113,"sourceCode":"  exactProbeAfterMs: z.number().default(150),\n  idleSilenceMs: z.number().default(3_000),\n  handoffGraceMs: z.number().default(500),\n  timeoutMs: z.number().default(30_000),\n  disposeGraceMs: z.number().default(3_000),\n})\n\n/**\n * Assert every effective numeric config field is a positive safe integer and bounds compose.\n * @param config - Schemastery-resolved plugin configuration.\n * @returns Narrows the input to the fully resolved configuration.\n */\nexport function validateConfig(config: Config): asserts config is ResolvedConfig {\n  const resolved = config as ResolvedConfig\n  if (resolved.backendType.length === 0) throw new Error('terminal-bash: backendType must be non-empty')\n  if (resolved.shellPath.length === 0) throw new Error('terminal-bash: shellPath must be non-empty')\n  for (const [name, value] of Object.entries(resolved)) {\n    if (typeof value === 'number' && (!Number.isSafeInteger(value) || value <= 0)) {\n      throw new Error(`terminal-bash: ${name} must be a positive safe integer`)\n    }\n  }\n  if (resolved.maxReadBytes > resolved.scrollbackMaxBytes) {\n    throw new Error('terminal-bash: maxReadBytes must not exceed scrollbackMaxBytes')\n  }\n  if (resolved.handoffGraceMs < resolved.pollIntervalMs) {\n    throw new Error('terminal-bash: handoffGraceMs must be at least pollIntervalMs so one readiness poll runs inside the grace window')\n  }\n}\n","sourceCodeStart":95,"sourceCodeEnd":123,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/terminal/terminal-bash/src/config.ts#L95-L123","documentation":"Error \"terminal-bash: ${name} must be a positive safe integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/terminal/terminal-bash/src/config.ts:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the named option to a positive safe integer."],"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"}