chenglou/pretext · error · Error
Corpus font matrix report was missing rows for ${meta.id} ($
Error message
Corpus font matrix report was missing rows for ${meta.id} (${variant.id}) What it means
Thrown by the font-matrix sweep after a browser corpus page posts a 'ready' report that omits the `rows` array for the current font variant. It guards against silently treating an empty/partial measurement as zero mismatches. The page either measured no width or the POST side channel delivered an incomplete payload.
Source
Thrown at scripts/corpus-font-matrix.ts:487
const report = await (async () => {
try {
return await loadPostedReport(
session,
url,
() => reportServer.waitForReport(null),
requestId,
options.browser,
options.timeoutMs,
)
} finally {
reportServer.close()
}
})()
if (report.status === 'error') {
throw new Error(`Corpus page returned error for ${meta.id} (${variant.id}): ${report.message ?? 'unknown error'}`)
}
if (report.rows === undefined) {
throw new Error(`Corpus font matrix report was missing rows for ${meta.id} (${variant.id})`)
}
const mismatches: VariantResult['mismatches'] = report.rows
.filter(row => Math.round(row.diffPx) !== 0)
.map(row => ({
width: row.width,
diffPx: Math.round(row.diffPx),
predictedHeight: Math.round(row.predictedHeight),
actualHeight: Math.round(row.actualHeight),
}))
const exactCount = report.exactCount ?? (report.rows.length - mismatches.length)
variantResults.push({
id: variant.id,
label: variant.label,
font: variant.font,
lineHeight: variant.lineHeight,
widthCount: report.rows.length,View on GitHub (pinned to ac49b09b7d)
Solutions
- Re-run the matrix; if it persists, open the same `/corpus?id=...&widths=...&font=...&lineHeight=...&report=1` URL in a headed browser and read the console for in-page errors.
- Check that the corpus's `min_width`/`max_width` in `corpora/sources.json` overlaps your `--start`/`--end` range; a clamped-empty width list yields no rows.
- Raise `--timeout` (or `CORPUS_CHECK_TIMEOUT_MS`); a measurement exceeding the timeout can post a 'ready' report before rows attach.
- Confirm the POST side channel (reportEndpoint) is reachable from the page; a blocked endpoint can drop the rows field.
Example fix
// before: corpus min_width clamps the sweep range empty
// corpora/sources.json: { "id": "x", "min_width": 950 }
// invocation: --start=300 --end=900 -> no widths in range -> no rows
// after: widen the sweep to overlap the corpus bounds
bun run scripts/corpus-font-matrix.ts --id=x --start=900 --end=1200 Defensive patterns
Strategy: retry
Validate before calling
const widths = getSweepWidths(meta, options)
if (widths.length === 0) {
console.error(`No widths in range for ${meta.id}; adjust --start/--end or corpus min_width/max_width`)
process.exit(0)
} Prevention
- Verify the corpus width range (min_width/max_width in sources.json) overlaps --start/--end before running a font matrix.
- Keep --timeout generous for large font matrices.
- Ensure the reportEndpoint POST side channel is reachable from the page.
When it happens
Trigger: Run `bun run scripts/corpus-font-matrix.ts --id=...` and the in-page harness posts `{status:'ready'}` with no `rows`. Typical causes: the `&widths=` list resolved to nothing because the corpus `min_width`/`max_width` clamped the range empty, the page threw before building rows, or the POST side channel truncated the payload.
Common situations: A corpus's `min_width`/`max_width` in `corpora/sources.json` excludes every width in the `--start`/`--end` sweep range; a stale `/corpus` page build that doesn't emit rows for the requested font variant; a reportEndpoint POST that drops the rows field under a firewall or timeout.
Related errors
- Corpus sweep report was missing rows for ${corpusId}
- Corpus taxonomy report was missing rows for ${meta.id}
- corpus-check exited with status ${result.status ?? 'unknown'
- Corpus page returned error for ${meta.id}: ${report.message
- Corpus page returned error for ${meta.id}: ${report.message
AI-assisted analysis of chenglou/pretext@ac49b09b7d (2026-08-12).
Data as JSON: /api/errors/5d4cb54e0004886b.
Report an issue: GitHub.