@substrate-ai/sdlc 0.20.40 → 0.20.41
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 +4 -2
- package/dist/run-model/index.d.ts.map +1 -1
- package/dist/run-model/index.js +4 -1
- package/dist/run-model/index.js.map +1 -1
- package/dist/run-model/per-story-state.d.ts +15 -0
- package/dist/run-model/per-story-state.d.ts.map +1 -1
- package/dist/run-model/probe-author-metrics.d.ts +113 -0
- package/dist/run-model/probe-author-metrics.d.ts.map +1 -0
- package/dist/run-model/probe-author-metrics.js +162 -0
- package/dist/run-model/probe-author-metrics.js.map +1 -0
- package/dist/run-model/schemas.d.ts +15 -0
- package/dist/run-model/schemas.d.ts.map +1 -1
- package/dist/run-model/verification-result.d.ts +48 -0
- package/dist/run-model/verification-result.d.ts.map +1 -1
- package/dist/run-model/verification-result.js +47 -0
- package/dist/run-model/verification-result.js.map +1 -1
- package/dist/verification/checks/runtime-probe-check.d.ts.map +1 -1
- package/dist/verification/checks/runtime-probe-check.js +18 -2
- package/dist/verification/checks/runtime-probe-check.js.map +1 -1
- package/dist/verification/findings.d.ts +10 -0
- package/dist/verification/findings.d.ts.map +1 -1
- package/dist/verification/findings.js.map +1 -1
- package/dist/verification/probes/types.d.ts +8 -0
- package/dist/verification/probes/types.d.ts.map +1 -1
- package/dist/verification/probes/types.js +14 -0
- package/dist/verification/probes/types.js.map +1 -1
- package/package.json +2 -2
|
@@ -14,10 +14,12 @@ export { CliFlagsSchema } from './cli-flags.js';
|
|
|
14
14
|
export type { CliFlags } from './cli-flags.js';
|
|
15
15
|
export { PerStoryStatusSchema, PerStoryStateSchema } from './per-story-state.js';
|
|
16
16
|
export type { PerStoryStatus, PerStoryState } from './per-story-state.js';
|
|
17
|
-
export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, StoredVerificationSummarySchema, } from './verification-result.js';
|
|
18
|
-
export type { StoredVerificationFinding, StoredVerificationCheckResult, StoredVerificationSummary, } from './verification-result.js';
|
|
17
|
+
export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, StoredVerificationSummarySchema, StoredVerificationAnnotationSchema, } from './verification-result.js';
|
|
18
|
+
export type { StoredVerificationFinding, StoredVerificationCheckResult, StoredVerificationSummary, StoredVerificationAnnotation, } from './verification-result.js';
|
|
19
19
|
export { rollupFindingCounts, ZERO_FINDING_COUNTS } from './verification-findings-counts.js';
|
|
20
20
|
export type { VerificationFindingsCounts } from './verification-findings-counts.js';
|
|
21
|
+
export { rollupProbeAuthorMetrics, rollupFindingsByAuthor, aggregateProbeAuthorMetrics, ZERO_PROBE_AUTHOR_METRICS, ZERO_FINDINGS_BY_AUTHOR, } from './probe-author-metrics.js';
|
|
22
|
+
export type { ProbeAuthorMetrics, ProbeAuthorAggregate, FindingsByAuthor, } from './probe-author-metrics.js';
|
|
21
23
|
export { StoredDevStorySignalsSchema } from './dev-story-signals.js';
|
|
22
24
|
export type { StoredDevStorySignals } from './dev-story-signals.js';
|
|
23
25
|
export { SupervisorLock } from './supervisor-lock.js';
|
|
@@ -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,cAAc,EACd,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CA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A;AAGnF,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAGnE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/run-model/index.js
CHANGED
|
@@ -14,9 +14,12 @@ export { CliFlagsSchema } from './cli-flags.js';
|
|
|
14
14
|
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
|
+
// Story 60-15: StoredVerificationAnnotation schema (operator-added catch-rate KPI annotations)
|
|
18
|
+
export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, StoredVerificationSummarySchema, StoredVerificationAnnotationSchema, } from './verification-result.js';
|
|
18
19
|
// Story 55-3b: roll-up helper for surfacing finding counts in CLI JSON output
|
|
19
20
|
export { rollupFindingCounts, ZERO_FINDING_COUNTS } from './verification-findings-counts.js';
|
|
21
|
+
// Story 60-15: probe-author per-story rollup + cross-run aggregate
|
|
22
|
+
export { rollupProbeAuthorMetrics, rollupFindingsByAuthor, aggregateProbeAuthorMetrics, ZERO_PROBE_AUTHOR_METRICS, ZERO_FINDINGS_BY_AUTHOR, } from './probe-author-metrics.js';
|
|
20
23
|
// Story 60-8: persisted dev-story signals (closes 60-3's manifest-source-of-truth gap)
|
|
21
24
|
export { StoredDevStorySignalsSchema } from './dev-story-signals.js';
|
|
22
25
|
// Story 52-2: Supervisor locking and ownership
|
|
@@ -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,EACnB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAErB,wFAAwF;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,0CAA0C;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAG/C,yDAAyD;AACzD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAGhF,2DAA2D;AAC3D,8EAA8E;AAC9E,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,+BAA+B,
|
|
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,EACnB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAErB,wFAAwF;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,0CAA0C;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAG/C,yDAAyD;AACzD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAGhF,2DAA2D;AAC3D,8EAA8E;AAC9E,+FAA+F;AAC/F,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,0BAA0B,CAAA;AAQjC,8EAA8E;AAC9E,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAG5F,mEAAmE;AACnE,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,2BAA2B,CAAA;AAOlC,uFAAuF;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AAGpE,+CAA+C;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -58,6 +58,10 @@ export declare const PerStoryStateSchema: z.ZodObject<{
|
|
|
58
58
|
stdoutTail: z.ZodOptional<z.ZodString>;
|
|
59
59
|
stderrTail: z.ZodOptional<z.ZodString>;
|
|
60
60
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
"probe-author": "probe-author";
|
|
63
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
64
|
+
}>>;
|
|
61
65
|
}, z.core.$strip>>>;
|
|
62
66
|
}, z.core.$strip>>;
|
|
63
67
|
status: z.ZodEnum<{
|
|
@@ -66,6 +70,17 @@ export declare const PerStoryStateSchema: z.ZodObject<{
|
|
|
66
70
|
fail: "fail";
|
|
67
71
|
}>;
|
|
68
72
|
duration_ms: z.ZodNumber;
|
|
73
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
74
|
+
findingCategory: z.ZodString;
|
|
75
|
+
judgment: z.ZodEnum<{
|
|
76
|
+
"confirmed-defect": "confirmed-defect";
|
|
77
|
+
"false-positive": "false-positive";
|
|
78
|
+
"probe-bug": "probe-bug";
|
|
79
|
+
}>;
|
|
80
|
+
probeName: z.ZodOptional<z.ZodString>;
|
|
81
|
+
note: z.ZodOptional<z.ZodString>;
|
|
82
|
+
createdAt: z.ZodString;
|
|
83
|
+
}, z.core.$strip>>>;
|
|
69
84
|
}, z.core.$strip>>;
|
|
70
85
|
cost_usd: z.ZodOptional<z.ZodNumber>;
|
|
71
86
|
review_cycles: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"per-story-state.d.ts","sourceRoot":"","sources":["../../src/run-model/per-story-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,iTAY/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAMjE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"per-story-state.d.ts","sourceRoot":"","sources":["../../src/run-model/per-story-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,iTAY/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAMjE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2B9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Probe-author per-story rollup — Story 60-15.
|
|
3
|
+
*
|
|
4
|
+
* Collapses every probe-author-relevant signal in a
|
|
5
|
+
* StoredVerificationSummary (including any operator annotations on
|
|
6
|
+
* probe-failures) into a flat `{dispatched, probesAuthoredCount,
|
|
7
|
+
* authoredProbesFailedCount, authoredProbesCaughtConfirmedDefectCount}`
|
|
8
|
+
* shape suitable for per-story surfacing in `substrate status`/`metrics`
|
|
9
|
+
* JSON output and for cross-run aggregation in the `--probe-author-summary`
|
|
10
|
+
* flag.
|
|
11
|
+
*
|
|
12
|
+
* Intentionally pure (mirrors `rollupFindingCounts` shape): no I/O, no
|
|
13
|
+
* logger, no throw. Backward-compat is load-bearing — pre-60-15 manifests
|
|
14
|
+
* have no `_authoredBy` discriminator on their stored findings, no
|
|
15
|
+
* `annotations` array, and probe-author wasn't actually running (Sprint
|
|
16
|
+
* 13/Sprint 20 lesson — the manifest registration bug). The rollup must
|
|
17
|
+
* produce sensible zero values on every legacy code path.
|
|
18
|
+
*/
|
|
19
|
+
import type { StoredVerificationSummary } from './verification-result.js';
|
|
20
|
+
/** Per-story rollup of probe-author signals. */
|
|
21
|
+
export interface ProbeAuthorMetrics {
|
|
22
|
+
/** True if probe-author dispatched against this story (any finding's
|
|
23
|
+
* `_authoredBy === 'probe-author'`, OR — when ANY annotation references
|
|
24
|
+
* a probe-author probe — true). False on legacy manifests, on stories
|
|
25
|
+
* whose AC wasn't event-driven, and on stories where probe-author was
|
|
26
|
+
* skipped via the feature flag. */
|
|
27
|
+
dispatched: boolean;
|
|
28
|
+
/** Total number of probes appended to the story by probe-author. Computed
|
|
29
|
+
* from the verification summary's findings; counts each unique
|
|
30
|
+
* `_authoredBy: 'probe-author'` finding's probe. May undercount when
|
|
31
|
+
* probe-author authored probes that ALL passed (passing probes don't
|
|
32
|
+
* emit findings) — see {@link ProbeAuthorMetrics.dispatched} for
|
|
33
|
+
* presence-detection on that path. */
|
|
34
|
+
probesAuthoredCount: number;
|
|
35
|
+
/** Probe-author-authored probes that failed at runtime (any
|
|
36
|
+
* `runtime-probe-*` finding's `_authoredBy === 'probe-author'`). NOT
|
|
37
|
+
* the same as defect-caught — a probe-author authoring bug, a flaky
|
|
38
|
+
* probe, or a real defect catch all surface as failures. The
|
|
39
|
+
* confirmed-defect count below distinguishes them post-hoc. */
|
|
40
|
+
authoredProbesFailedCount: number;
|
|
41
|
+
/** Subset of `authoredProbesFailedCount` for which an operator added a
|
|
42
|
+
* `judgment: 'confirmed-defect'` annotation via `substrate annotate`.
|
|
43
|
+
* This is the load-bearing KPI numerator — the catch-rate is computed
|
|
44
|
+
* as `confirmed / dispatched`. Without operator annotations, this is
|
|
45
|
+
* always 0 (annotations are post-hoc; the rollup is honest about it). */
|
|
46
|
+
authoredProbesCaughtConfirmedDefectCount: number;
|
|
47
|
+
}
|
|
48
|
+
/** Zero rollup, used as default when no probe-author signal is present. */
|
|
49
|
+
export declare const ZERO_PROBE_AUTHOR_METRICS: Readonly<ProbeAuthorMetrics>;
|
|
50
|
+
/** Per-author breakdown of finding counts (the `byAuthor` shape surfaced
|
|
51
|
+
* on each story's `verification_findings` payload). Mirrors
|
|
52
|
+
* `VerificationFindingsCounts` but split by `_authoredBy`. */
|
|
53
|
+
export interface FindingsByAuthor {
|
|
54
|
+
'probe-author': {
|
|
55
|
+
error: number;
|
|
56
|
+
warn: number;
|
|
57
|
+
info: number;
|
|
58
|
+
};
|
|
59
|
+
'create-story-ac-transfer': {
|
|
60
|
+
error: number;
|
|
61
|
+
warn: number;
|
|
62
|
+
info: number;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export declare const ZERO_FINDINGS_BY_AUTHOR: Readonly<FindingsByAuthor>;
|
|
66
|
+
/**
|
|
67
|
+
* Compute the per-story probe-author rollup from a verification summary.
|
|
68
|
+
*
|
|
69
|
+
* Inputs:
|
|
70
|
+
* - `summary`: the per-story stored verification summary (`per_story_state
|
|
71
|
+
* [storyKey].verification_result` in run manifest terms)
|
|
72
|
+
* - `dispatchedHint`: optional override — when the caller has direct
|
|
73
|
+
* knowledge that probe-author dispatched (e.g., from a captured
|
|
74
|
+
* `probe-author:appended-to-artifact` event on a fresh run), pass true.
|
|
75
|
+
* Useful when probe-author authored probes that all passed (no
|
|
76
|
+
* failure findings to attribute, but presence is real).
|
|
77
|
+
*
|
|
78
|
+
* Backward-compat: undefined/null summary → zero rollup. Missing
|
|
79
|
+
* `_authoredBy` field on findings → counted under
|
|
80
|
+
* `'create-story-ac-transfer'` per the schema's documented semantic.
|
|
81
|
+
* Missing `annotations` array → confirmed-defect count is 0.
|
|
82
|
+
*/
|
|
83
|
+
export declare function rollupProbeAuthorMetrics(summary: StoredVerificationSummary | undefined | null, dispatchedHint?: boolean): ProbeAuthorMetrics;
|
|
84
|
+
/**
|
|
85
|
+
* Compute the byAuthor breakdown of finding counts on a verification summary.
|
|
86
|
+
* Each finding's `_authoredBy` (default `'create-story-ac-transfer'` when
|
|
87
|
+
* absent) routes its severity into the appropriate per-author bucket.
|
|
88
|
+
*/
|
|
89
|
+
export declare function rollupFindingsByAuthor(summary: StoredVerificationSummary | undefined | null): FindingsByAuthor;
|
|
90
|
+
/**
|
|
91
|
+
* Aggregate probe-author metrics across multiple stories' rollups. Mirrors
|
|
92
|
+
* the spec's `--probe-author-summary` flag output shape.
|
|
93
|
+
*/
|
|
94
|
+
export interface ProbeAuthorAggregate {
|
|
95
|
+
totalStoriesDispatched: number;
|
|
96
|
+
probeAuthorDispatchedCount: number;
|
|
97
|
+
probeAuthorDispatchedPct: number;
|
|
98
|
+
totalAuthoredProbes: number;
|
|
99
|
+
totalAuthoredProbesFailed: number;
|
|
100
|
+
totalConfirmedDefectsCaught: number;
|
|
101
|
+
/** `failed / authored` — the raw signal (probes that fired). */
|
|
102
|
+
catchRateByCount: number;
|
|
103
|
+
/** `confirmed / authored` — the load-bearing KPI for Phase 2 calibration. */
|
|
104
|
+
catchRateByConfirmedDefect: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Sum per-story probe-author rollups into a single aggregate. `totalStories`
|
|
108
|
+
* is the denominator for `probeAuthorDispatchedPct` (stories where dispatch
|
|
109
|
+
* could have happened, regardless of outcome). Pass the count of stories
|
|
110
|
+
* the run touched, NOT just the ones with successful dispatch.
|
|
111
|
+
*/
|
|
112
|
+
export declare function aggregateProbeAuthorMetrics(perStory: ProbeAuthorMetrics[], totalStories: number): ProbeAuthorAggregate;
|
|
113
|
+
//# sourceMappingURL=probe-author-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe-author-metrics.d.ts","sourceRoot":"","sources":["../../src/run-model/probe-author-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAMzE,gDAAgD;AAChD,MAAM,WAAW,kBAAkB;IACjC;;;;wCAIoC;IACpC,UAAU,EAAE,OAAO,CAAA;IACnB;;;;;2CAKuC;IACvC,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;;oEAIgE;IAChE,yBAAyB,EAAE,MAAM,CAAA;IACjC;;;;8EAI0E;IAC1E,wCAAwC,EAAE,MAAM,CAAA;CACjD;AAED,2EAA2E;AAC3E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,kBAAkB,CAKjE,CAAA;AAEF;;+DAE+D;AAC/D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7D,0BAA0B,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1E;AAED,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,gBAAgB,CAG7D,CAAA;AAMF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,yBAAyB,GAAG,SAAS,GAAG,IAAI,EACrD,cAAc,CAAC,EAAE,OAAO,GACvB,kBAAkB,CAyCpB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,yBAAyB,GAAG,SAAS,GAAG,IAAI,GACpD,gBAAgB,CAyBlB;AAMD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B,EAAE,MAAM,CAAA;IAClC,wBAAwB,EAAE,MAAM,CAAA;IAChC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,yBAAyB,EAAE,MAAM,CAAA;IACjC,2BAA2B,EAAE,MAAM,CAAA;IACnC,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAA;IACxB,6EAA6E;IAC7E,0BAA0B,EAAE,MAAM,CAAA;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,kBAAkB,EAAE,EAC9B,YAAY,EAAE,MAAM,GACnB,oBAAoB,CAqBtB"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Probe-author per-story rollup — Story 60-15.
|
|
3
|
+
*
|
|
4
|
+
* Collapses every probe-author-relevant signal in a
|
|
5
|
+
* StoredVerificationSummary (including any operator annotations on
|
|
6
|
+
* probe-failures) into a flat `{dispatched, probesAuthoredCount,
|
|
7
|
+
* authoredProbesFailedCount, authoredProbesCaughtConfirmedDefectCount}`
|
|
8
|
+
* shape suitable for per-story surfacing in `substrate status`/`metrics`
|
|
9
|
+
* JSON output and for cross-run aggregation in the `--probe-author-summary`
|
|
10
|
+
* flag.
|
|
11
|
+
*
|
|
12
|
+
* Intentionally pure (mirrors `rollupFindingCounts` shape): no I/O, no
|
|
13
|
+
* logger, no throw. Backward-compat is load-bearing — pre-60-15 manifests
|
|
14
|
+
* have no `_authoredBy` discriminator on their stored findings, no
|
|
15
|
+
* `annotations` array, and probe-author wasn't actually running (Sprint
|
|
16
|
+
* 13/Sprint 20 lesson — the manifest registration bug). The rollup must
|
|
17
|
+
* produce sensible zero values on every legacy code path.
|
|
18
|
+
*/
|
|
19
|
+
/** Zero rollup, used as default when no probe-author signal is present. */
|
|
20
|
+
export const ZERO_PROBE_AUTHOR_METRICS = Object.freeze({
|
|
21
|
+
dispatched: false,
|
|
22
|
+
probesAuthoredCount: 0,
|
|
23
|
+
authoredProbesFailedCount: 0,
|
|
24
|
+
authoredProbesCaughtConfirmedDefectCount: 0,
|
|
25
|
+
});
|
|
26
|
+
export const ZERO_FINDINGS_BY_AUTHOR = Object.freeze({
|
|
27
|
+
'probe-author': { error: 0, warn: 0, info: 0 },
|
|
28
|
+
'create-story-ac-transfer': { error: 0, warn: 0, info: 0 },
|
|
29
|
+
});
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// Rollup
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
/**
|
|
34
|
+
* Compute the per-story probe-author rollup from a verification summary.
|
|
35
|
+
*
|
|
36
|
+
* Inputs:
|
|
37
|
+
* - `summary`: the per-story stored verification summary (`per_story_state
|
|
38
|
+
* [storyKey].verification_result` in run manifest terms)
|
|
39
|
+
* - `dispatchedHint`: optional override — when the caller has direct
|
|
40
|
+
* knowledge that probe-author dispatched (e.g., from a captured
|
|
41
|
+
* `probe-author:appended-to-artifact` event on a fresh run), pass true.
|
|
42
|
+
* Useful when probe-author authored probes that all passed (no
|
|
43
|
+
* failure findings to attribute, but presence is real).
|
|
44
|
+
*
|
|
45
|
+
* Backward-compat: undefined/null summary → zero rollup. Missing
|
|
46
|
+
* `_authoredBy` field on findings → counted under
|
|
47
|
+
* `'create-story-ac-transfer'` per the schema's documented semantic.
|
|
48
|
+
* Missing `annotations` array → confirmed-defect count is 0.
|
|
49
|
+
*/
|
|
50
|
+
export function rollupProbeAuthorMetrics(summary, dispatchedHint) {
|
|
51
|
+
if (summary === undefined || summary === null) {
|
|
52
|
+
return dispatchedHint === true
|
|
53
|
+
? { ...ZERO_PROBE_AUTHOR_METRICS, dispatched: true }
|
|
54
|
+
: { ...ZERO_PROBE_AUTHOR_METRICS };
|
|
55
|
+
}
|
|
56
|
+
// Collect all runtime-probe findings authored by probe-author.
|
|
57
|
+
const authoredFailures = [];
|
|
58
|
+
for (const check of summary.checks) {
|
|
59
|
+
const findings = check.findings ?? [];
|
|
60
|
+
for (const f of findings) {
|
|
61
|
+
const author = f._authoredBy ?? 'create-story-ac-transfer';
|
|
62
|
+
if (author !== 'probe-author')
|
|
63
|
+
continue;
|
|
64
|
+
if (!f.category.startsWith('runtime-probe-'))
|
|
65
|
+
continue;
|
|
66
|
+
// Probe name surfaces in the message as `probe "..."`. Best-effort
|
|
67
|
+
// extraction; falls back to category when absent.
|
|
68
|
+
const probeName = extractProbeName(f.message) ?? f.category;
|
|
69
|
+
authoredFailures.push({ probeName, category: f.category });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Cross-reference with operator annotations to compute confirmed-defect count.
|
|
73
|
+
const annotations = summary.annotations ?? [];
|
|
74
|
+
let confirmedDefectCount = 0;
|
|
75
|
+
for (const failure of authoredFailures) {
|
|
76
|
+
const matched = annotations.find((a) => a.judgment === 'confirmed-defect' &&
|
|
77
|
+
a.findingCategory === failure.category &&
|
|
78
|
+
(a.probeName === undefined || a.probeName === failure.probeName));
|
|
79
|
+
if (matched !== undefined)
|
|
80
|
+
confirmedDefectCount += 1;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
dispatched: dispatchedHint === true || authoredFailures.length > 0,
|
|
84
|
+
probesAuthoredCount: authoredFailures.length,
|
|
85
|
+
authoredProbesFailedCount: authoredFailures.length,
|
|
86
|
+
authoredProbesCaughtConfirmedDefectCount: confirmedDefectCount,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Compute the byAuthor breakdown of finding counts on a verification summary.
|
|
91
|
+
* Each finding's `_authoredBy` (default `'create-story-ac-transfer'` when
|
|
92
|
+
* absent) routes its severity into the appropriate per-author bucket.
|
|
93
|
+
*/
|
|
94
|
+
export function rollupFindingsByAuthor(summary) {
|
|
95
|
+
const result = {
|
|
96
|
+
'probe-author': { error: 0, warn: 0, info: 0 },
|
|
97
|
+
'create-story-ac-transfer': { error: 0, warn: 0, info: 0 },
|
|
98
|
+
};
|
|
99
|
+
if (summary === undefined || summary === null)
|
|
100
|
+
return result;
|
|
101
|
+
for (const check of summary.checks) {
|
|
102
|
+
const findings = check.findings ?? [];
|
|
103
|
+
for (const f of findings) {
|
|
104
|
+
const author = f._authoredBy ?? 'create-story-ac-transfer';
|
|
105
|
+
const bucket = result[author];
|
|
106
|
+
switch (f.severity) {
|
|
107
|
+
case 'error':
|
|
108
|
+
bucket.error += 1;
|
|
109
|
+
break;
|
|
110
|
+
case 'warn':
|
|
111
|
+
bucket.warn += 1;
|
|
112
|
+
break;
|
|
113
|
+
case 'info':
|
|
114
|
+
bucket.info += 1;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Sum per-story probe-author rollups into a single aggregate. `totalStories`
|
|
123
|
+
* is the denominator for `probeAuthorDispatchedPct` (stories where dispatch
|
|
124
|
+
* could have happened, regardless of outcome). Pass the count of stories
|
|
125
|
+
* the run touched, NOT just the ones with successful dispatch.
|
|
126
|
+
*/
|
|
127
|
+
export function aggregateProbeAuthorMetrics(perStory, totalStories) {
|
|
128
|
+
let dispatched = 0;
|
|
129
|
+
let authored = 0;
|
|
130
|
+
let failed = 0;
|
|
131
|
+
let confirmed = 0;
|
|
132
|
+
for (const story of perStory) {
|
|
133
|
+
if (story.dispatched)
|
|
134
|
+
dispatched += 1;
|
|
135
|
+
authored += story.probesAuthoredCount;
|
|
136
|
+
failed += story.authoredProbesFailedCount;
|
|
137
|
+
confirmed += story.authoredProbesCaughtConfirmedDefectCount;
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
totalStoriesDispatched: totalStories,
|
|
141
|
+
probeAuthorDispatchedCount: dispatched,
|
|
142
|
+
probeAuthorDispatchedPct: totalStories > 0 ? dispatched / totalStories : 0,
|
|
143
|
+
totalAuthoredProbes: authored,
|
|
144
|
+
totalAuthoredProbesFailed: failed,
|
|
145
|
+
totalConfirmedDefectsCaught: confirmed,
|
|
146
|
+
catchRateByCount: authored > 0 ? failed / authored : 0,
|
|
147
|
+
catchRateByConfirmedDefect: authored > 0 ? confirmed / authored : 0,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
// Internal helpers
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
/** Extract the probe name from a runtime-probe finding's message. The
|
|
154
|
+
* runtime-probe-check formatter writes `probe "<name>"...` as the leading
|
|
155
|
+
* pattern across all category branches (fail/timeout/assertion-fail/
|
|
156
|
+
* error-response). Returns undefined when the message doesn't match
|
|
157
|
+
* (fault tolerance — the rollup falls back to category-as-name). */
|
|
158
|
+
function extractProbeName(message) {
|
|
159
|
+
const match = /^probe\s+"([^"]+)"/.exec(message);
|
|
160
|
+
return match?.[1];
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=probe-author-metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe-author-metrics.js","sourceRoot":"","sources":["../../src/run-model/probe-author-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAqCH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,yBAAyB,GAAiC,MAAM,CAAC,MAAM,CAAC;IACnF,UAAU,EAAE,KAAK;IACjB,mBAAmB,EAAE,CAAC;IACtB,yBAAyB,EAAE,CAAC;IAC5B,wCAAwC,EAAE,CAAC;CAC5C,CAAC,CAAA;AAUF,MAAM,CAAC,MAAM,uBAAuB,GAA+B,MAAM,CAAC,MAAM,CAAC;IAC/E,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;IAC9C,0BAA0B,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAA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C,CAAC;KACpE,CAAA;AACH,CAAC;AAED,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;;;qEAIqE;AACrE,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChD,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC"}
|
|
@@ -84,6 +84,10 @@ export declare const RunManifestSchema: z.ZodObject<{
|
|
|
84
84
|
stdoutTail: z.ZodOptional<z.ZodString>;
|
|
85
85
|
stderrTail: z.ZodOptional<z.ZodString>;
|
|
86
86
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
"probe-author": "probe-author";
|
|
89
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
90
|
+
}>>;
|
|
87
91
|
}, z.core.$strip>>>;
|
|
88
92
|
}, z.core.$strip>>;
|
|
89
93
|
status: z.ZodEnum<{
|
|
@@ -92,6 +96,17 @@ export declare const RunManifestSchema: z.ZodObject<{
|
|
|
92
96
|
fail: "fail";
|
|
93
97
|
}>;
|
|
94
98
|
duration_ms: z.ZodNumber;
|
|
99
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
findingCategory: z.ZodString;
|
|
101
|
+
judgment: z.ZodEnum<{
|
|
102
|
+
"confirmed-defect": "confirmed-defect";
|
|
103
|
+
"false-positive": "false-positive";
|
|
104
|
+
"probe-bug": "probe-bug";
|
|
105
|
+
}>;
|
|
106
|
+
probeName: z.ZodOptional<z.ZodString>;
|
|
107
|
+
note: z.ZodOptional<z.ZodString>;
|
|
108
|
+
createdAt: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
95
110
|
}, z.core.$strip>>;
|
|
96
111
|
cost_usd: z.ZodOptional<z.ZodNumber>;
|
|
97
112
|
review_cycles: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/run-model/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAMnF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;iBAazB,CAAA;AAMF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/run-model/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAMnF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;iBAazB,CAAA;AAMF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyB5B,CAAA;AAMF;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,wEAAwE;IACxE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,EAAE,CAAA;gBAExB,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE;CAKzD"}
|
|
@@ -34,6 +34,10 @@ export declare const StoredVerificationFindingSchema: z.ZodObject<{
|
|
|
34
34
|
stdoutTail: z.ZodOptional<z.ZodString>;
|
|
35
35
|
stderrTail: z.ZodOptional<z.ZodString>;
|
|
36
36
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
"probe-author": "probe-author";
|
|
39
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
40
|
+
}>>;
|
|
37
41
|
}, z.core.$strip>;
|
|
38
42
|
export type StoredVerificationFinding = z.infer<typeof StoredVerificationFindingSchema>;
|
|
39
43
|
/**
|
|
@@ -64,6 +68,10 @@ export declare const StoredVerificationCheckResultSchema: z.ZodObject<{
|
|
|
64
68
|
stdoutTail: z.ZodOptional<z.ZodString>;
|
|
65
69
|
stderrTail: z.ZodOptional<z.ZodString>;
|
|
66
70
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
72
|
+
"probe-author": "probe-author";
|
|
73
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
74
|
+
}>>;
|
|
67
75
|
}, z.core.$strip>>>;
|
|
68
76
|
}, z.core.$strip>;
|
|
69
77
|
export type StoredVerificationCheckResult = z.infer<typeof StoredVerificationCheckResultSchema>;
|
|
@@ -73,6 +81,31 @@ export type StoredVerificationCheckResult = z.infer<typeof StoredVerificationChe
|
|
|
73
81
|
* Mirrors VerificationSummary from packages/sdlc/src/verification/types.ts
|
|
74
82
|
* without importing from that module (avoids circular dependency).
|
|
75
83
|
*/
|
|
84
|
+
/**
|
|
85
|
+
* Story 60-15: an operator-added annotation on a verification finding,
|
|
86
|
+
* recording the post-hoc judgment about whether a probe failure was
|
|
87
|
+
* a real defect catch, a false positive, or a probe bug.
|
|
88
|
+
*
|
|
89
|
+
* Persisted under `per_story_state[storyKey].verification_result.annotations[]`.
|
|
90
|
+
* Set via `substrate annotate --story <key> --finding-category <cat>
|
|
91
|
+
* --confirmed-defect|--false-positive|--probe-bug`.
|
|
92
|
+
*
|
|
93
|
+
* Used by `rollupProbeAuthorMetrics` to compute the catch-rate KPI's
|
|
94
|
+
* `confirmed-defect` count: a probe-author probe failure that the
|
|
95
|
+
* operator subsequently confirmed as catching a real defect.
|
|
96
|
+
*/
|
|
97
|
+
export declare const StoredVerificationAnnotationSchema: z.ZodObject<{
|
|
98
|
+
findingCategory: z.ZodString;
|
|
99
|
+
judgment: z.ZodEnum<{
|
|
100
|
+
"confirmed-defect": "confirmed-defect";
|
|
101
|
+
"false-positive": "false-positive";
|
|
102
|
+
"probe-bug": "probe-bug";
|
|
103
|
+
}>;
|
|
104
|
+
probeName: z.ZodOptional<z.ZodString>;
|
|
105
|
+
note: z.ZodOptional<z.ZodString>;
|
|
106
|
+
createdAt: z.ZodString;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
export type StoredVerificationAnnotation = z.infer<typeof StoredVerificationAnnotationSchema>;
|
|
76
109
|
export declare const StoredVerificationSummarySchema: z.ZodObject<{
|
|
77
110
|
storyKey: z.ZodString;
|
|
78
111
|
checks: z.ZodArray<z.ZodObject<{
|
|
@@ -97,6 +130,10 @@ export declare const StoredVerificationSummarySchema: z.ZodObject<{
|
|
|
97
130
|
stdoutTail: z.ZodOptional<z.ZodString>;
|
|
98
131
|
stderrTail: z.ZodOptional<z.ZodString>;
|
|
99
132
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
"probe-author": "probe-author";
|
|
135
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
136
|
+
}>>;
|
|
100
137
|
}, z.core.$strip>>>;
|
|
101
138
|
}, z.core.$strip>>;
|
|
102
139
|
status: z.ZodEnum<{
|
|
@@ -105,6 +142,17 @@ export declare const StoredVerificationSummarySchema: z.ZodObject<{
|
|
|
105
142
|
fail: "fail";
|
|
106
143
|
}>;
|
|
107
144
|
duration_ms: z.ZodNumber;
|
|
145
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
findingCategory: z.ZodString;
|
|
147
|
+
judgment: z.ZodEnum<{
|
|
148
|
+
"confirmed-defect": "confirmed-defect";
|
|
149
|
+
"false-positive": "false-positive";
|
|
150
|
+
"probe-bug": "probe-bug";
|
|
151
|
+
}>;
|
|
152
|
+
probeName: z.ZodOptional<z.ZodString>;
|
|
153
|
+
note: z.ZodOptional<z.ZodString>;
|
|
154
|
+
createdAt: z.ZodString;
|
|
155
|
+
}, z.core.$strip>>>;
|
|
108
156
|
}, z.core.$strip>;
|
|
109
157
|
export type StoredVerificationSummary = z.infer<typeof StoredVerificationSummarySchema>;
|
|
110
158
|
//# sourceMappingURL=verification-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-result.d.ts","sourceRoot":"","sources":["../../src/run-model/verification-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"verification-result.d.ts","sourceRoot":"","sources":["../../src/run-model/verification-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;iBAqB1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAMvF;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB9C,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAM/F;;;;;GAKG;AACH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;iBAc7C,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAE7F,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
|
|
@@ -33,6 +33,18 @@ export const StoredVerificationFindingSchema = z.object({
|
|
|
33
33
|
stdoutTail: z.string().optional(),
|
|
34
34
|
stderrTail: z.string().optional(),
|
|
35
35
|
durationMs: z.number().nonnegative().optional(),
|
|
36
|
+
/**
|
|
37
|
+
* Story 60-15: when the finding was generated by a runtime-probe failure,
|
|
38
|
+
* this records who authored the failing probe (`'probe-author'` if the
|
|
39
|
+
* probe-author phase appended it; `'create-story-ac-transfer'` for the
|
|
40
|
+
* legacy create-story AC-transfer path; absent for findings emitted by
|
|
41
|
+
* checks other than runtime-probe-check). Powers the catch-rate KPI's
|
|
42
|
+
* per-author breakdown and confirmed-defect attribution to probe-author.
|
|
43
|
+
*
|
|
44
|
+
* Backward-compat: pre-60-15 manifests have no `_authoredBy` field. The
|
|
45
|
+
* `byAuthor` rollup treats absent as `'create-story-ac-transfer'`.
|
|
46
|
+
*/
|
|
47
|
+
_authoredBy: z.enum(['probe-author', 'create-story-ac-transfer']).optional(),
|
|
36
48
|
});
|
|
37
49
|
// ---------------------------------------------------------------------------
|
|
38
50
|
// StoredVerificationCheckResultSchema
|
|
@@ -70,6 +82,34 @@ export const StoredVerificationCheckResultSchema = z.object({
|
|
|
70
82
|
* Mirrors VerificationSummary from packages/sdlc/src/verification/types.ts
|
|
71
83
|
* without importing from that module (avoids circular dependency).
|
|
72
84
|
*/
|
|
85
|
+
/**
|
|
86
|
+
* Story 60-15: an operator-added annotation on a verification finding,
|
|
87
|
+
* recording the post-hoc judgment about whether a probe failure was
|
|
88
|
+
* a real defect catch, a false positive, or a probe bug.
|
|
89
|
+
*
|
|
90
|
+
* Persisted under `per_story_state[storyKey].verification_result.annotations[]`.
|
|
91
|
+
* Set via `substrate annotate --story <key> --finding-category <cat>
|
|
92
|
+
* --confirmed-defect|--false-positive|--probe-bug`.
|
|
93
|
+
*
|
|
94
|
+
* Used by `rollupProbeAuthorMetrics` to compute the catch-rate KPI's
|
|
95
|
+
* `confirmed-defect` count: a probe-author probe failure that the
|
|
96
|
+
* operator subsequently confirmed as catching a real defect.
|
|
97
|
+
*/
|
|
98
|
+
export const StoredVerificationAnnotationSchema = z.object({
|
|
99
|
+
/** Finding category being annotated (e.g. `runtime-probe-fail`,
|
|
100
|
+
* `runtime-probe-error-response`). */
|
|
101
|
+
findingCategory: z.string(),
|
|
102
|
+
/** The operator's post-hoc judgment on the finding. */
|
|
103
|
+
judgment: z.enum(['confirmed-defect', 'false-positive', 'probe-bug']),
|
|
104
|
+
/** Optional probe name the annotation targets. When set, narrows the
|
|
105
|
+
* annotation to a specific probe within the category (a story may have
|
|
106
|
+
* multiple failing probes in the same category). */
|
|
107
|
+
probeName: z.string().optional(),
|
|
108
|
+
/** Free-form note explaining the judgment. */
|
|
109
|
+
note: z.string().optional(),
|
|
110
|
+
/** ISO timestamp of when the annotation was created. */
|
|
111
|
+
createdAt: z.string(),
|
|
112
|
+
});
|
|
73
113
|
export const StoredVerificationSummarySchema = z.object({
|
|
74
114
|
/** Story key that was verified (e.g. '52-7'). */
|
|
75
115
|
storyKey: z.string(),
|
|
@@ -79,5 +119,12 @@ export const StoredVerificationSummarySchema = z.object({
|
|
|
79
119
|
status: z.enum(['pass', 'warn', 'fail']),
|
|
80
120
|
/** Total duration of the verification pipeline run in milliseconds. */
|
|
81
121
|
duration_ms: z.number().nonnegative(),
|
|
122
|
+
/**
|
|
123
|
+
* Story 60-15: operator-added annotations on verification findings.
|
|
124
|
+
* Optional for backward compatibility with manifests written before
|
|
125
|
+
* `substrate annotate` shipped — pre-60-15 manifests deserialize with
|
|
126
|
+
* `annotations === undefined`.
|
|
127
|
+
*/
|
|
128
|
+
annotations: z.array(StoredVerificationAnnotationSchema).optional(),
|
|
82
129
|
});
|
|
83
130
|
//# sourceMappingURL=verification-result.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-result.js","sourceRoot":"","sources":["../../src/run-model/verification-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"verification-result.js","sourceRoot":"","sources":["../../src/run-model/verification-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,E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C,MAAM,CAAC;IACzD;2CACuC;IACvC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,uDAAuD;IACvD,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;IACrE;;yDAEqD;IACrD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,8CAA8C;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,wDAAwD;IACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,iDAAiD;IACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,yDAAyD;IACzD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,mCAAmC,CAAC;IACpD,uDAAuD;IACvD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,uEAAuE;IACvE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IACrC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,QAAQ,EAAE;CACpE,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-probe-check.d.ts","sourceRoot":"","sources":["../../../src/verification/checks/runtime-probe-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EAEnB,kBAAkB,EACnB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAA;AAqF3B;;;;;GAK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B,YAAW,iBAAiB;IACzD,QAAQ,CAAC,IAAI,oBAAmB;IAChC,QAAQ,CAAC,IAAI,EAAG,GAAG,CAAS;IAE5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;gBAEtC,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAOhD,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAoLrE"}
|
|
@@ -210,16 +210,26 @@ export class RuntimeProbeCheck {
|
|
|
210
210
|
if (context.sourceEpicContent !== undefined) {
|
|
211
211
|
if (detectsEventDrivenAC(context.sourceEpicContent) &&
|
|
212
212
|
!probesInvokeProductionTrigger(parsed.probes)) {
|
|
213
|
+
// Story 60-16: severity flipped from `warn` to `error` after Epic 60
|
|
214
|
+
// Phase 2's GREEN eval result (4/4 catch rate, v0.20.39). probe-author
|
|
215
|
+
// is now the recommended path for event-driven stories — when a
|
|
216
|
+
// dev-authored probe set fails to invoke any production trigger AND
|
|
217
|
+
// probe-author didn't run (or its probes also skipped the trigger),
|
|
218
|
+
// that's architectural drift, not advisory. Gate becomes blocking.
|
|
219
|
+
// Guidance: probe-author phase produces probes that exercise the
|
|
220
|
+
// production trigger by design; missing-trigger findings should be
|
|
221
|
+
// exceedingly rare on stories where probe-author dispatched.
|
|
213
222
|
findings.push({
|
|
214
223
|
category: CATEGORY_MISSING_TRIGGER,
|
|
215
|
-
severity: '
|
|
224
|
+
severity: 'error',
|
|
216
225
|
message: `source AC describes an event-driven mechanism (hook / timer / signal / webhook) ` +
|
|
217
226
|
`but no probe's command invokes a known production trigger ` +
|
|
218
227
|
`(git merge/pull/push, systemctl, crontab, kill -<sig>, curl -X POST, etc.). ` +
|
|
219
228
|
`Probes that call the implementation directly skip the wiring layer ` +
|
|
220
229
|
`the AC's user-facing event would exercise — see strata Run 13 / Story 1-12 ` +
|
|
221
230
|
`for the canonical case (post-merge hook never fires under git's conflict semantic). ` +
|
|
222
|
-
`Authoring guidance: probes/event-driven section of create-story.md
|
|
231
|
+
`Authoring guidance: probes/event-driven section of create-story.md, ` +
|
|
232
|
+
`or invoke probe-author to derive AC-grounded probes automatically (Epic 60 Phase 2).`,
|
|
223
233
|
});
|
|
224
234
|
}
|
|
225
235
|
}
|
|
@@ -267,6 +277,11 @@ export class RuntimeProbeCheck {
|
|
|
267
277
|
else {
|
|
268
278
|
message = `probe "${probe.name}"${descriptor} failed with exit ${result.exitCode ?? 'unknown'}`;
|
|
269
279
|
}
|
|
280
|
+
// Story 60-15: copy `_authoredBy` from the probe onto the finding so
|
|
281
|
+
// downstream consumers (rollupProbeAuthorMetrics, byAuthor breakdown
|
|
282
|
+
// in status/metrics CLI) can attribute the failure to its author.
|
|
283
|
+
// Probes without the field default to `'create-story-ac-transfer'`
|
|
284
|
+
// — pre-60-15 manifests + the legacy create-story AC-transfer path.
|
|
270
285
|
findings.push({
|
|
271
286
|
category,
|
|
272
287
|
severity: 'error',
|
|
@@ -276,6 +291,7 @@ export class RuntimeProbeCheck {
|
|
|
276
291
|
stdoutTail: result.stdoutTail,
|
|
277
292
|
stderrTail: result.stderrTail,
|
|
278
293
|
durationMs: result.durationMs,
|
|
294
|
+
_authoredBy: probe._authoredBy ?? 'create-story-ac-transfer',
|
|
279
295
|
});
|
|
280
296
|
}
|
|
281
297
|
const status = findings.some((f) => f.severity === 'error')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-probe-check.js","sourceRoot":"","sources":["../../../src/verification/checks/runtime-probe-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAGnB,MAAM,oBAAoB,CAAA;AAE3B,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E,MAAM,cAAc,GAAG,2BAA2B,CAAA;AAClD,MAAM,aAAa,GAAG,oBA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IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,QAAQ,GAA0B;gBACtC;oBACE,QAAQ,EAAE,cAAc;oBACxB,QAAQ,EAAE,OAAO;oBACjB,OAAO,EAAE,MAAM,CAAC,KAAK;iBACtB;aACF,CAAA;YACD,OAAO;gBACL,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,cAAc,CAAC,QAAQ,CAAC;gBACjC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;gBAC/B,QAAQ;aACT,CAAA;QACH,CAAC;QAED,iEAAiE;QACjE,sEAAsE;QACtE,iDAAiD;QACjD,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO;gBACL,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,8CAA8C;gBACvD,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;gBAC/B,QAAQ,EAAE,EAAE;aACb,CAAA;QACH,CAAC;QAED,MAAM,QAAQ,GAA0B,EAAE,CAAA;QAE1C,sEAAsE;QACtE,uEAAuE;QACvE,oEAAoE;QACpE,iEAAiE;QACjE,mEAAmE;QACnE,sEAAsE;QACtE,+CAA+C;QAC/C,IAAI,OAAO,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;YAC5C,IACE,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC/C,CAAC,6BAA6B,CAAC,MAAM,CAAC,MAAM,CAAC,EAC7C,CAAC;gBACD,QAAQ,CAAC,IAAI,CAAC;oBACZ,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime-probe-check.js","sourceRoot":"","sources":["../../../src/verification/checks/runtime-probe-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAA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AC7D,CAAC,CAAA;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;YACzD,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC;gBAC3C,CAAC,CAAC,MAAM;gBACR,CAAC,CAAC,MAAM,CAAA;QAEZ,OAAO;YACL,MAAM;YACN,OAAO,EACL,QAAQ,CAAC,MAAM,GAAG,CAAC;gBACjB,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC;gBAC1B,CAAC,CAAC,mBAAmB,MAAM,CAAC,MAAM,CAAC,MAAM,kBAAkB;YAC/D,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;YAC/B,QAAQ;SACT,CAAA;IACH,CAAC;CACF"}
|
|
@@ -47,6 +47,16 @@ export interface VerificationFinding {
|
|
|
47
47
|
stderrTail?: string;
|
|
48
48
|
/** Wall-clock milliseconds the producing action took. */
|
|
49
49
|
durationMs?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Story 60-15: when this finding came from a runtime-probe failure,
|
|
52
|
+
* records who authored the failing probe (`'probe-author'` if Epic 60
|
|
53
|
+
* Phase 2's probe-author phase appended it, `'create-story-ac-transfer'`
|
|
54
|
+
* for the legacy AC-transfer path). Absent for findings from other
|
|
55
|
+
* checks (build, phantom-review, ac-evidence, etc.). Persisted on the
|
|
56
|
+
* stored finding so post-run analysis can compute byAuthor breakdowns
|
|
57
|
+
* and the catch-rate KPI's per-author attribution.
|
|
58
|
+
*/
|
|
59
|
+
_authoredBy?: 'probe-author' | 'create-story-ac-transfer';
|
|
50
60
|
}
|
|
51
61
|
/**
|
|
52
62
|
* Render a list of findings into the multi-line human-readable string that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.d.ts","sourceRoot":"","sources":["../../src/verification/findings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH;;;;;;;;GAQG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,QAAQ,EAAE,2BAA2B,CAAA;IACrC,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"findings.d.ts","sourceRoot":"","sources":["../../src/verification/findings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH;;;;;;;;GAQG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,QAAQ,EAAE,2BAA2B,CAAA;IACrC,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,cAAc,GAAG,0BAA0B,CAAA;CAC1D;AAYD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,MAAM,CAKtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.js","sourceRoot":"","sources":["../../src/verification/findings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"findings.js","sourceRoot":"","sources":["../../src/verification/findings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsDH,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,eAAe,GAAgD;IACnE,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACb,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,QAA+B;IAC5D,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IACpC,OAAO,QAAQ;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;SACzE,IAAI,CAAC,IAAI,CAAC,CAAA;AACf,CAAC"}
|
|
@@ -69,6 +69,10 @@ export declare const RuntimeProbeSchema: z.ZodObject<{
|
|
|
69
69
|
description: z.ZodOptional<z.ZodString>;
|
|
70
70
|
expect_stdout_no_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
71
|
expect_stdout_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
"probe-author": "probe-author";
|
|
74
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
75
|
+
}>>;
|
|
72
76
|
}, z.core.$strip>;
|
|
73
77
|
export type RuntimeProbe = z.infer<typeof RuntimeProbeSchema>;
|
|
74
78
|
/** Zod schema for the full list (wrapping the per-probe schema). */
|
|
@@ -83,6 +87,10 @@ export declare const RuntimeProbeListSchema: z.ZodArray<z.ZodObject<{
|
|
|
83
87
|
description: z.ZodOptional<z.ZodString>;
|
|
84
88
|
expect_stdout_no_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
89
|
expect_stdout_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
_authoredBy: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
"probe-author": "probe-author";
|
|
92
|
+
"create-story-ac-transfer": "create-story-ac-transfer";
|
|
93
|
+
}>>;
|
|
86
94
|
}, z.core.$strip>>;
|
|
87
95
|
/**
|
|
88
96
|
* Result of parsing the `## Runtime Probes` section from story markdown.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/verification/probes/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB;;;EAA2B,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAM3E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAA;AAE9C;uEACuE;AACvE,eAAO,MAAM,gBAAgB,QAAW,CAAA;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/verification/probes/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KA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
* appear in the response).
|
|
89
89
|
*/
|
|
90
90
|
expect_stdout_regex: z.array(z.string().min(1)).optional(),
|
|
91
|
+
/**
|
|
92
|
+
* Story 60-15: discriminator identifying who authored the probe. Set to
|
|
93
|
+
* `'probe-author'` by `runProbeAuthor` when the probe-author phase
|
|
94
|
+
* appended it to the artifact. Absence (or explicit
|
|
95
|
+
* `'create-story-ac-transfer'`) means the probe was carried over from
|
|
96
|
+
* the create-story AC-transfer step (the legacy path before Epic 60
|
|
97
|
+
* Phase 2). Powers per-author breakdowns in `substrate status`/`metrics`
|
|
98
|
+
* JSON output and the cross-run probe-author catch-rate KPI.
|
|
99
|
+
*
|
|
100
|
+
* Backward-compat: pre-60-15 manifests have no `_authoredBy` field on
|
|
101
|
+
* their stored probes. The byAuthor breakdown treats absent as
|
|
102
|
+
* `'create-story-ac-transfer'`.
|
|
103
|
+
*/
|
|
104
|
+
_authoredBy: z.enum(['probe-author', 'create-story-ac-transfer']).optional(),
|
|
91
105
|
});
|
|
92
106
|
/** Zod schema for the full list (wrapping the per-probe schema). */
|
|
93
107
|
export const RuntimeProbeListSchema = z.array(RuntimeProbeSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/verification/probes/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,8EAA8E;AAC9E,iCAAiC;AACjC,8EAA8E;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAGjE,8EAA8E;AAC9E,2CAA2C;AAC3C,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAA;AAE9C;uEACuE;AACvE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,G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2
2
|
"name": "@substrate-ai/sdlc",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.41",
|
|
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.41",
|
|
28
28
|
"js-yaml": "^4.1.1",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|