Skip to content

fix: name the tool configuration behind a fallback instead of "Unknown changed file" - #144

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
tyza66:fix/142-tool-config-fallback-reasons
Nov 16, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
tyza66:fix/142-tool-config-fallback-reasons

Conversation

@tyza66

@tyza66 tyza66 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #142, first group only (.nvmrc / .node-version / .npmrc), as you suggested in the issue: .mocharc.* will follow in its own PR.

A change to only one of these has to fall back to the full suite — each decides which Node version is installed and how. That was already right, but the reason was Unknown changed file: .nvmrc, which reads like a gap in DiffCI rather than a decision.

What changed

  • CONFIG_PATTERNS (src/git/git-diff.ts) gains .nvmrc, .node-version and .npmrc.
  • toolConfigurationSubject (src/repo/impact.ts) names what a file controls, and every fallback site that produced "Unknown changed file" now uses it: Tool configuration changed: Node version (.nvmrc); full validation required.
  • applyGlobalRiskRules splits named tool configuration out of the generic Configuration file(s) changed sentence, so the reason a reader sees is the specific one rather than both.

Fixture (tests/repo/tool-config-reasons.test.ts) covers the three files in a Jest project: FULL mode, every test selected, nothing skipped, the named reason present, and no Unknown changed file for the same path. All three fail on main with Unknown changed file.

tests/repo/config-patterns.test.ts (the table pairing each pattern with a real file name) and release-files.json (the boundary audit requires every file to be listed) move with it.

Validation

  • npm run typecheck, npm run build, npm run audit:boundary (376 files) all pass.
  • npm test: the Cargo/Rust selection tests and Python repositories end to end fail on this machine. They also fail on main with the change stashed — 9 failures there, 8 or 9 here depending on how the shared temp fixtures race — and tests/repo/python-adapter.test.ts passes when run alone. Nothing here touches an adapter.
  • tests/fallback-reasons-docs.test.ts passes: the new reason is in the docs/using-diffci.md Fallback reasons table.

One commit, signed off with git commit -s.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 07:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

…allback

`.nvmrc`, `.node-version` and `.npmrc` decide which Node version is installed
and how, so a change to one of them has to fall back to the full suite. It did,
but the reason was `Unknown changed file: .nvmrc`, which reads like a gap in
DiffCI rather than a decision.

The three are now configuration, and the reason names them:
`Tool configuration changed: Node version (.nvmrc); full validation required`.
A recognised tool configuration keeps that reason even when some file happens to
reference it, because a reader cannot prove which tests notice a change to the
runner's settings.

`.mocharc.*` follows in its own pull request, as the maintainer asked.

Fixes DiffCI#142

Signed-off-by: tyza66 <[email protected]>
@tyza66
tyza66 force-pushed the fix/142-tool-config-fallback-reasons branch from 2725263 to db40153 Compare November 16, 2026 07:28
@tyza66

tyza66 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Narrowed to the first group, as you suggested: .nvmrc, .node-version and .npmrc only, one commit (db40153), re-verified after the split. .mocharc.* will come in its own PR.

Worth flagging for that second PR: .mocharc.js is currently SELECTIVE with zero tests, not a fallback — it is code, nothing imports it, so the graph finds no dependents and the plan selects nothing. The reason fix there also changes what runs.

@adityankale190895
adityankale190895 merged commit 3dab547 into DiffCI:main Nov 16, 2026
13 checks passed
@adityankale190895

Copy link
Copy Markdown
Member

Hi @tyza66, thank you, this is merged. "Tool configuration changed: Node version (.nvmrc)" says what actually happened, and the fixture covering all three files in a real Jest project made it an easy review. Thanks too for claiming the issue first and splitting it the way we discussed.

The .mocharc.* / .tool-versions follow-up is yours whenever you want it.

Two small asks, both optional:

  • A star on the repo helps more than you'd think at this stage. DiffCI is new, and stars are how other developers find it.
  • Try it on one of your own repositories if you have one with a test suite: npx "@diffci.com/diffci@latest" check runs locally, or the GitHub App adds a neutral "DiffCI change impact" check to each PR, which can't block a merge. If it picks wrong, falls back or refuses, that's exactly what we want to hear about. The community result form lets you choose whether we may publish it.

You'll also be listed on diffci.com/contributors. Tell me if you'd rather not be, or want a different name or link.

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.

Name the fallback reason for .nvmrc, .node-version, .npmrc and .mocharc changes

3 participants