{"record":{"id":"ad8149714d96b043","repo":"deepseek-ai/deepseek-harness","slug":"ralph-workflow-returned-a-malformed-round-report","errorCode":null,"errorMessage":"Ralph workflow returned a malformed round report","messagePattern":"Ralph workflow returned a malformed round report","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflow/tool-ralph/src/index.ts","lineNumber":256,"sourceCode":"function normalizedText(value: unknown): value is string {\n  return typeof value === 'string' && value.length > 0 && value === value.trim()\n}\n\nfunction normalizedList(value: unknown): value is string[] {\n  return Array.isArray(value) && value.every(normalizedText)\n}\n\n/** Defensively decode the fixed script's report across a provider boundary. */\nfunction readReport(value: unknown, expectedStatus: RalphRoundStatus, maxChars: number): RalphRoundReport {\n  if (!isRecord(value)\n    || Object.keys(value).sort().join(',') !== 'blocker,evidence,nextSteps,status,summary'\n    || value['status'] !== expectedStatus\n    || !normalizedText(value['summary'])\n    || !normalizedList(value['evidence'])\n    || !normalizedList(value['nextSteps'])\n    || typeof value['blocker'] !== 'string'\n    || value['blocker'] !== value['blocker'].trim()) {\n    throw new Error('Ralph workflow returned a malformed round report')\n  }\n  const report: RalphRoundReport = {\n    status: expectedStatus,\n    summary: value['summary'],\n    evidence: value['evidence'],\n    nextSteps: value['nextSteps'],\n    blocker: value['blocker'],\n  }\n  if (expectedStatus === 'continue' && (report.nextSteps.length === 0 || report.blocker !== '')) {\n    throw new Error('Ralph workflow returned an invalid continuing report')\n  }\n  if (expectedStatus === 'complete'\n    && (report.evidence.length === 0 || report.nextSteps.length !== 0 || report.blocker !== '')) {\n    throw new Error('Ralph workflow returned an invalid completion report')\n  }\n  if (expectedStatus === 'blocked' && !normalizedText(report.blocker)) {\n    throw new Error('Ralph workflow returned an invalid blocked report')\n  }","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/tool-ralph/src/index.ts#L238-L274","documentation":"Error \"Ralph workflow returned a malformed round report\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/tool-ralph/src/index.ts:256 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the Ralph workflow provider so each round returns a report matching the round-report schema; inspect the malformed report in the session log."],"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"}