mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-04 18:36:54 +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
@@ -6,8 +6,6 @@ import { spawnSync } from 'node:child_process';
|
||||
import { createAutoplanArtifactRecorder, recordAutoplanArtifact, readPendingAutoplanArtifact,
|
||||
autoplanArtifactRecorderStatus, autoplanArtifactApprovalBoundary } from './helpers/autoplan-artifact-recorder';
|
||||
import type { NativePublicToolEvent } from './helpers/plan-count-transcript';
|
||||
import { E2E_TOUCHFILES, selectTests } from './helpers/touchfiles';
|
||||
|
||||
// Synthetic hook envelopes and owned temp paths. The live pending hook envelope
|
||||
// was unpublished; these controls do not reconstruct it or provide paid coverage.
|
||||
function fixture(approveEdits=false) {
|
||||
@@ -164,13 +162,6 @@ describe('owned Autoplan pending artifact metadata recorder',()=>{
|
||||
expect(f.status()).toEqual({status:'invalid',reason:'stdin_timeout'});
|
||||
}finally{clearTimeout(timer);child.stdin.end();if(child.exitCode===null){child.kill('SIGKILL');await child.exited}f.dispose()}
|
||||
},7000);
|
||||
test('recorder disposal removes owned state and shared recorder inputs select both paid owners',()=>{
|
||||
const f=fixture();f.write(f.event());f.dispose();expect(fs.existsSync(f.recorder.file)).toBe(false);
|
||||
for(const file of ['test/helpers/autoplan-artifact-recorder.ts','test/autoplan-artifact-recorder.test.ts'])
|
||||
expect(selectTests([file],E2E_TOUCHFILES,[]).selected.sort()).toEqual([]);
|
||||
for(const file of ['test/autoplan-pending-artifact.test.ts','test/fixtures/autoplan-pending-artifact-ae.json'])
|
||||
expect(selectTests([file],E2E_TOUCHFILES,[]).selected).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
// Real hook subprocesses and the public JSONL reader; no synthetic phase success
|
||||
|
||||
Reference in new issue
Block a user