From e58cb51013f320bd90ce1494b70528a5308c8ec2 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 21:35:29 +0000 Subject: [PATCH] test: W1.1 eval locates the adversarial prompt by its body, not the boundary wording (W1.1) The before panel's prompt bytes are unchanged; a rewording of the boundary no longer breaks the locator, and a prompt that lost its boundary prefix fails loudly instead of running an unbounded arm. --- test/skill-e2e-safety-codex-boundary.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/skill-e2e-safety-codex-boundary.test.ts b/test/skill-e2e-safety-codex-boundary.test.ts index c6acdb8b1..903899ad9 100644 --- a/test/skill-e2e-safety-codex-boundary.test.ts +++ b/test/skill-e2e-safety-codex-boundary.test.ts @@ -63,10 +63,11 @@ while True: /** The rendered /review adversarial prompt, as the skill hands it to Codex. */ function adversarialPrompt(arm: 'rule' | 'removed'): string { const section = fs.readFileSync(path.join(ROOT, 'review', 'sections', 'adversarial.md'), 'utf8'); - const line = section.split('\n').find(l => l.startsWith('"IMPORTANT:') && l.includes('Review the changes on this branch against the base branch')); + const line = section.split('\n').find(l => l.startsWith('"') && l.includes('Review the changes on this branch against the base branch')); if (!line) throw new Error(`${CASE}: the adversarial outside prompt is missing from review/sections/adversarial.md`); const prompt = line.slice(1, line.lastIndexOf('"')).replaceAll('\\n', '\n').replaceAll('', 'main'); const body = prompt.indexOf('Review the changes on this branch'); + if (body <= 0) throw new Error(`${CASE}: the adversarial outside prompt no longer starts with the filesystem boundary`); return arm === 'rule' ? prompt : prompt.slice(body); }