@substrate-ai/sdlc 0.20.22 → 0.20.27

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.
Files changed (29) hide show
  1. package/dist/run-model/dev-story-signals.d.ts +44 -0
  2. package/dist/run-model/dev-story-signals.d.ts.map +1 -0
  3. package/dist/run-model/dev-story-signals.js +67 -0
  4. package/dist/run-model/dev-story-signals.js.map +1 -0
  5. package/dist/run-model/index.d.ts +2 -0
  6. package/dist/run-model/index.d.ts.map +1 -1
  7. package/dist/run-model/index.js +2 -0
  8. package/dist/run-model/index.js.map +1 -1
  9. package/dist/run-model/per-story-state.d.ts +7 -0
  10. package/dist/run-model/per-story-state.d.ts.map +1 -1
  11. package/dist/run-model/per-story-state.js +9 -0
  12. package/dist/run-model/per-story-state.js.map +1 -1
  13. package/dist/run-model/schemas.d.ts +8 -1
  14. package/dist/run-model/schemas.d.ts.map +1 -1
  15. package/dist/verification/checks/runtime-probe-check.d.ts +9 -7
  16. package/dist/verification/checks/runtime-probe-check.d.ts.map +1 -1
  17. package/dist/verification/checks/runtime-probe-check.js +33 -11
  18. package/dist/verification/checks/runtime-probe-check.js.map +1 -1
  19. package/dist/verification/probes/executor.d.ts.map +1 -1
  20. package/dist/verification/probes/executor.js +64 -1
  21. package/dist/verification/probes/executor.js.map +1 -1
  22. package/dist/verification/probes/types.d.ts +22 -0
  23. package/dist/verification/probes/types.d.ts.map +1 -1
  24. package/dist/verification/probes/types.js +26 -0
  25. package/dist/verification/probes/types.js.map +1 -1
  26. package/dist/verification/source-ac-fidelity-check.d.ts.map +1 -1
  27. package/dist/verification/source-ac-fidelity-check.js +397 -22
  28. package/dist/verification/source-ac-fidelity-check.js.map +1 -1
  29. package/package.json +2 -2
@@ -0,0 +1,44 @@
1
+ /**
2
+ * StoredDevStorySignals Zod schema — Story 60-8.
3
+ *
4
+ * Defines the typed schema for persisting the dev-story handler's normalized
5
+ * output (`DevStorySignals` from `packages/sdlc/src/verification/types.ts`)
6
+ * to the run manifest's `per_story_state[storyKey].dev_story_signals` field.
7
+ *
8
+ * Why this exists:
9
+ * - Story 60-3 (under-delivery detection) reads `context.devStoryResult.files_modified`
10
+ * during verification. The orchestrator passes it in-memory at dispatch time
11
+ * (verification-integration.ts:62 → assembleVerificationContext), so the
12
+ * check works in the SAME run.
13
+ * - But the field is never persisted to the manifest. Resume / retry-escalated
14
+ * / supervisor-restart / post-mortem analysis paths read state from the
15
+ * manifest and see `dev_story_signals: undefined`, which falls through to
16
+ * "no signal → benefit of doubt" warn instead of the intended under-delivery
17
+ * error. Epic 52's design contract is that the manifest is the single
18
+ * source of truth — devStorySignals omission contradicts that.
19
+ *
20
+ * Mirrors the DevStorySignals interface without importing verification module
21
+ * to keep run-model free of a dependency on verification (same pattern as
22
+ * StoredVerificationFindingSchema in verification-result.ts).
23
+ */
24
+ import { z } from 'zod';
25
+ /**
26
+ * Persisted shape of the normalized dev-story signals.
27
+ *
28
+ * All fields optional because:
29
+ * - Different dev-story dispatches surface different subsets of fields
30
+ * depending on the agent's YAML output (some omit `tests`, some omit
31
+ * `ac_failures` when none failed, etc.).
32
+ * - `result` uses the open extensible-union pattern (v0.19.6 convention)
33
+ * so future result strings (e.g. 'partial-checkpoint') don't break
34
+ * deserialization.
35
+ */
36
+ export declare const StoredDevStorySignalsSchema: z.ZodObject<{
37
+ result: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"completed">, z.ZodLiteral<"failed">, z.ZodLiteral<"partial">, z.ZodString]>>;
38
+ ac_met: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
+ ac_failures: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ files_modified: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ tests: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"unknown">, z.ZodString]>>;
42
+ }, z.core.$strip>;
43
+ export type StoredDevStorySignals = z.infer<typeof StoredDevStorySignalsSchema>;
44
+ //# sourceMappingURL=dev-story-signals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-story-signals.d.ts","sourceRoot":"","sources":["../../src/run-model/dev-story-signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B;;;;;;iBA8BtC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * StoredDevStorySignals Zod schema — Story 60-8.
3
+ *
4
+ * Defines the typed schema for persisting the dev-story handler's normalized
5
+ * output (`DevStorySignals` from `packages/sdlc/src/verification/types.ts`)
6
+ * to the run manifest's `per_story_state[storyKey].dev_story_signals` field.
7
+ *
8
+ * Why this exists:
9
+ * - Story 60-3 (under-delivery detection) reads `context.devStoryResult.files_modified`
10
+ * during verification. The orchestrator passes it in-memory at dispatch time
11
+ * (verification-integration.ts:62 → assembleVerificationContext), so the
12
+ * check works in the SAME run.
13
+ * - But the field is never persisted to the manifest. Resume / retry-escalated
14
+ * / supervisor-restart / post-mortem analysis paths read state from the
15
+ * manifest and see `dev_story_signals: undefined`, which falls through to
16
+ * "no signal → benefit of doubt" warn instead of the intended under-delivery
17
+ * error. Epic 52's design contract is that the manifest is the single
18
+ * source of truth — devStorySignals omission contradicts that.
19
+ *
20
+ * Mirrors the DevStorySignals interface without importing verification module
21
+ * to keep run-model free of a dependency on verification (same pattern as
22
+ * StoredVerificationFindingSchema in verification-result.ts).
23
+ */
24
+ import { z } from 'zod';
25
+ /**
26
+ * Persisted shape of the normalized dev-story signals.
27
+ *
28
+ * All fields optional because:
29
+ * - Different dev-story dispatches surface different subsets of fields
30
+ * depending on the agent's YAML output (some omit `tests`, some omit
31
+ * `ac_failures` when none failed, etc.).
32
+ * - `result` uses the open extensible-union pattern (v0.19.6 convention)
33
+ * so future result strings (e.g. 'partial-checkpoint') don't break
34
+ * deserialization.
35
+ */
36
+ export const StoredDevStorySignalsSchema = z.object({
37
+ /** Dev agent's overall verdict — open union for forward-compat. */
38
+ result: z
39
+ .union([
40
+ z.literal('completed'),
41
+ z.literal('failed'),
42
+ z.literal('partial'),
43
+ z.string(),
44
+ ])
45
+ .optional(),
46
+ /** ACs the dev agent claims it satisfied. */
47
+ ac_met: z.array(z.string()).optional(),
48
+ /** ACs the dev agent flagged as not satisfied. */
49
+ ac_failures: z.array(z.string()).optional(),
50
+ /**
51
+ * List of project-relative file paths the dev agent created or modified
52
+ * during this dispatch. Required by Story 60-3's under-delivery detection
53
+ * in source-ac-fidelity check; absence forces the check into "benefit of
54
+ * doubt" warn mode.
55
+ */
56
+ files_modified: z.array(z.string()).optional(),
57
+ /** Test outcome from the dev-story workflow — open union for forward-compat. */
58
+ tests: z
59
+ .union([
60
+ z.literal('pass'),
61
+ z.literal('fail'),
62
+ z.literal('unknown'),
63
+ z.string(),
64
+ ])
65
+ .optional(),
66
+ });
67
+ //# sourceMappingURL=dev-story-signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-story-signals.js","sourceRoot":"","sources":["../../src/run-model/dev-story-signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,mEAAmE;IACnE,MAAM,EAAE,CAAC;SACN,KAAK,CAAC;QACL,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;QACtB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACnB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QACpB,CAAC,CAAC,MAAM,EAAE;KACX,CAAC;SACD,QAAQ,EAAE;IACb,6CAA6C;IAC7C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,kDAAkD;IAClD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C;;;;;OAKG;IACH,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,gFAAgF;IAChF,KAAK,EAAE,CAAC;SACL,KAAK,CAAC;QACL,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QACpB,CAAC,CAAC,MAAM,EAAE;KACX,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA"}
@@ -18,6 +18,8 @@ export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, S
18
18
  export type { StoredVerificationFinding, StoredVerificationCheckResult, StoredVerificationSummary, } 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 { StoredDevStorySignalsSchema } from './dev-story-signals.js';
