fix: harden Docker image and async job responses

Harden Docker runtime packaging, preserve async job response semantics, fix Redis subscriber startup connections, clear lint warnings, and harden enterprise S3 object body handling.
This commit is contained in:
SnapOtter
2026-07-01 12:32:33 +08:00
committed by GitHub
parent 6683ee8c30
commit f3342a1e57
89 changed files with 635 additions and 159 deletions
@@ -110,6 +110,17 @@ function expectEnqueued(toolId: string, settings: Record<string, unknown>) {
);
}
function expectAsyncAccepted(body: string, clientJobId: string) {
const artifactJobId = mocks.enqueueToolJob.mock.calls.at(-1)?.[0].jobId;
expect(artifactJobId).toBeDefined();
expect(JSON.parse(body)).toEqual({
jobId: clientJobId,
progressJobId: clientJobId,
artifactJobId,
async: true,
});
}
describe("async AI photo routes", () => {
it("colorize validates JSON settings and enqueues colorization jobs", async () => {
const malformed = await postTool("colorize", [
@@ -122,8 +133,8 @@ describe("async AI photo routes", () => {
const clientJobId = "55555555-5555-4555-8555-555555555555";
const res = await postValid("colorize", { intensity: 0.45, model: "opencv" }, clientJobId);
expect(res.statusCode).toBe(202);
expect(JSON.parse(res.body)).toEqual({ jobId: clientJobId, async: true });
expectEnqueued("colorize", { intensity: 0.45, model: "opencv" });
expectAsyncAccepted(res.body, clientJobId);
});
it("noise-removal rejects invalid tiers and coerces numeric settings", async () => {