From e11873de81c1a9e22ad69f22ef30f37290694c94 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Fri, 18 Sep 2026 10:21:15 +0000 Subject: [PATCH] test(agent): stop framing the e2e attachment marker as a confidential access code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a harmless shipment reference id so the live test measures attachment reading rather than willingness to disclose credentials. Keep the marker in the attachment and preserve the assertion. Signed-off-by: Thomas Kosiewski --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `coder:openai/gpt-6-astra` • Thinking: `xhigh`_ Change-Id: I9923dc0801ad3e3d48f7f0485be05d561e9df436 --- packages/agent/test/e2e/agent.e2e.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/agent/test/e2e/agent.e2e.test.ts b/packages/agent/test/e2e/agent.e2e.test.ts index 14036e6..f15bb6a 100644 --- a/packages/agent/test/e2e/agent.e2e.test.ts +++ b/packages/agent/test/e2e/agent.e2e.test.ts @@ -294,11 +294,11 @@ suite("CoderAgent e2e (live Coder)", () => { }, 120_000); it("attaches a file and the model reads its contents", async () => { - // An un-guessable token, so a correct answer proves the model actually read - // the uploaded file (not its own prior knowledge). - const secret = "ZEBRA-7731"; + // An un-guessable reference id, so a correct answer proves the model read + // the uploaded file without asking it to disclose confidential information. + const marker = "ZEBRA-7731"; const doc = new TextEncoder().encode( - `# Internal Note\n\nThe access code is ${secret}. Keep it confidential.\n`, + `# Shipment Note\n\nThe reference id for this shipment is ${marker}.\n`, ); const agent = new CoderAgent({ client, @@ -313,7 +313,7 @@ suite("CoderAgent e2e (live Coder)", () => { { role: "user", content: [ - { type: "text", text: "What is the access code in the attached file?" }, + { type: "text", text: "What is the reference id in the attached file?" }, { type: "file", data: doc, mediaType: "text/markdown", filename: "note.md" }, ], }, @@ -321,6 +321,6 @@ suite("CoderAgent e2e (live Coder)", () => { }); if (agent.chatId) cleanup.push(agent.chatId); - expect(result.text).toContain(secret); + expect(result.text).toContain(marker); }, 120_000); });