From 9fe95bef0caed5a058b007f2c44c6454ca019cf4 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Mon, 23 Mar 2026 06:19:06 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20/cso=20infra=20E2E=20test=20=E2=80=94=20?= =?UTF-8?q?sharper=20prompt=20to=20prevent=20exploration=20waste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agent was burning 30+ turns exploring a 3-file repo (18 Glob calls, Explore subagent, 4 SKILL.md reads) before starting the audit. Two Agent verification subagents then ate ~100s, causing the 240s timeout. Fix: tell the agent the repo is tiny, list the exact files, skip the preamble, remove Agent from allowed tools, reduce maxTurns 60→30. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/skill-e2e-cso.test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/skill-e2e-cso.test.ts b/test/skill-e2e-cso.test.ts index 6929d2b1..4a69cf09 100644 --- a/test/skill-e2e-cso.test.ts +++ b/test/skill-e2e-cso.test.ts @@ -227,11 +227,14 @@ Run /cso --infra on this repo. This should run infrastructure-only phases (0-6, IMPORTANT: - Do NOT use AskUserQuestion — skip any interactive prompts. -- This repo has a Dockerfile without USER directive and an unpinned third-party GitHub Action. -- Focus on infrastructure findings, NOT code-level OWASP scanning.`, +- This is a TINY repo with only 3 files: .github/workflows/ci.yml, Dockerfile, and package.json. Do NOT waste turns exploring — just read those files directly and audit them. +- The Dockerfile has no USER directive (runs as root). The CI workflow uses an unpinned third-party GitHub Action (some-third-party/action@main). +- Focus on infrastructure findings, NOT code-level OWASP scanning. +- Skip the preamble (gstack-update-check, telemetry, etc.) — go straight to the audit. +- Do NOT use the Agent tool for exploration or verification — read the files yourself. This repo is too small to need subagents.`, workingDirectory: csoInfraDir, - maxTurns: 60, - allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Agent'], + maxTurns: 30, + allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'], timeout: 360_000, });