Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix([issue-12701]): stop the federated asset quota tests and the making-of font warm-up overrunning the Windows CI deadline

[._.]/ Adam Eivyc1f28c4d55ee
diff --git a/server/routes/musicVideoMakingOf.test.js b/server/routes/musicVideoMakingOf.test.js
index 5c18e2b297..aee75a8aca 100644
--- a/server/routes/musicVideoMakingOf.test.js
+++ b/server/routes/musicVideoMakingOf.test.js
@@ -73,7 +73,10 @@ describe('local making-of compilation', () => {
beforeAll(async () => {
const svg = '<svg xmlns="http://www.w3.org/2000/svg" width="160" height="90" viewBox="0 0 160 90"><text x="8" y="15" font-size="12">S</text></svg>';
await sharp(Buffer.from(svg)).png().toBuffer();
- });
+ // The cold start is a native fontconfig cache build whose cost depends on the
+ // runner (a loaded windows-latest shard overran the default 30s hook deadline,
+ // #12701), so this one-time warm-up gets its own explicit budget.
+ }, 120_000);
it('keeps multiline entity-encoded image captions inert in exported Markdown', async () => {
const png = await sharp({ create: { width: 2, height: 2, channels: 3, background: '#227766' } }).png().toBuffer();
diff --git a/server/services/federatedMedia/assetStore.test.js b/server/services/federatedMedia/assetStore.test.js
index d5b043b279..bd2b9ccd58 100644
--- a/server/services/federatedMedia/assetStore.test.js
+++ b/server/services/federatedMedia/assetStore.test.js
@@ -84,18 +84,29 @@ const plantSparse = (callerId, tag, sizeBytes, ageMs = 0) => {
describe('federated media asset store', () => {
describe('storage quota', () => {
+ // Each real upload re-scans the whole inbox and fsyncs a temp+rename write,
+ // so filling the cap with ~64 of them is quadratic file-system work that
+ // blew the 30s test deadline on Windows CI (#12701). Stage the bulk as
+ // count-only placeholders (what the quota scan reads is name + size) and
+ // let the last slot, the refusal and the replay go through the real path.
+ const fillCount = (callerId, count) => {
+ for (let i = 0; i < count; i += 1) plantSparse(callerId, `fill${i}`, 1);
+ };
+
it('refuses a caller beyond the per-caller count with 429, but still lets another caller upload and a replay refresh', async () => {
- for (let i = 0; i < FEDERATED_MEDIA_ASSET_CALLER_MAX_COUNT; i += 1) await upload('peer-a', distinctPng(i));
+ fillCount('peer-a', FEDERATED_MEDIA_ASSET_CALLER_MAX_COUNT - 1);
+ await upload('peer-a', distinctPng(0));
await expect(upload('peer-a', distinctPng(9999))).rejects.toMatchObject({ status: 429, code: 'MEDIA_PROVIDER_ASSET_QUOTA' });
await expect(upload('peer-a', distinctPng(0))).resolves.toMatchObject({ sizeBytes: distinctPng(0).length });
await expect(upload('peer-b', distinctPng(9999))).resolves.toMatchObject({ assetId: expect.any(String) });
});
it('does not let concurrent uploads jointly overshoot the per-caller count', async () => {
+ fillCount('peer-a', FEDERATED_MEDIA_ASSET_CALLER_MAX_COUNT - 8);
const results = await Promise.allSettled(
- Array.from({ length: FEDERATED_MEDIA_ASSET_CALLER_MAX_COUNT + 8 }, (_, i) => upload('peer-a', distinctPng(i))),
+ Array.from({ length: 16 }, (_, i) => upload('peer-a', distinctPng(i))),
);
- expect(results.filter((r) => r.status === 'fulfilled')).toHaveLength(FEDERATED_MEDIA_ASSET_CALLER_MAX_COUNT);
+ expect(results.filter((r) => r.status === 'fulfilled')).toHaveLength(8);
expect(results.filter((r) => r.status === 'rejected' && r.reason.code === 'MEDIA_PROVIDER_ASSET_QUOTA')).toHaveLength(8);
});