From 1b9dd7d475ec6b19105c4de4123813e047210476 Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Wed, 15 Jul 2026 13:45:47 +0200 Subject: [PATCH] Give the zip-bomb rejection test headroom against loaded runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compressing and inflating the 257-MiB zero buffer is CPU-bound and exceeded vitest's 5 s default on a busy CI runner (5.4 s — the M15 push ran CI and CD concurrently). Flaky tests are defects (ADR 0014): the test gets an explicit 30 s timeout. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Fb2VzvcoBPHkjh8bZ6PzQn --- apps/api/src/plugins/plugin-package.service.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/api/src/plugins/plugin-package.service.test.ts b/apps/api/src/plugins/plugin-package.service.test.ts index 2a941f9..2ec5ca9 100644 --- a/apps/api/src/plugins/plugin-package.service.test.ts +++ b/apps/api/src/plugins/plugin-package.service.test.ts @@ -150,11 +150,13 @@ describe('PluginPackageService.parse — each invalid class', () => { ); }); + // Compressing/inflating 257 MiB is CPU-bound and blew vitest's 5 s default + // on a busy CI runner (flaky = defect, ADR 0014) — give it real headroom. it('rejects a package that inflates beyond the unpacked limit', () => { const huge = new Uint8Array(257 * 1024 * 1024); // zeros compress tiny, inflate large expectReject( zip({ 'manifest.json': enc(JSON.stringify(codeManifest)), 'plugin.js': huge }), 'plugin_too_large', ); - }); + }, 30_000); });