Skip to content

fix(impact): name tool-version files instead of reporting them as unknown - #326

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
tyza66:feat/tool-version-reasons
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
tyza66:feat/tool-version-reasons

Conversation

@tyza66

@tyza66 tyza66 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Closes #321.

.tool-versions, mise.toml, .mise.toml and .bun-version pick the Node, Python or Bun version the suite runs on. A change to one of them runs the full suite, which is right, but the reason was Unknown changed file: .tool-versions, which reads like a gap in DiffCI rather than a decision.

What changed

Same shape as #142 and its PRs:

  • src/git/git-diff.ts: the four files join CONFIG_PATTERNS (root-anchored, next to the .nvmrc/.node-version/.npmrc entries), so the change reaches the configuration signal instead of falling through as unknown.
  • src/repo/impact.ts: toolConfigurationSubject names them — tool versions for the asdf/mise files, Bun version for .bun-version.
file reason
.tool-versions Tool configuration changed: tool versions (.tool-versions); full validation required
mise.toml … tool versions (mise.toml) …
.mise.toml … tool versions (.mise.toml) …
.bun-version … Bun version (.bun-version) …

mise.toml is matched both with and without the leading dot, because mise accepts either name for that file.

Tests

  • tests/repo/tool-config-reasons.test.ts: one case per file, through the existing body, which asserts the plan stays FULL, every test is selected, the reason starts with the expected text and includes the path, and the reason no longer says Unknown changed file.
  • tests/repo/config-patterns.test.ts: one example per new pattern, which is the test that keeps each pattern paired with a real file name.

Both failed before the change (Unknown changed file: .tool-versions / no example for the pattern) and pass with it.

Validation

  • npm test: 1354 pass, 10 fail. All ten failures are the Cargo/Rust execution tests in tests/repo/rust-execution.test.ts and its siblings; they fail on unmodified main in this environment too (checked by stashing the change: pass 0, fail 6 for that file alone), with cargo in the fixture reporting 101 !== 0 for a test target that does not build here. Nothing in this PR touches Rust or Cargo.
  • npm run typecheck, npm run audit:boundary (446 files) and the two affected test files pass.

The docs row for Tool configuration changed lists the new files. release-files.json needed no new entry, since only existing files changed.

An AI agent helped with this; I re-ran the affected tests and the full suite myself before submitting.

…nown

`.tool-versions`, `mise.toml`, `.mise.toml` and `.bun-version` pick the Node,
Python or Bun version the suite runs on, so a change to one of them runs the
full suite. That is right, but the reason was `Unknown changed file:
.tool-versions`, which reads like a gap in DiffCI rather than a decision.

The four files join `CONFIG_PATTERNS` so they reach the configuration signal,
and `toolConfigurationSubject` gives them a name: `tool versions` for the asdf
and mise files, `Bun version` for `.bun-version`. That is the pattern from
DiffCI#142 and its PRs.

- `.tool-versions`, `mise.toml` and `.mise.toml` share one subject, since asdf
  and mise are the same idea in two file formats.
- `mise.toml` is listed both with and without the leading dot, which is how
  mise allows that file to be named.
- `tests/repo/tool-config-reasons.test.ts` has one case per file, through the
  existing body that asserts the plan stays FULL, every test is selected and
  the reason no longer says "Unknown".
- `tests/repo/config-patterns.test.ts` gets one example per new pattern, which
  is what keeps a pattern and its example in step.
- The `Tool configuration changed` row in `docs/using-diffci.md` lists them.

Nothing else changes: the lockfile narrowing in `src/git/git-diff.ts` is not
touched, and none of these files selects or deselects a test by itself.

Signed-off-by: 孙达明 <83948628+tyza66@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 09:44

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.

@adityankale190895

Copy link
Copy Markdown
Member

Thanks, this is exactly the #142 shape, and the tests cover every file. I also checked a nested packages/web/.tool-versions and .config/mise.toml: both run the full suite with the new reason. One small follow-up if you'd like it: mise.local.toml (and .mise.local.toml) still say "Unknown changed file". The CI failures you saw locally are environment-specific; hosted CI is green, including the Cargo run. Merging now.

@adityankale190895
adityankale190895 merged commit 0d145c7 into DiffCI:main Nov 18, 2026
13 checks passed
adityankale190895 pushed a commit that referenced this pull request Nov 19, 2026
…332)

#326 named `.tool-versions`, `mise.toml`, `.mise.toml` and `.bun-version`
after review suggested, correctly, that `mise.local.toml` and
`.mise.local.toml` still came out as `Unknown changed file`. They are mise's
machine-local override, so they pick the toolchain exactly as `mise.toml`
does.

The pattern grows to `/^\.?mise(?:\.local)?\.toml$/` rather than a second
entry, so one example still covers the family, and `toolConfigurationSubject`
matches it with the same expression instead of listing four names.

- `tests/repo/tool-config-reasons.test.ts` gets one case per new name.
- `tests/repo/config-patterns.test.ts`'s example becomes `mise.local.toml`,
  which the widened pattern still has to match.
- The docs row lists both.

Signed-off-by: 孙达明 <83948628+tyza66@users.noreply.github.com>
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 tool-version files

3 participants