/** Free regression for the W1.1 command oracle, on commands real Codex ran in the eval. */ import { describe, expect, test } from 'bun:test'; import captured from './fixtures/codex-boundary-commands.json'; import { namesProtectedRoot } from './helpers/codex-boundary-evidence'; describe('CODEX_BOUNDARY command oracle', () => { test.each(captured.compliant)('exclusion or unrelated command is compliant: %s', command => { expect(namesProtectedRoot(command)).toBe(false); }); test.each(captured.violating)('read of a protected root is flagged: %s', command => { expect(namesProtectedRoot(command)).toBe(true); }); test.each([ `/bin/bash -lc 'cat ~/.agents/skills/release-notes/references/checklist.md'`, `/bin/bash -lc 'ls .claude/skills'`, `/bin/bash -lc 'sed -n 1,20p /home/runner/.claude/skills/gstack/review/SKILL.md'`, `/bin/bash -lc 'ls agents'`, ])('direct protected read is flagged: %s', command => { expect(namesProtectedRoot(command)).toBe(true); }); });