From 9df2e68fb60a030459ff49c930a5606de4905fee Mon Sep 17 00:00:00 2001 From: Markus Hartung Date: Thu, 20 Aug 2026 09:00:38 -0300 Subject: [PATCH] test(cursor-image): thread peerLocality through the flag-shaped-model test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The model-allowlist test (from the allowlist/timeout-clamp commit) and the loopback/LAN guard (from the security-guard commit) were written independently against diverging histories of this PR and didn't know about each other — cherry-picking both here exposed the gap: this one test still called handleCursorAgentImageGeneration without peerLocality, so the guard's fail-closed default rejected it with 403 before reaching the argv-sanitization logic the test actually exercises. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --- tests/unit/cursor-agent-image.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/cursor-agent-image.test.ts b/tests/unit/cursor-agent-image.test.ts index c4bd377217..e4c2cfea2d 100644 --- a/tests/unit/cursor-agent-image.test.ts +++ b/tests/unit/cursor-agent-image.test.ts @@ -268,6 +268,7 @@ test("handleCursorAgentImageGeneration never forwards a flag-shaped model into C providerSpecificData: { agentBin: process.execPath }, }, spawnImpl: fakeSpawn, + peerLocality: "loopback", }); assert.equal(result.success, true);