mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-04 02:16:56 +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
@@ -8,8 +8,6 @@ import { fakePlanSeedPrelude } from './helpers/fake-plan-seed';
|
||||
import fixture from './fixtures/eng-seeded-completion-ai.json';
|
||||
import { classifyVisible, extractPlanFilePath } from './helpers/claude-pty-runner';
|
||||
import * as predicates from './helpers/claude-pty-runner';
|
||||
import { selectTests, E2E_TOUCHFILES } from './helpers/touchfiles';
|
||||
|
||||
const gate = '─────\nClaude has written up a plan and is ready to execute. Would you like to proceed?\n❯ 1. Yes, and use auto mode\n2. Yes, manually approve edits\n3. Tell Claude what to change';
|
||||
const compactGate = 'Exit plan mode?\nClaude wants to exit plan mode\n❯ 1. Yes, and switch to default (ask each time) for this session\n2. No';
|
||||
const question = 'Which runner should the plan use?\nA) Use the built-in runner\nB) Build a custom runner\nRecommendation: A because it avoids duplicate scheduling logic.\nReply with A or B.';
|
||||
@@ -181,11 +179,3 @@ test('rejected completion does not erase a genuine earlier question or change un
|
||||
const unseeded = await mockedObservation([gate.replace('❯ ', '')], 'waiting', false);
|
||||
expect(unseeded.obs.outcome).toBe('plan_ready'); expect(unseeded.judged).toBe(0);
|
||||
});
|
||||
|
||||
test('completion evidence dependencies select exactly the seeded observation owners', () => {
|
||||
const owners = ['plan-ceo-review-plan-mode', 'plan-eng-review-plan-mode', 'plan-design-review-plan-mode',
|
||||
'plan-devex-review-plan-mode', 'plan-mode-no-op', 'auto-decide-preserved'].sort();
|
||||
for (const file of ['test/eng-seeded-completion-ai.test.ts', 'test/fixtures/eng-seeded-completion-ai.json']) {
|
||||
expect(selectTests([file], E2E_TOUCHFILES).selected.sort()).toEqual(owners);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user