Every worker "selection" rejection was projected onto the table argument, including an exact column name that does not exist in an existing table. Give column rejections their own worker reason and map each input reason to the caller argument it requires correcting. Table rejections keep the table path. Fixes #2613 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
674 B
TypeScript
25 lines
674 B
TypeScript
/** Bound frozen input, retained JSON and worker allocation before parsing untrusted files. */
|
|
export const SQLITE_DATABASE_LIMITS = {
|
|
concurrentInspections: 2,
|
|
inputBytes: 256 * 1024 * 1024,
|
|
outputBytes: 16 * 1024 * 1024,
|
|
timeoutMs: 30_000,
|
|
diagnosticBytes: 1024 * 1024,
|
|
} as const;
|
|
/** Internal rejection retains the failed boundary without returning partial success. */
|
|
export class SqliteInspectionFailure extends Error {
|
|
constructor(
|
|
readonly reason:
|
|
| "format"
|
|
| "selection"
|
|
| "column-selection"
|
|
| "unsupported"
|
|
| "unavailable"
|
|
| "output-limit"
|
|
| "memory",
|
|
message: string,
|
|
) {
|
|
super(message);
|
|
}
|
|
}
|