From 60d331992d67ac84e37839653e13a43a65f509b6 Mon Sep 17 00:00:00 2001 From: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Date: Tue, 18 Aug 2026 20:44:02 +0000 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20implement=20issue=20#528=20?= =?UTF-8?q?=E2=80=94=20SonarCloud:=20test=20assertion=20quality=20(S5906)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gmail-ai-classifier/tests/performance-scalability.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmail-ai-classifier/tests/performance-scalability.test.js b/src/gmail-ai-classifier/tests/performance-scalability.test.js index b935c9cd..640d3228 100644 --- a/src/gmail-ai-classifier/tests/performance-scalability.test.js +++ b/src/gmail-ai-classifier/tests/performance-scalability.test.js @@ -121,7 +121,7 @@ describe('Performance and Scalability Benchmarks', () => { const processed = processThreadBatch(threads, config, services) const duration = Date.now() - startTime - expect(processed.length).toBe(BATCH_SIZE) + expect(processed).toHaveLength(BATCH_SIZE) expect(duration).toBeLessThan(100) // 100 items benchmarked under 100ms }) }) From 364609553dc42563ed01359d28209714d9d08387 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Thu, 3 Sep 2026 08:37:04 +0000 Subject: [PATCH 2/4] fix(deps): update @humanfs packages to resolve moderate vulnerability Updates @humanfs/node from 0.16.7 to 0.16.8 to fix GHSA-p498-v437-472g (recursive copy symlink vulnerability) and upgrades @humanfs/core to 0.19.2. Resolves npm audit failure blocking this PR. Co-Authored-By: Claude Haiku 4.5 --- package-lock.json | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2b816614..c0decf74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1231,29 +1231,43 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", From e7dab9f5465c24501b19fb3301edc772a7722230 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Sun, 20 Sep 2026 18:34:16 +0000 Subject: [PATCH 3/4] fix(deps): resolve js-yaml vulnerability (GHSA-2883-xcg3-v3hh) Updates js-yaml from 4.3.1 to 4.3.2 to address high-severity vulnerability in maxTotalMergeKeys handling that fails to limit CPU use for empty merge sources. Co-Authored-By: Claude Haiku 4.5 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0decf74..da74e049 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5302,9 +5302,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", - "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, "funding": [ { From 93b4d71985694dd8ec6cd8394ac36780d71944c3 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Fri, 9 Oct 2026 17:09:26 +0000 Subject: [PATCH 4/4] fix(reviews): assert per-thread results in batch benchmark Co-Authored-By: Claude Sonnet 5.5 --- .../tests/performance-scalability.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gmail-ai-classifier/tests/performance-scalability.test.js b/src/gmail-ai-classifier/tests/performance-scalability.test.js index 640d3228..16f58db5 100644 --- a/src/gmail-ai-classifier/tests/performance-scalability.test.js +++ b/src/gmail-ai-classifier/tests/performance-scalability.test.js @@ -122,6 +122,11 @@ describe('Performance and Scalability Benchmarks', () => { const duration = Date.now() - startTime expect(processed).toHaveLength(BATCH_SIZE) + processed.forEach((result, i) => { + expect(result.threadId).toBe(`msg_${i}`) + expect(result.status).toBe('classified') + expect(result.label).toBe(classification.canonical_label) + }) expect(duration).toBeLessThan(100) // 100 items benchmarked under 100ms }) })