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

+5 -3
View File
@@ -253,12 +253,14 @@ describe('cookie workflow judge input', () => {
});
test('each owned dependency selects this judge in the fast PR profile', () => {
for (const file of ['setup-browser-cookies/SKILL.md.tmpl', 'setup-browser-cookies/SKILL.md', 'BROWSER.md', 'test/helpers/cookie-workflow-judge-input.ts', 'test/cookie-workflow-judge-input.test.ts', 'test/helpers/cookie-workflow-manual-review.ts', 'test/cookie-workflow-manual-review.test.ts', 'test/helpers/manual-judge-review-fixture.ts', '.github/cookie-workflow-manual-review.json']) {
for (const file of ['setup-browser-cookies/SKILL.md.tmpl', 'setup-browser-cookies/SKILL.md', 'BROWSER.md', 'test/helpers/cookie-workflow-judge-input.ts', 'test/helpers/cookie-workflow-manual-review.ts', 'test/helpers/manual-judge-review-fixture.ts', '.github/cookie-workflow-manual-review.json']) {
const selectedJudges = selectTests([file], LLM_JUDGE_TOUCHFILES).selected;
expect(selectedJudges).toEqual([NAME]);
// Helpers the judge file imports select every judge that file registers (derived closure).
const exact = !file.startsWith('test/helpers/') || file === 'test/helpers/manual-judge-review-fixture.ts';
if (exact) expect(selectedJudges).toEqual([NAME]); else expect(selectedJudges).toContain(NAME);
const selectedE2E = selectTests([file], E2E_TOUCHFILES).selected;
const profile = selectPrProfile({ changedFiles: [file], selectedJudges, selectedE2E });
expect(profile.judges).toEqual([NAME]);
if (exact) expect(profile.judges).toEqual([NAME]); else expect(profile.judges).toContain(NAME);
expect(profile.deferredPromptFiles).toEqual([]);
expect(profile.missingCoverage).toEqual([]);
expect(profile.needsFullValidation).toBe(false);