mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
ci(server): fail the Postgres probe on an unmeasured baseline
The probe shipped with scripts/pg-probe-baseline.json at `failing: null`, and an unmeasured baseline only reported. Every repository statement Postgres refused, new SQLite-only SQL included, still passed the job; only the dialect helper cases could fail it, so the ratchet was off until some later commit seeded the file. An unmeasured baseline now fails the run outside --update, and the log, step summary and annotation say which artifact file to commit. The job stays red until the first measurement lands, so the gate cannot reach dev holding nothing. A run that called no repository method (an unreadable tsconfig, a moved repositories directory) fails as well, also under --update, so a broken plan can neither pass nor seed an empty baseline.
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
* `--update` lowers entries and drops the ones that reach zero or whose
|
||||
* method is gone; it never raises or adds one. The only exception is the
|
||||
* first run: a baseline whose `failing` is `null` has never been measured,
|
||||
* so the check reports and passes, and `--update` (or the CI artifact)
|
||||
* writes the first measurement.
|
||||
* so there is nothing to compare and the run fails (scripts/pg-probe.ts)
|
||||
* until the first measurement, written by `--update` or taken from the CI
|
||||
* artifact, is committed.
|
||||
*/
|
||||
|
||||
import { readFileSync } from 'node:fs';
|
||||
@@ -22,7 +23,7 @@ export interface ProbeBaseline {
|
||||
}
|
||||
|
||||
export interface BaselineVerdict {
|
||||
/** The baseline has never been measured: report only. */
|
||||
/** The baseline has never been measured: nothing to compare, and the run fails until it is seeded. */
|
||||
unseeded: boolean;
|
||||
/** Methods failing more statements than their entry allows. */
|
||||
grown: { method: string; allowed: number; now: number }[];
|
||||
|
||||
Reference in New Issue
Block a user