Skip to content

test(impact): fixture for a vite.config-only change in a Vitest project - #109

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
sarankumar1325:test/vite-config-only-change
Nov 11, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
sarankumar1325:test/vite-config-only-change

Conversation

@sarankumar1325

Copy link
Copy Markdown
Contributor

Closes #98

Fixture

New tests/repo/vite-config-change.test.ts. For each case it builds a temporary git repository with a small Vitest project: vite and vitest in devDependencies, vitest run as the test script, a vite.config.* that has a test block (include plus a resolve.alias), no vitest.config.*, and two sources each with its own test. The head commit changes only the Vite config. Then the test runs analyzeCheckout.

Cases:

  1. A test.include edit in vite.config.ts (narrows the include to one test)
  2. A resolve.alias edit in vite.config.ts
  3. A test.include edit in vite.config.mjs
  4. A test.include edit in packages/web/vite.config.ts (config in a package directory)

Each case checks: mode FULL, fallbackRequired, both tests selected, nothing skipped, and the reason Language/framework configuration changed: <path>.

Is today's behaviour safe?

Yes. CONFIG_PATTERNS in git-diff.ts does not list vite.config., as the issue says. But the impact analyzer's language/framework rule (src/repo/impact.ts, (?:vite|vue|nuxt)\.config\.[^/]+, which matches at any depth) and isConfigFile both cover it. So every case falls back to the full suite, and DiffCI never selects fewer tests than a test.include change could affect. This PR changes no source code. It only pins that behaviour with a regression test, so a later narrowing of the framework-config rule would fail here.

The new test is registered in release-files.json.

Validation

npm test: 903 passed. npm run typecheck is clean, and so is npm run audit:boundary.

Vitest reads its test block from vite.config.* when there is no
vitest.config.*. Record that a change to only vite.config.ts or .mjs
(test.include or resolve.alias), at the root or in a package directory,
falls back to a full run through the language/framework configuration
rule, with every test selected.

Closes DiffCI#98

Signed-off-by: sarankumar1325 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T08:05:52.128116Z eaa9bba PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@adityankale190895
adityankale190895 merged commit a405ddf into DiffCI:main Nov 11, 2026
11 checks passed
adityankale190895 added a commit that referenced this pull request Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixture: change only vite.config.ts in a Vitest project

2 participants