diff --git a/CHANGELOG.md b/CHANGELOG.md index 4593d3f1..96fc4c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.6.1.0] - 2026-03-17 + +### Added + +- **E2E and LLM-judge tests now only run what you changed.** Each test declares which source files it depends on. When you run `bun run test:e2e`, it checks your diff and skips tests whose dependencies weren't touched. A branch that only changes `/retro` now runs 2 tests instead of 31. Use `bun run test:e2e:all` to force everything. +- **`bun run eval:select` previews which tests would run.** See exactly which tests your diff triggers before spending API credits. Supports `--json` for scripting and `--base ` to override the base branch. +- **Completeness guardrail catches forgotten test entries.** A free unit test validates that every `testName` in the E2E and LLM-judge test files has a corresponding entry in the TOUCHFILES map. New tests without entries fail `bun test` immediately — no silent always-run degradation. + +### Changed + +- `test:evals` and `test:e2e` now auto-select based on diff (was: all-or-nothing) +- New `test:evals:all` and `test:e2e:all` scripts for explicit full runs + ## 0.6.0.1 — 2026-03-17 - **`/gstack-upgrade` now catches stale vendored copies automatically.** If your global gstack is up to date but the vendored copy in your project is behind, `/gstack-upgrade` detects the mismatch and syncs it. No more manually asking "did we vendor it?" — it just tells you and offers to update. diff --git a/VERSION b/VERSION index 758efdb4..44e7f9a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.0.1 +0.6.1.0 diff --git a/test/helpers/touchfiles.ts b/test/helpers/touchfiles.ts index 21bf07f1..30a15579 100644 --- a/test/helpers/touchfiles.ts +++ b/test/helpers/touchfiles.ts @@ -57,9 +57,10 @@ export const E2E_TOUCHFILES: Record = { 'review-base-branch': ['review/**'], // Plan reviews - 'plan-ceo-review': ['plan-ceo-review/**'], - 'plan-eng-review': ['plan-eng-review/**'], - 'plan-eng-review-artifact': ['plan-eng-review/**'], + 'plan-ceo-review': ['plan-ceo-review/**'], + 'plan-ceo-review-selective': ['plan-ceo-review/**'], + 'plan-eng-review': ['plan-eng-review/**'], + 'plan-eng-review-artifact': ['plan-eng-review/**'], // Ship 'ship-base-branch': ['ship/**'], @@ -71,6 +72,12 @@ export const E2E_TOUCHFILES: Record = { // Document-release 'document-release': ['document-release/**'], + // QA bootstrap + 'qa-bootstrap': ['qa/**', 'browse/src/**', 'ship/**'], + + // Ship coverage audit + 'ship-coverage-audit': ['ship/**'], + // Design 'design-consultation-core': ['design-consultation/**'], 'design-consultation-research': ['design-consultation/**'], diff --git a/test/skill-e2e.test.ts b/test/skill-e2e.test.ts index 1b750701..1d311bdf 100644 --- a/test/skill-e2e.test.ts +++ b/test/skill-e2e.test.ts @@ -896,7 +896,7 @@ Focus on reviewing the plan content: architecture, error handling, security, and // --- Plan CEO Review (SELECTIVE EXPANSION) E2E --- -describeE2E('Plan CEO Review SELECTIVE EXPANSION E2E', () => { +describeIfSelected('Plan CEO Review SELECTIVE EXPANSION E2E', ['plan-ceo-review-selective'], () => { let planDir: string; beforeAll(() => { @@ -2346,7 +2346,7 @@ Review the site at ${serverUrl}. Use --quick mode. Skip any AskUserQuestion call // --- Test Bootstrap E2E --- -describeE2E('Test Bootstrap E2E', () => { +describeIfSelected('Test Bootstrap E2E', ['qa-bootstrap'], () => { let bootstrapDir: string; let bootstrapServer: ReturnType; @@ -2483,7 +2483,7 @@ This is a test+fix loop: find bugs, fix them, write regression tests, commit eac // --- Test Coverage Audit E2E --- -describeE2E('Test Coverage Audit E2E', () => { +describeIfSelected('Test Coverage Audit E2E', ['ship-coverage-audit'], () => { let coverageDir: string; beforeAll(() => { diff --git a/test/touchfiles.test.ts b/test/touchfiles.test.ts index 7880c229..e666bb3d 100644 --- a/test/touchfiles.test.ts +++ b/test/touchfiles.test.ts @@ -74,10 +74,12 @@ describe('selectTests', () => { expect(result.selected).not.toContain('document-release'); }); - test('skill-specific change selects only that skill', () => { + test('skill-specific change selects only that skill and related tests', () => { const result = selectTests(['plan-ceo-review/SKILL.md'], E2E_TOUCHFILES); - expect(result.selected).toEqual(['plan-ceo-review']); - expect(result.skipped.length).toBe(Object.keys(E2E_TOUCHFILES).length - 1); + expect(result.selected).toContain('plan-ceo-review'); + expect(result.selected).toContain('plan-ceo-review-selective'); + expect(result.selected.length).toBe(2); + expect(result.skipped.length).toBe(Object.keys(E2E_TOUCHFILES).length - 2); }); test('global touchfile triggers ALL tests', () => { @@ -110,9 +112,10 @@ describe('selectTests', () => { E2E_TOUCHFILES, ); expect(result.selected).toContain('plan-ceo-review'); + expect(result.selected).toContain('plan-ceo-review-selective'); expect(result.selected).toContain('retro'); expect(result.selected).toContain('retro-base-branch'); - expect(result.selected.length).toBe(3); + expect(result.selected.length).toBe(4); }); test('works with LLM_JUDGE_TOUCHFILES', () => {