mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-03 01:46:55 +02:00
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:
1 parent
689ef3094b
commit
7cbb5e04e4
53 files changed
+627
-1873
No files matched your search
@@ -5,7 +5,6 @@ import * as path from 'node:path';
|
||||
import { findNativeAutoDecision } from './helpers/native-auto-decide';
|
||||
import { classifyVisible } from './helpers/claude-pty-runner';
|
||||
import { readPlanCountTranscript, type NativePublicToolEvent } from './helpers/plan-count-transcript';
|
||||
import { E2E_TOUCHFILES, selectTests } from './helpers/touchfiles';
|
||||
import capture_auto_decide_current_declaration from './fixtures/auto-decide-current-declaration-6aef.json';
|
||||
import capture_auto_decide_explanatory_mode from './fixtures/auto-decide-explanatory-mode-043a.json';
|
||||
import captured749_auto_decide_explanatory_mode from './fixtures/auto-decide-explanatory-mode-749df.json';
|
||||
@@ -109,15 +108,6 @@ test('the native reader cannot promote foreign cwd, child, user or tool-result t
|
||||
}
|
||||
}finally{fs.rmSync(dir,{recursive:true,force:true});}
|
||||
});
|
||||
|
||||
test('new native annotation dependencies retain all existing observation caller owners',()=>{
|
||||
const expected=['plan-ceo-review-plan-mode','plan-eng-review-plan-mode','plan-design-review-plan-mode','plan-devex-review-plan-mode','plan-mode-no-op','office-hours-auto-mode','auto-decide-preserved'];
|
||||
for(const file of ['test/helpers/native-auto-decide.ts','test/native-auto-decide.test.ts','test/native-auto-decide-pty.test.ts','test/fixtures/native-auto-decide-ag.json']){
|
||||
const owners=Object.entries(E2E_TOUCHFILES).filter(([,paths])=>paths.includes(file)).map(([name])=>name);expect(owners).toEqual(expected);
|
||||
expect(selectTests([file],E2E_TOUCHFILES).selected).toContain('auto-decide-preserved');
|
||||
}
|
||||
});
|
||||
|
||||
describe('auto-decide-current-declaration', () => {
|
||||
const capture = capture_auto_decide_current_declaration;
|
||||
const clone = () => structuredClone(capture.retry) as any;
|
||||
|
||||
Reference in new issue
Block a user