@avi2dg/checks 0.65.0 → 0.65.2
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of `@avi2dg/checks`, newest first, written by the release from its conventional commits.
|
|
4
4
|
|
|
5
|
+
## 0.65.2
|
|
6
|
+
|
|
7
|
+
Released 2026-11-04.
|
|
8
|
+
|
|
9
|
+
### Fixes
|
|
10
|
+
|
|
11
|
+
- **testing:** stop filing failed issues for fully undecided night runs [#43](https://github.com/avi2d/checks/pull/43)
|
|
12
|
+
|
|
13
|
+
## 0.65.1
|
|
14
|
+
|
|
15
|
+
Released 2026-11-03.
|
|
16
|
+
|
|
17
|
+
### Fixes
|
|
18
|
+
|
|
19
|
+
- allow weekly advisory scan in any public repository [#42](https://github.com/avi2d/checks/pull/42)
|
|
20
|
+
|
|
5
21
|
## 0.65.0
|
|
6
22
|
|
|
7
23
|
Released 2026-11-03.
|
|
@@ -105,7 +105,7 @@ A range that leaves `bun.lock` unchanged runs in under a second, and a direct ru
|
|
|
105
105
|
## Running it on a schedule
|
|
106
106
|
|
|
107
107
|
A range never fails on an advisory published after its package landed, so a weekly `--all` run finds those.
|
|
108
|
-
Only a public repository
|
|
108
|
+
Only a public repository runs it on a schedule, as [checks-ci-wiring](checks-ci-wiring.md#schedules) requires.
|
|
109
109
|
Any other repository starts the same workflow by hand with `gh workflow run`, with no `schedule` trigger.
|
|
110
110
|
A package scans on Monday between 05:00 and 06:00 UTC, at a minute chosen so repositories do not start together:
|
|
111
111
|
|
|
@@ -104,11 +104,11 @@ Each refusal names the workflow file, the line of its `schedule` trigger and wha
|
|
|
104
104
|
### Schedules
|
|
105
105
|
|
|
106
106
|
It refuses every other workflow that triggers on `schedule`, since a test, mutation, flake, browser or night run starts only by hand, with `gh workflow run`.
|
|
107
|
-
The one schedule it keeps is a weekly advisory scan in a public repository
|
|
107
|
+
The one schedule it keeps is a weekly advisory scan in a public repository.
|
|
108
108
|
A workflow scans advisories when a run step calls `checks-advisories`, the same ways a release call counts, and every other run step is a `bun install`.
|
|
109
109
|
A weekly scan has one `cron` entry with one minute, one hour and one weekday, and `*` for the day of the month and the month.
|
|
110
|
-
It refuses an advisory scan that runs more often, and any scheduled advisory scan in a private repository
|
|
111
|
-
A run outside CI cannot read whether the repository is private, so it refuses a scan there only for the
|
|
110
|
+
It refuses an advisory scan that runs more often, and any scheduled advisory scan in a private repository.
|
|
111
|
+
A run outside CI cannot read whether the repository is private, so it refuses a scan there only for the cron.
|
|
112
112
|
A workflow that releases on a schedule is judged only by the release rule above.
|
|
113
113
|
Each refusal names the workflow file, the line of its `schedule` trigger and what to change.
|
|
114
114
|
|
package/package.json
CHANGED
package/src/core/lint.ts
CHANGED
|
@@ -160,6 +160,10 @@ function outcomeOf(exitCode: number): Outcome {
|
|
|
160
160
|
return exitCode === 1 ? "violated" : "undecided";
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
export function summaryOf(names: readonly string[], total: number, outcome: "failed" | "undecided"): string {
|
|
164
|
+
return `${names.length} of ${total} gate(s) ${outcome}: ${names.join(", ")}`;
|
|
165
|
+
}
|
|
166
|
+
|
|
163
167
|
const runGate = Effect.fn("runGate")(function* (gate: KitGate, range: Range, wholeTree: boolean) {
|
|
164
168
|
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
|
|
165
169
|
const script = (yield* Path.Path).join(import.meta.dir, "..", gate.vector, gate.file);
|
|
@@ -249,11 +253,11 @@ const lint = Effect.gen(function* () {
|
|
|
249
253
|
yield* Console.log(`${NAME}: ${gates.length} gate(s) pass`);
|
|
250
254
|
return true;
|
|
251
255
|
}
|
|
252
|
-
const names = failed.map((verdict) => verdict.gate.bin)
|
|
256
|
+
const names = failed.map((verdict) => verdict.gate.bin);
|
|
253
257
|
if (failed.every((verdict) => verdict.outcome === "undecided")) {
|
|
254
|
-
return yield* new GatesUndecided({ message:
|
|
258
|
+
return yield* new GatesUndecided({ message: summaryOf(names, gates.length, "undecided") });
|
|
255
259
|
}
|
|
256
|
-
const summary =
|
|
260
|
+
const summary = summaryOf(names, gates.length, "failed");
|
|
257
261
|
yield* Console.error(`${NAME}: ${summary}`);
|
|
258
262
|
return false;
|
|
259
263
|
});
|
|
@@ -42,7 +42,6 @@ function scansAdvisoriesOnly(workflow: Workflow, context: ScheduleContext): bool
|
|
|
42
42
|
|
|
43
43
|
function advisoryFault(workflow: Workflow, owner: ScheduleOwner): string | undefined {
|
|
44
44
|
if (owner.visibility === "private") return "a private repository scans advisories by hand; " + BY_HAND;
|
|
45
|
-
if (!owner.publishes) return "a package.json that sets private publishes nothing to npm, so it scans advisories by hand; " + BY_HAND;
|
|
46
45
|
const entries = crons(workflow.document);
|
|
47
46
|
if (entries.length === 1 && entries.every(weekly)) return undefined;
|
|
48
47
|
return 'the advisory scan runs more than once a week; keep one cron at a minute, an hour and a weekday, such as "15 5 * * 1"';
|
|
@@ -78,7 +78,7 @@ export function findingsOf(previous: Option.Option<PreviousNight>, tonight: Toni
|
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
const FAILED_GATES = /of \d+ gate\(s\) failed: (.+)/;
|
|
81
|
+
const FAILED_GATES = /checks-lint: \d+ of \d+ gate\(s\) failed: (.+)/;
|
|
82
82
|
const PASSED_GATES = /gate\(s\) pass/;
|
|
83
83
|
|
|
84
84
|
export function gatesOf(log: string): readonly Finding[] {
|