@diffci.com/diffci 0.3.59 → 0.3.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,6 +55,7 @@ import { GraphCache } from "@diffci.com/core/cache/graph-cache";
55
55
  import { githubDeliveryWarning } from "./delivery-warning.js";
56
56
  import { formatJobSummary } from "./job-summary.js";
57
57
  import { configureTelemetry, readTelemetryPreference, recordUsage, telemetryNotice } from "./telemetry.js";
58
+ import { observationSelection, planSelection, verificationSelection } from "./usage-signal.js";
58
59
  import { formatFeedbackPrompt, markFeedbackPromptShown, shouldShowFeedbackPrompt } from "./feedback-prompt.js";
59
60
  import { detectSpecificationConflicts, readSpecificationFile } from "./spec-conflicts.js";
60
61
  import { formatVerificationSummary, verificationExitCode, verifyChanged, verifyRange, verifyScoped } from "./verify.js";
@@ -165,7 +166,7 @@ async function runPlanCommand(args) {
165
166
  repoPath = values.get("--repo") ?? process.cwd();
166
167
  const plan = await analyzeCheckout({ repoPath, base, head: values.get("--head") ?? "HEAD" });
167
168
  console.log(JSON.stringify(plan, null, 2));
168
- await recordUsage("plan", plan.plan.mode === "SELECTIVE" ? "selective" : "full", observerIdentity().version, {}, process.env, repoPath);
169
+ await recordUsage("plan", plan.plan.mode === "SELECTIVE" ? "selective" : "full", observerIdentity().version, {}, process.env, repoPath, planSelection(plan.plan));
169
170
  return 0;
170
171
  }
171
172
  catch (error) {
@@ -694,7 +695,7 @@ async function runVerifyCommand(flags, env) {
694
695
  }
695
696
  catch { /* keeping an old hook never fails verification */ }
696
697
  }
697
- await recordUsage("verify", report.verification, identity.version, flags, env, repoPath);
698
+ await recordUsage("verify", report.verification, identity.version, flags, env, repoPath, verificationSelection(report));
698
699
  if (flags["no-log"] !== true)
699
700
  appendOutcome(repoPath, report, env);
