mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 08:00:06 +00:00
ci(server): hold unmeasured methods and only SQL errors to the probe baseline
The Postgres probe only ratcheted the methods it managed to call. A method it could not build arguments for, one that threw before its first statement and one that timed out were counted and logged but held to nothing, so a new repository method with a callback parameter could land SQLite-only SQL unseen, and the part of the code the probe reaches could shrink without anyone noticing. pg-probe-baseline.json gains an `uncovered` list of those methods. A method outside it that goes unmeasured fails the run, and so does an entry whose method is measured now or gone, so the list only shrinks. It is seeded from the same first measurement as `failing`; a baseline without the key reads as unmeasured. The failing count also counted every refusal, including data errors the sample values cause (a "probe" string in a date column, SQLSTATE 22007), so renaming a parameter could fail the gate on a change that never touched the SQL. Only classes 42 and 0A count now; the rest is reported in the log and the step summary without being held. The docs said the probe measures every repository statement. They now say it measures what each method reaches with sample arguments against empty tables, and that the methods it cannot reach are held to the list.
This commit is contained in:
@@ -7,9 +7,12 @@
|
||||
* date-shaped string when the name says so, an object gets every property
|
||||
* it can sample, an array one element). The values only have to get the
|
||||
* method to send its SQL; what the probe measures is whether Postgres
|
||||
* accepts that SQL against an empty schema. A parameter the sampler cannot
|
||||
* build (a callback, an EntityManager, an entity instance) makes the method
|
||||
* unprobeable, which the report lists instead of guessing.
|
||||
* accepts that SQL against an empty schema. A sample the column cannot take
|
||||
* (a name-shaped string in a date column) is a data error, which the
|
||||
* ratchet does not hold (pg-probe/baseline.ts). A parameter the sampler
|
||||
* cannot build (a callback, an EntityManager, an entity instance) makes the
|
||||
* method unprobeable: the report lists it instead of guessing, and the
|
||||
* baseline's `uncovered` list must name it, so a new one fails the run.
|
||||
*/
|
||||
|
||||
import path from 'node:path';
|
||||
|
||||
Reference in New Issue
Block a user