{"record":{"id":"63b28151bd7fc7b4","repo":"deepseek-ai/deepseek-harness","slug":"goal-change-operation-does-not-preserve-the-cur","errorCode":null,"errorMessage":"goal ${change.operation} does not preserve the current counters and timestamps","messagePattern":"goal (.+?) does not preserve the current counters and timestamps","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/fold.ts","lineNumber":212,"sourceCode":"  if (next.id !== current.id || next.revision !== current.revision + 1) {\n    throw new Error(`goal ${operation} must advance the current goal by one revision`)\n  }\n}\n\n/** Validate one non-create snapshot operation against the preceding projection. */\nfunction validateSnapshotTransition(\n  state: GoalFoldState,\n  change: GoalSnapshotChangeMeta,\n  current: GoalSnapshot,\n): void {\n  const next = change.goal\n  requireNextRevision(current, next, change.operation)\n  /* v8 ignore next -- a current goal established by this fold always has an updatedAt */\n  if (state.updatedAt === undefined) throw new Error('current goal fold lacks updatedAt')\n  if (change.createdAt !== state.createdAt\n    || change.updatedAt < state.updatedAt\n    || change.roundsStarted !== state.roundsStarted) {\n    throw new Error(`goal ${change.operation} does not preserve the current counters and timestamps`)\n  }\n  switch (change.operation) {\n    case 'edit':\n      if (next.phase !== current.phase\n        || JSON.stringify(next.blockedReason) !== JSON.stringify(current.blockedReason)) {\n        throw new Error('goal edit cannot change phase or blocked reason')\n      }\n      break\n    case 'pause':\n      requireSameDefinition(current, next, change.operation)\n      if (current.phase !== 'active' || next.phase !== 'paused') throw new Error('goal pause has an invalid phase transition')\n      break\n    case 'resume': {\n      requireSameDefinition(current, next, change.operation)\n      const resumable: ReadonlySet<GoalPhase> = new Set([\n        'active',\n        'paused',\n        'blocked',","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/fold.ts#L194-L230","documentation":"Error \"goal ${change.operation} does not preserve the current counters and timestamps\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/fold.ts:212 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"}