diff --git a/docs/using-diffci.md b/docs/using-diffci.md index a1e06fc..47aaedd 100644 --- a/docs/using-diffci.md +++ b/docs/using-diffci.md @@ -606,7 +606,7 @@ For `Unknown changed file` and `Deleted source/asset`, `observe --json` also ret | `Infrastructure definition(s) changed; full validation required` | Edit a `Dockerfile` or `terraform/main.tf` | Yes: declare it in `inputs` | | `Database definition(s) changed; full validation required` | Add a file under `migrations/` | Yes: declare it in `inputs` | | `Language/framework configuration changed: …` | Edit `go.mod` or `pom.xml` | No | -| `Tool configuration changed: … (…); full validation required` | Change `.nvmrc`, `.node-version`, `.npmrc`, `.mocharc.*`, `tsconfig.base.json` or `tsconfig.test.json` | No | +| `Tool configuration changed: … (…); full validation required` | Change `.nvmrc`, `.node-version`, `.npmrc`, `.mocharc.*`, `tsconfig.base.json`, `tsconfig.test.json`, `.tool-versions`, `mise.toml`, `.mise.toml` or `.bun-version` | No | | `Code that no file imports changed: …; a tool may load it by name, so full validation required` | Edit `karma.conf.js`, `.c8rc.js` or a root-level script that nothing imports | Yes: declare it in `inputs` | | `The test script runs …; full validation required` | Edit `scripts/check.mjs` when `package.json` has `"test": "node scripts/check.mjs && node --test"` | Yes: `verify` and the agent tools run that phase instead when it runs the program alone (`node scripts/check.mjs`) | | `The test script runs …, which imports …; full validation required` | Edit a module that `scripts/check.mjs` imports, with the same test script | Same as above | diff --git a/src/git/git-diff.ts b/src/git/git-diff.ts index 64bc9b7..dfb6a4e 100644 --- a/src/git/git-diff.ts +++ b/src/git/git-diff.ts @@ -252,6 +252,12 @@ export const CONFIG_PATTERNS = [ // `.mocharc.js` as code with no importers, so neither reached the configuration signals; both // decide how the suite runs. /^\.mocharc(?:\.[^/]+)?$/, + // Tool versions (issue #321). asdf, mise and Bun pick the toolchain the suite runs on, so a change + // falls back to the full suite; these entries make the reason name the file instead of reporting it + // as unknown. + /^\.tool-versions$/, + /^\.?mise\.toml$/, + /^\.bun-version$/, ]; // Stage 1B fix (2026-08-21, docs/research/2026-08-21-stage1b-*.md): root-caused in Stage 1A's fallback- diff --git a/src/repo/impact.ts b/src/repo/impact.ts index 34a7322..0d70181 100644 --- a/src/repo/impact.ts +++ b/src/repo/impact.ts @@ -67,6 +67,8 @@ function toolConfigurationSubject(filePath: string): string | undefined { if (base === ".npmrc") return "package manager settings"; if (/^tsconfig\.[^/]+\.json$/.test(base) || /^jsconfig\.[^/]+\.json$/.test(base)) return "TypeScript configuration"; if (base === ".mocharc" || base.startsWith(".mocharc.")) return "Mocha settings"; + if (base === ".tool-versions" || base === "mise.toml" || base === ".mise.toml") return "tool versions"; + if (base === ".bun-version") return "Bun version"; return undefined; } diff --git a/tests/repo/config-patterns.test.ts b/tests/repo/config-patterns.test.ts index 7596278..4d2e8f0 100644 --- a/tests/repo/config-patterns.test.ts +++ b/tests/repo/config-patterns.test.ts @@ -54,6 +54,9 @@ const EXAMPLES = [ ".node-version", ".npmrc", ".mocharc.json", + ".tool-versions", + "mise.toml", + ".bun-version", ]; test("every CONFIG_PATTERNS entry has one real file name in the table", () => { diff --git a/tests/repo/tool-config-reasons.test.ts b/tests/repo/tool-config-reasons.test.ts index c6f3e6c..0be4a21 100644 --- a/tests/repo/tool-config-reasons.test.ts +++ b/tests/repo/tool-config-reasons.test.ts @@ -55,6 +55,11 @@ const CASES: Array<{ file: string; before: string; after: string; reason: string { file: ".nvmrc", before: "22\n", after: "24\n", reason: "Tool configuration changed: Node version" }, { file: ".node-version", before: "22.5.0\n", after: "24.1.0\n", reason: "Tool configuration changed: Node version" }, { file: ".npmrc", before: "save-exact=true\n", after: "save-exact=false\n", reason: "Tool configuration changed: package manager settings" }, + // Tool versions (issue #321): the Node, Python and Bun versions the suite runs on. + { file: ".tool-versions", before: "nodejs 22.5.0\n", after: "nodejs 24.1.0\n", reason: "Tool configuration changed: tool versions" }, + { file: "mise.toml", before: '[tools]\nnode = "22.5.0"\n', after: '[tools]\nnode = "24.1.0"\n', reason: "Tool configuration changed: tool versions" }, + { file: ".mise.toml", before: '[tools]\nnode = "22.5.0"\n', after: '[tools]\nnode = "24.1.0"\n', reason: "Tool configuration changed: tool versions" }, + { file: ".bun-version", before: "1.1.0\n", after: "1.2.0\n", reason: "Tool configuration changed: Bun version" }, ]; for (const { file, before, after, reason } of CASES) {