700
701
  if (reportPath) {
@@ -964,7 +965,7 @@ async function runCheck(flags, env) {
964
965
  if (observationCode !== 0)
965
966
  return observationCode;
966
967
  const observation = JSON.parse(readFileSync(reportPath, "utf8"));
967
- await recordUsage("check", observation.status === "OBSERVED" ? "observed" : observation.status === "REFUSED" ? "refused" : "error", observerIdentity().version, flags, env, repoPath);
968
+ await recordUsage("check", observation.status === "OBSERVED" ? "observed" : observation.status === "REFUSED" ? "refused" : "error", observerIdentity().version, flags, env, repoPath, observationSelection(observation.result));
968
969
  const print = (message) => { if (flags.quiet !== true && flags.json !== true)
969
970
  console.log(message); };
970
971
  print(summarise(observation, true));
@@ -1109,7 +1110,7 @@ async function runObserve(flags, env) {
1109
1110
  writeFileSync(reportPath, `${JSON.stringify(report, null, 2)}\n`, "utf8");
1110
1111
  // check counts itself; its inner observation is not a second run.
1111
1112
  if (flags["skip-usage"] !== true)
1112
- await recordUsage("observe", report.status === "OBSERVED" ? "observed" : report.status === "REFUSED" ? "refused" : "error", identity.version, flags, env, repoPath);
1113
+ await recordUsage("observe", report.status === "OBSERVED" ? "observed" : report.status === "REFUSED" ? "refused" : "error", identity.version, flags, env, repoPath, observationSelection(report.result));
1113
1114
  const summary = summarise(report);
1114
1115
  if (flags.json === true) {
1115
1116
  console.log(JSON.stringify(report, null, 2));
@@ -1659,8 +1660,9 @@ client-side. Graphs hold paths and import edges, never file contents; a cache fa
1659
1660
  Usage counting is on: plan, check, observe and verify send command, outcome, version, surface, CI or local,
1660
1661
  activity, a random local installation ID and the repository name (host/owner/repo from GITHUB_REPOSITORY,
1661
1662
  GitLab CI or the origin remote). diffci telemetry --mode count-only drops the name and the ID; --mode repo
1662
- restores them. --internal-usage labels tests/internal activity. No commit, path, test, report, content or
1663
- machine details are sent. Only DO_NOT_TRACK=1, DIFFCI_NO_SEND=1 or DIFFCI_SHARE_USAGE=0 stop counting;
1663
+ restores them. --internal-usage labels tests/internal activity. Runs that choose tests also send how many:
1664
+ selective or full, tests selected, tests in the suite, and what a path-rule CI would have run. No commit,
1665
+ path, test name, report, content or machine details are sent. Only DO_NOT_TRACK=1, DIFFCI_NO_SEND=1 or DIFFCI_SHARE_USAGE=0 stop counting;
1664
1666
  --no-send stops report uploads only.
1665
1667
  Interactive check and observe runs print feedback links to stderr at most weekly; they send nothing.
1666
1668
  CI, MCP, --json and --quiet never show them; DIFFCI_NO_FEEDBACK_PROMPT=1 hides them.
@@ -1,8 +1,9 @@
1
- import { type UsageCommand, type UsageOutcome } from "./usage-signal.js";
1
+ import { type UsageCommand, type UsageOutcome, type UsageSelection } from "./usage-signal.js";
2
2
  /**
3
3
  * Usage counting is on by default. "repo" (the default) also names the repository (host/owner/repo from
4
4
  * the Git remote); "count-only" drops the name. Only DO_NOT_TRACK=1, DIFFCI_NO_SEND=1 or
5
- * DIFFCI_SHARE_USAGE=0 stop the count. No repository content, paths, commits or machine details are sent.
5
+ * DIFFCI_SHARE_USAGE=0 stop the count. No repository content, paths, commits or machine details are sent;
6
+ * a run that chose tests also sends how many (selected, total, path-rule comparator), never which.
6
7
  */
7
8
  export type TelemetryMode = "repo" | "count-only";
8
9
  interface Preference {
@@ -27,5 +28,5 @@ export declare function normaliseRemote(remote: string): string | undefined;
27
28
  export declare function repositoryName(repoPath: string | undefined, env: NodeJS.ProcessEnv): string | undefined;
28
29
  export declare function telemetryNotice(mode: TelemetryMode): string;
29
30
  /** Best effort: never throws and never changes the exit code. `flags` are read for --internal-usage only. */
30
- export declare function recordUsage(command: UsageCommand, outcome: UsageOutcome, version: string, flags: Flags, env: NodeJS.ProcessEnv, repoPath?: string): Promise<void>;
31
+ export declare function recordUsage(command: UsageCommand, outcome: UsageOutcome, version: string, flags: Flags, env: NodeJS.ProcessEnv, repoPath?: string, selection?: UsageSelection): Promise<void>;
31
32
  export {};
@@ -114,7 +114,7 @@ export function telemetryNotice(mode) {
114
114
  : `DiffCI counts runs without repository names or content. DO_NOT_TRACK=1 stops counting. ${TELEMETRY_DOCS}`;
115
115
  }
116
116
  /** Best effort: never throws and never changes the exit code. `flags` are read for --internal-usage only. */
117
- export async function recordUsage(command, outcome, version, flags, env, repoPath) {
117
+ export async function recordUsage(command, outcome, version, flags, env, repoPath, selection) {
118
118
  try {
119
119
  if (usageCountingDisabled(env))
120
120
  return;
@@ -133,6 +133,7 @@ export async function recordUsage(command, outcome, version, flags, env, repoPat
133
133
  activity: flags["internal-usage"] === true || env.DIFFCI_USAGE_INTERNAL === "1" || preference.internal ? "internal" : "external",
134
134
  ...(preference.installationId ? { installationId: preference.installationId } : {}),
135
135
  ...(repository ? { repository } : {}),
136
+ ...(selection ? { selection } : {}),
136
137
  });
137
138
  }
138
139
  catch { /* usage counting never affects a run */ }
@@ -2,6 +2,16 @@
2
2
  export type UsageCommand = "check" | "observe" | "verify" | "plan";
3
3
  export type UsageOutcome = "observed" | "refused" | "error" | "passed" | "failed" | "blocked" | "selective" | "full";
4
4
  export type UsageSurface = "cli" | "local-mcp" | "github-action" | "gitlab-component" | "azure-devops-task";
5
+ /**
6
+ * How much of the suite a run chose: counts only, never test names. `baselineTestsSelected` is what a simple
7
+ * path-rule CI would have run (the comparator savings are measured against), when the report carries it.
8
+ */
9
+ export interface UsageSelection {
10
+ mode: "selective" | "full";
11
+ testsSelected: number;
12
+ testsTotal: number;
13
+ baselineTestsSelected?: number;
14
+ }
5
15
  export interface UsageSignal {
6
16
  command: UsageCommand;
7
17
  outcome: UsageOutcome;
@@ -11,6 +21,7 @@ export interface UsageSignal {
11
21
  ci?: boolean;
12
22
  installationId?: string;
13
23
  repository?: string;
24
+ selection?: UsageSelection;
14
25
  endpoint?: string;
15
26
  fetchImpl?: typeof fetch;
16
27
  }
@@ -18,5 +29,26 @@ export interface DeliveryResult {
18
29
  status: "delivered" | "accepted" | "failed" | "timed-out";
19
30
  httpStatus?: number;
20
31
  }
32
+ /** From an observation result (observe, check). No result, or no tests found: nothing to count. */
33
+ export declare function observationSelection(result: {
34
+ mode: "SELECTIVE" | "FULL";
35
+ selectedTests: readonly string[];
36
+ totalTestCount: number;
37
+ pathBaseline?: {
38
+ selectedTestCount: number;
39
+ };
40
+ } | undefined): UsageSelection | undefined;
41
+ /** From a verification receipt. "none" with tests available means the change needed none of them. */
42
+ export declare function verificationSelection(report: {
43
+ selection: "none" | "selected" | "full";
44
+ tests_selected: number;
45
+ tests_available: number;
46
+ }): UsageSelection | undefined;
47
+ /** From an advisory plan (diffci plan). */
48
+ export declare function planSelection(plan: {
49
+ mode: string;
50
+ selectedTests: readonly string[];
51
+ skippedTests: readonly string[];
52
+ }): UsageSelection | undefined;
21
53
  export declare function deliverUsageSignal(input: UsageSignal): Promise<DeliveryResult>;
22
54
  export declare function sendUsageSignal(input: UsageSignal): Promise<boolean>;
@@ -1,3 +1,34 @@
1
+ const count = (value) => typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 1_000_000;
2
+ function selectionFields(selection) {
3
+ if (!selection || !count(selection.testsSelected) || !count(selection.testsTotal) || selection.testsSelected > selection.testsTotal)
4
+ return {};
5
+ return { mode: selection.mode, tests_selected: selection.testsSelected, tests_total: selection.testsTotal,
6
+ ...(count(selection.baselineTestsSelected) && selection.baselineTestsSelected <= selection.testsTotal ? { baseline_tests_selected: selection.baselineTestsSelected } : {}) };
7
+ }
8
+ /** From an observation result (observe, check). No result, or no tests found: nothing to count. */
9
+ export function observationSelection(result) {
10
+ if (!result || !(result.totalTestCount > 0))
11
+ return undefined;
12
+ return { mode: result.mode === "SELECTIVE" ? "selective" : "full",
13
+ testsSelected: result.mode === "SELECTIVE" ? result.selectedTests.length : result.totalTestCount,
14
+ testsTotal: result.totalTestCount,
15
+ ...(result.pathBaseline ? { baselineTestsSelected: result.pathBaseline.selectedTestCount } : {}) };
16
+ }
17
+ /** From a verification receipt. "none" with tests available means the change needed none of them. */
18
+ export function verificationSelection(report) {
19
+ if (!(report.tests_available > 0))
20
+ return undefined;
21
+ return { mode: report.selection === "full" ? "full" : "selective",
22
+ testsSelected: report.selection === "none" ? 0 : report.selection === "full" ? report.tests_available : report.tests_selected,
23
+ testsTotal: report.tests_available };
24
+ }
25
+ /** From an advisory plan (diffci plan). */
26
+ export function planSelection(plan) {
27
+ const total = plan.selectedTests.length + plan.skippedTests.length;
28
+ if (total === 0)
29
+ return undefined;
30
+ return { mode: plan.mode === "SELECTIVE" ? "selective" : "full", testsSelected: plan.selectedTests.length, testsTotal: total };
31
+ }
1
32
  export async function deliverUsageSignal(input) {
2
33
  try {
3
34
  const url = new URL(input.endpoint ?? "https://app.diffci.com/v1/usage-events");
@@ -12,6 +43,7 @@ export async function deliverUsageSignal(input) {
12
43
  ...(input.ci !== undefined ? { ci: input.ci } : {}),
13
44
  ...(input.installationId ? { installation_id: input.installationId } : {}),
14
45
  ...(input.repository ? { repository: input.repository } : {}),
46
+ ...selectionFields(input.selection),
15
47
  }),
16
48
  signal: AbortSignal.timeout(3000),
17
49
  });
@@ -9,6 +9,7 @@
9
9
  [![npm](https://img.shields.io/npm/v/@diffci.com/diffci)](https://www.npmjs.com/package/@diffci.com/diffci)
10
10
  [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-DiffCI%20change%20impact-blue?logo=github)](https://github.com/marketplace/actions/diffci-change-impact)
11
11
  [![GitLab CI/CD Catalog](https://img.shields.io/badge/GitLab%20CI%2FCD%20Catalog-diffci-FC6D26?logo=gitlab)](https://gitlab.com/explore/catalog/diffci/diffci)
12
+ [![mcptry](https://mcptry.com/badge/io.github.DiffCI/diffci)](https://mcptry.com/servers/io.github.DiffCI/diffci)
12
13
  [![Sponsor](https://img.shields.io/badge/sponsor-DiffCI-ea4aaa?logo=githubsponsors)](https://github.com/sponsors/DiffCI)
13
14
 
14
15
  **Verification for AI coding agents.** DiffCI tells Claude Code, Codex, Cursor (or you) which tests and checks a change affects, runs them before the push instead of letting them fail at the full CI gate afterwards, and leaves a receipt of what ran and what was skipped. MIT licensed, runs locally, never uploads your code or reports unless you configure it (it does count runs by default: [usage counting](docs/telemetry.md)), and falls back to the full suite whenever the evidence is incomplete.
@@ -27,7 +28,7 @@ If DiffCI saves you CI time, a ⭐ helps others find it.
27
28
 
28
29
  ```yaml
29
30
  - uses: actions/checkout@v7
30
- - uses: DiffCI/core@v0.3.58
31
+ - uses: DiffCI/core@v0.3.60
31
32
  ```
32
33
 
33
34
  Add `with: comment: "true"` (and `pull-requests: write` on the job) and the same answer appears on the pull request itself, updated in place on each push:
@@ -98,6 +99,15 @@ npx -y -p @diffci.com/diffci@latest diffci-mcp
98
99
  | `diffci_init` | Seeds agent instructions, MCP configs, the verify skill and a pre-push hook |
99
100
  | `diffci_verify_workflow` | Checks that a DiffCI GitHub Actions job cannot affect the rest of CI |
100
101
 
102
+ A hosted, read-only guidance server runs at `https://diffci.com/mcp/v1`. It is
103
+ listed in the [Official MCP Registry](https://registry.modelcontextprotocol.io/?q=io.github.DiffCI%2Fdiffci)
104
+ as `io.github.DiffCI/diffci`, and on
105
+ [Glama](https://glama.ai/mcp/servers/DiffCI/core),
106
+ [Agent Tools](https://agent-tools.cloud/mcp/servers/diffci-diffci-com),
107
+ [Wellknown](https://wellknown.network/agents/diffci),
108
+ [Agenstry](https://agenstry.com/mcp/io.github.diffci/diffci) and
109
+ [SealKeeper](https://sealkeeper.run/agents/diffci.com/diffci-com).
110
+
101
111
  ## Use it from your coding agent
102
112
 
103
113
  The public [`integrations/agent-plugin`](integrations/agent-plugin) package
@@ -291,15 +301,15 @@ Most open work is teaching DiffCI to narrow changes it currently treats as "run
291
301
 
292
302
  Thank you to everyone who has improved DiffCI:
293
303
 
294
- - <a href="https://github.com/KingEmma7"><img src="https://github.com/KingEmma7.png?size=80" width="40" height="40" alt="@KingEmma7"></a> **[Emmanuel Mawulolo Tagbor](https://github.com/KingEmma7)**, **[Regular contributor](CONTRIBUTING.md#contributor-tiers)**: [`diffci check-plan`](docs/using-diffci.md#compare-a-plan-with-a-full-suite-junit-report) for comparing a saved plan with full-suite JUnit results ([#74](https://github.com/DiffCI/core/pull/74)), Yarn Classic lockfile narrowing ([#63](https://github.com/DiffCI/core/pull/63)), and follow-ups ([#67](https://github.com/DiffCI/core/pull/67), [#70](https://github.com/DiffCI/core/pull/70)); narrow supported Yarn Berry lockfile changes ([#245](https://github.com/DiffCI/core/pull/245)).
304
+ - <a href="https://github.com/KingEmma7"><img src="https://github.com/KingEmma7.png?size=80" width="40" height="40" alt="@KingEmma7"></a> **[Emmanuel Mawulolo Tagbor](https://github.com/KingEmma7)**, **[Regular contributor](CONTRIBUTING.md#contributor-tiers)**: [`diffci check-plan`](docs/using-diffci.md#compare-a-plan-with-a-full-suite-junit-report) for comparing a saved plan with full-suite JUnit results ([#74](https://github.com/DiffCI/core/pull/74)), Yarn Classic lockfile narrowing ([#63](https://github.com/DiffCI/core/pull/63)), and follow-ups ([#67](https://github.com/DiffCI/core/pull/67), [#70](https://github.com/DiffCI/core/pull/70)); narrow supported Yarn Berry lockfile changes ([#245](https://github.com/DiffCI/core/pull/245)); Recognize uv global options before run in Python workflow checks ([#333](https://github.com/DiffCI/core/pull/333)).
295
305
  - <a href="https://github.com/FredApps"><img src="https://github.com/FredApps.png?size=80" width="40" height="40" alt="@FredApps"></a> **[@FredApps](https://github.com/FredApps)**, **[Area maintainer: Rust](CONTRIBUTING.md#contributor-tiers)**: the [Rust (Cargo) adapter](https://github.com/DiffCI/core/issues/62), from Cargo package and test-target mapping ([#91](https://github.com/DiffCI/core/pull/91)) through crate-dependency selection ([#92](https://github.com/DiffCI/core/pull/92)), conservative `cargo test` commands ([#93](https://github.com/DiffCI/core/pull/93)), registration inside the release boundary ([#94](https://github.com/DiffCI/core/pull/94)) and a pinned public replay on hosted CI ([#95](https://github.com/DiffCI/core/pull/95)), and five safety fixes for runtime module dependencies, Maven module resources, runner suites, deleted assets and Go runtime inputs ([#32](https://github.com/DiffCI/core/pull/32)–[#36](https://github.com/DiffCI/core/pull/36)); match the verify usage line that lists --staged and --paths ([#203](https://github.com/DiffCI/core/pull/203)); list npm run agent:check with the local checks in CONTRIBUTING ([#289](https://github.com/DiffCI/core/pull/289)); say Rust is supported experimentally in the roadmap ([#291](https://github.com/DiffCI/core/pull/291)); retry removing Cargo-built fixtures on Windows ([#235](https://github.com/DiffCI/core/pull/235)); assert the interpreter the analysis recorded, not a second probe ([#310](https://github.com/DiffCI/core/pull/310)); build dist-client once instead of in every test file ([#202](https://github.com/DiffCI/core/pull/202)); find the npm-cli.js npm runs, not one under its global prefix ([#240](https://github.com/DiffCI/core/pull/240)); drop the dead --share-usage flag from the help ([#312](https://github.com/DiffCI/core/pull/312)); expand matrix include the way GitHub does ([#165](https://github.com/DiffCI/core/pull/165)); compare if: strings ignoring case, as GitHub does ([#170](https://github.com/DiffCI/core/pull/170)); an empty or comment-only workflow file no longer crashes diffci plan ([#171](https://github.com/DiffCI/core/pull/171)); parse numstat -z renames so renamed files keep isBinary ([#176](https://github.com/DiffCI/core/pull/176)); compile globs character by character so regex metacharacters stay literal ([#179](https://github.com/DiffCI/core/pull/179)); split run lines into argv the way sh would ([#181](https://github.com/DiffCI/core/pull/181)); read GitHub Actions path filters from the workflow's on: triggers ([#182](https://github.com/DiffCI/core/pull/182)); plan a purpose from a job that runs its step ([#185](https://github.com/DiffCI/core/pull/185)); treat Azure Pipelines and other CI providers' pipeline files as CI config ([#186](https://github.com/DiffCI/core/pull/186)); only an ancestor script makes a cycle ([#188](https://github.com/DiffCI/core/pull/188)); match task input patterns as path globs ([#174](https://github.com/DiffCI/core/pull/174)); read template text after a substitution in script checks ([#219](https://github.com/DiffCI/core/pull/219)); treat a change to an extended tsconfig base as global ([#237](https://github.com/DiffCI/core/pull/237)); lint changed files of types the ESLint config adds ([#242](https://github.com/DiffCI/core/pull/242)); check double-quoted expansion in linear time ([#302](https://github.com/DiffCI/core/pull/302)); resolve imports against a test package's basedir ([#205](https://github.com/DiffCI/core/pull/205)); follow pytest plugins that addopts loads with -p ([#207](https://github.com/DiffCI/core/pull/207)); expand wildcards in pytest testpaths ([#209](https://github.com/DiffCI/core/pull/209)); recognise Failsafe's IT* and *ITCase test names ([#211](https://github.com/DiffCI/core/pull/211)); ignore XML comments when reading a POM ([#213](https://github.com/DiffCI/core/pull/213)); ignore go.mod fixtures under testdata, _ and . directories ([#215](https://github.com/DiffCI/core/pull/215)); keep +, $ and ^ literal in globs, and match everything with ** ([#249](https://github.com/DiffCI/core/pull/249)); resolve a leading <rootDir> in testPathIgnorePatterns ([#253](https://github.com/DiffCI/core/pull/253)); install with --mode=skip-build on Yarn 2 and later ([#200](https://github.com/DiffCI/core/pull/200)); coverage map records files a test reads by relative path ([#201](https://github.com/DiffCI/core/pull/201)); turn the shared graph cache off when its secret is too short ([#264](https://github.com/DiffCI/core/pull/264)); answer ping with an empty result ([#295](https://github.com/DiffCI/core/pull/295)); list both paths of a renamed file in changed_files ([#299](https://github.com/DiffCI/core/pull/299)); replace a local action-v tag left by a rejected push on rerun ([#280](https://github.com/DiffCI/core/pull/280)); do not persist write-scoped checkout tokens in publish and merge-gate ([#282](https://github.com/DiffCI/core/pull/282)); count observe runs as the GitHub Action surface ([#285](https://github.com/DiffCI/core/pull/285)); say usage counting is on where the docs said DiffCI sends nothing ([#287](https://github.com/DiffCI/core/pull/287)); count Azure DevOps task runs as surface azure-devops-task ([#307](https://github.com/DiffCI/core/pull/307)); resolve Vue paths aliases against the declaring tsconfig without baseUrl ([#268](https://github.com/DiffCI/core/pull/268)); link the implementation next to a resolved declaration file ([#270](https://github.com/DiffCI/core/pull/270)); name the adapter runner when a repository has no test files ([#217](https://github.com/DiffCI/core/pull/217)); fall back when an npm lockfile bump meets undeclared imports ([#246](https://github.com/DiffCI/core/pull/246)); translate wildcards inside import.meta.glob brace alternatives ([#274](https://github.com/DiffCI/core/pull/274)); treat modelled Python files as code when resolving readers ([#257](https://github.com/DiffCI/core/pull/257)); let declared inputs and alwaysRunTests select pytest and Maven tests ([#272](https://github.com/DiffCI/core/pull/272)); cover a program the test script runs directly ([#306](https://github.com/DiffCI/core/pull/306)); keep a GitLab subgroup project's full path in the report ([#266](https://github.com/DiffCI/core/pull/266)); name a member NAME@VERSION when a dependency shares its name ([#232](https://github.com/DiffCI/core/pull/232)); keep required-feature targets' packages whole instead of blocking the repository ([#248](https://github.com/DiffCI/core/pull/248)); confine helper scripts and native sources to the crate that owns them ([#250](https://github.com/DiffCI/core/pull/250)); add covering crates instead of refusing when features would differ ([#254](https://github.com/DiffCI/core/pull/254)); pinned anstyle replay narrows real revisions with the same failures ([#258](https://github.com/DiffCI/core/pull/258)); read byte and C raw strings as raw in the input scan ([#228](https://github.com/DiffCI/core/pull/228)); treat quoted keys and inline tables in Cargo config as build settings ([#229](https://github.com/DiffCI/core/pull/229)); scan doctest code in doc comments for inputs ([#230](https://github.com/DiffCI/core/pull/230)); resolve literal paths from the workspace root too ([#231](https://github.com/DiffCI/core/pull/231)); list the Rust planner's no-command reasons and check them ([#233](https://github.com/DiffCI/core/pull/233)); restore the non-Windows branch of the .mcp.json MCP launcher ([#167](https://github.com/DiffCI/core/pull/167)); infer go test or pytest when package.json has no test script ([#293](https://github.com/DiffCI/core/pull/293)); cover every commit of a branch's first push ([#309](https://github.com/DiffCI/core/pull/309)); --tail-bytes 0 keeps no output, and tails are cut by bytes ([#239](https://github.com/DiffCI/core/pull/239)); fail verify when the time limit leaves gate checks unrun ([#260](https://github.com/DiffCI/core/pull/260)); plan verify --redact-paths with real paths, redact the receipt ([#276](https://github.com/DiffCI/core/pull/276)); read nested package-manager calls like top-level ones ([#198](https://github.com/DiffCI/core/pull/198)); run a Bun repository's test script with bun run test ([#199](https://github.com/DiffCI/core/pull/199)); accept literal #[path] modules inside their own crate ([#234](https://github.com/DiffCI/core/pull/234)); accept rustup chains, deny-warnings flags and whole-workspace cargo test as CI evidence ([#252](https://github.com/DiffCI/core/pull/252)); do not run gate steps once the time limit is used up ([#262](https://github.com/DiffCI/core/pull/262)); Do not report a changed worktree when there was no checkout to compare ([#283](https://github.com/DiffCI/core/pull/283)); install dependencies in the generated verification workflow ([#297](https://github.com/DiffCI/core/pull/297)); model local path packages inside the repository instead of blocking it ([#256](https://github.com/DiffCI/core/pull/256)).
296
- - <a href="https://github.com/shounakjoshi88-a11y"><img src="https://github.com/shounakjoshi88-a11y.png?size=80" width="40" height="40" alt="@shounakjoshi88-a11y"></a> **[Shounak Joshi](https://github.com/shounakjoshi88-a11y)**: Go package-owned `testdata` selection, so a golden-file edit runs the owning package's tests instead of the full suite ([#85](https://github.com/DiffCI/core/pull/85)).
306
+ - <a href="https://github.com/shounakjoshi88-a11y"><img src="https://github.com/shounakjoshi88-a11y.png?size=80" width="40" height="40" alt="@shounakjoshi88-a11y"></a> **[Shounak Joshi](https://github.com/shounakjoshi88-a11y)**: Go package-owned `testdata` selection, so a golden-file edit runs the owning package's tests instead of the full suite ([#85](https://github.com/DiffCI/core/pull/85)); scope a bare testdata reference to the reading package ([#334](https://github.com/DiffCI/core/pull/334)).
297
307
  - <a href="https://github.com/bfs2021"><img src="https://github.com/bfs2021.png?size=80" width="40" height="40" alt="@bfs2021"></a> **[@bfs2021](https://github.com/bfs2021)**: `bun.lock` and `npm-shrinkwrap.json` recognition in the lockfile signal ([#64](https://github.com/DiffCI/core/pull/64)).
298
- - <a href="https://github.com/sarankumar1325"><img src="https://github.com/sarankumar1325.png?size=80" width="40" height="40" alt="@sarankumar1325"></a> **[@sarankumar1325](https://github.com/sarankumar1325)**: lockfile and config-file signals. One shared lockfile list replaced every hand-written copy in `src/` ([#97](https://github.com/DiffCI/core/issues/97)): reference resolution, impact analysis and the lockfile-free dependency check ([#118](https://github.com/DiffCI/core/pull/118)–[#120](https://github.com/DiffCI/core/pull/120)), config-file discovery and impact classification, where `npm-shrinkwrap.json` is now a config change like every other lockfile ([#151](https://github.com/DiffCI/core/pull/151), [#152](https://github.com/DiffCI/core/pull/152)), the Vue analysis cache ([#107](https://github.com/DiffCI/core/pull/107)), CI inference ([#105](https://github.com/DiffCI/core/pull/105), [#146](https://github.com/DiffCI/core/pull/146)) and both path baselines, which now also fall back on `npm-shrinkwrap.json` ([#147](https://github.com/DiffCI/core/pull/147), [#148](https://github.com/DiffCI/core/pull/148)). A full run when only `babel.config.*` or `.babelrc*` changes ([#108](https://github.com/DiffCI/core/pull/108)) or a package's Jest, Vitest or Babel config changes ([#121](https://github.com/DiffCI/core/pull/121)), where these files used to select no tests. Regression tests for `vite.config`-only changes in Vitest projects ([#109](https://github.com/DiffCI/core/pull/109)) and for a root Vitest config that turns isolation off ([#149](https://github.com/DiffCI/core/pull/149)), and removal of dead config-file patterns with a test for every entry ([#106](https://github.com/DiffCI/core/pull/106)). Go `replace` targets inside the repository modelled under root-module scope instead of forcing the full suite ([#110](https://github.com/DiffCI/core/pull/110)). The [no-runnable-command reasons](docs/using-diffci.md#no-runnable-command), documented with a test that keeps the table complete ([#150](https://github.com/DiffCI/core/pull/150)), and `"\0"` escapes in place of raw NUL bytes, so git and ripgrep can search those source files again ([#145](https://github.com/DiffCI/core/pull/145)); document verify-workflow, pilot-packet, validate-specs and telemetry ([#153](https://github.com/DiffCI/core/pull/153)); pytest.ini wins even when empty, and read .pytest.ini ([#314](https://github.com/DiffCI/core/pull/314)); read pyproject pytest lists as TOML strings ([#315](https://github.com/DiffCI/core/pull/315)); pytest settings from tox.ini and setup.cfg ([#316](https://github.com/DiffCI/core/pull/316)); show that declared inputs select pytest tests, and document it ([#319](https://github.com/DiffCI/core/pull/319)); find tests under a relative <testSourceDirectory> ([#317](https://github.com/DiffCI/core/pull/317)); read pytest.toml and the native [tool.pytest] table ([#318](https://github.com/DiffCI/core/pull/318)).
308
+ - <a href="https://github.com/sarankumar1325"><img src="https://github.com/sarankumar1325.png?size=80" width="40" height="40" alt="@sarankumar1325"></a> **[@sarankumar1325](https://github.com/sarankumar1325)**: lockfile and config-file signals. One shared lockfile list replaced every hand-written copy in `src/` ([#97](https://github.com/DiffCI/core/issues/97)): reference resolution, impact analysis and the lockfile-free dependency check ([#118](https://github.com/DiffCI/core/pull/118)–[#120](https://github.com/DiffCI/core/pull/120)), config-file discovery and impact classification, where `npm-shrinkwrap.json` is now a config change like every other lockfile ([#151](https://github.com/DiffCI/core/pull/151), [#152](https://github.com/DiffCI/core/pull/152)), the Vue analysis cache ([#107](https://github.com/DiffCI/core/pull/107)), CI inference ([#105](https://github.com/DiffCI/core/pull/105), [#146](https://github.com/DiffCI/core/pull/146)) and both path baselines, which now also fall back on `npm-shrinkwrap.json` ([#147](https://github.com/DiffCI/core/pull/147), [#148](https://github.com/DiffCI/core/pull/148)). A full run when only `babel.config.*` or `.babelrc*` changes ([#108](https://github.com/DiffCI/core/pull/108)) or a package's Jest, Vitest or Babel config changes ([#121](https://github.com/DiffCI/core/pull/121)), where these files used to select no tests. Regression tests for `vite.config`-only changes in Vitest projects ([#109](https://github.com/DiffCI/core/pull/109)) and for a root Vitest config that turns isolation off ([#149](https://github.com/DiffCI/core/pull/149)), and removal of dead config-file patterns with a test for every entry ([#106](https://github.com/DiffCI/core/pull/106)). Go `replace` targets inside the repository modelled under root-module scope instead of forcing the full suite ([#110](https://github.com/DiffCI/core/pull/110)). The [no-runnable-command reasons](docs/using-diffci.md#no-runnable-command), documented with a test that keeps the table complete ([#150](https://github.com/DiffCI/core/pull/150)), and `"\0"` escapes in place of raw NUL bytes, so git and ripgrep can search those source files again ([#145](https://github.com/DiffCI/core/pull/145)); document verify-workflow, pilot-packet, validate-specs and telemetry ([#153](https://github.com/DiffCI/core/pull/153)); pytest.ini wins even when empty, and read .pytest.ini ([#314](https://github.com/DiffCI/core/pull/314)); read pyproject pytest lists as TOML strings ([#315](https://github.com/DiffCI/core/pull/315)); pytest settings from tox.ini and setup.cfg ([#316](https://github.com/DiffCI/core/pull/316)); show that declared inputs select pytest tests, and document it ([#319](https://github.com/DiffCI/core/pull/319)); find tests under a relative <testSourceDirectory> ([#317](https://github.com/DiffCI/core/pull/317)); read pytest.toml and the native [tool.pytest] table ([#318](https://github.com/DiffCI/core/pull/318)); fall back for Java sources outside the standard roots ([#328](https://github.com/DiffCI/core/pull/328)).
299
309
  - <a href="https://github.com/robertwmccarty-caelum"><img src="https://github.com/robertwmccarty-caelum.png?size=80" width="40" height="40" alt="@robertwmccarty-caelum"></a> **[@robertwmccarty-caelum](https://github.com/robertwmccarty-caelum)**: the Vitest reporter/timeout config fixture and its narrowing conditions ([#53](https://github.com/DiffCI/core/issues/53#issuecomment-6514436312), landed in [#65](https://github.com/DiffCI/core/pull/65)).
300
310
  - <a href="https://github.com/varshith84"><img src="https://github.com/varshith84.png?size=80" width="40" height="40" alt="@varshith84"></a> **[Varshith Sai Pasupuleti](https://github.com/varshith84)**: tests for transitive Vue selection and full fallback ([#16](https://github.com/DiffCI/core/pull/16)).
301
311
  - <a href="https://github.com/aniKet0753"><img src="https://github.com/aniKet0753.png?size=80" width="40" height="40" alt="@aniKet0753"></a> **[@aniKet0753](https://github.com/aniKet0753)**: a `diffci help` command list and `USAGE` text that match the commands the CLI runs, with a test that fails when a command is missing ([#130](https://github.com/DiffCI/core/pull/130)).
302
- - <a href="https://github.com/tyza66"><img src="https://github.com/tyza66.png?size=80" width="40" height="40" alt="@tyza66"></a> **[@tyza66](https://github.com/tyza66)**: name the tool configuration behind a fallback instead of "Unknown changed file" ([#144](https://github.com/DiffCI/core/pull/144)); name a tsconfig variant as TypeScript configuration instead of unknown ([#155](https://github.com/DiffCI/core/pull/155)); fall back for Mocha configuration, and say so ([#156](https://github.com/DiffCI/core/pull/156)); name tool-version files instead of reporting them as unknown ([#326](https://github.com/DiffCI/core/pull/326)).
312
+ - <a href="https://github.com/tyza66"><img src="https://github.com/tyza66.png?size=80" width="40" height="40" alt="@tyza66"></a> **[@tyza66](https://github.com/tyza66)**: name the tool configuration behind a fallback instead of "Unknown changed file" ([#144](https://github.com/DiffCI/core/pull/144)); name a tsconfig variant as TypeScript configuration instead of unknown ([#155](https://github.com/DiffCI/core/pull/155)); fall back for Mocha configuration, and say so ([#156](https://github.com/DiffCI/core/pull/156)); name tool-version files instead of reporting them as unknown ([#326](https://github.com/DiffCI/core/pull/326)); name mise.local.toml with the other tool-version files ([#332](https://github.com/DiffCI/core/pull/332)).
303
313
 
304
314
  Every merged contribution is credited in the release notes, here, on [diffci.com/contributors](https://diffci.com/contributors), and next to the feature in the docs. The README and website entries are added automatically when a pull request merges. A [contributor tier](CONTRIBUTING.md#contributor-tiers) above Contributor is written after the name, as in **[Area maintainer: Rust](CONTRIBUTING.md#contributor-tiers)**, and diffci.com copies it from here.
305
315
 
@@ -14,7 +14,8 @@
14
14
  * a recipe that does not rewrite files (`--fix`, `ruff format` or `black`/`isort` without a check flag);
15
15
  * - a direct `mypy`, `pyright`, `basedpyright`, `pyrefly check`, `ruff check` or `ruff format --check`
16
16
  * call, optionally behind `uv run`, `poetry run`, `pdm run`, `hatch run`, `pipenv run` or `python -m`,
17
- * whose every argument is a plain word and none rewrites files or writes output.
17
+ * whose every argument is a plain word and none rewrites files or writes output. Before `uv run`,
18
+ * --directory and --project take repository-relative paths; --offline and --no-progress take no value.
18
19
  *
19
20
  * FAILING CLOSED. Here that means adding nothing: anything not read with certainty is left out, which
20
21
  * is the behaviour before this module. Steps in disabled jobs, steps with expressions in their working
@@ -15,7 +15,8 @@
15
15
  * a recipe that does not rewrite files (`--fix`, `ruff format` or `black`/`isort` without a check flag);
16
16
  * - a direct `mypy`, `pyright`, `basedpyright`, `pyrefly check`, `ruff check` or `ruff format --check`
17
17
  * call, optionally behind `uv run`, `poetry run`, `pdm run`, `hatch run`, `pipenv run` or `python -m`,
18
- * whose every argument is a plain word and none rewrites files or writes output.
18
+ * whose every argument is a plain word and none rewrites files or writes output. Before `uv run`,
19
+ * --directory and --project take repository-relative paths; --offline and --no-progress take no value.
19
20
  *
20
21
  * FAILING CLOSED. Here that means adding nothing: anything not read with certainty is left out, which
21
22
  * is the behaviour before this module. Steps in disabled jobs, steps with expressions in their working
@@ -41,7 +42,7 @@ const CONTEXT_CHANGE = /^(?:cd|pushd|popd|source|\.|export|set|unset|alias)\s|\\
41
42
  const PY_TOOL = /\b(?:mypy|pyright|basedpyright|pyrefly|ruff|pylint|flake8|black|isort|pytype|lint-imports)\b/;
42
43
  const JS_TOOL = /\b(?:npm|npx|pnpm|yarn|node|tsc|eslint|prettier|bun|deno|vp|turbo|nx)\b/;
43
44
  const PY_FILE = /\.(?:py|pyi|pyx|pxd|ipynb)$/;
44
- const PY_CONFIG = /^(?:pyproject\.toml|setup\.cfg|setup\.py|mypy\.ini|\.mypy\.ini|pyrightconfig\.json|pyrefly\.toml|ruff\.toml|\.ruff\.toml|tox\.ini|uv\.lock|poetry\.lock|pdm\.lock|Pipfile|Pipfile\.lock|\.python-version|py\.typed|(?:requirements|constraints)[\w.-]*\.(?:txt|in))$/;
45
+ const PY_CONFIG = /^(?:pyproject\.toml|setup\.cfg|setup\.py|mypy\.ini|\.mypy\.ini|pyrightconfig\.json|pyrefly\.toml|ruff\.toml|\.ruff\.toml|tox\.ini|uv\.toml|uv\.lock|poetry\.lock|pdm\.lock|Pipfile|Pipfile\.lock|\.python-version|py\.typed|(?:requirements|constraints)[\w.-]*\.(?:txt|in))$/;
45
46
  const MAKEFILES = ["GNUmakefile", "makefile", "Makefile"];
46
47
  function normalizeDir(dir) {
47
48
  if (/\$\{\{|\.\.|^\//.test(dir))
@@ -73,11 +74,40 @@ function rewrites(line) {
73
74
  return true;
74
75
  return false;
75
76
  }
77
+ /** Strip only recognized pre-run globals for matching. Keep the original command for execution so
78
+ * uv applies --directory and --project itself, in the order specified by the workflow. */
79
+ function withoutUvGlobals(command) {
80
+ if (!command.startsWith("uv --"))
81
+ return command;
82
+ const words = command.split(" ");
83
+ const seen = new Set();
84
+ let i = 1;
85
+ while (i < words.length) {
86
+ const word = words[i++];
87
+ if (word === "run")
88
+ return ["uv", "run", ...words.slice(i)].join(" ");
89
+ const equals = word.indexOf("=");
90
+ const option = equals < 0 ? word : word.slice(0, equals);
91
+ if (seen.has(option))
92
+ return undefined;
93
+ seen.add(option);
94
+ if (word === "--offline" || word === "--no-progress")
95
+ continue;
96
+ if (option !== "--directory" && option !== "--project")
97
+ return undefined;
98
+ const path = equals < 0 ? words[i++] : word.slice(equals + 1);
99
+ if (!path || !/^[\w.][\w./-]*$/.test(path) || normalizeDir(path) === undefined)
100
+ return undefined;
101
+ }
102
+ return undefined;
103
+ }
76
104
  /** A direct Python tool call, normalized, with its kind; undefined when the line is anything else. */
77
105
  export function directToolCall(line) {
78
106
  const command = line.trim().replace(/\s+/g, " ");
79
- const prefix = RUNNER_PREFIX.exec(command)[0];
80
- const rest = command.slice(prefix.length);
107
+ const invocation = withoutUvGlobals(command);
108
+ if (!invocation)
109
+ return undefined;
110
+ const rest = invocation.replace(RUNNER_PREFIX, "");
81
111
  const tool = TOOL.exec(rest);
82
112
  if (!tool)
83
113
  return undefined;
@@ -118,8 +148,7 @@ function makeTarget(dir, target, read) {
118
148
  }
119
149
  return undefined;
120
150
  }
121
- /** True when every recipe line is an echo, a Python tool call, or a repository script that calls a Python
122
- * tool and no JavaScript tool; also returns those scripts. Undefined when any line is something else. */
151
+ /** Repository scripts read by a Python-only recipe, or undefined when a line cannot be classified. */
123
152
  function pythonOnlyRecipe(target, dir, read) {
124
153
  if (target.prerequisites.includes(";"))
125
154
  return undefined;
@@ -134,7 +163,11 @@ function pythonOnlyRecipe(target, dir, read) {
134
163
  if (JS_TOOL.test(line))
135
164
  return undefined;
136
165
  const script = /^(?:(?:bash|sh)\s+)?(\.?\/?[\w./-]+)(?:\s|$)/.exec(line)?.[1];
137
- if (directToolCall(line.replace(/\s+\$\([\w]+\)/g, ""))) {
166
+ const call = directToolCall(line.replace(/\s+\$\([\w]+\)/g, ""));
167
+ if (call) {
168
+ // A Make expansion could supply an additional uv option or the command after run.
169
+ if (call.command.startsWith("uv --") && line.includes("$("))
170
+ return undefined;
138
171
  usesPython = true;
139
172
  continue;
140
173
  }
@@ -239,7 +272,10 @@ function toolCheck(line, workflowPath) {
239
272
  const call = directToolCall(line);
240
273
  if (!call)
241
274
  return undefined;
242
- return { id: call.command, script: workflowPath, runsScript: false, command: call.command, kind: call.kind, decision: "RUN", reason: `run by CI workflow ${workflowPath}`, pythonOnly: true, triggers: [] };
275
+ return {
276
+ id: call.command, script: workflowPath, runsScript: false, command: call.command, kind: call.kind,
277
+ decision: "RUN", reason: `run by CI workflow ${workflowPath}`, pythonOnly: true, triggers: [],
278
+ };
243
279
  }
244
280
  function pythonRelevant(path) {
245
281
  return PY_FILE.test(path) || PY_CONFIG.test(posix.basename(path)) || path.startsWith(".github/workflows/");
@@ -1 +1 @@
1
- {"version":3,"file":"python-checks.js","sourceRoot":"","sources":["../../src/planner/python-checks.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAiB7B,MAAM,SAAS,GAAG,2CAA2C,CAAC;AAC9D,MAAM,YAAY,GAAG,wGAAwG,CAAC;AAC9H,MAAM,aAAa,GAAG,8MAA8M,CAAC;AACrO,MAAM,IAAI,GAAG,iFAAiF,CAAC;AAC/F,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AACnC,MAAM,aAAa,GAAG,qMAAqM,CAAC;AAC5N,MAAM,cAAc,GAAG,2DAA2D,CAAC;AACnF,MAAM,OAAO,GAAG,8FAA8F,CAAC;AAC/G,MAAM,OAAO,GAAG,yEAAyE,CAAC;AAC1F,MAAM,OAAO,GAAG,6BAA6B,CAAC;AAC9C,MAAM,SAAS,GAAG,sQAAsQ,CAAC;AACzR,MAAM,SAAS,GAAG,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAE1D,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAClD,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EA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K,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,kDAAkD,EAAE,CAAC;IAChH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -125,6 +125,20 @@ export declare function scriptNamesPath(body: string, target: string, pattern: R
125
125
  ancestors?: boolean;
126
126
  cwd?: string;
127
127
  }): boolean;
128
+ /**
129
+ * `content` with each run of adjacent string-literal arguments to a path-joining call written as the one
130
+ * path they join to (2026-11-20). `path.join("ops", "cloudflare-d1", "gateway", "x.mjs")` names
131
+ * `ops/cloudflare-d1/gateway/x.mjs`, but read word by word its bare `"cloudflare-d1"` named every file
132
+ * under that directory: DentalPresence's scripts/test-security.js, which `npm test` runs, made every
133
+ * change to ops/cloudflare-d1/staging-sync/plans.json - 23 of 29 migration commits - a full run.
134
+ *
135
+ * A run after a non-literal argument (`join(root, "ops", ...)`) is relative to a directory the content
136
+ * does not name, so it is written behind a leading variable (`$base/ops/...`), which contentNamesPath
137
+ * already reads as a path below an unknown directory. A run that ends at a directory still names
138
+ * everything under it, and a single literal between variables (`join(root, "ops", name)`) is left bare,
139
+ * so a dynamic path keeps the conservative answer.
140
+ */
141
+ export declare function foldJoinedLiterals(content: string): string;
128
142
  /**
129
143
  * Whether `content`, read from `readerPath`, names `target` (or, with `ancestors`, one of its
130
144
  * directories), once each matching word is read as a whole path (2026-10-28). The reference pattern
@@ -261,6 +261,98 @@ export function scriptNamesPath(body, target, pattern, { ancestors = true, cwd =
261
261
  return false;
262
262
  }
263
263
  const CONTENT_PATH_WORD = /[A-Za-z0-9._\-/@+~*?{}[\]!,$]+/g;
264
+ /** `path.join(`, `posix.join(`, `os.path.join(`, `filepath.Join(`, `path.resolve(`. */
265
+ const PATH_JOIN_CALL = /\b(?:join|Join|resolve)\s*\(/g;
266
+ /** A string literal with no escape or substitution, so its text is exactly the string. */
267
+ const PLAIN_LITERAL = /^(["'`])([^"'`\\\n$]*)\1$/;
268
+ /** Arguments are scanned this far at most; a longer call is left as written. */
269
+ const MAX_JOIN_CALL = 1000;
270
+ /** The arguments of the call whose `(` ends just before `start`, or undefined if it does not close. */
271
+ function callArguments(content, start) {
272
+ const args = [];
273
+ const limit = Math.min(content.length, start + MAX_JOIN_CALL);
274
+ let depth = 0;
275
+ let argStart = start;
276
+ const finish = (end) => {
277
+ const text = content.slice(argStart, end);
278
+ const lead = text.length - text.trimStart().length;
279
+ const trimmed = text.trim();
280
+ if (trimmed)
281
+ args.push({ start: argStart + lead, end: argStart + lead + trimmed.length, literal: PLAIN_LITERAL.exec(trimmed)?.[2] });
282
+ };
283
+ for (let i = start; i < limit; i++) {
284
+ const char = content[i];
285
+ if (char === '"' || char === "'" || char === "`") {
286
+ // Skip the literal; an unclosed one leaves the call unfolded.
287
+ let j = i + 1;
288
+ while (j < limit && content[j] !== char)
289
+ j += content[j] === "\\" ? 2 : 1;
290
+ if (j >= limit)
291
+ return undefined;
292
+ i = j;
293
+ }
294
+ else if (char === "(" || char === "[" || char === "{")
295
+ depth++;
296
+ else if (char === ")" || char === "]" || char === "}") {
297
+ if (depth === 0) {
298
+ if (char !== ")")
299
+ return undefined;
300
+ finish(i);
301
+ return args;
302
+ }
303
+ depth--;
304
+ }
305
+ else if (char === "," && depth === 0) {
306
+ finish(i);
307
+ argStart = i + 1;
308
+ }
309
+ }
310
+ return undefined;
311
+ }
312
+ /**
313
+ * `content` with each run of adjacent string-literal arguments to a path-joining call written as the one
314
+ * path they join to (2026-11-20). `path.join("ops", "cloudflare-d1", "gateway", "x.mjs")` names
315
+ * `ops/cloudflare-d1/gateway/x.mjs`, but read word by word its bare `"cloudflare-d1"` named every file
316
+ * under that directory: DentalPresence's scripts/test-security.js, which `npm test` runs, made every
317
+ * change to ops/cloudflare-d1/staging-sync/plans.json - 23 of 29 migration commits - a full run.
318
+ *
319
+ * A run after a non-literal argument (`join(root, "ops", ...)`) is relative to a directory the content
320
+ * does not name, so it is written behind a leading variable (`$base/ops/...`), which contentNamesPath
321
+ * already reads as a path below an unknown directory. A run that ends at a directory still names
322
+ * everything under it, and a single literal between variables (`join(root, "ops", name)`) is left bare,
323
+ * so a dynamic path keeps the conservative answer.
324
+ */
325
+ export function foldJoinedLiterals(content) {
326
+ if (!/\b(?:join|Join|resolve)\s*\(/.test(content))
327
+ return content;
328
+ let folded = "";
329
+ let last = 0;
330
+ for (const call of content.matchAll(PATH_JOIN_CALL)) {
331
+ const start = call.index + call[0].length;
332
+ if (start < last)
333
+ continue;
334
+ const args = callArguments(content, start);
335
+ if (!args)
336
+ continue;
337
+ for (let i = 0; i < args.length;) {
338
+ if (args[i].literal === undefined) {
339
+ i++;
340
+ continue;
341
+ }
342
+ let j = i;
343
+ while (j + 1 < args.length && args[j + 1].literal !== undefined)
344
+ j++;
345
+ if (j > i) {
346
+ const joined = args.slice(i, j + 1).map((arg) => arg.literal).filter(Boolean).join("/").replace(/\/{2,}/g, "/");
347
+ const path = i > 0 && !joined.startsWith("/") ? `$base/${joined}` : joined;
348
+ folded += `${content.slice(last, args[i].start)}"${path}"`;
349
+ last = args[j].end;
350
+ }
351
+ i = j + 1;
352
+ }
353
+ }
354
+ return folded + content.slice(last);
355
+ }
264
356
  /** Keys whose list names files a tool skips: tsconfig and Vitest `exclude`, knip `ignore`, ESLint-style
265
357
  * `ignores` and `ignorePatterns`, Jest `testPathIgnorePatterns` and its siblings. */
266
358
  const EXCLUSION_LOOKBACK = 4096;
@@ -333,6 +425,8 @@ function namesDirectoryOf(content, readerPath, target) {
333
425
  export function contentNamesPath(content, readerPath, target, pattern, ancestors, readGlobs = true) {
334
426
  if (!pattern.test(content))
335
427
  return false;
428
+ // Every path a join folds to was spelled out by its parts, so the raw test above stays a valid filter.
429
+ content = foldJoinedLiterals(content);
336
430
  const dirs = [];
337
431
  for (let dir = posix.dirname(target); ancestors && dir !== "." && dir !== "/"; dir = posix.dirname(dir))
338
432
  dirs.push(dir);