@diffci.com/diffci 0.3.49 → 0.3.51
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.
- package/dist-client/src/client/failure-baseline.js +0 -0
- package/dist-client/src/client/red-builds.d.ts +29 -1
- package/dist-client/src/client/red-builds.js +63 -15
- package/node_modules/@diffci.com/core/README.md +6 -5
- package/node_modules/@diffci.com/core/dist/ci-inference/evidence.js +2 -1
- package/node_modules/@diffci.com/core/dist/ci-inference/evidence.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/git/git-diff.js +7 -1
- package/node_modules/@diffci.com/core/dist/git/git-diff.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/planner/path-baseline.js +2 -1
- package/node_modules/@diffci.com/core/dist/planner/path-baseline.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/analyzer.js +3 -5
- package/node_modules/@diffci.com/core/dist/repo/analyzer.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/impact.js +51 -5
- package/node_modules/@diffci.com/core/dist/repo/impact.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/research/baseline/path-baseline.js +4 -1
- package/node_modules/@diffci.com/core/dist/research/baseline/path-baseline.js.map +1 -1
- package/node_modules/@diffci.com/core/src/ci-inference/evidence.ts +2 -1
- package/node_modules/@diffci.com/core/src/git/git-diff.ts +7 -1
- package/node_modules/@diffci.com/core/src/planner/path-baseline.ts +2 -1
- package/node_modules/@diffci.com/core/src/repo/analyzer.ts +3 -5
- package/node_modules/@diffci.com/core/src/repo/impact.ts +47 -5
- package/node_modules/@diffci.com/core/src/research/baseline/path-baseline.ts +3 -1
- package/package.json +2 -2
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 2 (2026-11-16): rows carry `branchAgent`, the report adds `byBranchAgent`, and an agent
|
|
3
3
|
* found by its branch prefix is named (`"copilot"`) with `source: "branch"` instead of `"branch prefix"`.
|
|
4
4
|
*/
|
|
5
|
-
export declare const RED_BUILDS_SCHEMA =
|
|
5
|
+
export declare const RED_BUILDS_SCHEMA = 3;
|
|
6
6
|
export type JobBucket = "infra" | "ci-only" | "check";
|
|
7
7
|
export type Verdict = "preventable" | "partly" | "likely" | "shared" | "ci-only" | "flaky" | "infra";
|
|
8
8
|
export declare const VERDICTS: readonly Verdict[];
|
|
@@ -16,6 +16,8 @@ export interface RunSummary {
|
|
|
16
16
|
headRepo: string;
|
|
17
17
|
conclusion: string | null;
|
|
18
18
|
createdAt: string;
|
|
19
|
+
/** Who triggered the run. Used only to count distinct authors; never written to the report. */
|
|
20
|
+
actor?: string;
|
|
19
21
|
}
|
|
20
22
|
export interface JobSummary {
|
|
21
23
|
id: number;
|
|
@@ -78,6 +80,11 @@ export interface ClassifyInput {
|
|
|
78
80
|
patterns?: Patterns;
|
|
79
81
|
}
|
|
80
82
|
/** Pure: sorts every red run whose jobs were read into one verdict. */
|
|
83
|
+
/**
|
|
84
|
+
* One key per pull request: its head repository and branch. GitHub links no pull request to runs from forks,
|
|
85
|
+
* so the branch is the one identity every run has.
|
|
86
|
+
*/
|
|
87
|
+
export declare function pullRequestKey(run: RunSummary): string;
|
|
81
88
|
export declare function classify(input: ClassifyInput): RedRun[];
|
|
82
89
|
/** The coding agent a branch is named after: `copilot/fix-123` and `claude-fix` give "copilot" and "claude". */
|
|
83
90
|
export declare function branchAgent(branch: string): string | null;
|
|
@@ -89,6 +96,8 @@ export declare function agentMarker(message: string, branch: string): {
|
|
|
89
96
|
/** Pull request runs and red-run verdicts for one group of branches. */
|
|
90
97
|
export interface BranchAgentSlice {
|
|
91
98
|
pullRequestRuns: number;
|
|
99
|
+
/** Runs that actually ran: not waiting for approval, skipped, still running, or failed before any job. */
|
|
100
|
+
ranRuns: number;
|
|
92
101
|
redRuns: number;
|
|
93
102
|
analysed: number;
|
|
94
103
|
verdicts: Record<Verdict, number>;
|
|
@@ -106,16 +115,33 @@ export interface RedBuildsReport {
|
|
|
106
115
|
to: string;
|
|
107
116
|
} | null;
|
|
108
117
|
pullRequestRuns: number;
|
|
118
|
+
/**
|
|
119
|
+
* Runs that actually ran, the denominator for red rates. Left out: runs waiting for approval
|
|
120
|
+
* (`action_required`, common on coding-agent pull requests), skipped, startup failures, still queued or
|
|
121
|
+
* running, and runs marked failed although no job started.
|
|
122
|
+
*/
|
|
123
|
+
ranRuns: number;
|
|
109
124
|
/** Red runs where at least one job ran. */
|
|
110
125
|
redRuns: number;
|
|
111
126
|
/** Runs GitHub marked failed although no job started (workflow startup failures); left out of redRuns. */
|
|
112
127
|
neverStarted: number;
|
|
113
128
|
analysed: number;
|
|
114
129
|
unreadable: number;
|
|
130
|
+
/** Per verdict: red runs, their runner-minutes, and the distinct pull requests they came from. */
|
|
115
131
|
verdicts: Record<Verdict, {
|
|
116
132
|
runs: number;
|
|
117
133
|
runnerMinutes: number;
|
|
134
|
+
pullRequests: number;
|
|
118
135
|
}>;
|
|
136
|
+
/** Distinct pull requests among the analysed red runs. */
|
|
137
|
+
redPullRequests: number;
|
|
138
|
+
/**
|
|
139
|
+
* The most preventable runs from any one pull request. Every push to a branch whose checks fail is another
|
|
140
|
+
* red run, so one long-lived branch (often a maintainer letting CI run the tests) can dominate the run count.
|
|
141
|
+
*/
|
|
142
|
+
largestPreventablePullRequest: number;
|
|
143
|
+
/** Distinct people who triggered the preventable runs: a count only, no names. */
|
|
144
|
+
preventableAuthors: number;
|
|
119
145
|
agentWrittenPreventable: number;
|
|
120
146
|
/**
|
|
121
147
|
* The same counts split by the coding agent each run's head branch is named after (`copilot`, `claude`...),
|
|
@@ -127,6 +153,8 @@ export interface RedBuildsReport {
|
|
|
127
153
|
}
|
|
128
154
|
/** `neverStarted`: the runs marked failed although no job started, as ids (for the per-agent split) or a count. */
|
|
129
155
|
export declare function summarise(repository: string, runs: RunSummary[], rows: RedRun[], stoppedEarly: string | null, neverStarted?: number | ReadonlySet<number>): RedBuildsReport;
|
|
156
|
+
/** One pull request holds most of the preventable runs (at least 3, and more than half). */
|
|
157
|
+
export declare function dominated(report: RedBuildsReport): boolean;
|
|
130
158
|
export declare function formatReport(report: RedBuildsReport): string;
|
|
131
159
|
export type GitHubGet = (path: string) => Promise<{
|
|
132
160
|
status: number;
|
|
@@ -28,7 +28,7 @@ import { writeFileSync } from "node:fs";
|
|
|
28
28
|
* 2 (2026-11-16): rows carry `branchAgent`, the report adds `byBranchAgent`, and an agent
|
|
29
29
|
* found by its branch prefix is named (`"copilot"`) with `source: "branch"` instead of `"branch prefix"`.
|
|
30
30
|
*/
|
|
31
|
-
export const RED_BUILDS_SCHEMA =
|
|
31
|
+
export const RED_BUILDS_SCHEMA = 3;
|
|
32
32
|
const REPOSITORY = /^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9._-]{1,100}$/;
|
|
33
33
|
const INFRA_STEP = /set up|setup|checkout|install|cache|download|upload|restore|docker|login|post /i;
|
|
34
34
|
/** Jobs no local check can stand in for, whatever else the name says ("e2e tests" is not a unit test). */
|
|
@@ -105,10 +105,17 @@ function minutes(job) {
|
|
|
105
105
|
return Math.max(0, (Date.parse(job.completedAt) - Date.parse(job.startedAt)) / 60_000);
|
|
106
106
|
}
|
|
107
107
|
/** Pure: sorts every red run whose jobs were read into one verdict. */
|
|
108
|
+
/**
|
|
109
|
+
* One key per pull request: its head repository and branch. GitHub links no pull request to runs from forks,
|
|
110
|
+
* so the branch is the one identity every run has.
|
|
111
|
+
*/
|
|
112
|
+
export function pullRequestKey(run) {
|
|
113
|
+
return `${run.headRepo}:${run.headBranch}`;
|
|
114
|
+
}
|
|
108
115
|
export function classify(input) {
|
|
109
116
|
const patterns = input.patterns ?? DEFAULT_PATTERNS;
|
|
110
117
|
const passed = new Set(input.runs.filter((r) => r.conclusion === "success").map((r) => `${r.workflowId}:${r.headSha}`));
|
|
111
|
-
const prKey =
|
|
118
|
+
const prKey = pullRequestKey;
|
|
112
119
|
const failingOf = (jobs) => jobs.filter((j) => j.conclusion === "failure" || j.conclusion === "timed_out");
|
|
113
120
|
// Which PRs each failure signature, and each failing check job, appeared on across the whole window.
|
|
114
121
|
const seen = new Map();
|
|
@@ -215,13 +222,15 @@ function sliceByBranchAgent(runs, rows, neverStartedIds) {
|
|
|
215
222
|
const sliceOf = (agent) => {
|
|
216
223
|
const key = agent ?? NO_AGENT_BRANCH;
|
|
217
224
|
return slices[key] ??= {
|
|
218
|
-
pullRequestRuns: 0, redRuns: 0, analysed: 0, preventableRunnerMinutes: 0,
|
|
225
|
+
pullRequestRuns: 0, ranRuns: 0, redRuns: 0, analysed: 0, preventableRunnerMinutes: 0,
|
|
219
226
|
verdicts: Object.fromEntries(VERDICTS.map((v) => [v, 0])),
|
|
220
227
|
};
|
|
221
228
|
};
|
|
222
229
|
for (const run of runs) {
|
|
223
230
|
const slice = sliceOf(branchAgent(run.headBranch));
|
|
224
231
|
slice.pullRequestRuns++;
|
|
232
|
+
if (ran(run) && !neverStartedIds.has(run.id))
|
|
233
|
+
slice.ranRuns++;
|
|
225
234
|
if (run.conclusion === "failure" && !neverStartedIds.has(run.id))
|
|
226
235
|
slice.redRuns++;
|
|
227
236
|
}
|
|
@@ -240,13 +249,28 @@ function sliceByBranchAgent(runs, rows, neverStartedIds) {
|
|
|
240
249
|
export function summarise(repository, runs, rows, stoppedEarly, neverStarted = 0) {
|
|
241
250
|
const neverStartedIds = typeof neverStarted === "number" ? new Set() : neverStarted;
|
|
242
251
|
const neverStartedCount = typeof neverStarted === "number" ? neverStarted : neverStarted.size;
|
|
243
|
-
const verdicts = Object.fromEntries(VERDICTS.map((v) => [v, { runs: 0, runnerMinutes: 0 }]));
|
|
252
|
+
const verdicts = Object.fromEntries(VERDICTS.map((v) => [v, { runs: 0, runnerMinutes: 0, pullRequests: 0 }]));
|
|
253
|
+
const byId = new Map(runs.map((run) => [run.id, run]));
|
|
254
|
+
const pullRequestsOf = Object.fromEntries(VERDICTS.map((v) => [v, new Set()]));
|
|
255
|
+
const redPullRequests = new Set();
|
|
256
|
+
const preventablePerPullRequest = new Map();
|
|
257
|
+
const preventableAuthors = new Set();
|
|
244
258
|
for (const row of rows) {
|
|
245
259
|
verdicts[row.verdict].runs++;
|
|
246
260
|
verdicts[row.verdict].runnerMinutes += row.runnerMinutes;
|
|
261
|
+
const run = byId.get(row.run);
|
|
262
|
+
const key = run ? pullRequestKey(run) : `run:${row.run}`;
|
|
263
|
+
pullRequestsOf[row.verdict].add(key);
|
|
264
|
+
redPullRequests.add(key);
|
|
265
|
+
if (row.verdict === "preventable") {
|
|
266
|
+
preventablePerPullRequest.set(key, (preventablePerPullRequest.get(key) ?? 0) + 1);
|
|
267
|
+
preventableAuthors.add(run?.actor || key);
|
|
268
|
+
}
|
|
247
269
|
}
|
|
248
|
-
for (const v of VERDICTS)
|
|
270
|
+
for (const v of VERDICTS) {
|
|
249
271
|
verdicts[v].runnerMinutes = Math.round(verdicts[v].runnerMinutes);
|
|
272
|
+
verdicts[v].pullRequests = pullRequestsOf[v].size;
|
|
273
|
+
}
|
|
250
274
|
const times = runs.map((r) => r.createdAt).sort();
|
|
251
275
|
const red = runs.filter((r) => r.conclusion === "failure").length - neverStartedCount;
|
|
252
276
|
return {
|
|
@@ -255,11 +279,15 @@ export function summarise(repository, runs, rows, stoppedEarly, neverStarted = 0
|
|
|
255
279
|
workflow: runs[0]?.workflowName ?? null,
|
|
256
280
|
window: times.length ? { from: times[0], to: times.at(-1) } : null,
|
|
257
281
|
pullRequestRuns: runs.length,
|
|
282
|
+
ranRuns: runs.filter(ran).length - neverStartedCount,
|
|
258
283
|
redRuns: red,
|
|
259
284
|
neverStarted: neverStartedCount,
|
|
260
285
|
analysed: rows.length,
|
|
261
286
|
unreadable: red - rows.length,
|
|
262
287
|
verdicts,
|
|
288
|
+
redPullRequests: redPullRequests.size,
|
|
289
|
+
largestPreventablePullRequest: Math.max(0, ...preventablePerPullRequest.values()),
|
|
290
|
+
preventableAuthors: preventableAuthors.size,
|
|
263
291
|
agentWrittenPreventable: rows.filter((r) => r.verdict === "preventable" && r.agent?.written).length,
|
|
264
292
|
byBranchAgent: sliceByBranchAgent(runs, rows, neverStartedIds),
|
|
265
293
|
stoppedEarly,
|
|
@@ -283,31 +311,41 @@ const NOTES = {
|
|
|
283
311
|
function pct(part, whole) {
|
|
284
312
|
return whole ? `${Math.round((part / whole) * 100)}%` : "0%";
|
|
285
313
|
}
|
|
314
|
+
/** A run that finished after its jobs ran (pass or fail), as opposed to waiting, skipped or still running. */
|
|
315
|
+
function ran(run) {
|
|
316
|
+
return run.conclusion !== null && !IDLE_CONCLUSION.has(run.conclusion);
|
|
317
|
+
}
|
|
286
318
|
/** A table of the per-agent split, shown only when some branch is named after a coding agent. */
|
|
287
319
|
function formatBranchAgents(report) {
|
|
288
320
|
const agents = Object.keys(report.byBranchAgent).filter((key) => key !== NO_AGENT_BRANCH).sort();
|
|
289
321
|
if (agents.length === 0)
|
|
290
322
|
return [];
|
|
291
|
-
const lines = ["", `${"By branch prefix".padEnd(20)}${"PR runs".padStart(9)}${"red".padStart(12)}${"preventable".padStart(16)}`];
|
|
323
|
+
const lines = ["", `${"By branch prefix".padEnd(20)}${"PR runs".padStart(9)}${"ran".padStart(7)}${"red".padStart(12)}${"preventable".padStart(16)}`];
|
|
292
324
|
for (const key of [...agents, NO_AGENT_BRANCH]) {
|
|
293
325
|
const slice = report.byBranchAgent[key];
|
|
294
326
|
if (!slice)
|
|
295
327
|
continue;
|
|
296
328
|
const label = key === NO_AGENT_BRANCH ? "other branches" : `${key}/...`;
|
|
297
|
-
const red = `${slice.redRuns} (${pct(slice.redRuns, slice.
|
|
329
|
+
const red = `${slice.redRuns} (${pct(slice.redRuns, slice.ranRuns)})`;
|
|
298
330
|
const preventable = `${slice.verdicts.preventable} of ${slice.analysed}`;
|
|
299
|
-
lines.push(` ${label.padEnd(18)}${String(slice.pullRequestRuns).padStart(9)}${red.padStart(12)}${preventable.padStart(16)}`);
|
|
331
|
+
lines.push(` ${label.padEnd(18)}${String(slice.pullRequestRuns).padStart(9)}${String(slice.ranRuns).padStart(7)}${red.padStart(12)}${preventable.padStart(16)}`);
|
|
300
332
|
}
|
|
333
|
+
lines.push("Red is a share of the runs that ran: runs waiting for approval, skipped or still running are left out.");
|
|
301
334
|
lines.push("Agents that use ordinary branch names count under other branches.");
|
|
302
335
|
return lines;
|
|
303
336
|
}
|
|
337
|
+
/** One pull request holds most of the preventable runs (at least 3, and more than half). */
|
|
338
|
+
export function dominated(report) {
|
|
339
|
+
const largest = report.largestPreventablePullRequest;
|
|
340
|
+
return largest >= 3 && largest * 2 > report.verdicts.preventable.runs;
|
|
341
|
+
}
|
|
304
342
|
export function formatReport(report) {
|
|
305
343
|
const lines = [`DiffCI red-build check: ${report.repository}${report.workflow ? ` · workflow "${report.workflow}"` : ""}`];
|
|
306
344
|
if (!report.window) {
|
|
307
345
|
lines.push("", "No pull request workflow runs found.");
|
|
308
346
|
return lines.join("\n");
|
|
309
347
|
}
|
|
310
|
-
lines.push(`${report.window.from.slice(0, 16).replace("T", " ")} to ${report.window.to.slice(0, 16).replace("T", " ")} UTC · ${report.pullRequestRuns} pull request runs, ${report.redRuns} red (${pct(report.redRuns, report.
|
|
348
|
+
lines.push(`${report.window.from.slice(0, 16).replace("T", " ")} to ${report.window.to.slice(0, 16).replace("T", " ")} UTC · ${report.pullRequestRuns} pull request runs, ${report.redRuns} red (${pct(report.redRuns, report.ranRuns)}${report.ranRuns === report.pullRequestRuns ? "" : ` of the ${report.ranRuns} that ran`})`);
|
|
311
349
|
if (report.neverStarted > 0)
|
|
312
350
|
lines.push(`${report.neverStarted} more runs were marked failed although no job started (the workflow failed to start); they are not counted as red.`);
|
|
313
351
|
if (report.unreadable > 0)
|
|
@@ -316,19 +354,22 @@ export function formatReport(report) {
|
|
|
316
354
|
lines.push("", "No red runs to analyse.");
|
|
317
355
|
return lines.join("\n");
|
|
318
356
|
}
|
|
319
|
-
lines.push("", `${"Red runs by cause".padEnd(38)}${"runs".padStart(6)}${"runner-min".padStart(12)}`);
|
|
357
|
+
lines.push("", `${"Red runs by cause".padEnd(38)}${"runs".padStart(6)}${"PRs".padStart(6)}${"runner-min".padStart(12)}`);
|
|
320
358
|
for (const v of VERDICTS) {
|
|
321
|
-
const { runs, runnerMinutes } = report.verdicts[v];
|
|
359
|
+
const { runs, runnerMinutes, pullRequests } = report.verdicts[v];
|
|
322
360
|
if (runs === 0 && v !== "preventable")
|
|
323
361
|
continue;
|
|
324
362
|
const note = NOTES[v] ? ` ${NOTES[v]}` : "";
|
|
325
|
-
lines.push(` ${LABELS[v].padEnd(36)}${String(runs).padStart(6)}${runnerMinutes.toLocaleString("en-US").padStart(12)}${note}`);
|
|
363
|
+
lines.push(` ${LABELS[v].padEnd(36)}${String(runs).padStart(6)}${String(pullRequests).padStart(6)}${runnerMinutes.toLocaleString("en-US").padStart(12)}${note}`);
|
|
326
364
|
if (v === "preventable" && runs > 0)
|
|
327
365
|
lines.push(` ${"written by a coding agent".padEnd(34)}${String(report.agentWrittenPreventable).padStart(6)}`);
|
|
328
366
|
}
|
|
329
367
|
const p = report.verdicts.preventable.runs;
|
|
330
368
|
const likely = report.verdicts.likely.runs;
|
|
331
|
-
lines.push("", `Up to ${p} of ${report.analysed} red runs (${pct(p, report.analysed)}) failed only on checks the author could have run before pushing.`, ...(likely ? [`${likely} more failed on such checks without annotations, so whose failure it was is unconfirmed.`] : []),
|
|
369
|
+
lines.push("", `Up to ${p} of ${report.analysed} red runs (${pct(p, report.analysed)}) failed only on checks the author could have run before pushing.`, ...(likely ? [`${likely} more failed on such checks without annotations, so whose failure it was is unconfirmed.`] : []), ...(p ? [`By pull request: ${report.verdicts.preventable.pullRequests} of ${report.redPullRequests} red pull requests (${pct(report.verdicts.preventable.pullRequests, report.redPullRequests)}), from ${report.preventableAuthors} ${report.preventableAuthors === 1 ? "author" : "authors"}.`] : []), ...(dominated(report) ? [
|
|
370
|
+
`One pull request accounts for ${report.largestPreventablePullRequest} of the ${p} preventable runs. Every push to a branch whose checks fail counts again,`,
|
|
371
|
+
"so a long-lived branch where someone lets CI run the tests (often a maintainer's) can dominate: read the pull request count first.",
|
|
372
|
+
] : []), "That is an upper bound: it assumes the check ran and covered the failing test. CI history only; nothing was run.", ...formatBranchAgents(report), "", "Catch these inside your coding agent's loop, before the push: npx @diffci.com/diffci init", "Method: https://github.com/DiffCI/core/blob/main/docs/red-builds.md");
|
|
332
373
|
if (report.stoppedEarly)
|
|
333
374
|
lines.push("", `Stopped early: ${report.stoppedEarly}. The figures cover what was read.`);
|
|
334
375
|
return lines.join("\n");
|
|
@@ -385,7 +426,13 @@ export function githubClient(token, options = {}) {
|
|
|
385
426
|
};
|
|
386
427
|
}
|
|
387
428
|
/** Workflows that run on pull requests but are not the test CI: scanners, previews, benchmarks, bots. */
|
|
388
|
-
const NOT_MAIN_WORKFLOW = /\b(preview|codeql|security|semgrep|sonar(qube|cloud)?|snyk|scorecard|bench(mark)?s?|size|label(er|s)?|stale|triage|greet(ings?)?|welcome|translations?|i18n|docs?|documentation|docker|image|deploy(ment)?|release|licen[cs]e|title|conventional|commits?|semantic|submodule|e2e|end ?(to|2) ?end|playwright|cypress|lighthouse|dependabot|renovate|cla|dco|changeset|storybook|chromatic|clean(up)?|caches?|housekeeping|perf(ormance)?|ios|android)\b/i;
|
|
429
|
+
const NOT_MAIN_WORKFLOW = /\b(preview|codeql|security|semgrep|sonar(qube|cloud)?|snyk|scorecard|bench(mark)?s?|size|label(er|s)?|stale|triage|greet(ings?)?|welcome|translations?|i18n|docs?|documentation|docker|image|deploy(ment)?|release|licen[cs]e|title|conventional|commits?|semantic|submodule|e2e|end ?(to|2) ?end|playwright|cypress|lighthouse|dependabot|renovate|cla|dco|changeset|storybook|chromatic|clean(up)?|caches?|housekeeping|perf(ormance)?|ios|android|links?|link ?check(er)?|re ?reviews?|reviews?|reviewer|investigator|monitor|scanner|fixer|evals?|probe|workflows? tests?)\b/i;
|
|
430
|
+
/**
|
|
431
|
+
* GitHub Agentic Workflows (gh-aw) compile each agent workflow to `<name>.lock.yml`. They run AI agents on
|
|
432
|
+
* pull requests (reviewers, CI investigators) for a long time, and were picked as "the main CI" on
|
|
433
|
+
* github/gh-aw, dotnet/sdk and Azure/azure-sdk-for-net (2026-11-16). They are never the test CI.
|
|
434
|
+
*/
|
|
435
|
+
const AGENTIC_WORKFLOW_FILE = /\.lock\.ya?ml$/i;
|
|
389
436
|
/** Names and file names the main pull request CI usually has. */
|
|
390
437
|
const MAIN_WORKFLOW = /\b(ci|cd|tests?|pipeline|pr|pull[-_ ]request|build|checks?|main|verify|validate|unit|unittests?|lint|quality)\b/i;
|
|
391
438
|
/** Test words: a tie-breaker between two CI-looking workflows of about the same weight (unit tests over lint). */
|
|
@@ -402,7 +449,7 @@ function genericName(name) {
|
|
|
402
449
|
}
|
|
403
450
|
function workflowScore(name, path, minutes) {
|
|
404
451
|
const text = `${name} ${path.replace(/\.ya?ml$/, "").replace(/[-_.]/g, " ")}`;
|
|
405
|
-
const notMain = NOT_MAIN_WORKFLOW.test(text);
|
|
452
|
+
const notMain = NOT_MAIN_WORKFLOW.test(text) || AGENTIC_WORKFLOW_FILE.test(path);
|
|
406
453
|
const main = MAIN_WORKFLOW.test(text) && !notMain;
|
|
407
454
|
const score = (minutes + 0.01) * (notMain ? 0.05 : 1) * (MAIN_WORKFLOW.test(text) ? 2 : 1)
|
|
408
455
|
* (main && TEST_WORKFLOW.test(text) ? 1.05 : 1) * (main && genericName(name) ? 1.5 : 1);
|
|
@@ -490,6 +537,7 @@ export async function collectRedBuilds(options) {
|
|
|
490
537
|
id: r.id, workflowId: r.workflow_id, workflowName: String(r.name ?? ""), attempt: r.run_attempt ?? 1,
|
|
491
538
|
headSha: r.head_sha, headBranch: String(r.head_branch ?? ""), headRepo: String(r.head_repository?.full_name ?? ""),
|
|
492
539
|
conclusion: r.conclusion ?? null, createdAt: r.created_at,
|
|
540
|
+
actor: String(r.triggering_actor?.login ?? r.actor?.login ?? ""),
|
|
493
541
|
});
|
|
494
542
|
}
|
|
495
543
|
if (batch.length < 100)
|
|
@@ -21,7 +21,7 @@ If DiffCI saves you CI time, a ⭐ helps others find it.
|
|
|
21
21
|
|
|
22
22
|
```yaml
|
|
23
23
|
- uses: actions/checkout@v7
|
|
24
|
-
- uses: DiffCI/core@v0.3.
|
|
24
|
+
- uses: DiffCI/core@v0.3.50
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
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:
|
|
@@ -164,7 +164,7 @@ Each study is a replay on real repositories, with its method, raw data and limit
|
|
|
164
164
|
[Star Core](https://github.com/DiffCI/core) · [Volunteer a pilot repository](https://diffci.com/#pilot) · [Find a first contribution](https://github.com/DiffCI/core/issues?q=is%3Aopen+label%3A%22good+first+issue%22).
|
|
165
165
|
Watch → Custom → Releases and Discussions for benchmark results and support updates. [Public roadmap](docs/roadmap.md).
|
|
166
166
|
|
|
167
|
-
This is the standalone Core engine. It analyzes local JavaScript/TypeScript repositories, supported Vue components, root Go modules, conventional Maven reactors
|
|
167
|
+
This is the standalone Core engine. It analyzes local JavaScript/TypeScript repositories, supported Vue components, root Go modules, conventional Maven reactors, Python projects tested with pytest and, experimentally, Cargo workspaces (Rust support is new and has not yet narrowed a real project's history, so expect full runs there for now), traces dependency impact, infers GitHub Actions structure and proposes test selections with evidence and full-run fallbacks. It works without a DiffCI account, hosted service or API key. See [the release boundary](docs/release-boundary.md) for support limits.
|
|
168
168
|
|
|
169
169
|
**Want to try DiffCI in an existing repository?** Use the published CLI: `npx @diffci.com/diffci@latest check`. See [the CLI quickstart](docs/using-diffci.md) for a no-execution analysis option, prerequisites, and result interpretation. To get help setting it up and have the cases that matter to your repository fixed first, [join as a design partner](https://github.com/DiffCI/core/issues/86). Tried it already? [Share your result](https://github.com/DiffCI/core/issues/new?template=community-result.yml), including fallbacks, refusals and misses, and choose whether we may publish it. The commands below build the standalone engine from source.
|
|
170
170
|
|
|
@@ -269,20 +269,21 @@ What stays in Core, and never moves to Cloud, is set out in [STEWARDSHIP.md](STE
|
|
|
269
269
|
|
|
270
270
|
## Contributing
|
|
271
271
|
|
|
272
|
-
Most open work is teaching DiffCI to narrow changes it currently treats as "run everything": config files, `package.json` edits and lockfiles. Each case is small and comes with a synthetic fixture, so you don't need to learn the whole engine. Django
|
|
272
|
+
Most open work is teaching DiffCI to narrow changes it currently treats as "run everything": config files, `package.json` edits and lockfiles. Each case is small and comes with a synthetic fixture, so you don't need to learn the whole engine. Django and PHP support are next and split into one-PR steps: see the [Django](https://github.com/DiffCI/core/issues/87) and [PHP](https://github.com/DiffCI/core/issues/88) tracking issues, or the [Go](https://github.com/DiffCI/core/issues/76), [Maven](https://github.com/DiffCI/core/issues/89) and [Rust](https://github.com/DiffCI/core/issues/131) ones for fewer full-suite fallbacks. Pick a [good first issue](https://github.com/DiffCI/core/issues?q=is%3Aopen+label%3A%22good+first+issue%22) and see [CONTRIBUTING.md](CONTRIBUTING.md); a dev container is included.
|
|
273
273
|
|
|
274
274
|
### Contributors
|
|
275
275
|
|
|
276
276
|
Thank you to everyone who has improved DiffCI:
|
|
277
277
|
|
|
278
278
|
- <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)**: [`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)).
|
|
279
|
-
- <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)**: Cargo package and test-target mapping, the
|
|
279
|
+
- <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)).
|
|
280
280
|
- <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)).
|
|
281
281
|
- <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)).
|
|
282
|
-
- <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)**:
|
|
282
|
+
- <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)).
|
|
283
283
|
- <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)).
|
|
284
284
|
- <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)).
|
|
285
285
|
- <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)).
|
|
286
|
+
- <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)).
|
|
286
287
|
|
|
287
288
|
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.
|
|
288
289
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
13
13
|
import { join } from "node:path";
|
|
14
14
|
import { parse as parseYaml } from "yaml";
|
|
15
|
+
import { LOCKFILE_NAMES } from "../repo/lockfiles.js";
|
|
15
16
|
/** Finds the 1-indexed line of the first occurrence of `needle`, for citable evidence. */
|
|
16
17
|
function lineOf(source, needle) {
|
|
17
18
|
const index = source.indexOf(needle);
|
|
@@ -60,7 +61,7 @@ export function packageFacts(repoPath) {
|
|
|
60
61
|
/** Which lockfile is committed. The repository's own statement about its package manager. */
|
|
61
62
|
export function lockfileFacts(repoPath) {
|
|
62
63
|
const facts = [];
|
|
63
|
-
for (const name of
|
|
64
|
+
for (const name of LOCKFILE_NAMES) {
|
|
64
65
|
if (existsSync(join(repoPath, name))) {
|
|
65
66
|
facts.push({ kind: "lockfile.present", value: name, evidence: { file: name, text: name } });
|
|
66
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/ci-inference/evidence.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/ci-inference/evidence.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,0FAA0F;AAC1F,SAAS,MAAM,CAAC,MAAc,EAAE,MAAc;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACnC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AACnD,CAAC;AAED,SAAS,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,MAAe;IACtD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI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E,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;oBACnH,CAAC;gBACH,CAAC;gBACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAA4B,CAAC,EAAE,CAAC;oBACvF,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;gBAClI,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO;QACL,GAAG,aAAa,CAAC,QAAQ,CAAC;QAC1B,GAAG,YAAY,CAAC,QAAQ,CAAC;QACzB,GAAG,aAAa,CAAC,QAAQ,CAAC;QAC1B,GAAG,gBAAgB,CAAC,QAAQ,CAAC;QAC7B,GAAG,iBAAiB,CAAC,QAAQ,CAAC;KAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -184,6 +184,12 @@ export const CONFIG_PATTERNS = [
|
|
|
184
184
|
/^Pipfile(?:\.lock)?$/,
|
|
185
185
|
/^(?:poetry|uv|pdm)\.lock$/,
|
|
186
186
|
/^\.python-version$/,
|
|
187
|
+
// Node version and package-manager settings (issue #142). Each decides how the suite is installed,
|
|
188
|
+
// so a change falls back to the full suite; the entries make the reason name the file instead of
|
|
189
|
+
// reporting it as unknown.
|
|
190
|
+
/^\.nvmrc$/,
|
|
191
|
+
/^\.node-version$/,
|
|
192
|
+
/^\.npmrc$/,
|
|
187
193
|
];
|
|
188
194
|
// Stage 1B fix (2026-08-21, docs/research/2026-08-21-stage1b-*.md): root-caused in Stage 1A's fallback-
|
|
189
195
|
// composition analysis - dependencyManifestChanged previously fired on ANY change to the root
|
|
@@ -491,7 +497,7 @@ function listFilesAtSha(sha, repoPath) {
|
|
|
491
497
|
const result = runGit(["ls-tree", "-r", "--full-tree", "--name-only", "-z", sha], repoPath);
|
|
492
498
|
if (result.status !== 0)
|
|
493
499
|
return [];
|
|
494
|
-
return result.stdout.split("
|
|
500
|
+
return result.stdout.split("\0").filter(Boolean);
|
|
495
501
|
}
|
|
496
502
|
/** Root entries include directories and gitlinks, which recursive file inventories can omit. */
|
|
497
503
|
function readRootPathsAtSha(sha, repoPath) {
|