Repository navigation
fix(impact): name tool-version files instead of reporting them as unknown - #326
Conversation
…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>
There was a problem hiding this comment.
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.
|
Thanks, this is exactly the #142 shape, and the tests cover every file. I also checked a nested |
…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>
Closes #321.
.tool-versions,mise.toml,.mise.tomland.bun-versionpick 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 wasUnknown 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 joinCONFIG_PATTERNS(root-anchored, next to the.nvmrc/.node-version/.npmrcentries), so the change reaches the configuration signal instead of falling through as unknown.src/repo/impact.ts:toolConfigurationSubjectnames them —tool versionsfor the asdf/mise files,Bun versionfor.bun-version..tool-versionsTool configuration changed: tool versions (.tool-versions); full validation requiredmise.toml… tool versions (mise.toml) ….mise.toml… tool versions (.mise.toml) ….bun-version… Bun version (.bun-version) …mise.tomlis 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 staysFULL, every test is selected, the reason starts with the expected text and includes the path, and the reason no longer saysUnknown 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 intests/repo/rust-execution.test.tsand its siblings; they fail on unmodifiedmainin this environment too (checked by stashing the change:pass 0, fail 6for that file alone), withcargoin the fixture reporting101 !== 0for atesttarget 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 changedlists the new files.release-files.jsonneeded 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.