@substrate-ai/sdlc 0.20.65 → 0.20.66
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/learning/failure-classifier.d.ts.map +1 -1
- package/dist/learning/failure-classifier.js +5 -0
- package/dist/learning/failure-classifier.js.map +1 -1
- package/dist/learning/types.d.ts +8 -0
- package/dist/learning/types.d.ts.map +1 -1
- package/dist/learning/types.js +5 -0
- package/dist/learning/types.js.map +1 -1
- package/dist/verification/checks/ac-traceability-check.d.ts +98 -0
- package/dist/verification/checks/ac-traceability-check.d.ts.map +1 -0
- package/dist/verification/checks/ac-traceability-check.js +194 -0
- package/dist/verification/checks/ac-traceability-check.js.map +1 -0
- package/dist/verification/findings-to-learning-store.d.ts +81 -0
- package/dist/verification/findings-to-learning-store.d.ts.map +1 -0
- package/dist/verification/findings-to-learning-store.js +150 -0
- package/dist/verification/findings-to-learning-store.js.map +1 -0
- package/dist/verification/index.d.ts +4 -0
- package/dist/verification/index.d.ts.map +1 -1
- package/dist/verification/index.js +4 -0
- package/dist/verification/index.js.map +1 -1
- package/dist/verification/types.d.ts +8 -0
- package/dist/verification/types.d.ts.map +1 -1
- package/dist/verification/verification-pipeline.d.ts +5 -0
- package/dist/verification/verification-pipeline.d.ts.map +1 -1
- package/dist/verification/verification-pipeline.js +5 -0
- package/dist/verification/verification-pipeline.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure-classifier.d.ts","sourceRoot":"","sources":["../../src/learning/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAMjF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,mBAAmB,GAAG,iBAAiB,CAS3E;
|
|
1
|
+
{"version":3,"file":"failure-classifier.d.ts","sourceRoot":"","sources":["../../src/learning/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAMjF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,mBAAmB,GAAG,iBAAiB,CAS3E;AA2BD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,mBAAmB,EACxB,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,MAAM,GACZ,OAAO,CAmBT"}
|
|
@@ -44,6 +44,11 @@ const CATEGORY_DESCRIPTIONS = {
|
|
|
44
44
|
'resource-exhaustion': 'Story produced fewer than 100 output tokens (resource exhaustion suspected)',
|
|
45
45
|
'infrastructure': 'System-level infrastructure error (OOM, disk, permissions, or SIGKILL)',
|
|
46
46
|
'unclassified': 'No error text available', // overridden in buildFinding with raw ctx.error when present
|
|
47
|
+
// Story 74-2: verification-derived root causes consumed by FindingsInjector
|
|
48
|
+
'ac-missing-evidence': 'Acceptance criteria evidence check found missing or insufficient AC coverage',
|
|
49
|
+
'runtime-probe-fail': 'Runtime probe verification failed (probe execution or assertion failure)',
|
|
50
|
+
'source-ac-drift': 'Source AC fidelity check detected drift between story ACs and source epic',
|
|
51
|
+
'cross-story-concurrent-modification': 'Cross-story consistency check detected concurrent file modification conflict',
|
|
47
52
|
};
|
|
48
53
|
// ---------------------------------------------------------------------------
|
|
49
54
|
// Finding builder
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure-classifier.js","sourceRoot":"","sources":["../../src/learning/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG1C,8EAA8E;AAC9E,uEAAuE;AACvE,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,GAAwB;IACtD,IAAI,GAAG,CAAC,KAAK,EA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AY,CAC1B,GAAwB,EACxB,SAA4B,EAC5B,KAAa;IAEb,MAAM,UAAU,GAAG,SAAS,KAAK,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAA;IAEhE,MAAM,WAAW,GACf,SAAS,KAAK,cAAc;QAC1B,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,yBAAyB,CAAC;QAC1C,CAAC,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAA;IAEtC,OAAO,aAAa,CAAC,KAAK,CAAC;QACzB,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;QACvB,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,GAAG,CAAC,QAAQ;QACvB,UAAU,EAAE,SAAS;QACrB,cAAc,EAAE,GAAG,CAAC,aAAa,IAAI,EAAE;QACvC,WAAW;QACX,UAAU;QACV,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,kBAAkB,EAAE,CAAC;KACtB,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/learning/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export declare const RootCauseCategorySchema: z.ZodEnum<{
|
|
8
|
+
"cross-story-concurrent-modification": "cross-story-concurrent-modification";
|
|
8
9
|
"namespace-collision": "namespace-collision";
|
|
9
10
|
"dependency-ordering": "dependency-ordering";
|
|
10
11
|
"spec-staleness": "spec-staleness";
|
|
@@ -14,6 +15,9 @@ export declare const RootCauseCategorySchema: z.ZodEnum<{
|
|
|
14
15
|
"resource-exhaustion": "resource-exhaustion";
|
|
15
16
|
infrastructure: "infrastructure";
|
|
16
17
|
unclassified: "unclassified";
|
|
18
|
+
"ac-missing-evidence": "ac-missing-evidence";
|
|
19
|
+
"runtime-probe-fail": "runtime-probe-fail";
|
|
20
|
+
"source-ac-drift": "source-ac-drift";
|
|
17
21
|
}>;
|
|
18
22
|
export type RootCauseCategory = z.infer<typeof RootCauseCategorySchema>;
|
|
19
23
|
export declare const FindingSchema: z.ZodObject<{
|
|
@@ -21,6 +25,7 @@ export declare const FindingSchema: z.ZodObject<{
|
|
|
21
25
|
run_id: z.ZodString;
|
|
22
26
|
story_key: z.ZodString;
|
|
23
27
|
root_cause: z.ZodEnum<{
|
|
28
|
+
"cross-story-concurrent-modification": "cross-story-concurrent-modification";
|
|
24
29
|
"namespace-collision": "namespace-collision";
|
|
25
30
|
"dependency-ordering": "dependency-ordering";
|
|
26
31
|
"spec-staleness": "spec-staleness";
|
|
@@ -30,6 +35,9 @@ export declare const FindingSchema: z.ZodObject<{
|
|
|
30
35
|
"resource-exhaustion": "resource-exhaustion";
|
|
31
36
|
infrastructure: "infrastructure";
|
|
32
37
|
unclassified: "unclassified";
|
|
38
|
+
"ac-missing-evidence": "ac-missing-evidence";
|
|
39
|
+
"runtime-probe-fail": "runtime-probe-fail";
|
|
40
|
+
"source-ac-drift": "source-ac-drift";
|
|
33
41
|
}>;
|
|
34
42
|
affected_files: z.ZodArray<z.ZodString>;
|
|
35
43
|
description: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/learning/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/learning/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;EAelC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAMvE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWxB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAOnD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB"}
|
package/dist/learning/types.js
CHANGED
|
@@ -17,6 +17,11 @@ export const RootCauseCategorySchema = z.enum([
|
|
|
17
17
|
'resource-exhaustion',
|
|
18
18
|
'infrastructure',
|
|
19
19
|
'unclassified',
|
|
20
|
+
// Story 74-2: verification-derived root causes consumed by FindingsInjector
|
|
21
|
+
'ac-missing-evidence',
|
|
22
|
+
'runtime-probe-fail',
|
|
23
|
+
'source-ac-drift',
|
|
24
|
+
'cross-story-concurrent-modification',
|
|
20
25
|
]);
|
|
21
26
|
// ---------------------------------------------------------------------------
|
|
22
27
|
// Finding schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/learning/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5C,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,gBAAgB;IAChB,cAAc;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/learning/types.ts"],"names":[],"mappings":"AAAA;;;;GA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
* spec to test descriptions found in the story's modified test files. The check
|
|
6
|
+
* uses Jaccard word-overlap (≥0.4 threshold) for approximate matching and
|
|
7
|
+
* always reports `confidence: 'approximate'` to signal the heuristic nature.
|
|
8
|
+
*
|
|
9
|
+
* Design notes:
|
|
10
|
+
* - On-demand ONLY — NOT registered in the default Tier A/B pipeline.
|
|
11
|
+
* Invoked explicitly via `--verify-ac` on `substrate report` and `substrate run`.
|
|
12
|
+
* - No LLM call in this module (LLM augmentation deferred to Epic 75 per AC5).
|
|
13
|
+
* - No package additions — uses only Node.js built-ins and existing codebase.
|
|
14
|
+
* - File reader is injectable via `_readFile` for unit testing (keeps tests pure).
|
|
15
|
+
*
|
|
16
|
+
* Citation (AC8):
|
|
17
|
+
* - Phase D Story 54-7 (original spec for AC-to-test traceability concept)
|
|
18
|
+
* - Epic 71 (substrate report; this story 74-1 extends Epic 71's output)
|
|
19
|
+
*/
|
|
20
|
+
/** A single row in the AC traceability matrix. */
|
|
21
|
+
export interface AcTraceabilityRow {
|
|
22
|
+
/** The raw AC text (trimmed, with numbering stripped). */
|
|
23
|
+
acText: string;
|
|
24
|
+
/** Whether at least one test description scored ≥0.4 word overlap. */
|
|
25
|
+
matched: boolean;
|
|
26
|
+
/** Name of the best-matching test description, or null if none matched. */
|
|
27
|
+
testName: string | null;
|
|
28
|
+
/** Numeric overlap score of the best match (0–1). */
|
|
29
|
+
score: number;
|
|
30
|
+
}
|
|
31
|
+
/** Input to `runAcTraceabilityCheck`. */
|
|
32
|
+
export interface AcTraceabilityInput {
|
|
33
|
+
/** Story key being checked (e.g., '74-1'). */
|
|
34
|
+
storyKey: string;
|
|
35
|
+
/** Full raw markdown content of the story spec file. */
|
|
36
|
+
storyContent: string;
|
|
37
|
+
/**
|
|
38
|
+
* List of file paths modified by the story's implementation.
|
|
39
|
+
* Sourced from `per_story_state[key].dev_story_signals.files_modified`.
|
|
40
|
+
* Absolute or project-relative paths are both accepted; the check attempts
|
|
41
|
+
* to read each path as-is.
|
|
42
|
+
*/
|
|
43
|
+
filesModified: string[];
|
|
44
|
+
/**
|
|
45
|
+
* Optional file reader for dependency injection in tests.
|
|
46
|
+
* When provided, called instead of `fs/promises.readFile` for each test file.
|
|
47
|
+
* Returning null/undefined causes the file to be silently skipped.
|
|
48
|
+
*/
|
|
49
|
+
_readFile?: (filePath: string) => Promise<string | null>;
|
|
50
|
+
}
|
|
51
|
+
/** Output from `runAcTraceabilityCheck`. */
|
|
52
|
+
export interface AcTraceabilityOutput {
|
|
53
|
+
storyKey: string;
|
|
54
|
+
/** Per-AC match rows. */
|
|
55
|
+
matrix: AcTraceabilityRow[];
|
|
56
|
+
/** Always 'approximate' — the matching algorithm is heuristic. */
|
|
57
|
+
confidence: 'approximate';
|
|
58
|
+
/** Advisory messages (e.g., "no test files found in filesModified"). */
|
|
59
|
+
warnings: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Compute Jaccard-based word overlap between two strings.
|
|
63
|
+
* Returns 0 when either string has no tokens.
|
|
64
|
+
*/
|
|
65
|
+
export declare function wordOverlap(a: string, b: string): number;
|
|
66
|
+
/**
|
|
67
|
+
* Extract numbered AC items from the `## Acceptance Criteria` section of a
|
|
68
|
+
* story spec. Handles both plain `## Acceptance Criteria` headings and the
|
|
69
|
+
* bold-wrapped variant `**Acceptance Criteria:**`.
|
|
70
|
+
*
|
|
71
|
+
* Stops scanning at the next `##` heading (or end-of-file).
|
|
72
|
+
*
|
|
73
|
+
* Returns an array of trimmed AC text strings (numbering stripped).
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseAcList(storyContent: string): string[];
|
|
76
|
+
/** Returns true when the path matches a known test file pattern. */
|
|
77
|
+
export declare function isTestFile(path: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Extract all string literals passed to `describe(`, `it(`, or `test(` in the
|
|
80
|
+
* provided source text.
|
|
81
|
+
*/
|
|
82
|
+
export declare function extractTestDescriptions(source: string): string[];
|
|
83
|
+
/**
|
|
84
|
+
* Run the AC-to-test traceability heuristic.
|
|
85
|
+
*
|
|
86
|
+
* Steps:
|
|
87
|
+
* 1. Parse AC list from `input.storyContent`.
|
|
88
|
+
* 2. Filter `input.filesModified` to test files.
|
|
89
|
+
* 3. Read each test file and extract describe/it/test descriptions.
|
|
90
|
+
* 4. For each AC × each test description, compute word-overlap score.
|
|
91
|
+
* 5. A score ≥ 0.4 marks the AC as "matched".
|
|
92
|
+
* 6. Return the matrix with `confidence: 'approximate'`.
|
|
93
|
+
*
|
|
94
|
+
* File I/O errors are silently ignored per file (the file is simply skipped).
|
|
95
|
+
* When no test files are found, all ACs are "not matched" and a warning is emitted.
|
|
96
|
+
*/
|
|
97
|
+
export declare function runAcTraceabilityCheck(input: AcTraceabilityInput): Promise<AcTraceabilityOutput>;
|
|
98
|
+
//# sourceMappingURL=ac-traceability-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ac-traceability-check.d.ts","sourceRoot":"","sources":["../../../src/verification/checks/ac-traceability-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAA;IAChB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CACzD;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,yBAAyB;IACzB,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,kEAAkE;IAClE,UAAU,EAAE,aAAa,CAAA;IACzB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAmBD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAUxD;AAMD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CA+B1D;AAQD,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAQD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAYhE;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAgE/B"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AC-to-Test Traceability Check — Story 74-1.
|
|
3
|
+
*
|
|
4
|
+
* On-demand heuristic check that maps Acceptance Criteria items from a story
|
|
5
|
+
* spec to test descriptions found in the story's modified test files. The check
|
|
6
|
+
* uses Jaccard word-overlap (≥0.4 threshold) for approximate matching and
|
|
7
|
+
* always reports `confidence: 'approximate'` to signal the heuristic nature.
|
|
8
|
+
*
|
|
9
|
+
* Design notes:
|
|
10
|
+
* - On-demand ONLY — NOT registered in the default Tier A/B pipeline.
|
|
11
|
+
* Invoked explicitly via `--verify-ac` on `substrate report` and `substrate run`.
|
|
12
|
+
* - No LLM call in this module (LLM augmentation deferred to Epic 75 per AC5).
|
|
13
|
+
* - No package additions — uses only Node.js built-ins and existing codebase.
|
|
14
|
+
* - File reader is injectable via `_readFile` for unit testing (keeps tests pure).
|
|
15
|
+
*
|
|
16
|
+
* Citation (AC8):
|
|
17
|
+
* - Phase D Story 54-7 (original spec for AC-to-test traceability concept)
|
|
18
|
+
* - Epic 71 (substrate report; this story 74-1 extends Epic 71's output)
|
|
19
|
+
*/
|
|
20
|
+
import { readFile } from 'fs/promises';
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
// Word-overlap algorithm (AC2)
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
/**
|
|
25
|
+
* Tokenize a string to a deduplicated set of lowercase alphanumeric tokens.
|
|
26
|
+
* Non-alphanumeric characters are replaced with spaces before splitting.
|
|
27
|
+
*/
|
|
28
|
+
function tokenize(s) {
|
|
29
|
+
const words = s
|
|
30
|
+
.toLowerCase()
|
|
31
|
+
.replace(/[^a-z0-9\s]/g, ' ')
|
|
32
|
+
.split(/\s+/)
|
|
33
|
+
.filter(Boolean);
|
|
34
|
+
return new Set(words);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Compute Jaccard-based word overlap between two strings.
|
|
38
|
+
* Returns 0 when either string has no tokens.
|
|
39
|
+
*/
|
|
40
|
+
export function wordOverlap(a, b) {
|
|
41
|
+
const setA = tokenize(a);
|
|
42
|
+
const setB = tokenize(b);
|
|
43
|
+
if (setA.size === 0 || setB.size === 0)
|
|
44
|
+
return 0;
|
|
45
|
+
let intersection = 0;
|
|
46
|
+
for (const w of setA) {
|
|
47
|
+
if (setB.has(w))
|
|
48
|
+
intersection++;
|
|
49
|
+
}
|
|
50
|
+
const union = new Set([...setA, ...setB]).size;
|
|
51
|
+
return intersection / union;
|
|
52
|
+
}
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
// AC section parser (AC2)
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
/**
|
|
57
|
+
* Extract numbered AC items from the `## Acceptance Criteria` section of a
|
|
58
|
+
* story spec. Handles both plain `## Acceptance Criteria` headings and the
|
|
59
|
+
* bold-wrapped variant `**Acceptance Criteria:**`.
|
|
60
|
+
*
|
|
61
|
+
* Stops scanning at the next `##` heading (or end-of-file).
|
|
62
|
+
*
|
|
63
|
+
* Returns an array of trimmed AC text strings (numbering stripped).
|
|
64
|
+
*/
|
|
65
|
+
export function parseAcList(storyContent) {
|
|
66
|
+
const lines = storyContent.split('\n');
|
|
67
|
+
const items = [];
|
|
68
|
+
let inAcSection = false;
|
|
69
|
+
for (const line of lines) {
|
|
70
|
+
// Detect start of AC section
|
|
71
|
+
if (/^##\s+Acceptance Criteria/i.test(line) || /\*\*Acceptance Criteria:\*\*/i.test(line)) {
|
|
72
|
+
inAcSection = true;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
// Stop at the next level-2 heading (but not level-3+ sub-headings)
|
|
76
|
+
if (inAcSection && /^##\s/.test(line)) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
if (!inAcSection)
|
|
80
|
+
continue;
|
|
81
|
+
// Match numbered list items: "1." / "1)" / "AC1:" / "AC1." etc.
|
|
82
|
+
// Prefix is required (no trailing ?) to avoid capturing continuation prose.
|
|
83
|
+
const numbered = line.match(/^\s*(?:\d+[.):]|AC\d+[.):])\s*(.+)/);
|
|
84
|
+
if (numbered) {
|
|
85
|
+
const text = (numbered[1] ?? '').trim();
|
|
86
|
+
if (text.length > 0) {
|
|
87
|
+
items.push(text);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return items;
|
|
92
|
+
}
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Test file detection (AC2)
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
const TEST_FILE_PATTERNS = [/\.test\.ts$/, /\.test\.js$/, /test/i];
|
|
97
|
+
/** Returns true when the path matches a known test file pattern. */
|
|
98
|
+
export function isTestFile(path) {
|
|
99
|
+
return TEST_FILE_PATTERNS.some((p) => p.test(path));
|
|
100
|
+
}
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
// Test description extraction (AC2)
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
const TEST_DESC_RE = /(?:describe|it|test)\s*\(\s*['"`]([^'"`]+)['"`]/g;
|
|
105
|
+
/**
|
|
106
|
+
* Extract all string literals passed to `describe(`, `it(`, or `test(` in the
|
|
107
|
+
* provided source text.
|
|
108
|
+
*/
|
|
109
|
+
export function extractTestDescriptions(source) {
|
|
110
|
+
const results = [];
|
|
111
|
+
let m;
|
|
112
|
+
// Reset lastIndex to 0 before each scan (the regex has the /g flag)
|
|
113
|
+
TEST_DESC_RE.lastIndex = 0;
|
|
114
|
+
while ((m = TEST_DESC_RE.exec(source)) !== null) {
|
|
115
|
+
const desc = m[1];
|
|
116
|
+
if (desc !== undefined && desc.trim().length > 0) {
|
|
117
|
+
results.push(desc.trim());
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return results;
|
|
121
|
+
}
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
// Core check function (AC1)
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
/**
|
|
126
|
+
* Run the AC-to-test traceability heuristic.
|
|
127
|
+
*
|
|
128
|
+
* Steps:
|
|
129
|
+
* 1. Parse AC list from `input.storyContent`.
|
|
130
|
+
* 2. Filter `input.filesModified` to test files.
|
|
131
|
+
* 3. Read each test file and extract describe/it/test descriptions.
|
|
132
|
+
* 4. For each AC × each test description, compute word-overlap score.
|
|
133
|
+
* 5. A score ≥ 0.4 marks the AC as "matched".
|
|
134
|
+
* 6. Return the matrix with `confidence: 'approximate'`.
|
|
135
|
+
*
|
|
136
|
+
* File I/O errors are silently ignored per file (the file is simply skipped).
|
|
137
|
+
* When no test files are found, all ACs are "not matched" and a warning is emitted.
|
|
138
|
+
*/
|
|
139
|
+
export async function runAcTraceabilityCheck(input) {
|
|
140
|
+
const { storyKey, storyContent, filesModified } = input;
|
|
141
|
+
const fileReader = input._readFile ?? ((p) => readFile(p, 'utf-8'));
|
|
142
|
+
const warnings = [];
|
|
143
|
+
// Step 1: parse AC list
|
|
144
|
+
const acList = parseAcList(storyContent);
|
|
145
|
+
// Step 2: filter to test files
|
|
146
|
+
const testFiles = filesModified.filter(isTestFile);
|
|
147
|
+
if (testFiles.length === 0) {
|
|
148
|
+
warnings.push(`No test files found in filesModified for story ${storyKey}. All ACs marked as unmatched.`);
|
|
149
|
+
// Return all ACs as unmatched
|
|
150
|
+
const matrix = acList.map((acText) => ({
|
|
151
|
+
acText,
|
|
152
|
+
matched: false,
|
|
153
|
+
testName: null,
|
|
154
|
+
score: 0,
|
|
155
|
+
}));
|
|
156
|
+
return { storyKey, matrix, confidence: 'approximate', warnings };
|
|
157
|
+
}
|
|
158
|
+
// Step 3: read test files and extract descriptions
|
|
159
|
+
const allTestDescriptions = [];
|
|
160
|
+
for (const filePath of testFiles) {
|
|
161
|
+
try {
|
|
162
|
+
const source = await fileReader(filePath);
|
|
163
|
+
if (source != null) {
|
|
164
|
+
const descs = extractTestDescriptions(source);
|
|
165
|
+
allTestDescriptions.push(...descs);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
// Silently skip unreadable files
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// Step 4 & 5: score each AC against test descriptions
|
|
173
|
+
const MATCH_THRESHOLD = 0.4;
|
|
174
|
+
const matrix = acList.map((acText) => {
|
|
175
|
+
let bestScore = 0;
|
|
176
|
+
let bestTestName = null;
|
|
177
|
+
for (const desc of allTestDescriptions) {
|
|
178
|
+
const score = wordOverlap(acText, desc);
|
|
179
|
+
if (score > bestScore) {
|
|
180
|
+
bestScore = score;
|
|
181
|
+
bestTestName = desc;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const matched = bestScore >= MATCH_THRESHOLD;
|
|
185
|
+
return {
|
|
186
|
+
acText,
|
|
187
|
+
matched,
|
|
188
|
+
testName: matched ? bestTestName : null,
|
|
189
|
+
score: bestScore,
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
return { storyKey, matrix, confidence: 'approximate', warnings };
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=ac-traceability-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ac-traceability-check.js","sourceRoot":"","sources":["../../../src/verification/checks/ac-traceability-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAkDtC,8EAA8E;AAC9E,+BAA+B;AAC/B,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,QAAQ,CAAC,CAAS;IACzB,MAAM,KAAK,GAAG,CAAC;SACZ,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,OAAO,CAAC,CAAA;IAClB,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAA;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,CAAS,EAAE,CAAS;IAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACxB,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,CAAC,CAAA;IAChD,IAAI,YAAY,GAAG,CAAC,CAAA;IACpB,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YAAE,YAAY,EAAE,CAAA;IACjC,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IAC9C,OAAO,YAAY,GAAG,KAA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S,GAAG,KAAK,CAAA;gBACjB,YAAY,GAAG,IAAI,CAAA;YACrB,CAAC;QACH,CAAC;QAED,MAAM,OAAO,GAAG,SAAS,IAAI,eAAe,CAAA;QAC5C,OAAO;YACL,MAAM;YACN,OAAO;YACP,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;YACvC,KAAK,EAAE,SAAS;SACjB,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAA;AAClE,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification-to-Learning feedback bridge.
|
|
3
|
+
*
|
|
4
|
+
* Original spec: Phase D Story 54-8 (2026-04-05)
|
|
5
|
+
* Root-cause taxonomy consumed: Story 53-5 (v0.19.31)
|
|
6
|
+
*
|
|
7
|
+
* Closes the feedback circuit: verification pipeline findings →
|
|
8
|
+
* learning store (Dolt decisions table) → FindingsInjector →
|
|
9
|
+
* future dispatch context.
|
|
10
|
+
*
|
|
11
|
+
* Story 74-2:
|
|
12
|
+
* - Consumes the existing `VerificationSummary` shape (no new aggregate format).
|
|
13
|
+
* - Maps each `fail` / `warn` check to a `RootCauseCategory` via a static map
|
|
14
|
+
* (AC2). Unmapped check names are skipped — verification keeps growing new
|
|
15
|
+
* checks; we'd rather drop unrelated noise than mis-classify it.
|
|
16
|
+
* - Writes Finding rows via `appendFinding` from
|
|
17
|
+
* `@substrate-ai/core/persistence/queries/decisions`. That helper inserts
|
|
18
|
+
* into the same `decisions` table (`category = 'finding'`) that
|
|
19
|
+
* `FindingsInjector` already reads via `getDecisionsByCategory`, so future
|
|
20
|
+
* dispatches automatically pick up verification-derived signal.
|
|
21
|
+
*
|
|
22
|
+
* Wiring (AC6):
|
|
23
|
+
* - Invoked by `VerificationPipeline.run()` AFTER it emits
|
|
24
|
+
* `verification:story-complete`. Fire-and-forget — Dolt write errors are
|
|
25
|
+
* logged at warn but never propagate to the verification result.
|
|
26
|
+
*/
|
|
27
|
+
import type { DatabaseAdapter } from '@substrate-ai/core';
|
|
28
|
+
import type { Finding, RootCauseCategory } from '../learning/types.js';
|
|
29
|
+
import type { VerificationSummary } from './types.js';
|
|
30
|
+
/**
|
|
31
|
+
* Maps verification check names → learning-store root cause categories.
|
|
32
|
+
*
|
|
33
|
+
* Only checks present in this map produce findings. Any other check name is
|
|
34
|
+
* silently skipped (the verification result is unaffected).
|
|
35
|
+
*/
|
|
36
|
+
export declare const ROOT_CAUSE_MAP: Record<string, RootCauseCategory>;
|
|
37
|
+
/**
|
|
38
|
+
* Minimal story-scoped context needed to stamp a Finding row.
|
|
39
|
+
*
|
|
40
|
+
* Sourced by callers from the orchestrator's per-story state — the dev-story
|
|
41
|
+
* `files_modified` array and the active pipeline run id.
|
|
42
|
+
*/
|
|
43
|
+
export interface StoryContext {
|
|
44
|
+
/** Pipeline run id; falls back to `'unknown'` when not supplied. */
|
|
45
|
+
runId: string;
|
|
46
|
+
/** Files the dev-story dispatch reported as modified. */
|
|
47
|
+
filesModified: string[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Inject verification-derived findings into the learning store.
|
|
51
|
+
*
|
|
52
|
+
* For each check in `summary.checks` whose `status` is `'fail'` or `'warn'`
|
|
53
|
+
* AND whose `checkName` is mapped in `ROOT_CAUSE_MAP`, append a Finding row
|
|
54
|
+
* to the existing `decisions` table via `appendFinding`. Findings are stamped
|
|
55
|
+
* with:
|
|
56
|
+
* - `confidence: 'high'` — verification is static analysis, not heuristic
|
|
57
|
+
* (AC3).
|
|
58
|
+
* - `affected_files: storyContext.filesModified` (AC4).
|
|
59
|
+
* - `root_cause: ROOT_CAUSE_MAP[check.checkName]` (AC2).
|
|
60
|
+
*
|
|
61
|
+
* Adapter resolution:
|
|
62
|
+
* - Production: callers (e.g., the orchestrator-wired VerificationPipeline)
|
|
63
|
+
* pass an explicit adapter built from the monolith's
|
|
64
|
+
* `createDatabaseAdapter` shim (which injects DoltClient).
|
|
65
|
+
* - Standalone (e.g., the runtime probe in this story): when `adapter` is
|
|
66
|
+
* omitted we fall back to `@substrate-ai/core`'s `createDatabaseAdapter`
|
|
67
|
+
* with `backend: 'auto'`. Without a Dolt client factory the core factory
|
|
68
|
+
* returns InMemoryDatabaseAdapter — fine for tests, surfaces a no-op for
|
|
69
|
+
* the runtime probe (which uses an explicit adapter via the wiring).
|
|
70
|
+
*
|
|
71
|
+
* Errors are surfaced to the caller's `.catch` handler. The production wiring
|
|
72
|
+
* in `VerificationPipeline.run` swallows them at warn so verification never
|
|
73
|
+
* blocks on Dolt unavailability.
|
|
74
|
+
*/
|
|
75
|
+
export declare function injectVerificationFindings(verificationSummary: VerificationSummary, storyContext: StoryContext, adapter?: DatabaseAdapter): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Build the list of Finding objects that should be persisted for this summary.
|
|
78
|
+
* Pure function — no I/O — to keep unit tests simple.
|
|
79
|
+
*/
|
|
80
|
+
export declare function buildFindingsFromSummary(summary: VerificationSummary, storyContext: StoryContext): Finding[];
|
|
81
|
+
//# sourceMappingURL=findings-to-learning-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findings-to-learning-store.d.ts","sourceRoot":"","sources":["../../src/verification/findings-to-learning-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAA2B,MAAM,YAAY,CAAA;AAM9E;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAQ5D,CAAA;AAMD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,0BAA0B,CAC9C,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAuBf;AAMD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,YAAY,EAAE,YAAY,GACzB,OAAO,EAAE,CAwBX"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification-to-Learning feedback bridge.
|
|
3
|
+
*
|
|
4
|
+
* Original spec: Phase D Story 54-8 (2026-04-05)
|
|
5
|
+
* Root-cause taxonomy consumed: Story 53-5 (v0.19.31)
|
|
6
|
+
*
|
|
7
|
+
* Closes the feedback circuit: verification pipeline findings →
|
|
8
|
+
* learning store (Dolt decisions table) → FindingsInjector →
|
|
9
|
+
* future dispatch context.
|
|
10
|
+
*
|
|
11
|
+
* Story 74-2:
|
|
12
|
+
* - Consumes the existing `VerificationSummary` shape (no new aggregate format).
|
|
13
|
+
* - Maps each `fail` / `warn` check to a `RootCauseCategory` via a static map
|
|
14
|
+
* (AC2). Unmapped check names are skipped — verification keeps growing new
|
|
15
|
+
* checks; we'd rather drop unrelated noise than mis-classify it.
|
|
16
|
+
* - Writes Finding rows via `appendFinding` from
|
|
17
|
+
* `@substrate-ai/core/persistence/queries/decisions`. That helper inserts
|
|
18
|
+
* into the same `decisions` table (`category = 'finding'`) that
|
|
19
|
+
* `FindingsInjector` already reads via `getDecisionsByCategory`, so future
|
|
20
|
+
* dispatches automatically pick up verification-derived signal.
|
|
21
|
+
*
|
|
22
|
+
* Wiring (AC6):
|
|
23
|
+
* - Invoked by `VerificationPipeline.run()` AFTER it emits
|
|
24
|
+
* `verification:story-complete`. Fire-and-forget — Dolt write errors are
|
|
25
|
+
* logged at warn but never propagate to the verification result.
|
|
26
|
+
*/
|
|
27
|
+
import { appendFinding, createDatabaseAdapter } from '@substrate-ai/core';
|
|
28
|
+
import { FindingSchema } from '../learning/types.js';
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Root-cause derivation map (AC2)
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
/**
|
|
33
|
+
* Maps verification check names → learning-store root cause categories.
|
|
34
|
+
*
|
|
35
|
+
* Only checks present in this map produce findings. Any other check name is
|
|
36
|
+
* silently skipped (the verification result is unaffected).
|
|
37
|
+
*/
|
|
38
|
+
export const ROOT_CAUSE_MAP = {
|
|
39
|
+
'phantom-review': 'build-failure',
|
|
40
|
+
'trivial-output': 'resource-exhaustion',
|
|
41
|
+
build: 'build-failure',
|
|
42
|
+
'acceptance-criteria-evidence': 'ac-missing-evidence',
|
|
43
|
+
'runtime-probes': 'runtime-probe-fail',
|
|
44
|
+
'source-ac-fidelity': 'source-ac-drift',
|
|
45
|
+
'cross-story-consistency': 'cross-story-concurrent-modification',
|
|
46
|
+
};
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// injectVerificationFindings (AC1, AC2, AC3, AC4, AC7)
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* Inject verification-derived findings into the learning store.
|
|
52
|
+
*
|
|
53
|
+
* For each check in `summary.checks` whose `status` is `'fail'` or `'warn'`
|
|
54
|
+
* AND whose `checkName` is mapped in `ROOT_CAUSE_MAP`, append a Finding row
|
|
55
|
+
* to the existing `decisions` table via `appendFinding`. Findings are stamped
|
|
56
|
+
* with:
|
|
57
|
+
* - `confidence: 'high'` — verification is static analysis, not heuristic
|
|
58
|
+
* (AC3).
|
|
59
|
+
* - `affected_files: storyContext.filesModified` (AC4).
|
|
60
|
+
* - `root_cause: ROOT_CAUSE_MAP[check.checkName]` (AC2).
|
|
61
|
+
*
|
|
62
|
+
* Adapter resolution:
|
|
63
|
+
* - Production: callers (e.g., the orchestrator-wired VerificationPipeline)
|
|
64
|
+
* pass an explicit adapter built from the monolith's
|
|
65
|
+
* `createDatabaseAdapter` shim (which injects DoltClient).
|
|
66
|
+
* - Standalone (e.g., the runtime probe in this story): when `adapter` is
|
|
67
|
+
* omitted we fall back to `@substrate-ai/core`'s `createDatabaseAdapter`
|
|
68
|
+
* with `backend: 'auto'`. Without a Dolt client factory the core factory
|
|
69
|
+
* returns InMemoryDatabaseAdapter — fine for tests, surfaces a no-op for
|
|
70
|
+
* the runtime probe (which uses an explicit adapter via the wiring).
|
|
71
|
+
*
|
|
72
|
+
* Errors are surfaced to the caller's `.catch` handler. The production wiring
|
|
73
|
+
* in `VerificationPipeline.run` swallows them at warn so verification never
|
|
74
|
+
* blocks on Dolt unavailability.
|
|
75
|
+
*/
|
|
76
|
+
export async function injectVerificationFindings(verificationSummary, storyContext, adapter) {
|
|
77
|
+
const findings = buildFindingsFromSummary(verificationSummary, storyContext);
|
|
78
|
+
if (findings.length === 0)
|
|
79
|
+
return;
|
|
80
|
+
const ownAdapter = adapter === undefined;
|
|
81
|
+
const dbAdapter = adapter ?? createDatabaseAdapter({ backend: 'auto' });
|
|
82
|
+
try {
|
|
83
|
+
for (const finding of findings) {
|
|
84
|
+
await appendFinding(dbAdapter, finding);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
// Only close adapters we created. Caller owns adapters they passed in.
|
|
89
|
+
if (ownAdapter) {
|
|
90
|
+
try {
|
|
91
|
+
await dbAdapter.close();
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
// Non-fatal — close errors must not propagate
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// Helpers
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
/**
|
|
103
|
+
* Build the list of Finding objects that should be persisted for this summary.
|
|
104
|
+
* Pure function — no I/O — to keep unit tests simple.
|
|
105
|
+
*/
|
|
106
|
+
export function buildFindingsFromSummary(summary, storyContext) {
|
|
107
|
+
const findings = [];
|
|
108
|
+
for (const check of summary.checks) {
|
|
109
|
+
if (!shouldInjectCheck(check))
|
|
110
|
+
continue;
|
|
111
|
+
const rootCause = ROOT_CAUSE_MAP[check.checkName];
|
|
112
|
+
if (rootCause === undefined)
|
|
113
|
+
continue;
|
|
114
|
+
const finding = FindingSchema.parse({
|
|
115
|
+
id: crypto.randomUUID(),
|
|
116
|
+
run_id: storyContext.runId.length > 0 ? storyContext.runId : 'unknown',
|
|
117
|
+
story_key: summary.storyKey,
|
|
118
|
+
root_cause: rootCause,
|
|
119
|
+
affected_files: storyContext.filesModified,
|
|
120
|
+
description: buildDescription(check),
|
|
121
|
+
confidence: 'high',
|
|
122
|
+
created_at: new Date().toISOString(),
|
|
123
|
+
expires_after_runs: 5,
|
|
124
|
+
});
|
|
125
|
+
findings.push(finding);
|
|
126
|
+
}
|
|
127
|
+
return findings;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns true when a verification check should produce a finding.
|
|
131
|
+
*
|
|
132
|
+
* AC2 / AC9 require both `fail` and `warn` to inject (Task 5 case d). `pass`
|
|
133
|
+
* and any unrecognized status are skipped — silence is signal.
|
|
134
|
+
*/
|
|
135
|
+
function shouldInjectCheck(check) {
|
|
136
|
+
return check.status === 'fail' || check.status === 'warn';
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Compose a stable, human-readable description from the check result.
|
|
140
|
+
* `details` is preferred when present; otherwise we fall back to a synthetic
|
|
141
|
+
* one-liner so retry prompts always have something to render.
|
|
142
|
+
*/
|
|
143
|
+
function buildDescription(check) {
|
|
144
|
+
const detailText = check.details?.trim() ?? '';
|
|
145
|
+
if (detailText.length > 0) {
|
|
146
|
+
return `[${check.checkName}/${check.status}] ${detailText}`;
|
|
147
|
+
}
|
|
148
|
+
return `[${check.checkName}/${check.status}] verification check produced no detail text`;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=findings-to-learning-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findings-to-learning-store.js","sourceRoot":"","sources":["../../src/verification/findings-to-learning-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAGpD,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsC;IAC/D,gBAAgB,EAAE,eAAe;IACjC,gBAAgB,EAAE,qBAAqB;IACvC,KAAK,EAAE,eAAe;IACtB,8BAA8B,EAAE,qBAAqB;IACrD,gBAAgB,EAAE,oBAAoB;IACtC,oBAAoB,EAAE,iBAAiB;IACvC,yBAAyB,EAAE,qCAAqC;CACjE,CAAA;AAmBD,8EAA8E;AAC9E,uDAAuD;AACvD,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,mBAAwC,EACxC,YAA0B,EAC1B,OAAyB;IAEzB,MAAM,QAAQ,GAAG,wBAAwB,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAA;IAE5E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAM;IAEjC,MAAM,UAAU,GAAG,OAAO,KAAK,SAAS,CAAA;IACxC,MAAM,SAAS,GACb,OAAO,IAAI,qBAAqB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;IAEvD,IAAI,CAAC;QACH,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM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KG;AACH,SAAS,iBAAiB,CAAC,KAA8B;IACvD,OAAO,KAAK,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAA;AAC3D,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,KAA8B;IACtD,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC9C,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE,CAAA;IAC7D,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,8CAA8C,CAAA;AAC1F,CAAC"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* and concrete check implementations.
|
|
6
6
|
*/
|
|
7
7
|
export { VerificationPipeline, createDefaultVerificationPipeline } from './verification-pipeline.js';
|
|
8
|
+
export { injectVerificationFindings, buildFindingsFromSummary, ROOT_CAUSE_MAP, } from './findings-to-learning-store.js';
|
|
9
|
+
export type { StoryContext } from './findings-to-learning-store.js';
|
|
8
10
|
export type { VerificationCheck, VerificationContext, VerificationResult, VerificationCheckResult, VerificationSummary, ReviewSignals, DevStorySignals, VerificationFinding, VerificationFindingSeverity, } from './types.js';
|
|
9
11
|
export { renderFindings } from './findings.js';
|
|
10
12
|
export { RuntimeProbeCheck } from './checks/runtime-probe-check.js';
|
|
@@ -24,4 +26,6 @@ export { CrossStoryConsistencyCheck, runCrossStoryConsistencyCheck, } from './ch
|
|
|
24
26
|
export { CATEGORY_CROSS_STORY_CONCURRENT_MODIFICATION } from './findings.js';
|
|
25
27
|
export { detectStaleVerifications, CommittedAtResolver, runStaleVerificationRecovery, } from './cross-story-race-recovery.js';
|
|
26
28
|
export type { BatchEntry, StaleVerificationRecoveryInput, StaleVerificationRecoveryResult, } from './cross-story-race-recovery.js';
|
|
29
|
+
export { runAcTraceabilityCheck, wordOverlap, parseAcList, isTestFile, extractTestDescriptions, } from './checks/ac-traceability-check.js';
|
|
30
|
+
export type { AcTraceabilityInput, AcTraceabilityOutput, AcTraceabilityRow, } from './checks/ac-traceability-check.js';
|
|
27
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAA;AAEpG,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,cAAc,GACf,MAAM,iCAAiC,CAAA;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AACnE,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAE5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAA;AACjG,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErE,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,4CAA4C,EAAE,MAAM,eAAe,CAAA;AAE5E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,gCAAgC,CAAA;AACvC,YAAY,EACV,UAAU,EACV,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,UAAU,EACV,uBAAuB,GACxB,MAAM,mCAAmC,CAAA;AAC1C,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,mCAAmC,CAAA"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* and concrete check implementations.
|
|
6
6
|
*/
|
|
7
7
|
export { VerificationPipeline, createDefaultVerificationPipeline } from './verification-pipeline.js';
|
|
8
|
+
// Story 74-2: verification → learning feedback bridge
|
|
9
|
+
export { injectVerificationFindings, buildFindingsFromSummary, ROOT_CAUSE_MAP, } from './findings-to-learning-store.js';
|
|
8
10
|
export { renderFindings } from './findings.js';
|
|
9
11
|
// Epic 55 Phase 2 — Runtime probe support.
|
|
10
12
|
export { RuntimeProbeCheck } from './checks/runtime-probe-check.js';
|
|
@@ -28,4 +30,6 @@ export { CrossStoryConsistencyCheck, runCrossStoryConsistencyCheck, } from './ch
|
|
|
28
30
|
export { CATEGORY_CROSS_STORY_CONCURRENT_MODIFICATION } from './findings.js';
|
|
29
31
|
// Story 70-1: cross-story race recovery
|
|
30
32
|
export { detectStaleVerifications, CommittedAtResolver, runStaleVerificationRecovery, } from './cross-story-race-recovery.js';
|
|
33
|
+
// Story 74-1: AC-to-test traceability check (on-demand via --verify-ac flag)
|
|
34
|
+
export { runAcTraceabilityCheck, wordOverlap, parseAcList, isTestFile, extractTestDescriptions, } from './checks/ac-traceability-check.js';
|
|
31
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAA;AACpG,sDAAsD;AACtD,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,cAAc,GACf,MAAM,iCAAiC,CAAA;AAaxC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,2CAA2C;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,0DAA0D;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,iFAAiF;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAQ1B,+CAA+C;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAA;AACjG,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC1F,uCAAuC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,qDAAqD;AACrD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAA;AAC9D,+DAA+D;AAC/D,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,4CAA4C,EAAE,MAAM,eAAe,CAAA;AAC5E,wCAAwC;AACxC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,gCAAgC,CAAA;AAMvC,6EAA6E;AAC7E,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,UAAU,EACV,uBAAuB,GACxB,MAAM,mCAAmC,CAAA"}
|
|
@@ -131,6 +131,14 @@ export interface VerificationContext {
|
|
|
131
131
|
* drive detection without requiring real concurrent-story context.
|
|
132
132
|
*/
|
|
133
133
|
_crossStoryConflictingFiles?: string[];
|
|
134
|
+
/**
|
|
135
|
+
* Optional pipeline run id used by the verification → learning feedback bridge
|
|
136
|
+
* (Story 74-2). Populated by the orchestrator from `config.pipelineRunId` so
|
|
137
|
+
* `injectVerificationFindings` can stamp the resulting Finding rows with the
|
|
138
|
+
* correct run scope; left undefined when the caller cannot supply one (the
|
|
139
|
+
* bridge falls back to `'unknown'` and still writes the finding).
|
|
140
|
+
*/
|
|
141
|
+
runId?: string;
|
|
134
142
|
}
|
|
135
143
|
/**
|
|
136
144
|
* Result returned by a single VerificationCheck.run() invocation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/verification/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAGxD,YAAY,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAMrF;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,6GAA6G;IAC7G,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAA;IACtC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CACjC;AAMD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,8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WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,uBAAuB,EAAE,CAAA;IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,WAAW,EAAE,MAAM,CAAA;CACpB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAA;IACZ,mFAAmF;IACnF,IAAI,EAAE,GAAG,GAAG,GAAG,CAAA;IACf;;;OAGG;IACH,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAC/D"}
|
|
@@ -62,6 +62,11 @@ export declare class VerificationPipeline {
|
|
|
62
62
|
* 6. SourceAcFidelityCheck — Story 58-2: cross-references rendered story artifact
|
|
63
63
|
* against the source epic's hard clauses (MUST/SHALL/paths)
|
|
64
64
|
*
|
|
65
|
+
* On-demand check (NOT in default pipeline):
|
|
66
|
+
* - AcTraceabilityCheck — Story 74-1: heuristic AC-to-test traceability.
|
|
67
|
+
* Invoked only via `--verify-ac` on `substrate report` and `substrate run`.
|
|
68
|
+
* Excluded from default Tier A/B to avoid paying the cost on every run.
|
|
69
|
+
*
|
|
65
70
|
* @param bus Typed event bus for verification events.
|
|
66
71
|
* @param config Optional config (used to forward threshold to TrivialOutputCheck).
|
|
67
72
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-pipeline.d.ts","sourceRoot":"","sources":["../../src/verification/verification-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAGnB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AA+BhF;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2B;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAElD;;;OAGG;
|
|
1
|
+
{"version":3,"file":"verification-pipeline.d.ts","sourceRoot":"","sources":["../../src/verification/verification-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAGnB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AA+BhF;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2B;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAElD;;;OAGG;gBAED,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,EAC9B,MAAM,GAAE,iBAAiB,EAAO;IAQlC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAIxC;;;;;;;;;;OAUG;IACG,GAAG,CAAC,OAAO,EAAE,mBAAmB,EAAE,IAAI,GAAE,GAAG,GAAG,GAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAqE7F;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,EAC9B,MAAM,CAAC,EAAE,wBAAwB,GAChC,oBAAoB,CAYtB"}
|
|
@@ -156,6 +156,11 @@ export class VerificationPipeline {
|
|
|
156
156
|
* 6. SourceAcFidelityCheck — Story 58-2: cross-references rendered story artifact
|
|
157
157
|
* against the source epic's hard clauses (MUST/SHALL/paths)
|
|
158
158
|
*
|
|
159
|
+
* On-demand check (NOT in default pipeline):
|
|
160
|
+
* - AcTraceabilityCheck — Story 74-1: heuristic AC-to-test traceability.
|
|
161
|
+
* Invoked only via `--verify-ac` on `substrate report` and `substrate run`.
|
|
162
|
+
* Excluded from default Tier A/B to avoid paying the cost on every run.
|
|
163
|
+
*
|
|
159
164
|
* @param bus Typed event bus for verification events.
|
|
160
165
|
* @param config Optional config (used to forward threshold to TrivialOutputCheck).
|
|
161
166
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-pipeline.js","sourceRoot":"","sources":["../../src/verification/verification-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAA;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAA;AAEtF,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,eAAe,CACtB,MAAiC;IAEjC,IAAI,MAAM,GAA6B,MAAM,CAAA;IAC7C,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;YAAE,OAAO,MAAM,CAAA;QACtC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;YAAE,MAAM,GAAG,MAAM,CAAA;IAC1C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACd,IAAI,CAA2B;IAC/B,OAAO,GAAwB,EAAE,CAAA;IAElD;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"verification-pipeline.js","sourceRoot":"","sources":["../../src/verification/verification-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAA;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAA;AAEtF,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,eAAe,CACtB,MAAiC;IAEjC,IAAI,MAAM,GAA6B,MAAM,CAAA;IAC7C,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;YAAE,OAAO,MAAM,CAAA;QACtC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;YAAE,MAAM,GAAG,MAAM,CAAA;IAC1C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACd,IAAI,CAA2B;IAC/B,OAAO,GAAwB,EA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I,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAA;QAEtD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAED,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,iCAAiC,CAC/C,GAA8B,EAC9B,MAAiC;IAEjC,MAAM,MAAM,GAAwB;QAClC,IAAI,kBAAkB,EAAE;QACxB,IAAI,kBAAkB,CAAC,MAAM,CAAC;QAC9B,IAAI,+BAA+B,EAAE;QACrC,IAAI,UAAU,EAAE,EAAE,8DAA8D;QAChF,IAAI,iBAAiB,EAAE,EAAE,iDAAiD;QAC1E,IAAI,qBAAqB,EAAE,EAAE,sCAAsC;QACnE,IAAI,qBAAqB,EAAE,EAAE,iFAAiF;QAC9G,IAAI,0BAA0B,EAAE,EAAE,wEAAwE;KAC3G,CAAA;IACD,OAAO,IAAI,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AAC9C,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.66",
|
|
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.66",
|
|
28
28
|
"js-yaml": "^4.1.1",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|