test: derive paid touchfiles from each eval's static closure (E)

touchfiles.test.ts now checks, per key, that the paid file's static
test/helpers and test/fixtures closure (plus fixture paths it names in string
literals) is covered, and names the file, path, chain and key to fix when it is
not. Free *.test.ts files are no longer touchfiles, so editing a free replay
test stops selecting paid evals: 950 entries removed, 653 real closure paths
added. The hand-copied inventories go: periodic-fixture-selection,
fake-impeccable-touchfiles and 45 per-file selection examples. Selection for
the sample edits (plan-eng-review template, claude-pty-runner,
plan-count-fixture, gstack-config) loses no case under either profile.
CONTRIBUTING documents the rule and its lower bound.
This commit is contained in:
garrytan committed 2026-09-29 07:00:28 +00:00
1 parent 689ef3094b
commit 7cbb5e04e4
53 files changed
+627 -1873

No files matched your search

-8
View File
@@ -8,8 +8,6 @@ import { setupQuestionEventSource, readPermissionRequestEvents } from './helpers
import retainedQuestionValidation from './fixtures/eng-auq-validation-error.json';
import retainedBashDirectory from './fixtures/bash-directory-permission.json';
import retainedDesignTasksPermission from './fixtures/design-tasks-bash-permission.json';
import { E2E_TOUCHFILES, selectTests } from './helpers/touchfiles';
const sessionId = '00000000-0000-4000-8000-000000000001';
const question: NativeQuestion = { question: 'D1 — Which approach?\nMake it reliable. Enforce the delivery policy.', header: 'Approach', multiSelect: false,
options: ['Extend dispatcher', 'Queue fanout', 'Minimal patch', 'Hold scope'].map(label => ({ label, description: label })) };
@@ -1858,12 +1856,6 @@ function bashHooks() {
return { source, input, response, emit, post, read };
}
test('captured directory Bash permission fixture selects every existing permission-helper consumer', () => {
const selected = selectTests(['test/fixtures/bash-directory-permission.json'], E2E_TOUCHFILES);
expect(selected.reason).toBe('diff');
expect(selected.selected.sort()).toEqual(selectTests(['test/helpers/plan-skill-questions.ts'], E2E_TOUCHFILES).selected.sort());
});
test('captured directory Bash card requires its exact owned request and permits only one grant', () => {
const { input, card, nativeId } = retainedBashDirectory;
const s = bashHooks(); s.emit('PreToolUse', nativeId, input);