mandrel 2.88.0 → 2.89.0
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/.agents/docs/agentrc-reference.json +3 -1
- package/.agents/docs/configuration.md +2 -0
- package/.agents/schemas/agentrc.schema.json +13 -0
- package/.agents/scripts/coverage-capture.js +32 -49
- package/.agents/scripts/lib/audit-baselines/gate-surface.js +24 -11
- package/.agents/scripts/lib/audit-baselines/read.js +4 -2
- package/.agents/scripts/lib/audit-baselines/surface-entry.js +95 -11
- package/.agents/scripts/lib/baselines/crap-preview-scan.js +3 -1
- package/.agents/scripts/lib/baselines/crap-updater-cli.js +2 -0
- package/.agents/scripts/lib/baselines/kinds/crap.js +37 -16
- package/.agents/scripts/lib/baselines/preview-gates.js +1 -0
- package/.agents/scripts/lib/close-validation/gates.js +40 -9
- package/.agents/scripts/lib/config/gates/crap.schema.js +15 -0
- package/.agents/scripts/lib/config/quality.js +49 -1
- package/.agents/scripts/lib/coverage-capture-affected.js +2 -1
- package/.agents/scripts/lib/coverage-capture-fullscope.js +2 -2
- package/.agents/scripts/lib/coverage-capture-incremental.js +1 -1
- package/.agents/scripts/lib/coverage-capture-passes.js +143 -0
- package/.agents/scripts/lib/coverage-capture-usage.js +1 -1
- package/.agents/scripts/lib/coverage-capture.js +30 -15
- package/.agents/scripts/lib/crap-utils.js +6 -2
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/maintainability-utils.js +6 -1
- package/.agents/scripts/lib/orchestration/check-baselines/phases/evaluate.js +1 -1
- package/.agents/scripts/lib/orchestration/verify-credit.js +4 -1
- package/.agents/scripts/update-crap-baseline.js +2 -2
- package/.agents/workflows/audit-baselines.md +7 -2
- package/docs/CHANGELOG.md +13 -0
- package/package.json +1 -1
|
@@ -16,7 +16,12 @@ const MAINTAINABILITY_WORKER_URL = new URL(
|
|
|
16
16
|
|
|
17
17
|
const SERIAL_THRESHOLD = POOL_SERIAL_THRESHOLD;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Directory names `scanDirectory` never descends into — the CRAP and
|
|
21
|
+
* maintainability walk. Exported so the baseline-audit lens judges a dead
|
|
22
|
+
* `ignoreGlobs` entry against this exact walk instead of a copy of it.
|
|
23
|
+
*/
|
|
24
|
+
export const IGNORED_DIRS = new Set([
|
|
20
25
|
'node_modules',
|
|
21
26
|
'.git',
|
|
22
27
|
'dist',
|
|
@@ -127,8 +127,8 @@ export async function evaluateKind({
|
|
|
127
127
|
// Rows from superseded scoring semantics pass schema but are incomparable;
|
|
128
128
|
// fail closed.
|
|
129
129
|
const semanticsError = checkBaselineSemantics(kind, baseline, {
|
|
130
|
+
...gateBlock,
|
|
130
131
|
cwd,
|
|
131
|
-
targetDirs: gateBlock?.targetDirs,
|
|
132
132
|
});
|
|
133
133
|
if (semanticsError) {
|
|
134
134
|
return {
|
|
@@ -139,7 +139,10 @@ export function resolveVerifyCredit(
|
|
|
139
139
|
const { crap } = getQualityImpl(config);
|
|
140
140
|
const mode =
|
|
141
141
|
crap?.enabled !== false &&
|
|
142
|
-
hasNpmScriptImpl(
|
|
142
|
+
hasNpmScriptImpl(
|
|
143
|
+
readPackageScriptsImpl(worktree),
|
|
144
|
+
crap?.captureScript ?? 'test:coverage',
|
|
145
|
+
)
|
|
143
146
|
? 'capture'
|
|
144
147
|
: 'evidence';
|
|
145
148
|
|
|
@@ -39,7 +39,7 @@ const USAGE = {
|
|
|
39
39
|
],
|
|
40
40
|
[
|
|
41
41
|
'--coverage <path>',
|
|
42
|
-
|
|
42
|
+
"Read coverage from this path; wins over config (default `delivery.quality.gates.crap.coveragePath`, falling back to the coverage gate's `coveragePath`, `coverage/coverage-final.json`).",
|
|
43
43
|
],
|
|
44
44
|
[
|
|
45
45
|
'--full-scope',
|
|
@@ -55,7 +55,7 @@ const USAGE = {
|
|
|
55
55
|
],
|
|
56
56
|
],
|
|
57
57
|
notes: [
|
|
58
|
-
'Run `npm run test:coverage`
|
|
58
|
+
'Run the CRAP capture script first — `npm run <delivery.quality.gates.crap.captureScript>`, default `npm run test:coverage` — without a coverage artifact the refresh refuses (exit 1) and leaves the baseline untouched.',
|
|
59
59
|
],
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -107,8 +107,13 @@ Two envelope-level reads come **before** any finding:
|
|
|
107
107
|
- `baselineExists` is `false`, or `parseError` is non-null — the instrument
|
|
108
108
|
cannot be read at all.
|
|
109
109
|
- `deadIgnoreGlobs` is non-empty — a configured ignore pattern matches zero
|
|
110
|
-
files
|
|
111
|
-
|
|
110
|
+
files that **its own gate's scanner walk** would visit: that gate's
|
|
111
|
+
`targetDirs`, minus the directories its scanner skips. It protects nothing
|
|
112
|
+
today and silently exempts the next file that happens to match it. A glob
|
|
113
|
+
aimed at a generated or installed tree (`node_modules`, `dist`, `build`,
|
|
114
|
+
`out`, `coverage`, `.next`) that the scanner would visit is never reported
|
|
115
|
+
dead — it is load-bearing after an install or build, even when the tree is
|
|
116
|
+
absent now.
|
|
112
117
|
|
|
113
118
|
Grade a stub or unenforced gate **Medium**, a `parseError` on an enforced
|
|
114
119
|
gate **High** (delivery reads that file every run), a dead glob **Low**.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,19 @@ All notable changes to this project will be documented in this file.
|
|
|
15
15
|
-->
|
|
16
16
|
<!-- markdownlint-disable-file MD004 MD012 MD037 -->
|
|
17
17
|
|
|
18
|
+
## [2.89.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.88.0...mandrel-v2.89.0) (2026-10-16)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
* CRAP gate: own coverage source (crap.coveragePath + crap.captureScript) honored by seat, capture, preview and updater ([#5717](https://github.com/dsj1984/mandrel/issues/5717)) ([#5719](https://github.com/dsj1984/mandrel/issues/5719)) ([2912ae0](https://github.com/dsj1984/mandrel/commit/2912ae07ae488b171f005e69cab16d2dab473d6c))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
* audit-baselines: judge dead ignoreGlobs against each gate's own scanner walk, not the lens's ([#5716](https://github.com/dsj1984/mandrel/issues/5716)) ([#5718](https://github.com/dsj1984/mandrel/issues/5718)) ([9d00bb1](https://github.com/dsj1984/mandrel/commit/9d00bb1f25a1e6b4745ea9efcf260d9ed09f8ae9))
|
|
29
|
+
* coverage-capture failure and timeout messages, and the close coverage-c… ([#5721](https://github.com/dsj1984/mandrel/issues/5721)) ([#5722](https://github.com/dsj1984/mandrel/issues/5722)) ([dbf1ac8](https://github.com/dsj1984/mandrel/commit/dbf1ac855a19206a179ebdc664e4fe4f4c6c4f56))
|
|
30
|
+
|
|
18
31
|
## [2.88.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.87.0...mandrel-v2.88.0) (2026-10-15)
|
|
19
32
|
|
|
20
33
|
|
package/package.json
CHANGED