@substrate-ai/sdlc 0.20.5 → 0.20.7
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/run-model/index.d.ts +2 -0
- package/dist/run-model/index.d.ts.map +1 -1
- package/dist/run-model/index.js +2 -0
- package/dist/run-model/index.js.map +1 -1
- package/dist/run-model/verification-findings-counts.d.ts +37 -0
- package/dist/run-model/verification-findings-counts.d.ts.map +1 -0
- package/dist/run-model/verification-findings-counts.js +59 -0
- package/dist/run-model/verification-findings-counts.js.map +1 -0
- package/package.json +2 -2
|
@@ -16,6 +16,8 @@ export { PerStoryStatusSchema, PerStoryStateSchema } from './per-story-state.js'
|
|
|
16
16
|
export type { PerStoryStatus, PerStoryState } from './per-story-state.js';
|
|
17
17
|
export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, StoredVerificationSummarySchema, } from './verification-result.js';
|
|
18
18
|
export type { StoredVerificationFinding, StoredVerificationCheckResult, StoredVerificationSummary, } from './verification-result.js';
|
|
19
|
+
export { rollupFindingCounts, ZERO_FINDING_COUNTS } from './verification-findings-counts.js';
|
|
20
|
+
export type { VerificationFindingsCounts } from './verification-findings-counts.js';
|
|
19
21
|
export { SupervisorLock } from './supervisor-lock.js';
|
|
20
22
|
export type { SupervisorLockOptions } from './supervisor-lock.js';
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/run-model/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,YAAY,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,QAAQ,GACT,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,c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MAAM,gBAAgB,CAAA;AAG9C,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAChF,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIzE,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,yBAAyB,EACzB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5F,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAGnF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/run-model/index.js
CHANGED
|
@@ -15,6 +15,8 @@ export { PerStoryStatusSchema, PerStoryStateSchema } from './per-story-state.js'
|
|
|
15
15
|
// Story 52-7: Stored verification result schemas and types
|
|
16
16
|
// Story 55-3: StoredVerificationFinding schema (part of findings persistence)
|
|
17
17
|
export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, StoredVerificationSummarySchema, } from './verification-result.js';
|
|
18
|
+
// Story 55-3b: roll-up helper for surfacing finding counts in CLI JSON output
|
|
19
|
+
export { rollupFindingCounts, ZERO_FINDING_COUNTS } from './verification-findings-counts.js';
|
|
18
20
|
// Story 52-2: Supervisor locking and ownership
|
|
19
21
|
export { SupervisorLock } from './supervisor-lock.js';
|
|
20
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/run-model/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAU/C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,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|
+
/**
|
|
2
|
+
* Verification finding count roll-up — Story 55-3b.
|
|
3
|
+
*
|
|
4
|
+
* Collapses every finding across every check in a StoredVerificationSummary
|
|
5
|
+
* into a `{error, warn, info}` triple, suitable for per-story surfacing in
|
|
6
|
+
* the status/metrics CLI JSON payloads.
|
|
7
|
+
*
|
|
8
|
+
* Intentionally pure: no I/O, no logger, no throw. Fits cleanly in the
|
|
9
|
+
* run-model package so both the status and metrics commands (and any
|
|
10
|
+
* future consumer) can share a single implementation and one set of tests.
|
|
11
|
+
*/
|
|
12
|
+
import type { StoredVerificationSummary } from './verification-result.js';
|
|
13
|
+
/**
|
|
14
|
+
* Per-severity roll-up of verification findings for a single story.
|
|
15
|
+
*
|
|
16
|
+
* Every field is always populated. Consumers should not have to test for
|
|
17
|
+
* presence; a story that emitted zero findings (or whose checks pre-date
|
|
18
|
+
* the structured-finding migration) reports `{ error: 0, warn: 0, info: 0 }`.
|
|
19
|
+
*/
|
|
20
|
+
export interface VerificationFindingsCounts {
|
|
21
|
+
error: number;
|
|
22
|
+
warn: number;
|
|
23
|
+
info: number;
|
|
24
|
+
}
|
|
25
|
+
/** Zero-counts object used as the default return value and as the identity
|
|
26
|
+
* element in consumer-side accumulations. */
|
|
27
|
+
export declare const ZERO_FINDING_COUNTS: Readonly<VerificationFindingsCounts>;
|
|
28
|
+
/**
|
|
29
|
+
* Sum findings across every check in the summary, grouped by severity.
|
|
30
|
+
*
|
|
31
|
+
* Backward-compatible — when the summary is `undefined`, or a check has no
|
|
32
|
+
* `findings` field (legacy manifests written before Story 55-2 migrated the
|
|
33
|
+
* checks), the absent arrays contribute 0 to every severity. No severity
|
|
34
|
+
* ever reports undefined.
|
|
35
|
+
*/
|
|
36
|
+
export declare function rollupFindingCounts(summary: StoredVerificationSummary | undefined | null): VerificationFindingsCounts;
|
|
37
|
+
//# sourceMappingURL=verification-findings-counts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification-findings-counts.d.ts","sourceRoot":"","sources":["../../src/run-model/verification-findings-counts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAMzE;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAMD;8CAC8C;AAC9C,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,0BAA0B,CAInE,CAAA;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,yBAAyB,GAAG,SAAS,GAAG,IAAI,GACpD,0BAA0B,CA2B5B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification finding count roll-up — Story 55-3b.
|
|
3
|
+
*
|
|
4
|
+
* Collapses every finding across every check in a StoredVerificationSummary
|
|
5
|
+
* into a `{error, warn, info}` triple, suitable for per-story surfacing in
|
|
6
|
+
* the status/metrics CLI JSON payloads.
|
|
7
|
+
*
|
|
8
|
+
* Intentionally pure: no I/O, no logger, no throw. Fits cleanly in the
|
|
9
|
+
* run-model package so both the status and metrics commands (and any
|
|
10
|
+
* future consumer) can share a single implementation and one set of tests.
|
|
11
|
+
*/
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// Rollup
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
/** Zero-counts object used as the default return value and as the identity
|
|
16
|
+
* element in consumer-side accumulations. */
|
|
17
|
+
export const ZERO_FINDING_COUNTS = Object.freeze({
|
|
18
|
+
error: 0,
|
|
19
|
+
warn: 0,
|
|
20
|
+
info: 0,
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Sum findings across every check in the summary, grouped by severity.
|
|
24
|
+
*
|
|
25
|
+
* Backward-compatible — when the summary is `undefined`, or a check has no
|
|
26
|
+
* `findings` field (legacy manifests written before Story 55-2 migrated the
|
|
27
|
+
* checks), the absent arrays contribute 0 to every severity. No severity
|
|
28
|
+
* ever reports undefined.
|
|
29
|
+
*/
|
|
30
|
+
export function rollupFindingCounts(summary) {
|
|
31
|
+
if (summary === undefined || summary === null) {
|
|
32
|
+
return { ...ZERO_FINDING_COUNTS };
|
|
33
|
+
}
|
|
34
|
+
let error = 0;
|
|
35
|
+
let warn = 0;
|
|
36
|
+
let info = 0;
|
|
37
|
+
for (const check of summary.checks) {
|
|
38
|
+
const findings = check.findings;
|
|
39
|
+
if (findings === undefined)
|
|
40
|
+
continue;
|
|
41
|
+
for (const finding of findings) {
|
|
42
|
+
switch (finding.severity) {
|
|
43
|
+
case 'error':
|
|
44
|
+
error += 1;
|
|
45
|
+
break;
|
|
46
|
+
case 'warn':
|
|
47
|
+
warn += 1;
|
|
48
|
+
break;
|
|
49
|
+
case 'info':
|
|
50
|
+
info += 1;
|
|
51
|
+
break;
|
|
52
|
+
// No default — the schema rejects other severities at parse time, so
|
|
53
|
+
// an unknown value at runtime would indicate bit-rot, not user data.
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return { error, warn, info };
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=verification-findings-counts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification-findings-counts.js","sourceRoot":"","sources":["../../src/run-model/verification-findings-counts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAqBH,8EAA8E;AAC9E,SAAS;AACT,8EAA8E;AAE9E;8CAC8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAyC,MAAM,CAAC,MAAM,CAAC;IACrF,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;CACR,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAqD;IAErD,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACnC,CAAC;IACD,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC/B,IAAI,QAAQ,KAAK,SAAS;YAAE,SAAQ;QACpC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,QAAQ,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACzB,KAAK,OAAO;oBACV,KAAK,IAAI,CAAC,CAAA;oBACV,MAAK;gBACP,KAAK,MAAM;oBACT,IAAI,IAAI,CAAC,CAAA;oBACT,MAAK;gBACP,KAAK,MAAM;oBACT,IAAI,IAAI,CAAC,CAAA;oBACT,MAAK;gBACP,qEAAqE;gBACrE,qEAAqE;YACvE,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrate-ai/sdlc",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=22.0.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@substrate-ai/core": "0.20.
|
|
27
|
+
"@substrate-ai/core": "0.20.7",
|
|
28
28
|
"js-yaml": "^4.1.1",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|