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
@@ -5,38 +5,7 @@ import * as path from 'node:path';
|
||||
import { planDecisionCalibrations } from './fixtures/plan-decision-classification';
|
||||
import { buildPlanReviewDecisionPrompt } from './helpers/plan-review-decisions';
|
||||
import { ENG_BATCHING_FINDINGS } from './helpers/plan-review-cases';
|
||||
import { E2E_TOUCHFILES, E2E_TIERS, selectTests } from './helpers/touchfiles';
|
||||
|
||||
const ROOT = path.resolve(import.meta.dir, '..');
|
||||
const IDS = ['plan-eng-multi-finding-batching', 'plan-ceo-split-overflow', 'plan-decision-classification'].sort();
|
||||
|
||||
test('semantic helper changes also select the separate DX analysis calibration', () => {
|
||||
for (const file of ['test/helpers/plan-review-decisions.ts', 'test/plan-review-decisions.test.ts',
|
||||
'test/helpers/plan-review-cases.ts', 'test/plan-review-cases.test.ts',
|
||||
'test/skill-e2e-plan-decision-classification.test.ts', 'test/fixtures/plan-decision-classification.ts', 'test/plan-review-calibration.test.ts']) {
|
||||
const shared = ['test/helpers/plan-review-decisions.ts', 'test/plan-review-decisions.test.ts',
|
||||
'test/helpers/plan-review-cases.ts', 'test/plan-review-cases.test.ts'].includes(file);
|
||||
const expected = shared ? [...IDS, 'plan-devex-peer-comparison-classification'] : [...IDS];
|
||||
if (file === 'test/helpers/plan-review-decisions.ts' || file === 'test/plan-review-decisions.test.ts')
|
||||
expected.push('plan-ceo-mode-routing');
|
||||
// The UI gate now uses the shared picker for acknowledged native questions.
|
||||
if (file === 'test/helpers/plan-review-cases.ts') expected.push('plan-design-with-ui-scope');
|
||||
// plan-review-cases.test.ts also verifies the Eng template/renderer gate.
|
||||
// Its direct behavioral consumers extend the unchanged helper-only set.
|
||||
if (file === 'test/plan-review-cases.test.ts') expected.push(
|
||||
'plan-eng-review', 'plan-eng-review-artifact', 'plan-review-report',
|
||||
'plan-eng-review-plan-mode', 'plan-mode-no-op',
|
||||
'carve-section-loading', 'plan-eng-finding-floor',
|
||||
'plan-eng-review-format-coverage', 'plan-eng-review-format-kind',
|
||||
'plan-ceo-review-prosons-cadence', 'plan-review-prosons-format',
|
||||
'codex-offered-eng-review', 'plan-eng-coverage-audit', 'autoplan-dual-voice',
|
||||
);
|
||||
expect(selectTests([file], E2E_TOUCHFILES, []).selected.sort()).toEqual(
|
||||
expected.sort());
|
||||
}
|
||||
for (const id of IDS) expect(E2E_TIERS[id]).toBe('periodic');
|
||||
});
|
||||
|
||||
test('calibration briefs preserve source-required structure and actual choices without phase/qid reliance', () => {
|
||||
const format = fs.readFileSync(path.join(ROOT, 'scripts/resolvers/preamble/generate-ask-user-format.ts'), 'utf8');
|
||||
const split = fs.readFileSync(path.join(ROOT, 'docs/askuserquestion-split.md'), 'utf8');
|
||||
|
||||
Reference in new issue
Block a user