{"record":{"id":"3f2d2daad6473b6d","repo":"chenglou/pretext","slug":"corpus-taxonomy-report-was-missing-rows-for-meta","errorCode":null,"errorMessage":"Corpus taxonomy report was missing rows for ${meta.id}","messagePattern":"Corpus taxonomy report was missing rows for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/corpus-taxonomy.ts","lineNumber":237,"sourceCode":"  const report = await (async () => {\n    try {\n      return await loadPostedReport(\n        session,\n        url,\n        () => reportServer.waitForReport(null),\n        requestId,\n        browser,\n        timeoutMs,\n      )\n    } finally {\n      reportServer.close()\n    }\n  })()\n  if (report.status === 'error') {\n    throw new Error(`Corpus page returned error for ${meta.id}: ${report.message ?? 'unknown error'}`)\n  }\n  if (report.rows === undefined) {\n    throw new Error(`Corpus taxonomy report was missing rows for ${meta.id}`)\n  }\n\n  for (const row of report.rows) {\n    const diffPx = Math.round(row.diffPx)\n    if (diffPx === 0) continue\n\n    entries.push({\n      width: row.width,\n      diffPx,\n      category: classifyTaxonomy(row),\n      reason: row.firstBreakMismatch?.reasonGuess ?? 'no break diagnostic',\n      deltaText: row.firstBreakMismatch?.deltaText ?? '',\n    })\n  }\n\n  printEntries(entries)\n} finally {\n  session.close()","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/chenglou/pretext/blob/ac49b09b7d83ede19581fa94a8b892b07d309baf/scripts/corpus-taxonomy.ts#L219-L255","documentation":"Guard after the taxonomy report loads: status is not 'error' but `report.rows` is undefined. It prevents classifying a payload-less report as 'all exact'.","triggerScenarios":"The `/corpus` page posts `{status:'ready'}` with no `rows` — e.g., the widths list was empty after clamping, or the POST side channel truncated the payload.","commonSituations":"Corpus `min_width`/`max_width` clamps the range to nothing; transport truncation; a stale page build that doesn't attach rows.","solutions":["Confirm the corpus width range overlaps `--start`/`--end`/`--samples` so the widths list is non-empty.","Re-run; if persistent, open the `/corpus?id=...&widths=...&diagnostic=full&report=1` URL headed and inspect console errors.","Raise `--timeout` so a slow measurement completes before posting."],"exampleFix":"// before: corpus bounds exclude the whole target range\n// sources.json: { \"id\": \"x\", \"min_width\": 950 }\nbun run scripts/corpus-taxonomy.ts --id=x --start=300 --end=900\n// after\nbun run scripts/corpus-taxonomy.ts --id=x --start=900 --end=1200","handlingStrategy":"retry","validationCode":"const widths = getTargetWidths(meta, start, end, step, samples)\nif (widths.length === 0) {\n  console.error(`No widths in range for ${meta.id}; adjust --start/--end/--samples`)\n  process.exit(0)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm corpus min_width/max_width overlaps your target range/sample before running.","Keep --timeout generous so the page attaches rows before posting.","Inspect the headed /corpus URL when a ready-but-rowless report persists."],"tags":["corpus","taxonomy","browser-automation","report-transport"],"backgroundTag":null,"analyzedSha":"ac49b09b7d83ede19581fa94a8b892b07d309baf","analyzedAt":"2026-08-12T17:03:16.263Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}