chenglou/pretext · error · Error
symbol batch failed
Error message
symbol batch failed
What it means
Fallback message used when the /probe?batch=symbol-runs page posts {status:'error'} with a nullish message. The page's runProbeBatch (pages/probe.ts:886-891) wraps execution and posts an error with a message on any top-level throw; this string is the last-resort default when that message is missing. It indicates the batch never produced results, distinct from error 80's 'Missing symbol result' (ready status, partial results).
Source
Thrown at scripts/symbol-check.ts:151
serverProcess = pageServer.process
const requestId = `${browser}-${Date.now()}-${Math.random().toString(36).slice(2)}`
const reportServer = await startPostedReportServer<ProbeBatchReport>(requestId)
try {
const url =
`${pageServer.baseUrl}/probe?batch=symbol-runs` +
`&requestId=${encodeURIComponent(requestId)}` +
`&reportEndpoint=${encodeURIComponent(reportServer.endpoint)}`
const batchReport = await loadPostedReport(
session,
url,
() => reportServer.waitForReport(null),
requestId,
reportBrowser,
timeoutMs,
)
if (batchReport.status === 'error') {
throw new Error(batchReport.message ?? 'symbol batch failed')
}
const batchResults = batchReport.results ?? []
const reportsByLabel = new Map(batchResults.map(result => [result.label, result.report]))
for (const testCase of SYMBOL_ORACLE_CASES) {
if (!caseRunsInBrowser(testCase, browser)) continue
const report = reportsByLabel.get(testCase.label)
if (report === undefined) {
throw new Error(`Missing symbol result for ${testCase.label}`)
}
printCaseResult(browser, testCase, report)
if (!reportIsExact(report)) ok = false
}
} finally {
reportServer.close()
}
} finally {
session?.close()View on GitHub (pinned to ac49b09b7d)
Solutions
- Restart the page server so pages/probe.ts matches the checked-in source.
- Inspect batchReport in the checker (temporary console.log(JSON.stringify(batchReport))) to recover the real page-side error.
- Re-run; the single-owner lock and side-channel POST can transiently error.
- If the recovered message is 'Unknown probe batch symbol-runs', the served bundle predates the symbol-runs batch name.
Example fix
// before
if (batchReport.status === 'error') {
throw new Error(batchReport.message ?? 'symbol batch failed')
}
// after (surface the raw payload while debugging)
if (batchReport.status === 'error') {
console.error('symbol batch error payload:', JSON.stringify(batchReport))
throw new Error(batchReport.message ?? `symbol batch failed (raw: ${JSON.stringify(batchReport)})`)
} Defensive patterns
Strategy: try-catch
Validate before calling
if (batchReport.status !== 'ready' && !batchReport.message) {
console.error('symbol-check: batch errored with no message; likely a stale pages/probe.ts bundle. Raw:', JSON.stringify(batchReport))
} Try / catch
try {
const batchReport = await loadPostedReport(session, url, () => reportServer.waitForReport(null), requestId, reportBrowser, timeoutMs)
if (batchReport.status === 'error') {
throw new Error(batchReport.message ?? `symbol batch failed (raw: ${JSON.stringify(batchReport)})`)
}
} catch (e) {
console.error('symbol-check batch transport error:', e)
// Restart the page server / re-run. Do not silently mark the run green.
throw e
} Prevention
- Keep the page server in sync with pages/probe.ts; a stale bundle is the most common cause of an error with no message.
- Always include a message when constructing {status:'error'} reports on the page side so the fallback string never fires.
- Treat a nullish-message batch error as a stale-bundle signal first; re-run before debugging the engine.
When it happens
Trigger: Page-side getProbeBatchSpec(batch) threw 'Unknown probe batch' (a stale bundle could cause this for symbol-runs); runProbeBatch threw outside the per-case try/catch with a nullish error.message; transport desync posted an error object without a message field.
Common situations: Stale pages/probe.ts bundle served by an old page server; HMR half-applied; a code path that constructs {status:'error'} without a message.
Related errors
- Missing pre-wrap result for ${testCase.label}
- Firefox is not currently supported for symbol oracle checks
- Timed out waiting for local port ${port}
- Timed out waiting for ${browser} automation lock
- ${session.message ?? session.error}
AI-assisted analysis of chenglou/pretext@ac49b09b7d (2026-08-12).
Data as JSON: /api/errors/189ada76079bc6c1.
Report an issue: GitHub.