mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: make OCR portable and reliable across AMD64 and ARM64 (#519)
* fix: make OCR portable and reliable * fix: harden OCR installation portability * fix: pin OCR partials across downloads * fix: make OCR execution reliably asynchronous * fix: harden OCR portability and docs routes * fix: preserve decoder and docs safeguards
This commit is contained in:
@@ -4,6 +4,7 @@ import { apiToolPath, TOOL_BUNDLE_MAP, TOOLS } from "@snapotter/shared";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { fixtureDir } from "../../fixtures/index.js";
|
||||
import { defaultSettingsFor } from "../../helpers/tool-default-settings.js";
|
||||
import { cancelAcceptedJobAndWait } from "../settle-job.js";
|
||||
import {
|
||||
buildTestApp,
|
||||
createMultipartPayload,
|
||||
@@ -275,6 +276,13 @@ describe("multi-modality tool x format matrix", () => {
|
||||
`${toolId} x ${fixture.filename}: 202 without jobId`,
|
||||
).toBeDefined();
|
||||
expect(typeof payload.jobId).toBe("string");
|
||||
|
||||
// The generic matrix verifies acceptance, not OCR execution. If an
|
||||
// optional OCR runtime happens to be installed locally, release its
|
||||
// long-running job immediately rather than leaking it into teardown.
|
||||
if (toolId === "ocr-pdf") {
|
||||
await cancelAcceptedJobAndWait(payload.jobId as string, "ai");
|
||||
}
|
||||
}
|
||||
|
||||
if (res.statusCode === 501) {
|
||||
|
||||
Reference in New Issue
Block a user