CI / check (push) Successful in 39s
CI / tests-imaging-browsers (push) Successful in 2m9s
CI / tests-integration (push) Successful in 2m47s
CI / tests-unit (push) Failing after 3m22s
CI / tests-ui (push) Failing after 4m14s
CI / preflight (push) Skipped
CI / deploy (push) Skipped
Bundle the remaining imaging hardening and the host/CI fixes from the
"Doe alles" pass into one release.
Furniture:
- Resolve the local bundle extension from FURNI_BUNDLE_EXT (".hab" default,
".nitro" for a stock Nitro client). The configured extension is written by
imports/repairs and preferred on lookup; the other stays a legacy fallback.
Imaging:
- Avatar proxy sends s-maxage=86400 + stale-while-revalidate (300/3600 for the
fallback path) so the edge can hold a render a day.
- Cloudflare cache rule now covers /api/imaging/ (verified MISS->HIT live).
- Document that bare /imaging is shadowed by the edge proxy to the renderer.
Ops/CI:
- docker-update.sh skips a CI-managed host (exit 0) instead of failing cron.
- ci-deploy.sh runs the cross-browser imaging gate (chromium+firefox+webkit)
against the candidate before cutover; DEPLOY_SKIP_CROSS_BROWSER=1 as escape.
- scripts/imager-health-alert.sh alerts (Discord) on imager up/down transitions;
runs from cron every 5 minutes.
Tests:
- Furniture bundle-ext resolver + FURNI_BUNDLE_EXT wiring.
- Imaging performance budget (bytes + warm latency).
- classifyDdos: /api/imaging/* stays in the api bucket.
40 lines
1.5 KiB
TypeScript
40 lines
1.5 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { avatarPath } from "./imaging-target";
|
|
|
|
// Lightweight size/latency budget for the avatar path. The endpoint spec checks
|
|
// correctness; this one catches a regression that keeps the image correct but
|
|
// makes it oversized or slow — e.g. losing the disk/edge cache and re-encoding
|
|
// (or re-rendering) on every hit. Budgets are deliberately loose: they should
|
|
// flag a real regression, not a cold cache or a slow CI network.
|
|
const STATIC_MAX_BYTES = 64 * 1024;
|
|
const ANIMATED_MAX_BYTES = 512 * 1024;
|
|
const WARM_MAX_MS = 3000;
|
|
|
|
test("the static avatar stays inside its byte budget", async ({ request }) => {
|
|
const response = await request.get(avatarPath({ img_format: "png" }));
|
|
expect(response.status()).toBe(200);
|
|
expect((await response.body()).length).toBeLessThanOrEqual(STATIC_MAX_BYTES);
|
|
});
|
|
|
|
test("the animated avatar stays inside its byte budget", async ({
|
|
request,
|
|
}) => {
|
|
const response = await request.get(
|
|
avatarPath({ img_format: "apng", effect: "14" }),
|
|
);
|
|
expect(response.status()).toBe(200);
|
|
expect((await response.body()).length).toBeLessThanOrEqual(
|
|
ANIMATED_MAX_BYTES,
|
|
);
|
|
});
|
|
|
|
test("a warm avatar request is served quickly", async ({ request }) => {
|
|
const path = avatarPath({ img_format: "png" });
|
|
await request.get(path); // warm the disk and edge caches
|
|
const started = Date.now();
|
|
const response = await request.get(path);
|
|
const elapsed = Date.now() - started;
|
|
expect([200, 304]).toContain(response.status());
|
|
expect(elapsed).toBeLessThan(WARM_MAX_MS);
|
|
});
|