mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(api): propagate lenient structural-validation flag to batch + pipeline
Main already reuses the per-modality input handlers in batch and pipeline (#244), so the modality-aware reuse from the video QA sweep was redundant. Port only the remaining unique piece: pass lenient: skipStructuralValidation to the handler so batched/pipelined PDF tools that opt out of structural validation behave like the single-file factory path. Keeps main's safer explicit image-decode chain (HEIC/RAW/SVG/autoOrient) and AI fileId threading.
This commit is contained in:
@@ -249,6 +249,7 @@ export async function registerBatchRoutes(app: FastifyInstance): Promise<void> {
|
||||
processFilename,
|
||||
{
|
||||
scratchDir: batchScratch,
|
||||
lenient: getToolConfig(toolId)?.skipStructuralValidation,
|
||||
},
|
||||
);
|
||||
processBuffer = prepared.buffer;
|
||||
|
||||
@@ -304,6 +304,7 @@ export async function registerPipelineRoutes(app: FastifyInstance): Promise<void
|
||||
try {
|
||||
const prepared = await inputHandlerFor(inputModality).prepare(fileBuffer, filename, {
|
||||
scratchDir: pipelineScratch,
|
||||
lenient: getToolConfig(firstToolId ?? "")?.skipStructuralValidation,
|
||||
});
|
||||
fileBuffer = prepared.buffer;
|
||||
filename = prepared.filename;
|
||||
@@ -893,7 +894,10 @@ export async function registerPipelineRoutes(app: FastifyInstance): Promise<void
|
||||
const prepared = await inputHandlerFor(batchModality).prepare(
|
||||
processBuffer,
|
||||
processFilename,
|
||||
{ scratchDir: pipelineBatchScratch },
|
||||
{
|
||||
scratchDir: pipelineBatchScratch,
|
||||
lenient: getToolConfig(pipeline.steps[0]?.toolId ?? "")?.skipStructuralValidation,
|
||||
},
|
||||
);
|
||||
processBuffer = prepared.buffer;
|
||||
processFilename = prepared.filename;
|
||||
|
||||
Reference in New Issue
Block a user