{"record":{"id":"eaa153af076e34d6","repo":"deepseek-ai/deepseek-harness","slug":"goal-invalid-max-rounds","errorCode":"GOAL_INVALID_MAX_ROUNDS","errorMessage":"maxGoalRounds must be a positive safe integer","messagePattern":"maxGoalRounds must be a positive safe integer","errorType":"exception","errorClass":"GoalError","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/index.ts","lineNumber":144,"sourceCode":"\n/** Process-local cache plus activation intent crossing the synchronous append boundary. */\ninterface GoalCache {\n  readonly state: GoalFoldState\n  activation: GoalActivation\n  observedSeq: number\n  pendingActivation: { readonly seq: number; readonly activation: GoalActivation } | undefined\n}\n\n/** Validated create input with every deployment default materialized. */\ninterface ResolvedCreateGoal {\n  readonly objective: string\n  readonly maxGoalRounds: number\n}\n\n/** Validate a caller-visible positive safe-integer round cap. */\nfunction resolveMaxGoalRounds(value: number): number {\n  if (!Number.isSafeInteger(value) || value < 1) {\n    throw new GoalError('maxGoalRounds must be a positive safe integer', 'GOAL_INVALID_MAX_ROUNDS')\n  }\n  return value\n}\n\n/** Validate and normalize an objective at the domain boundary. */\nfunction resolveObjective(value: string): string {\n  if (typeof value !== 'string' || value.trim().length === 0) {\n    throw new GoalError('goal objective must be a non-empty string', 'GOAL_INVALID_OBJECTIVE')\n  }\n  return value.trim()\n}\n\n/** Materialize deployment defaults and validate one create request. */\nfunction resolveCreateGoal(request: CreateGoalRequest, defaultMaxGoalRounds: number): ResolvedCreateGoal {\n  return {\n    objective: resolveObjective(request.objective),\n    maxGoalRounds: resolveMaxGoalRounds(request.maxGoalRounds ?? defaultMaxGoalRounds),\n  }","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/index.ts#L126-L162","documentation":"Error \"maxGoalRounds must be a positive safe integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/index.ts:144 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"}