{"record":{"id":"e2037943c6808ace","repo":"deepseek-ai/deepseek-harness","slug":"goal-clear-tombstone-id-must-be-a-non-empty-string","errorCode":null,"errorMessage":"goal clear tombstone id must be a non-empty string","messagePattern":"goal clear tombstone id must be a non-empty string","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/fold.ts","lineNumber":123,"sourceCode":"    throw new Error(`goal change goal for phase ${phase} must have exactly ${expectedKeys} fields`)\n  }\n  return {\n    id: GoalId(value['id']),\n    revision: positiveInteger(value['revision'], 'goal.revision'),\n    objective: value['objective'],\n    phase,\n    maxGoalRounds: positiveInteger(value['maxGoalRounds'], 'goal.maxGoalRounds'),\n    ...phase === 'blocked' ? { blockedReason: decodeBlockReason(value['blockedReason']) } : {},\n  }\n}\n\n/** Decode and validate one ref. */\nfunction decodeRef(value: unknown): GoalRef {\n  if (!isRecord(value) || Object.keys(value).sort().join(',') !== 'id,revision') {\n    throw new Error('goal clear tombstone must have exactly id and revision fields')\n  }\n  if (typeof value['id'] !== 'string' || value['id'].length === 0) {\n    throw new Error('goal clear tombstone id must be a non-empty string')\n  }\n  return { id: GoalId(value['id']), revision: positiveInteger(value['revision'], 'cleared.revision') }\n}\n\n/**\n * Decode a value that declares itself as a goal change. Unrelated values\n * return `undefined`; malformed goal changes fail replay loudly.\n * @param value - candidate source change.\n * @returns validated goal change or `undefined` for another value kind.\n */\nexport function decodeGoalChange(value: unknown): GoalChangeMeta | undefined {\n  if (!isRecord(value) || value['kind'] !== 'goal/change') return undefined\n  if (value['version'] !== GOAL_CHANGE_VERSION) {\n    throw new Error(`unsupported goal change version ${String(value['version'])}`)\n  }\n  if (value['operation'] === 'clear') {\n    const allowed = ['cleared', 'clearedAt', 'kind', 'operation', 'version']\n    if (Object.keys(value).sort().join(',') !== allowed.sort().join(',')) {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/fold.ts#L105-L141","documentation":"Error \"goal clear tombstone id must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/fold.ts:123 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"}