{"record":{"id":"94ffd4e8db676ae2","repo":"stablyai/orca","slug":"no-opencode-terminal-perf-annotations-found-in-the","errorCode":null,"errorMessage":"No opencode terminal perf annotations found in the provided reports","messagePattern":"No opencode terminal perf annotations found in the provided reports","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/generate-terminal-perf-html-report.mjs","lineNumber":460,"sourceCode":"  // Why: older callers (the scale report gate) pass bare inputPaths.\n  const resolvedInputs =\n    inputs ??\n    (inputPaths ?? []).map((path) => ({\n      label: basename(path).replace(/\\.json$/i, ''),\n      path\n    }))\n  const revisions = resolvedInputs.map(({ label, path }) => {\n    const report = readJsonReport(path)\n    return {\n      label,\n      path,\n      stats: report.stats ?? null,\n      rows: collectTerminalPerfRows(report, label)\n    }\n  })\n  const totalRows = revisions.reduce((sum, revision) => sum + revision.rows.length, 0)\n  if (totalRows === 0) {\n    throw new Error('No opencode terminal perf annotations found in the provided reports')\n  }\n  const html = renderHtml({ generatedAt: now.toISOString(), revisions })\n  mkdirSync(dirname(outputPath), { recursive: true })\n  writeFileSync(outputPath, html)\n  const latestFailures = revisions\n    .at(-1)\n    .rows.reduce((sum, row) => sum + budgetFailures(row).length, 0)\n  return { outputPath, rowCount: totalRows, budgetFailureCount: latestFailures }\n}\n\nconst isMain = process.argv[1] && import.meta.filename === process.argv[1]\nif (isMain) {\n  try {\n    const { inputs, outputPath } = parseHtmlReportArgs(process.argv.slice(2))\n    const result = generateTerminalPerfHtmlReport({ inputs, outputPath })\n    console.log(\n      `Terminal perf HTML report saved to ${result.outputPath} (${result.rowCount} rows, ${result.budgetFailureCount} budget failures).`\n    )","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/generate-terminal-perf-html-report.mjs#L442-L478","documentation":"Thrown by generateTerminalPerfHtmlReport when, after reading and parsing all input reports via collectTerminalPerfRows, the total number of collected scenario rows across all revisions is zero. The script only recognizes rows carrying the opencode terminal perf annotations; reports without them yield no rows (generate-terminal-perf-html-report.mjs:458-461).","triggerScenarios":"Passing a Playwright JSON report that has no opencode terminal perf annotations (e.g., a different suite, or annotations stripped by a reporter transform); passing reports from a test config that did not emit the perf annotation steps; passing a non-Playwright JSON.","commonSituations":"Pointing the generator at a generic Playwright report from a non-terminal-perf suite; a refactor that renamed or removed the annotation attachments; a report produced by an older/newer test version with a different annotation key.","solutions":["Confirm the input reports come from the terminal-perf Playwright suite that emits opencode- prefixed annotations.","Open a report JSON and search for the annotation attachment type; if absent, re-run the correct perf suite.","If the annotation key changed, update collectTerminalPerfRows or regenerate reports with the current suite."],"exampleFix":"// before: report from a non-perf suite -> 0 rows\ngenerateTerminalPerfHtmlReport({ inputs: [{ label: 'x', path: 'unit-report.json' }], outputPath: 'o.html' })\n// after: report from the terminal-perf suite\n//   generateTerminalPerfHtmlReport({ inputs: [{ label: 'v2', path: 'terminal-perf.json' }], outputPath: 'o.html' })","handlingStrategy":"validation","validationCode":"import { collectTerminalPerfRows } from './terminal-perf-report-annotations.mjs'\nconst report = JSON.parse(readFileSync(path, 'utf8'))\nif (collectTerminalPerfRows(report, 'check').length === 0) {\n  throw new Error(`${path} has no opencode terminal perf annotations`)\n}","typeGuard":"function reportHasTerminalPerfAnnotations(report) {\n  return collectTerminalPerfRows(report, 'check').length > 0\n}","tryCatchPattern":"try {\n  generateTerminalPerfHtmlReport({ inputs, outputPath })\n} catch (error) {\n  if (/No opencode terminal perf annotations/.test(error.message)) {\n    // wrong report source; point at the terminal-perf suite output\n  } else throw error\n}","preventionTips":["Confirm input reports originate from the terminal-perf Playwright suite that emits opencode- annotations.","Spot-check a report JSON for the expected annotation attachment before bulk processing."],"tags":["data-validation","benchmark","playwright"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}