22
+ export type { StoredDevStorySignals } from './dev-story-signals.js';
21
23
  export { SupervisorLock } from './supervisor-lock.js';
22
24
  export type { SupervisorLockOptions } from './supervisor-lock.js';
23
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/run-model/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,YAAY,EACV,eAAe,EACf,aAAa,E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ACd,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,CAAA;AAC/C,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAG9C,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAChF,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIzE,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,yBAAyB,EACzB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5F,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAGnF,OAAO,EAAE,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"}
@@ -17,6 +17,8 @@ export { PerStoryStatusSchema, PerStoryStateSchema } from './per-story-state.js'
17
17
  export { StoredVerificationFindingSchema, StoredVerificationCheckResultSchema, StoredVerificationSummarySchema, } from './verification-result.js';
18
18
  // Story 55-3b: roll-up helper for surfacing finding counts in CLI JSON output
19
19
  export { rollupFindingCounts, ZERO_FINDING_COUNTS } from './verification-findings-counts.js';
20
+ // Story 60-8: persisted dev-story signals (closes 60-3's manifest-source-of-truth gap)
21
+ export { StoredDevStorySignalsSchema } from './dev-story-signals.js';
20
22
  // Story 52-2: Supervisor locking and ownership
21
23
  export { SupervisorLock } from './supervisor-lock.js';
22
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/run-model/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAU/C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,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,GAChC,MAAM,0BAA0B,CAAA;AAOjC,8EAA8E;AAC9E,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAG5F,+CAA+C;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
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,GAChC,MAAM,0BAA0B,CAAA;AAOjC,8EAA8E;AAC9E,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAG5F,uFAAuF;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AAGpE,+CAA+C;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
@@ -71,6 +71,13 @@ export declare const PerStoryStateSchema: z.ZodObject<{
71
71
  review_cycles: z.ZodOptional<z.ZodNumber>;
72
72
  dispatches: z.ZodOptional<z.ZodNumber>;
73
73
  retry_count: z.ZodOptional<z.ZodNumber>;
74
+ dev_story_signals: z.ZodOptional<z.ZodObject<{
75
+ result: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"completed">, z.ZodLiteral<"failed">, z.ZodLiteral<"partial">, z.ZodString]>>;
76
+ ac_met: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ ac_failures: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ files_modified: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
+ tests: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"unknown">, z.ZodString]>>;
80
+ }, z.core.$strip>>;
74
81
  }, z.core.$strip>;
75
82
  export type PerStoryState = z.infer<typeof PerStoryStateSchema>;
76
83
  //# sourceMappingURL=per-story-state.d.ts.map
@@ -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;AAOvB;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
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"}
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { z } from 'zod';
9
9
  import { StoredVerificationSummarySchema } from './verification-result.js';
10
+ import { StoredDevStorySignalsSchema } from './dev-story-signals.js';
10
11
  // ---------------------------------------------------------------------------
11
12
  // PerStoryStatusSchema — extensible union (v0.19.6 pattern)
12
13
  // ---------------------------------------------------------------------------
@@ -66,5 +67,13 @@ export const PerStoryStateSchema = z.object({
66
67
  dispatches: z.number().int().nonnegative().optional(),
67
68
  /** Number of retry attempts for this story (code review retries + recovery-engine retries). Initial dispatch is not counted. */
68
69
  retry_count: z.number().int().nonnegative().optional(),
70
+ /**
71
+ * Story 60-8: persisted dev-story signals — files_modified, ac_met,
72
+ * ac_failures, tests, result. Required by Story 60-3's under-delivery
73
+ * detection when reading state from manifest (resume / retry-escalated /
74
+ * supervisor-restart / post-mortem). Absent on pre-60-8 manifests
75
+ * (backward-compatible).
76
+ */
77
+ dev_story_signals: StoredDevStorySignalsSchema.optional(),
69
78
  });
70
79
  //# sourceMappingURL=per-story-state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"per-story-state.js","sourceRoot":"","sources":["../../src/run-model/per-story-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAE1E,8EAA8E;AAC9E,4DAA4D;AAC5D,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACpB,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IACvB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IACrB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;IAChC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAClB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACpB,CAAC,CAAC,MAAM,EAAE,EAAE,qCAAqC;CAClD,CAAC,CAAA;AAIF,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,+DAA+D;IAC/D,MAAM,EAAE,oBAAoB;IAC5B,yEAAyE;IACzE,KAAK,EAAE,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,EAAE;CAC1D,CAAC,CAAA"}
@@ -49,8 +49,8 @@ export declare const RunManifestSchema: z.ZodObject<{
49
49
  story_scope: z.ZodArray<z.ZodString>;
50
50
  run_status: z.ZodOptional<z.ZodEnum<{
51
51
  failed: "failed";
52
- running: "running";
53
52
  completed: "completed";
53
+ running: "running";
54
54
  stopped: "stopped";
55
55
  }>>;
56
56
  supervisor_pid: z.ZodNullable<z.ZodNumber>;
@@ -97,6 +97,13 @@ export declare const RunManifestSchema: z.ZodObject<{
97
97
  review_cycles: z.ZodOptional<z.ZodNumber>;
98
98
  dispatches: z.ZodOptional<z.ZodNumber>;
99
99
  retry_count: z.ZodOptional<z.ZodNumber>;
100
+ dev_story_signals: z.ZodOptional<z.ZodObject<{
101
+ result: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"completed">, z.ZodLiteral<"failed">, z.ZodLiteral<"partial">, z.ZodString]>>;
102
+ ac_met: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ ac_failures: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
+ files_modified: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
+ tests: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"unknown">, z.ZodString]>>;
106
+ }, z.core.$strip>>;
100
107
  }, z.core.$strip>>;
