{"record":{"id":"a43c4aff580e305d","repo":"chenglou/pretext","slug":"corpus-page-returned-error-for-meta-id-repor-a43c4a","errorCode":null,"errorMessage":"Corpus page returned error for ${meta.id}: ${report.message ?? 'unknown error'}","messagePattern":"Corpus page returned error for (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/corpus-taxonomy.ts","lineNumber":234,"sourceCode":"    `&reportEndpoint=${encodeURIComponent(reportServer.endpoint)}`\n  url = appendOverrideParams(url, font, lineHeight)\n\n  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","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/chenglou/pretext/blob/ac49b09b7d83ede19581fa94a8b892b07d309baf/scripts/corpus-taxonomy.ts#L216-L252","documentation":"The taxonomy run's in-page corpus harness posted a report with `status:'error'` and a `message`. The page itself is reporting a failure during measurement or content loading.","triggerScenarios":"The `/corpus` page (with `&diagnostic=full`) fails to load corpus content, a width is invalid, or an in-page exception is caught and posted as an error report.","commonSituations":"Missing corpus source file; malformed `&widths`; wrong working directory so assets don't resolve; transient browser launch failure.","solutions":["Read `report.message` in the error text — it is the page's own failure reason.","Open the failing `/corpus?id=...&widths=...&diagnostic=full` URL headed and read the console.","Confirm the corpus source file exists and the dev server serves `/corpus`.","Re-run to rule out a transient browser launch failure."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const report = await loadPostedReport(session, url, () => reportServer.waitForReport(null), requestId, browser, timeoutMs)\n  if (report.status === 'error') {\n    console.error(`page error for ${meta.id}: ${report.message ?? 'unknown'}; retrying once`)\n    // one retry of navigation/POST, then surface if it persists\n  }\n} catch (err) {\n  // separate transport timeout from a genuine page-reported error\n}","preventionTips":["Read report.message first — it is the page's own diagnosis.","Confirm the dev server serves /corpus and corpus assets resolve.","Allow one retry for transient browser failures, then inspect headed."],"tags":["corpus","taxonomy","browser-automation","page-error"],"backgroundTag":null,"analyzedSha":"ac49b09b7d83ede19581fa94a8b892b07d309baf","analyzedAt":"2026-08-12T17:03:16.263Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}