{"record":{"id":"f1d99c5a5c6f09d2","repo":"deepseek-ai/deepseek-harness","slug":"goal-resume-has-an-invalid-phase-transition-or-exh","errorCode":null,"errorMessage":"goal resume has an invalid phase transition or exhausted round budget","messagePattern":"goal resume has an invalid phase transition or exhausted round budget","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/fold.ts","lineNumber":233,"sourceCode":"    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',\n      ])\n      if (!resumable.has(current.phase) || next.phase !== 'active' || state.roundsStarted >= next.maxGoalRounds) {\n        throw new Error('goal resume has an invalid phase transition or exhausted round budget')\n      }\n      break\n    }\n    case 'complete':\n      requireSameDefinition(current, next, change.operation)\n      if (current.phase === 'complete' || next.phase !== 'complete') throw new Error('goal complete has an invalid phase transition')\n      break\n    case 'block':\n      requireSameDefinition(current, next, change.operation)\n      if (current.phase !== 'active' || next.phase !== 'blocked') throw new Error('goal block has an invalid phase transition')\n      break\n    /* v8 ignore start -- the caller excludes create and GoalOperation is closed; these arms retain fail-loud exhaustiveness */\n    case 'create':\n      throw new Error('goal create cannot be validated as a current-goal transition')\n    default:\n      change.operation satisfies never\n      throw new Error('unknown goal snapshot operation')\n    /* v8 ignore stop */","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/fold.ts#L215-L251","documentation":"Error \"goal resume has an invalid phase transition or exhausted round budget\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/fold.ts:233 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"}