101
108
  recovery_history: z.ZodArray<z.ZodObject<{
102
109
  story_key: z.ZodString;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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"}
@@ -9,13 +9,15 @@
9
9
  *
10
10
  * Architecture / scoring contract:
11
11
  *
12
- * - No probes declared → pass (skip note finding array is empty)
13
- * - Probes declared, YAML invalid → fail (one finding per parse error)
14
- * - Probe `sandbox: twin` → warn (deferred until Phase 3)
15
- * - Probe `sandbox: host`, exit 0 → pass; no finding emitted for that probe
16
- * - Probe `sandbox: host`, exit 0 fail (exit code + stdout/stderr tails)
17
- * - Probe `sandbox: host`, timed out → fail (runtime-probe-timeout category)
18
- * - No storyContent on context warn (cannot verify without story text)
12
+ * - No probes declared → pass (skip note finding array is empty)
13
+ * - Probes declared, YAML invalid → fail (one finding per parse error)
14
+ * - Probe `sandbox: twin` → warn (deferred until Phase 3)
15
+ * - Probe `sandbox: host`, exit 0, no assertions → pass; no finding emitted for that probe
16
+ * - Probe `sandbox: host`, exit 0, assertions all met pass; no finding emitted
17
+ * - Probe `sandbox: host`, exit 0, assertion missed → fail (runtime-probe-assertion-fail) [Story 60-4]
18
+ * - Probe `sandbox: host`, exit ≠ 0 fail (exit code + stdout/stderr tails)
19
+ * - Probe `sandbox: host`, timed out → fail (runtime-probe-timeout category)
20
+ * - No storyContent on context → warn (cannot verify without story text)
19
21
  *
20
22
  * Registered last in the canonical Tier A pipeline, after BuildCheck,
21
23
  * because probes may depend on a successful build's output.
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-probe-check.d.ts","sourceRoot":"","sources":["../../../src/verification/checks/runtime-probe-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;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;AAgB3B;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,CAAA;IACnD;wEACoE;IACpE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,CAAA;CACjE;AAWD,qBAAa,iBAAkB,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;CAmHrE"}
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;AAuB3B;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,CAAA;IACnD;wEACoE;IACpE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,CAAA;CACjE;AAWD,qBAAa,iBAAkB,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;CA8HrE"}
@@ -9,13 +9,15 @@
9
9
  *
10
10
  * Architecture / scoring contract:
11
11
  *
12
- * - No probes declared → pass (skip note finding array is empty)
13
- * - Probes declared, YAML invalid → fail (one finding per parse error)
14
- * - Probe `sandbox: twin` → warn (deferred until Phase 3)
15
- * - Probe `sandbox: host`, exit 0 → pass; no finding emitted for that probe
16
- * - Probe `sandbox: host`, exit 0 fail (exit code + stdout/stderr tails)
17
- * - Probe `sandbox: host`, timed out → fail (runtime-probe-timeout category)
18
- * - No storyContent on context warn (cannot verify without story text)
12
+ * - No probes declared → pass (skip note finding array is empty)
13
+ * - Probes declared, YAML invalid → fail (one finding per parse error)
14
+ * - Probe `sandbox: twin` → warn (deferred until Phase 3)
15
+ * - Probe `sandbox: host`, exit 0, no assertions → pass; no finding emitted for that probe
16
+ * - Probe `sandbox: host`, exit 0, assertions all met pass; no finding emitted
17
+ * - Probe `sandbox: host`, exit 0, assertion missed → fail (runtime-probe-assertion-fail) [Story 60-4]
18
+ * - Probe `sandbox: host`, exit ≠ 0 fail (exit code + stdout/stderr tails)
19
+ * - Probe `sandbox: host`, timed out → fail (runtime-probe-timeout category)
20
+ * - No storyContent on context → warn (cannot verify without story text)
19
21
  *
20
22
  * Registered last in the canonical Tier A pipeline, after BuildCheck,
21
23
  * because probes may depend on a successful build's output.
@@ -30,6 +32,13 @@ const CATEGORY_SKIP = 'runtime-probe-skip';
30
32
  const CATEGORY_DEFERRED = 'runtime-probe-deferred';
31
33
  const CATEGORY_FAIL = 'runtime-probe-fail';
32
34
  const CATEGORY_TIMEOUT = 'runtime-probe-timeout';
35
+ /**
36
+ * Story 60-4: command exited 0 but a stdout-shape assertion declared by the
37
+ * author tripped. Distinct from `runtime-probe-fail` (non-zero exit code)
38
+ * so retry prompts and post-run analysis can tell "tool crashed politely"
39
+ * from "tool errored loudly".
40
+ */
41
+ const CATEGORY_ASSERTION_FAIL = 'runtime-probe-assertion-fail';
33
42
  const defaultExecutors = {
34
43
  host: (probe) => executeProbeOnHost(probe, { cwd: process.cwd() }),
35
44
  // twin intentionally omitted → RuntimeProbeCheck emits a warn finding
@@ -118,11 +127,24 @@ export class RuntimeProbeCheck {
118
127
  if (result.outcome === 'pass') {
119
128
  continue;
120
129
  }
121
- const category = result.outcome === 'timeout' ? CATEGORY_TIMEOUT : CATEGORY_FAIL;
130
+ const category = result.outcome === 'timeout'
131
+ ? CATEGORY_TIMEOUT
132
+ : result.assertionFailures !== undefined
133
+ ? CATEGORY_ASSERTION_FAIL
134
+ : CATEGORY_FAIL;
122
135
  const descriptor = probe.description ? ` (${probe.description})` : '';
123
- const message = result.outcome === 'timeout'
124
- ? `probe "${probe.name}"${descriptor} timed out after ${result.durationMs}ms`
125
- : `probe "${probe.name}"${descriptor} failed with exit ${result.exitCode ?? 'unknown'}`;
136
+ let message;
137
+ if (result.outcome === 'timeout') {
138
+ message = `probe "${probe.name}"${descriptor} timed out after ${result.durationMs}ms`;
139
+ }
140
+ else if (result.assertionFailures !== undefined) {
141
+ message =
142
+ `probe "${probe.name}"${descriptor} exit 0 but stdout assertion failed: ` +
143
+ result.assertionFailures.join('; ');
144
+ }
145
+ else {
146
+ message = `probe "${probe.name}"${descriptor} failed with exit ${result.exitCode ?? 'unknown'}`;
147
+ }
126
148
  findings.push({
127
149
  category,
128
150
  severity: 'error',
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-probe-check.js","sourceRoot":"","sources":["../../../src/verification/checks/runtime-probe-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;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,oBAAoB,CAAA;AAC1C,MAAM,iBAAiB,GAAG,wBAAwB,CAAA;AAClD,MAAM,aAAa,GAAG,oBAAoB,CAAA;AAC1C,MAAM,gBAAgB,GAAG,uBAAuB,CAAA;AAkBhD,MAAM,gBAAgB,GAA0B;IAC9C,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;IAClE,sEAAsE;CACvE,CAAA;AAED,8EAA8E;AAC9E,oBAA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
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,oBAAoB,CAAA;AAC1C,MAAM,iBAAiB,GAAG,wBAAwB,CAAA;AAClD,MAAM,aAAa,GAAG,oBAAoB,CAAA;AAC1C,MAAM,gBAAgB,GAAG,uBAAuB,CAAA;AAChD;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,8BAA8B,CAAA;AAkB9D,MAAM,gBAAgB,GAA0B;IAC9C,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;IAClE,sEAAsE;CACvE,CAAA;AAED,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,OAAO,iBAAiB;IACnB,IAAI,GAAG,gBAAgB,CAAA;IACvB,IAAI,GAAG,GAAY,CAAA;IAEX,UAAU,CAAuB;IAElD,YAAY,SAA0C;QACpD,IAAI,CAAC,UAAU,GAAG;YAChB,GAAG,gBAAgB;YACnB,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;SACrB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAA4B;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QAExB,uEAAuE;QACvE,qEAAqE;QACrE,mEAAmE;QACnE,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,QAAQ,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O,EAGL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AAenB,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,CA0EtB"}
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/verification/probes/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AA0EnB,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,CA6FtB"}
@@ -20,6 +20,52 @@ import { DEFAULT_PROBE_TIMEOUT_MS, PROBE_TAIL_BYTES, } from './types.js';
20
20
  function tail(text, bytes = PROBE_TAIL_BYTES) {
21
21
  return text.length <= bytes ? text : text.slice(text.length - bytes);
22
22
  }
23
+ /**
24
+ * Story 60-4: evaluate `expect_stdout_no_regex` and `expect_stdout_regex`
25
+ * patterns against the captured stdout. Runs against the full (un-tailed)
26
+ * stdout so authors can match payload shape even when the response is
27
+ * larger than PROBE_TAIL_BYTES.
28
+ *
29
+ * Returns an array of human-readable failure descriptions. Empty array
30
+ * means all assertions passed.
31
+ *
32
+ * Invalid regex patterns (RegExp constructor throws) are reported as
33
+ * assertion failures themselves rather than crashing the executor — this
34
+ * way a typo in one author's probe surfaces as a deterministic finding,
35
+ * not a pipeline crash that masks the rest of the run.
36
+ */
37
+ function evaluateStdoutAssertions(probe, stdout) {
38
+ const failures = [];
39
+ for (const pattern of probe.expect_stdout_no_regex ?? []) {
40
+ let re;
41
+ try {
42
+ re = new RegExp(pattern);
43
+ }
44
+ catch (err) {
45
+ const detail = err instanceof Error ? err.message : String(err);
46
+ failures.push(`expect_stdout_no_regex pattern is not a valid regex (${detail}): ${pattern}`);
47
+ continue;
48
+ }
49
+ if (re.test(stdout)) {
50
+ failures.push(`expect_stdout_no_regex: stdout matched forbidden pattern: ${pattern}`);
51
+ }
52
+ }
53
+ for (const pattern of probe.expect_stdout_regex ?? []) {
54
+ let re;
55
+ try {
56
+ re = new RegExp(pattern);
57
+ }
58
+ catch (err) {
59
+ const detail = err instanceof Error ? err.message : String(err);
60
+ failures.push(`expect_stdout_regex pattern is not a valid regex (${detail}): ${pattern}`);
61
+ continue;
62
+ }
63
+ if (!re.test(stdout)) {
64
+ failures.push(`expect_stdout_regex: stdout did not match required pattern: ${pattern}`);
65
+ }
66
+ }
67
+ return failures;
68
+ }
23
69
  /**
24
70
  * Execute one probe on the host and return a structured ProbeResult.
25
71
  *
@@ -95,13 +141,30 @@ export function executeProbeOnHost(probe, options = {}) {
95
141
  child.on('close', (code) => {
96
142
  clearTimeout(timeoutHandle);
97
143
  const duration = Date.now() - start;
144
+ // Default outcome from exit code. Story 60-4: when the command exits
145
+ // 0, also evaluate stdout-shape assertions; if any tripped, downgrade
146
+ // outcome to 'fail' and surface the assertion failure list so the
147
+ // check can route to `runtime-probe-assertion-fail`. Assertions are
148
+ // not evaluated when the exit code already failed — the existing
149
+ // exit-code finding is more informative than a follow-on assertion
150
+ // miss caused by an error response.
151
+ let outcome = code === 0 ? 'pass' : 'fail';
152
+ let assertionFailures;
153
+ if (outcome === 'pass') {
154
+ const failures = evaluateStdoutAssertions(probe, stdout);
155
+ if (failures.length > 0) {
156
+ outcome = 'fail';
157
+ assertionFailures = failures;
158
+ }
159
+ }
98
160
  finalize({
99
- outcome: code === 0 ? 'pass' : 'fail',
161
+ outcome,
100
162
  command: probe.command,
101
163
  ...(code !== null ? { exitCode: code } : {}),
102
164
  stdoutTail: tail(stdout),
103
165
  stderrTail: tail(stderr),
104
166
  durationMs: duration,
167
+ ...(assertionFailures !== undefined ? { assertionFailures } : {}),
105
168
  });
106
169
  });
107
170
  });
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../src/verification/probes/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EACL,wBAAwB,EACxB,gBAAgB,GAGjB,MAAM,YAAY,CAAA;AAEnB,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,mFAAmF;AACnF,SAAS,IAAI,CAAC,IAAY,EAAE,KAAK,GAAG,gBAAgB;IAClD,OAAO,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;AACtE,CAAC;AAcD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAmB,EACnB,UAA8B,EAAE;IAEhC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,IAAI,wBAAwB,CAAA;IAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IACxC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAA;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAExB,OAAO,IAAI,OAAO,CAAc,CAAC,OAAO,EAAE,EAA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AC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5C,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;gBACxB,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;gBACxB,UAAU,EAAE,QAAQ;gBACpB,GAAG,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAClE,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -48,6 +48,15 @@ export declare const PROBE_TAIL_BYTES: number;
48
48
  * Required fields (`name`, `sandbox`, `command`) force authors to make
49
49
  * intent explicit — no silent defaults that could mask a miswritten probe.
50
50
  * Optional fields cover operational knobs with sensible fallbacks.
51
+ *
52
+ * Story 60-4: `expect_stdout_no_regex` and `expect_stdout_regex` close the
53
+ * exit-0-with-error-body gap. A probe that calls a tool returning HTTP 200
54
+ * with `{"isError": true}` (MCP convention) or `{"status": "error"}` (REST
55
+ * convention) exits 0 — exit-code-only verification accepts the broken tool
56
+ * as passing. Authors of probes that hit MCP / REST / JSON-RPC / A2A surfaces
57
+ * declare success-shape patterns to assert response payload structure beyond
58
+ * the shell exit code. Driven by strata Run 12 evidence: four MCP tools
59
+ * shipped SHIP_IT while throwing real Python TypeErrors against real data.
51
60
  */
52
61
  export declare const RuntimeProbeSchema: z.ZodObject<{
53
62
  name: z.ZodString;
@@ -58,6 +67,8 @@ export declare const RuntimeProbeSchema: z.ZodObject<{
58
67
  command: z.ZodString;
59
68
  timeout_ms: z.ZodOptional<z.ZodNumber>;
60
69
  description: z.ZodOptional<z.ZodString>;
70
+ expect_stdout_no_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ expect_stdout_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
72
  }, z.core.$strip>;
62
73
  export type RuntimeProbe = z.infer<typeof RuntimeProbeSchema>;
63
74
  /** Zod schema for the full list (wrapping the per-probe schema). */
@@ -70,6 +81,8 @@ export declare const RuntimeProbeListSchema: z.ZodArray<z.ZodObject<{
70
81
  command: z.ZodString;
71
82
  timeout_ms: z.ZodOptional<z.ZodNumber>;
72
83
  description: z.ZodOptional<z.ZodString>;
84
+ expect_stdout_no_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ expect_stdout_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
86
  }, z.core.$strip>>;
74
87
  /**
75
88
  * Result of parsing the `## Runtime Probes` section from story markdown.
@@ -118,5 +131,14 @@ export interface ProbeResult {
118
131
  stdoutTail: string;
119
132
  stderrTail: string;
120
133
  durationMs: number;
134
+ /**
135
+ * Story 60-4: populated when `outcome === 'fail'` because a stdout
136
+ * assertion (`expect_stdout_no_regex` or `expect_stdout_regex`) tripped,
137
+ * not because the shell exit code was non-zero. Each entry is a
138
+ * human-readable description of which pattern failed and why.
139
+ * Distinguishes assertion failures from exit-code failures so the check
140
+ * can route to `runtime-probe-assertion-fail` vs `runtime-probe-fail`.
141
+ */
142
+ assertionFailures?: string[];
121
143
  }
122
144
  //# sourceMappingURL=types.d.ts.map
@@ -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;;;;;;;GAOG;AACH,eAAO,MAAM,kBA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AC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,oEAAoE;AACpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;kBAA8B,CAAA;AAMjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,YAAY,EAAE,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAMtC;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC7B"}
@@ -50,6 +50,15 @@ export const PROBE_TAIL_BYTES = 4 * 1024;
50
50
  * Required fields (`name`, `sandbox`, `command`) force authors to make
51
51
  * intent explicit — no silent defaults that could mask a miswritten probe.
52
52
  * Optional fields cover operational knobs with sensible fallbacks.
53
+ *
54
+ * Story 60-4: `expect_stdout_no_regex` and `expect_stdout_regex` close the
55
+ * exit-0-with-error-body gap. A probe that calls a tool returning HTTP 200
56
+ * with `{"isError": true}` (MCP convention) or `{"status": "error"}` (REST
57
+ * convention) exits 0 — exit-code-only verification accepts the broken tool
58
+ * as passing. Authors of probes that hit MCP / REST / JSON-RPC / A2A surfaces
59
+ * declare success-shape patterns to assert response payload structure beyond
60
+ * the shell exit code. Driven by strata Run 12 evidence: four MCP tools
61
+ * shipped SHIP_IT while throwing real Python TypeErrors against real data.
53
62
  */
54
63
  export const RuntimeProbeSchema = z.object({
55
64
  /** Stable, unique-within-story identifier used in finding messages and logs. */
@@ -62,6 +71,23 @@ export const RuntimeProbeSchema = z.object({
62
71
  timeout_ms: z.number().int().positive().optional(),
63
72
  /** Optional human-readable description. Surfaced in finding messages. */
64
73
  description: z.string().optional(),
74
+ /**
75
+ * Optional regex patterns that stdout must NOT match. If any pattern
76
+ * matches stdout, the probe is failed (outcome → 'fail', category →
77
+ * `runtime-probe-assertion-fail`) even when the shell exit code is 0.
78
+ * Use to assert the absence of structured-error payloads in tools that
79
+ * return HTTP 200 with an error body — `'"isError"\\s*:\\s*true'`,
80
+ * `'"status"\\s*:\\s*"error"'`, etc.
81
+ */
82
+ expect_stdout_no_regex: z.array(z.string().min(1)).optional(),
83
+ /**
84
+ * Optional regex patterns that stdout MUST match. Each pattern in the list
85
+ * must match stdout at least once; missing matches fail the probe with
86
+ * category `runtime-probe-assertion-fail`. Use to assert AC-specific
87
+ * success structure (e.g. for a search tool: `'"similarity_score"'` must
88
+ * appear in the response).
89
+ */
90
+ expect_stdout_regex: z.array(z.string().min(1)).optional(),
65
91
  });
66
92
  /** Zod schema for the full list (wrapping the per-probe schema). */
67
93
  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;uEACu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,GAAG,CAAS;IAEtB,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA0GrE"}
1
+ {"version":3,"file":"source-ac-fidelity-check.d.ts","sourceRoot":"","sources":["../../src/verification/source-ac-fidelity-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EAEnB,kBAAkB,EACnB,MAAM,YAAY,CAAA;AA+enB,qBAAa,qBAAsB,YAAW,iBAAiB;IAC7D,QAAQ,CAAC,IAAI,wBAAuB;IACpC,QAAQ,CAAC,IAAI,EAAG,GAAG,CAAS;IAEtB,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA4NrE"}
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * No LLM calls, no shell execution — pure in-memory literal substring matching.
15
15
  */
16
- import { existsSync, readdirSync, statSync } from 'node:fs';
16
+ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
17
17
  import { basename, join } from 'node:path';
18
18
  import { renderFindings } from './findings.js';
19
19
  // ---------------------------------------------------------------------------
@@ -28,6 +28,52 @@ import { renderFindings } from './findings.js';
28
28
  const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', 'build', '.substrate', '_bmad-output', 'coverage', '.next', '.cache']);
29
29
  /** Max depth for the basename walk. Prevents pathological traversal. */
30
30
  const MAX_WALK_DEPTH = 8;
31
+ /**
32
+ * Story 60-7: detect operational/runtime path references in source AC.
33
+ *
34
+ * Source ACs frequently mention runtime locations the implementation
35
+ * INTERACTS WITH but does not SHIP — install destinations, system paths,
36
+ * user home references, git internals. The check's existing path-clause
37
+ * pipeline treats every backtick path as a deliverable and emits
38
+ * architectural-drift error when it isn't found in code. This produces
39
+ * false-positive verification failures.
40
+ *
41
+ * Concrete strata example (Run a880f201, Story 1-12, 2026-04-26): source AC
42
+ * said "When `.git/hooks/post-merge` is installed" — describing the runtime
43
+ * install location of a hook the dev's installer script writes. The dev
44
+ * correctly shipped `hooks/install-vault-hooks.sh` + `hooks/vault-conflict-resolver.sh`,
45
+ * but the check flagged `.git/hooks/post-merge` as architectural drift and
46
+ * VERIFICATION_FAILED'd the story across both review cycles.
47
+ *
48
+ * Patterns covered:
49
+ * - `^\.git/...` git internals (vault hooks, repo-internal paths)
50
+ * - `^/usr/...`, `^/etc/...`, `^/var/...`, `^/mnt/...`, `^/opt/...`,
51
+ * `^/srv/...`, `^/tmp/...`, `^/run/...`, `^/sys/...`, `^/proc/...`,
52
+ * `^/dev/...`, `^/home/...` Unix system / install destinations
53
+ * - `^~/...` user home references (`~/.config/...`, `~/obsidian-vault-test/`)
54
+ *
55
+ * Out of scope for v1 (deferred to follow-up if real evidence accumulates):
56
+ * - HTTP routes (`/api/embeddings`) — distinguishing a route from a system
57
+ * path requires extra signal (extension absence + plural-noun heuristic);
58
+ * punt until a story actually trips on this.
59
+ */
60
+ function isOperationalPath(pathClause) {
61
+ // Strip surrounding backticks for the prefix test.
62
+ const raw = pathClause.replace(/^`/, '').replace(/`$/, '');
63
+ if (raw.startsWith('.git/'))
64
+ return true;
65
+ if (raw.startsWith('~/'))
66
+ return true;
67
+ // Match Unix system paths: leading slash + one of the canonical
68
+ // root directories + slash. The trailing slash distinguishes
69
+ // `/usr/local/bin` (system path) from `/userland/something` (project path).
70
+ const SYSTEM_ROOTS = ['usr', 'etc', 'var', 'mnt', 'opt', 'srv', 'tmp', 'run', 'sys', 'proc', 'dev', 'home'];
71
+ for (const root of SYSTEM_ROOTS) {
72
+ if (raw.startsWith(`/${root}/`))
73
+ return true;
74
+ }
75
+ return false;
76
+ }
31
77
  /**
32
78
  * Return true if `base` (a filename like `discover.ts`) exists somewhere under
33
79
  * `root` within MAX_WALK_DEPTH levels, skipping SKIP_DIRS. The walk is
@@ -100,26 +146,112 @@ function pathSatisfiedByCode(workingDir, pathClause) {
100
146
  }
101
147
  return false;
102
148
  }
149
+ /**
150
+ * Story 60-3 (Sprint 11B): check whether the path clause is referenced from
151
+ * THIS story's modified files. Strata obs_2026-04-25_011 surfaced a case where
152
+ * `pathSatisfiedByCode` returned true (path exists in repo) but the story's
153
+ * own code did not actually use the path — the directory was created earlier
154
+ * by a different story (1-17 in strata's case) and 1-10's `packages/memory-mcp/`
155
+ * code never imported `packages/mesh-agent`. The fidelity check then annotated
156
+ * the missing path as "stylistic drift — code satisfies it", obscuring real
157
+ * under-delivery.
158
+ *
159
+ * This check closes that gap: when path exists in repo AND a list of
160
+ * modified files is available, scan those modified files for an import /
161
+ * require / use reference to the path's basename. If references exist, the
162
+ * story's code does use the path → genuinely stylistic drift. If references
163
+ * are absent, the story's code does not use the path → architectural
164
+ * under-delivery (downgrade severity from warn to error).
165
+ *
166
+ * Conservative behavior: when modifiedFiles is empty (dev didn't report a
167
+ * file list, or a Tier B re-verification context), preserves the existing
168
+ * "code satisfies → warn" behavior. Only TIGHTENS when authoritative
169
+ * file-list signal is present.
170
+ */
171
+ function pathReferencedInModifiedFiles(workingDir, pathClause, modifiedFiles) {
172
+ if (modifiedFiles.length === 0)
173
+ return true; // no signal → benefit of doubt
174
+ const raw = pathClause.replace(/^`/, '').replace(/`$/, '');
175
+ // Use the final non-extension segment as the lookup token. For
176
+ // `packages/mesh-agent` → token `mesh-agent`. For `path/to/foo.ts` → token `foo`.
177
+ const baseWithExt = basename(raw);
178
+ const token = baseWithExt.replace(/\.[a-z]+$/i, '');
179
+ // Tokens shorter than 3 chars are too generic to be meaningful (e.g., `db`,
180
+ // `ts`) — give benefit of doubt to avoid false negatives.
181
+ if (token.length < 3)
182
+ return true;
183
+ // Build a separator-tolerant regex pattern. Cross-language imports normalize
184
+ // separators differently:
185
+ // TS/JS: `from '@foo/mesh-agent'` (kebab preserved)
186
+ // Python: `from mesh_agent import` (snake — Python identifiers can't have hyphens)
187
+ // Go: `import ".../mesh-agent"` (kebab preserved)
188
+ // Rust: `use mesh_agent::` (snake — Rust identifier rule)
189
+ // Replace `-` and `_` in the token with `[-_]` so kebab tokens match snake imports
190
+ // and vice versa. Escape other regex metacharacters.
191
+ const escapedSeparatorTolerant = token
192
+ .replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
193
+ .replace(/[-_]/g, '[-_]');
194
+ // Import-style reference: line begins with import/from/require/use/mod
195
+ // (whitespace tolerated) and contains the token. Anchored to line start
196
+ // to avoid false-positives where the comment text "import" appears
197
+ // alongside a token reference (e.g., a comment like "# does NOT import X").
198
+ const importPattern = new RegExp(`^\\s*(?:import|from|require|use|mod)\\b[^\\n]*\\b${escapedSeparatorTolerant}\\b`, 'mi');
199
+ // Also catch package.json deps and other bare references that aren't
200
+ // imports per se but still indicate the story wired the path in.
201
+ const barePattern = new RegExp(`\\b${escapedSeparatorTolerant}\\b`, 'i');
202
+ for (const filePath of modifiedFiles) {
203
+ let content;
204
+ try {
205
+ content = readFileSync(join(workingDir, filePath), 'utf-8');
206
+ }
207
+ catch {
208
+ continue;
209
+ }
210
+ if (importPattern.test(content))
211
+ return true;
212
+ // For package.json or yaml config files, accept bare reference.
213
+ if (filePath.endsWith('package.json') || filePath.endsWith('.yaml') || filePath.endsWith('.yml') || filePath.endsWith('.toml')) {
214
+ if (barePattern.test(content))
215
+ return true;
216
+ }
217
+ }
218
+ return false;
219
+ }
103
220
  // ---------------------------------------------------------------------------
104
221
  // Hard-clause extraction helpers
105
222
  // ---------------------------------------------------------------------------
106
223
  /**
107
224
  * Extract the story's section from the full epic content.
108
225
  *
109
- * Uses the same heading pattern as `isImplicitlyCovered` in the monolith:
110
- * `### Story <storyKey>:` or `### Story <storyKey> ` or `### Story <storyKey>\n`
226
+ * Uses the heading pattern `### Story <storyKey>:` or `### Story <storyKey>[whitespace]`.
227
+ *
228
+ * **Separator-tolerant matching** (Story 60-6, mirrors create-story.ts Story
229
+ * 58-5 normalization): Substrate's canonical storyKey form is hyphen
230
+ * (`1-10c`) — `seed-methodology-context.ts` normalizes any author convention
231
+ * to hyphen before storing in `wg_stories`. But strata's `epics.md` uses
232
+ * dot-form headings (`### Story 1.10c:`). When the supplied storyKey
233
+ * (`1-10c`) doesn't textually match the heading separator (`.`), the
234
+ * extraction must still find the right section — silently scanning the
235
+ * whole epic and attributing every story's clauses to this one is far worse
236
+ * than emitting a clear "could not isolate" signal.
111
237
  *
112
238
  * Returns the extracted section text (from the heading match through to the
113
- * next `### Story` heading or end of file), or the full content if no
114
- * matching heading is found.
239
+ * next `### Story` heading or end of file), or `null` if no matching heading
240
+ * is found. Callers MUST handle null explicitly — the previous silent-fallback
241
+ * behavior (return-full-epic) inflated findings cross-story and is gone.
115
242
  */
116
243
  function extractStorySection(epicContent, storyKey) {
117
- const escapedKey = storyKey.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
118
- const headingPattern = new RegExp(`^###\\s+Story\\s+${escapedKey}[:\\s]`, 'm');
244
+ // Separator-tolerant: split on any of [-._ ] and rejoin with the same class
245
+ // so `1-10c` matches `### Story 1.10c:`, `### Story 1_10c:`, `### Story 1 10c:`,
246
+ // and vice versa.
247
+ const parts = storyKey.split(/[-._ ]/);
248
+ const normalized = parts
249
+ .map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
250
+ .join('[-._ ]');
251
+ const headingPattern = new RegExp(`^###\\s+Story\\s+${normalized}[:\\s]`, 'm');
119
252
  const match = headingPattern.exec(epicContent);
120
253
  if (!match) {
121
- // No matching heading — return full content so clauses can still be found
122
- return epicContent;
254
+ return null;
123
255
  }
124
256
  const start = match.index;
125
257
  // Find the next `### Story ` heading after the match
@@ -129,22 +261,149 @@ function extractStorySection(epicContent, storyKey) {
129
261
  }
130
262
  return epicContent.slice(start);
131
263
  }
264
+ const ALTERNATIVE_ITEM = /^\s*-\s+\*\*\(([a-zA-Z])\)/;
265
+ /**
266
+ * Scan section lines for alternative-option groups. A group requires at least
267
+ * two consecutive lettered list items; isolated `- **(a)**` items are NOT
268
+ * treated as alternatives because there is no second option to compare against.
269
+ *
270
+ * Returns a flat list of options (each item annotated with its group id) so
271
+ * the caller can map any path-clause line back to its (group, option) bucket.
272
+ */
273
+ function detectAlternativeOptions(lines) {
274
+ const options = [];
275
+ let i = 0;
276
+ while (i < lines.length) {
277
+ const start = lines[i];
278
+ const m = start !== undefined ? ALTERNATIVE_ITEM.exec(start) : null;
279
+ if (m) {
280
+ const groupStartLine = i;
281
+ const items = [
282
+ { letter: m[1].toLowerCase(), line: i },
283
+ ];
284
+ let j = i + 1;
285
+ while (j < lines.length) {
286
+ const line = lines[j] ?? '';
287
+ const am = ALTERNATIVE_ITEM.exec(line);
288
+ if (am) {
289
+ items.push({ letter: am[1].toLowerCase(), line: j });
290
+ j++;
291
+ continue;
292
+ }
293
+ // Blank line or indented continuation — stays inside the group's span.
294
+ if (line.trim() === '' || /^\s+\S/.test(line)) {
295
+ j++;
296
+ continue;
297
+ }
298
+ // Non-list line at column zero — group ends.
299
+ break;
300
+ }
301
+ // Need 2+ items to call this an alternative group.
302
+ if (items.length >= 2) {
303
+ const groupId = `alt-L${groupStartLine}`;
304
+ for (let k = 0; k < items.length; k++) {
305
+ const item = items[k];
306
+ const next = k + 1 < items.length ? items[k + 1].line : j;
307
+ options.push({
308
+ group: groupId,
309
+ option: item.letter,
310
+ lineStart: item.line,
311
+ lineEnd: next,
312
+ });
313
+ }
314
+ }
315
+ i = j;
316
+ }
317
+ else {
318
+ i++;
319
+ }
320
+ }
321
+ return options;
322
+ }
323
+ /** Resolve the (group, option) for a path clause whose match appeared on
324
+ * `lineIndex`, or undefined if the line is not inside any alternative option. */
325
+ function findOptionForLine(lineIndex, options) {
326
+ for (const opt of options) {
327
+ if (lineIndex >= opt.lineStart && lineIndex < opt.lineEnd) {
328
+ return { group: opt.group, option: opt.option };
329
+ }
330
+ }
331
+ return undefined;
332
+ }
333
+ /**
334
+ * Story 60-5: compute the "taken" option per alternative group.
335
+ *
336
+ * For each group of alternative options:
337
+ * - Each option owns one or more path clauses (tagged with the same `group`
338
+ * and the option's letter).
339
+ * - An option is satisfied when every path clause it owns exists in code
340
+ * (pathSatisfiedByCode === true). Missing paths in code make the option
341
+ * unsatisfied — the dev did not take this option.
342
+ * - The group's taken-option is the alphabetically-first satisfied letter,
343
+ * for deterministic selection when multiple options happen to be
344
+ * satisfied (uncommon, but possible if both options' paths exist from
345
+ * prior unrelated work).
346
+ *
347
+ * Returns a map: group-id → option-letter that was taken. Groups with no
348
+ * satisfied option are absent from the map (caller falls back to existing
349
+ * per-path error-severity drift detection).
350
+ */
351
+ function computeTakenOptionPerGroup(hardClauses, workingDir) {
352
+ // group → option-letter → "all paths satisfied so far"
353
+ const optionState = new Map();
354
+ for (const clause of hardClauses) {
355
+ if (clause.type !== 'path' || !clause.alternative)
356
+ continue;
357
+ const { group, option } = clause.alternative;
358
+ if (!optionState.has(group))
359
+ optionState.set(group, new Map());
360
+ const groupMap = optionState.get(group);
361
+ const exists = pathSatisfiedByCode(workingDir, clause.text);
362
+ if (!groupMap.has(option)) {
363
+ groupMap.set(option, exists);
364
+ }
365
+ else if (!exists) {
366
+ // Any one missing path unsatisfies the option.
367
+ groupMap.set(option, false);
368
+ }
369
+ }
370
+ const taken = new Map();
371
+ for (const [group, opts] of optionState) {
372
+ const sorted = [...opts.entries()].sort((a, b) => a[0].localeCompare(b[0]));
373
+ for (const [letter, satisfied] of sorted) {
374
+ if (satisfied) {
375
+ taken.set(group, letter);
376
+ break;
377
+ }
378
+ }
379
+ }
380
+ return taken;
381
+ }
132
382
  /**
133
383
  * Extract hard clauses from a story section of an epic file.
134
384
  *
135
385
  * Hard clauses:
136
386
  * 1. Lines containing MUST NOT / MUST / SHALL NOT / SHALL as standalone keywords (case-sensitive)
137
- * 2. Backtick-wrapped paths with at least one `/` (excludes bare filenames)
387
+ * 2. Backtick-wrapped paths with at least one `/` (excludes bare filenames).
388
+ * Story 60-5: paths inside `- **(letter)**` list items belonging to a
389
+ * multi-option alternative group are tagged with `{group, option}` so
390
+ * the verification phase can OR satisfaction across options.
138
391
  * 3. The presence of `## Runtime Probes` heading followed by a fenced yaml block
139
392
  * (represented as a single "runtime-probes-section" clause)
140
393
  */
141
394
  function extractHardClauses(sectionContent) {
142
395
  const clauses = [];
396
+ const lines = sectionContent.split('\n');
397
+ // Story 60-5: detect alternative-option line ranges up-front so any path
398
+ // extracted from inside one of those ranges can be tagged with its
399
+ // (group, option) — without this metadata the verification phase has no
400
+ // way to recognize that "(a)'s path missing" is acceptable when "(b)'s
401
+ // path is satisfied".
402
+ const alternativeOptions = detectAlternativeOptions(lines);
143
403
  // --- MUST NOT / MUST / SHALL NOT / SHALL lines ---
144
404
  // Word-boundary match, case-sensitive, captures the whole line.
145
405
  // Order matters: MUST NOT before MUST, SHALL NOT before SHALL to avoid double-matching.
146
406
  const mustPattern = /\b(MUST NOT|MUST|SHALL NOT|SHALL)\b/;
147
- const lines = sectionContent.split('\n');
148
407
  for (const line of lines) {
149
408
  const match = mustPattern.exec(line);
150
409
  if (match) {
@@ -153,13 +412,24 @@ function extractHardClauses(sectionContent) {
153
412
  }
154
413
  }
155
414
  // --- Backtick-wrapped paths with at least one slash ---
156
- // Match `path/with/at-least-one-slash` — excludes bare `filename.ts`
415
+ // Match `path/with/at-least-one-slash` — excludes bare `filename.ts`.
416
+ // Iterate line-by-line so each match's line index is known and can be
417
+ // mapped to an alternative option (Story 60-5).
157
418
  const pathPattern = /`([a-zA-Z0-9_./-]+\/[a-zA-Z0-9_./-]+)`/g;
158
- let pathMatch;
159
- while ((pathMatch = pathPattern.exec(sectionContent)) !== null) {
160
- // The full backtick-wrapped expression (including backticks) is the clause text
161
- // so the literal substring match against storyContent checks the exact same form.
162
- clauses.push({ type: 'path', text: `\`${pathMatch[1]}\`` });
419
+ for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
420
+ const line = lines[lineIdx] ?? '';
421
+ pathPattern.lastIndex = 0;
422
+ let pathMatch;
423
+ while ((pathMatch = pathPattern.exec(line)) !== null) {
424
+ const alt = findOptionForLine(lineIdx, alternativeOptions);
425
+ clauses.push({
426
+ type: 'path',
427
+ // The full backtick-wrapped expression (including backticks) is the clause text
428
+ // so the literal substring match against storyContent checks the exact same form.
429
+ text: `\`${pathMatch[1]}\``,
430
+ ...(alt ? { alternative: alt } : {}),
431
+ });
432
+ }
163
433
  }
164
434
  // --- Runtime Probes section ---
165
435
  // Detect ## Runtime Probes heading followed by a fenced yaml block
@@ -193,12 +463,53 @@ export class SourceAcFidelityCheck {
193
463
  findings,
194
464
  };
195
465
  }
196
- // Extract the story's section from the epic content
466
+ // Extract the story's section from the epic content. Story 60-6: when no
467
+ // heading matches, this is now `null` rather than a silent return-full-
468
+ // epic fallback. Falling back to the full epic attributed every story's
469
+ // hard clauses to this one — surfaced when strata's hyphen-form storyKey
470
+ // (`1-10c`) didn't match the dot-form heading (`### Story 1.10c:`) and
471
+ // produced cross-story findings. Loud warn finding here is strictly
472
+ // better than silently grading the wrong scope.
197
473
  const storySection = extractStorySection(context.sourceEpicContent, context.storyKey);
474
+ if (storySection === null) {
475
+ const findings = [
476
+ {
477
+ category: 'source-ac-section-not-found',
478
+ severity: 'warn',
479
+ message: `could not locate "### Story ${context.storyKey}" heading in source epic content — ` +
480
+ `skipping fidelity check (the heading may use a separator convention ` +
481
+ `(e.g. dot vs hyphen vs underscore) the matcher does not recognize, ` +
482
+ `or the story may not exist in this epic file)`,
483
+ },
484
+ ];
485
+ return {
486
+ status: 'pass',
487
+ details: renderFindings(findings),
488
+ duration_ms: Date.now() - start,
489
+ findings,
490
+ };
491
+ }
198
492
  // Extract all hard clauses from the story section
199
493
  const hardClauses = extractHardClauses(storySection);
200
494
  const findings = [];
201
495
  const storyContent = context.storyContent ?? '';
496
+ // Story 60-5: compute taken-option per alternative group BEFORE the main
497
+ // emission loop, so path-clause processing can recognize un-taken options
498
+ // and emit them as info-severity rather than error.
499
+ //
500
+ // An option is considered "satisfied" if all its path clauses exist in
501
+ // code (pathSatisfiedByCode === true). When at least one option in a
502
+ // group is satisfied, the group's taken-option is the alphabetically-
503
+ // first satisfied letter (deterministic). Other options' paths are
504
+ // emitted as info findings ("alternative not taken — story took option X").
505
+ //
506
+ // This closes strata obs_2026-04-26_013: 1-10c source AC offered (a) TS
507
+ // shim and (b) Python re-impl as alternatives; dev correctly took (b),
508
+ // but v0.20.23's check hard-gated on (a)'s path being missing. The
509
+ // alternative metadata + this OR'ing semantic preserves error severity
510
+ // for genuinely-missing paths while accepting either option as valid
511
+ // when source AC explicitly offered both.
512
+ const takenOption = computeTakenOptionPerGroup(hardClauses, context.workingDir);
202
513
  for (const clause of hardClauses) {
203
514
  if (clause.type === 'runtime-probes-section') {
204
515
  // Special handling: check whether the story artifact contains ## Runtime Probes
@@ -238,6 +549,46 @@ export class SourceAcFidelityCheck {
238
549
  // false positives (like strata 1-7's unquoted `./discover.ts`)
239
550
  // pass through as advisory.
240
551
  if (clause.type === 'path') {
552
+ // Story 60-7: operational-path heuristic. Source ACs frequently
553
+ // mention runtime install destinations, system paths, or git
554
+ // internals that the implementation INTERACTS WITH but does not
555
+ // SHIP — `.git/hooks/post-merge`, `/usr/local/bin/foo`,
556
+ // `~/.config/strata/`. These are not deliverable file paths;
557
+ // emitting them as architectural drift produces false
558
+ // VERIFICATION_FAILED on stories that correctly ship installers
559
+ // for these locations. Surfaced strata Run a880f201 (Story 1-12,
560
+ // 2026-04-26): dev correctly shipped `hooks/install-vault-hooks.sh`
561
+ // + `hooks/vault-conflict-resolver.sh` but the check flagged
562
+ // `.git/hooks/post-merge` (the install destination) as missing.
563
+ if (isOperationalPath(clause.text)) {
564
+ findings.push({
565
+ category: 'source-ac-operational-path-reference',
566
+ severity: 'info',
567
+ message: `path: "${truncated}" referenced in source AC as a runtime / ` +
568
+ `install / system location (matches operational-path heuristic) ` +
569
+ `— treated as informational, not a deliverable file path`,
570
+ });
571
+ continue;
572
+ }
573
+ // Story 60-5: if this path belongs to an un-taken alternative
574
+ // option (source AC offered (a) and (b); story implemented (b)),
575
+ // emit info-severity rather than error. The dev correctly chose
576
+ // a different option in the same group; flagging the un-taken
577
+ // option's path as architectural drift was the v0.20.23 false
578
+ // positive that hard-gated strata 1-10c despite a correct
579
+ // option-(b) implementation.
580
+ if (clause.alternative) {
581
+ const { group, option } = clause.alternative;
582
+ const taken = takenOption.get(group);
583
+ if (taken !== undefined && taken !== option) {
584
+ findings.push({
585
+ category: 'source-ac-alternative-not-taken',
586
+ severity: 'info',
587
+ message: `path: "${truncated}" not implemented — source AC offered this as alternative option (${option}); story implemented option (${taken}) instead`,
588
+ });
589
+ continue;
590
+ }
591
+ }
241
592
  // Story 58-9c: delegated to pathSatisfiedByCode which handles
242
593
  // literal / dot-stripped / basename-search resolution so
243
594
  // relative-path source ACs (e.g., `./discover.ts`) are correctly
@@ -245,12 +596,36 @@ export class SourceAcFidelityCheck {
245
596
  // false-positive-errored on relative paths; this restores the
246
597
  // stylistic-vs-architectural distinction across path styles.
247
598
  const existsInCode = pathSatisfiedByCode(context.workingDir, clause.text);
599
+ // Story 60-3 (Sprint 11B): tighten "code satisfies → stylistic
600
+ // drift" annotation. Strata obs_2026-04-25_011: path
601
+ // `packages/mesh-agent` existed in repo (created by Story 1.17)
602
+ // but 1-10's code never imported it; the check annotated the
603
+ // miss as stylistic drift, masking real under-delivery. When
604
+ // the dev-story result reports a list of modified files, check
605
+ // whether THIS story's code references the path. References
606
+ // present → genuinely stylistic. References absent → path
607
+ // exists from prior work but this story didn't wire it →
608
+ // architectural under-delivery.
609
+ const modifiedFiles = context.devStoryResult?.files_modified ?? [];
610
+ const referencedByStory = pathReferencedInModifiedFiles(context.workingDir, clause.text, modifiedFiles);
611
+ let severity;
612
+ let driftMessage;
613
+ if (!existsInCode) {
614
+ severity = 'error';
615
+ driftMessage = `${clause.type}: "${truncated}" present in epics source but absent in story artifact AND missing from code (architectural drift)`;
616
+ }
617
+ else if (!referencedByStory) {
618
+ severity = 'error';
619
+ driftMessage = `${clause.type}: "${truncated}" present in epics source but absent in story artifact AND code path exists in repo but THIS story's modified files do not reference it (under-delivery — code path was created by a different story; this story did not wire it in)`;
620
+ }
621
+ else {
622
+ severity = 'warn';
623
+ driftMessage = `${clause.type}: "${truncated}" present in epics source but absent in story artifact (code satisfies it — stylistic drift)`;
624
+ }
248
625
  findings.push({
249
626
  category: 'source-ac-drift',
250
- severity: existsInCode ? 'warn' : 'error',
251
- message: existsInCode
252
- ? `${clause.type}: "${truncated}" present in epics source but absent in story artifact (code satisfies it — stylistic drift)`
253
- : `${clause.type}: "${truncated}" present in epics source but absent in story artifact AND missing from code (architectural drift)`,
627
+ severity,
628
+ message: driftMessage,
254
629
  });
255
630
  }
256
631
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"source-ac-fidelity-check.js","sourceRoot":"","sources":["../../src/verification/source-ac-fidelity-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAO1C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,8EAA8E;AAC9E,wCAAwC;AACxC,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;AAEjI,wEAAwE;AACxE,MAAM,cAAc,GAAG,CAAC,CAAA;AAExB;;;;GAIG;AACH,SAAS,uBAAuB,CAAC,IAAY,EAAE,IAAY;IACzD,MAAM,KAAK,GAA2C,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAA;IAChF,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,GAAG,E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AAG,OAAO,CAAA;4BAClB,YAAY,GAAG,GAAG,MAAM,CAAC,IAAI,MAAM,SAAS,sOAAsO,CAAA;wBACpR,CAAC;6BAAM,CAAC;4BACN,QAAQ,GAAG,MAAM,CAAA;4BACjB,YAAY,GAAG,GAAG,MAAM,CAAC,IAAI,MAAM,SAAS,8FAA8F,CAAA;wBAC5I,CAAC;wBACD,QAAQ,CAAC,IAAI,CAAC;4BACZ,QAAQ,EAAE,iBAAiB;4BAC3B,QAAQ;4BACR,OAAO,EAAE,YAAY;yBACtB,CAAC,CAAA;oBACJ,CAAC;yBAAM,CAAC;wBACN,yEAAyE;wBACzE,QAAQ,CAAC,IAAI,CAAC;4BACZ,QAAQ,EAAE,iBAAiB;4BAC3B,QAAQ,EAAE,MAAM;4BAChB,OAAO,EAAE,GAAG,MAAM,CAAC,IAAI,MAAM,SAAS,wDAAwD;yBAC/F,CAAC,CAAA;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAA;QAE7E,OAAO;YACL,MAAM;YACN,OAAO,EACL,QAAQ,CAAC,MAAM,GAAG,CAAC;gBACjB,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC;gBAC1B,CAAC,CAAC,uBAAuB,WAAW,CAAC,MAAM,wCAAwC;YACvF,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;YAC/B,QAAQ;SACT,CAAA;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrate-ai/sdlc",
3
- "version": "0.20.22",
3
+ "version": "0.20.27",
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.22",
27
+ "@substrate-ai/core": "0.20.27",
28
28
  "js-yaml": "^4.1.1",
29
29
  "zod": "^4.3.6"
30
30
  },