mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-05 02:47:17 +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,8 +5,6 @@ import path from 'node:path';
|
||||
import {readPlanCountTranscript,type NativePublicToolEvent} from './helpers/plan-count-transcript';
|
||||
import {autoplanPhaseCompletions} from './helpers/autoplan-phase-observer';
|
||||
import fixture from './fixtures/autoplan-public-narration-ad.json';
|
||||
import {E2E_TOUCHFILES,selectTests} from './helpers/touchfiles';
|
||||
|
||||
const at=Date.parse(fixture.provenance.timestamp);
|
||||
function read(blocks: unknown[]= [fixture.block],delta: any={},complete=true) {
|
||||
const dir=fs.mkdtempSync(path.join(os.tmpdir(),'public-narration-')),cwd=path.join(dir,'repo');
|
||||
@@ -124,17 +122,3 @@ test('phase ordering and duplicate collapse use native time rather than polling
|
||||
{sessionId:'parent',timestamp:new Date(at+30).toISOString(),text:'Phase 1 is done.'}]};
|
||||
expect(autoplanPhaseCompletions(t,at)).toEqual([{phase:1,ts:at+10},{phase:2,ts:at+20}]);
|
||||
});
|
||||
|
||||
test('public narration changes select every existing shared native-reader consumer',()=>{
|
||||
const expected=[
|
||||
'auto-decide-preserved',
|
||||
'plan-ceo-mode-routing','plan-ceo-split-overflow',
|
||||
'plan-design-review-plan-mode','plan-design-with-ui-scope',
|
||||
'plan-eng-multi-finding-batching',
|
||||
'plan-eng-review-plan-mode',
|
||||
].sort();
|
||||
const reader=selectTests(['test/helpers/plan-count-transcript.ts'],E2E_TOUCHFILES).selected.sort();
|
||||
expect(reader).toEqual(expected);
|
||||
for(const file of ['test/autoplan-public-narration.test.ts','test/fixtures/autoplan-public-narration-ad.json'])
|
||||
expect(selectTests([file],E2E_TOUCHFILES).selected.sort()).toEqual(reader);
|
||||
});
|
||||
Reference in new issue
Block a user