Files
gstack/test/design-research-fixture.test.ts
T
Garry Tan 730a1017d1 v1.89.1.0 fix: remove continuous checkpoint commits (#2970)
* v1.89.1.0 fix: remove continuous checkpoint commits and repair validation blockers

* fix: clarify shipping and engineering review recovery

* fix: interpret native no-change review descriptions

* test: separate descendant readiness from timeout delivery
2026-09-24 17:27:14 -04:00

32 lines
1.8 KiB
TypeScript

import { expect, test } from 'bun:test';
import { readFileSync } from 'node:fs';
import { extractDesignResearchContract } from './helpers/skill-fixture';
import { E2E_TOUCHFILES, selectTests } from './helpers/touchfiles';
const source = readFileSync(new URL('../design-consultation/SKILL.md', import.meta.url), 'utf8');
test('research-only fixture supplies actual readiness and egress dependencies without expanding scope', () => {
const contract = extractDesignResearchContract(source);
expect(contract.match(/console\.log\("ASIDE_READY /g)).toHaveLength(1);
expect(contract).toContain('GSTACK_SKIP_ASIDE');
expect(contract).toContain('Reuse the Phase 0 BROWSER SETUP result');
expect(contract).toContain('_gstack_egress_run open aside-agent');
expect(contract.indexOf('ASIDE_READY')).toBeLessThan(contract.indexOf('## Web research runs in Aside'));
expect(contract).not.toContain('## Phase 2: Research');
expect(contract).not.toContain('**Step 2: Visual research');
expect(contract).not.toContain('best websites {current year}');
expect(contract).not.toContain('DESIGN.md');
expect(extractDesignResearchContract(source.replace('ASIDE_READY', 'PROBE_CHANGED'))).toContain('PROBE_CHANGED');
});
test.each(['## BROWSER SETUP', '### Rules for driving a real browser', '## Web research runs in Aside',
'## Phase 2: Research', '**Step 1: Identify', '**Step 2: Visual research', '_aside_exec()'])('missing %s fails closed before a paid run', marker => {
expect(() => extractDesignResearchContract(source.replace(marker, 'REMOVED'))).toThrow();
});
test('research fixture changes select their actual live consumer', () => {
for (const file of ['test/helpers/skill-fixture.ts', 'test/design-research-fixture.test.ts']) {
expect(selectTests([file], E2E_TOUCHFILES, []).selected).toContain('design-consultation-research');
}
});