@oscharko-dev/keiko-workflows 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/bug-investigation/context.d.ts +7 -0
- package/dist/bug-investigation/context.d.ts.map +1 -0
- package/dist/bug-investigation/context.js +119 -0
- package/dist/bug-investigation/descriptor.d.ts +4 -0
- package/dist/bug-investigation/descriptor.d.ts.map +1 -0
- package/dist/bug-investigation/descriptor.js +46 -0
- package/dist/bug-investigation/emit.d.ts +13 -0
- package/dist/bug-investigation/emit.d.ts.map +1 -0
- package/dist/bug-investigation/emit.js +35 -0
- package/dist/bug-investigation/events.d.ts +2 -0
- package/dist/bug-investigation/events.d.ts.map +1 -0
- package/dist/bug-investigation/events.js +6 -0
- package/dist/bug-investigation/failure-parse.d.ts +4 -0
- package/dist/bug-investigation/failure-parse.d.ts.map +1 -0
- package/dist/bug-investigation/failure-parse.js +154 -0
- package/dist/bug-investigation/guard.d.ts +3 -0
- package/dist/bug-investigation/guard.d.ts.map +1 -0
- package/dist/bug-investigation/guard.js +69 -0
- package/dist/bug-investigation/index.d.ts +8 -0
- package/dist/bug-investigation/index.d.ts.map +1 -0
- package/dist/bug-investigation/index.js +13 -0
- package/dist/bug-investigation/internal.d.ts +39 -0
- package/dist/bug-investigation/internal.d.ts.map +1 -0
- package/dist/bug-investigation/internal.js +65 -0
- package/dist/bug-investigation/memory.d.ts +5 -0
- package/dist/bug-investigation/memory.d.ts.map +1 -0
- package/dist/bug-investigation/memory.js +91 -0
- package/dist/bug-investigation/model-loop.d.ts +5 -0
- package/dist/bug-investigation/model-loop.d.ts.map +1 -0
- package/dist/bug-investigation/model-loop.js +225 -0
- package/dist/bug-investigation/parse.d.ts +4 -0
- package/dist/bug-investigation/parse.d.ts.map +1 -0
- package/dist/bug-investigation/parse.js +125 -0
- package/dist/bug-investigation/prompt.d.ts +5 -0
- package/dist/bug-investigation/prompt.d.ts.map +1 -0
- package/dist/bug-investigation/prompt.js +122 -0
- package/dist/bug-investigation/report.d.ts +24 -0
- package/dist/bug-investigation/report.d.ts.map +1 -0
- package/dist/bug-investigation/report.js +151 -0
- package/dist/bug-investigation/stages.d.ts +14 -0
- package/dist/bug-investigation/stages.d.ts.map +1 -0
- package/dist/bug-investigation/stages.js +247 -0
- package/dist/bug-investigation/types.d.ts +88 -0
- package/dist/bug-investigation/types.d.ts.map +1 -0
- package/dist/bug-investigation/types.js +6 -0
- package/dist/bug-investigation/verify-stage.d.ts +11 -0
- package/dist/bug-investigation/verify-stage.d.ts.map +1 -0
- package/dist/bug-investigation/verify-stage.js +91 -0
- package/dist/bug-investigation/workflow.d.ts +3 -0
- package/dist/bug-investigation/workflow.d.ts.map +1 -0
- package/dist/bug-investigation/workflow.js +85 -0
- package/dist/contextpack/assemble.d.ts +35 -0
- package/dist/contextpack/assemble.d.ts.map +1 -0
- package/dist/contextpack/assemble.js +431 -0
- package/dist/contextpack/compaction.d.ts +23 -0
- package/dist/contextpack/compaction.d.ts.map +1 -0
- package/dist/contextpack/compaction.js +68 -0
- package/dist/contextpack/index.d.ts +9 -0
- package/dist/contextpack/index.d.ts.map +1 -0
- package/dist/contextpack/index.js +8 -0
- package/dist/contextpack/microIndex.d.ts +29 -0
- package/dist/contextpack/microIndex.d.ts.map +1 -0
- package/dist/contextpack/microIndex.js +98 -0
- package/dist/contextpack/reranker.d.ts +15 -0
- package/dist/contextpack/reranker.d.ts.map +1 -0
- package/dist/contextpack/reranker.js +31 -0
- package/dist/descriptor.d.ts +2 -0
- package/dist/descriptor.d.ts.map +1 -0
- package/dist/descriptor.js +1 -0
- package/dist/governed-handoff.d.ts +6 -0
- package/dist/governed-handoff.d.ts.map +1 -0
- package/dist/governed-handoff.js +86 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/planner/anchors.d.ts +17 -0
- package/dist/planner/anchors.d.ts.map +1 -0
- package/dist/planner/anchors.js +291 -0
- package/dist/planner/explorationPlanner.d.ts +9 -0
- package/dist/planner/explorationPlanner.d.ts.map +1 -0
- package/dist/planner/explorationPlanner.js +15 -0
- package/dist/planner/governor.d.ts +16 -0
- package/dist/planner/governor.d.ts.map +1 -0
- package/dist/planner/governor.js +106 -0
- package/dist/planner/index.d.ts +11 -0
- package/dist/planner/index.d.ts.map +1 -0
- package/dist/planner/index.js +8 -0
- package/dist/planner/intent.d.ts +8 -0
- package/dist/planner/intent.d.ts.map +1 -0
- package/dist/planner/intent.js +140 -0
- package/dist/planner/plan.d.ts +43 -0
- package/dist/planner/plan.d.ts.map +1 -0
- package/dist/planner/plan.js +237 -0
- package/dist/promptEnhancer/index.d.ts +23 -0
- package/dist/promptEnhancer/index.d.ts.map +1 -0
- package/dist/promptEnhancer/index.js +282 -0
- package/dist/qualityIntelligence/__tests__/fixtures/runEntryFixtures.d.ts +30 -0
- package/dist/qualityIntelligence/__tests__/fixtures/runEntryFixtures.d.ts.map +1 -0
- package/dist/qualityIntelligence/__tests__/fixtures/runEntryFixtures.js +114 -0
- package/dist/qualityIntelligence/cancellation.d.ts +20 -0
- package/dist/qualityIntelligence/cancellation.d.ts.map +1 -0
- package/dist/qualityIntelligence/cancellation.js +55 -0
- package/dist/qualityIntelligence/descriptors.d.ts +41 -0
- package/dist/qualityIntelligence/descriptors.d.ts.map +1 -0
- package/dist/qualityIntelligence/descriptors.js +105 -0
- package/dist/qualityIntelligence/index.d.ts +11 -0
- package/dist/qualityIntelligence/index.d.ts.map +1 -0
- package/dist/qualityIntelligence/index.js +11 -0
- package/dist/qualityIntelligence/modelRoutedTestDesign.d.ts +100 -0
- package/dist/qualityIntelligence/modelRoutedTestDesign.d.ts.map +1 -0
- package/dist/qualityIntelligence/modelRoutedTestDesign.js +620 -0
- package/dist/qualityIntelligence/runEntries.d.ts +60 -0
- package/dist/qualityIntelligence/runEntries.d.ts.map +1 -0
- package/dist/qualityIntelligence/runEntries.js +243 -0
- package/dist/qualityIntelligence/runtimeCommon.d.ts +106 -0
- package/dist/qualityIntelligence/runtimeCommon.d.ts.map +1 -0
- package/dist/qualityIntelligence/runtimeCommon.js +258 -0
- package/dist/qualityIntelligence/scopedRegeneration.d.ts +26 -0
- package/dist/qualityIntelligence/scopedRegeneration.d.ts.map +1 -0
- package/dist/qualityIntelligence/scopedRegeneration.js +35 -0
- package/dist/ranking/filter.d.ts +20 -0
- package/dist/ranking/filter.d.ts.map +1 -0
- package/dist/ranking/filter.js +99 -0
- package/dist/ranking/index.d.ts +9 -0
- package/dist/ranking/index.d.ts.map +1 -0
- package/dist/ranking/index.js +8 -0
- package/dist/ranking/rank.d.ts +21 -0
- package/dist/ranking/rank.d.ts.map +1 -0
- package/dist/ranking/rank.js +160 -0
- package/dist/ranking/scoring.d.ts +13 -0
- package/dist/ranking/scoring.d.ts.map +1 -0
- package/dist/ranking/scoring.js +39 -0
- package/dist/ranking/signals.d.ts +20 -0
- package/dist/ranking/signals.d.ts.map +1 -0
- package/dist/ranking/signals.js +145 -0
- package/dist/unit-tests/context.d.ts +7 -0
- package/dist/unit-tests/context.d.ts.map +1 -0
- package/dist/unit-tests/context.js +129 -0
- package/dist/unit-tests/conventions.d.ts +5 -0
- package/dist/unit-tests/conventions.d.ts.map +1 -0
- package/dist/unit-tests/conventions.js +87 -0
- package/dist/unit-tests/descriptor.d.ts +5 -0
- package/dist/unit-tests/descriptor.d.ts.map +1 -0
- package/dist/unit-tests/descriptor.js +43 -0
- package/dist/unit-tests/emit.d.ts +13 -0
- package/dist/unit-tests/emit.d.ts.map +1 -0
- package/dist/unit-tests/emit.js +35 -0
- package/dist/unit-tests/events.d.ts +2 -0
- package/dist/unit-tests/events.d.ts.map +1 -0
- package/dist/unit-tests/events.js +6 -0
- package/dist/unit-tests/frontend.d.ts +42 -0
- package/dist/unit-tests/frontend.d.ts.map +1 -0
- package/dist/unit-tests/frontend.js +281 -0
- package/dist/unit-tests/index.d.ts +9 -0
- package/dist/unit-tests/index.d.ts.map +1 -0
- package/dist/unit-tests/index.js +15 -0
- package/dist/unit-tests/internal.d.ts +36 -0
- package/dist/unit-tests/internal.d.ts.map +1 -0
- package/dist/unit-tests/internal.js +43 -0
- package/dist/unit-tests/model-loop.d.ts +6 -0
- package/dist/unit-tests/model-loop.d.ts.map +1 -0
- package/dist/unit-tests/model-loop.js +98 -0
- package/dist/unit-tests/parse.d.ts +7 -0
- package/dist/unit-tests/parse.d.ts.map +1 -0
- package/dist/unit-tests/parse.js +68 -0
- package/dist/unit-tests/prompt.d.ts +6 -0
- package/dist/unit-tests/prompt.d.ts.map +1 -0
- package/dist/unit-tests/prompt.js +139 -0
- package/dist/unit-tests/report.d.ts +26 -0
- package/dist/unit-tests/report.d.ts.map +1 -0
- package/dist/unit-tests/report.js +104 -0
- package/dist/unit-tests/stages.d.ts +12 -0
- package/dist/unit-tests/stages.d.ts.map +1 -0
- package/dist/unit-tests/stages.js +202 -0
- package/dist/unit-tests/strategy.d.ts +6 -0
- package/dist/unit-tests/strategy.d.ts.map +1 -0
- package/dist/unit-tests/strategy.js +36 -0
- package/dist/unit-tests/target-guard.d.ts +5 -0
- package/dist/unit-tests/target-guard.d.ts.map +1 -0
- package/dist/unit-tests/target-guard.js +29 -0
- package/dist/unit-tests/types.d.ts +74 -0
- package/dist/unit-tests/types.d.ts.map +1 -0
- package/dist/unit-tests/types.js +6 -0
- package/dist/unit-tests/verify-stage.d.ts +10 -0
- package/dist/unit-tests/verify-stage.d.ts.map +1 -0
- package/dist/unit-tests/verify-stage.js +56 -0
- package/dist/unit-tests/workflow.d.ts +3 -0
- package/dist/unit-tests/workflow.d.ts.map +1 -0
- package/dist/unit-tests/workflow.js +69 -0
- package/package.json +38 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runEntries.d.ts","sourceRoot":"","sources":["../../src/qualityIntelligence/runEntries.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,mBAAmB,IAAI,EAAE,EACzB,KAAK,eAAe,EACpB,KA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AU,EAAE,SAAS,EAAE,CAAC,oCAAoC,EAAE,CAAC;IACxE,QAAQ,CAAC,cAAc,EAAE,iCAAiC,CAAC;CAC5D;AAuBD,wBAAsB,gCAAgC,CACpD,KAAK,EAAE,kCAAkC,EACzC,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CA+DxC;AAID,wBAAsB,oCAAoC,CACxD,KAAK,EAAE,sCAAsC,EAC7C,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAuCxC;AAmDD,wBAAsB,gCAAgC,CACpD,KAAK,EAAE,kCAAkC,EACzC,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CA2CxC;AAID,wBAAsB,wCAAwC,CAC5D,KAAK,EAAE,0CAA0C,EACjD,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CA6CxC"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
// Quality Intelligence deterministic ("scripted") workflow run entries (Epic #270, Issue #273,
|
|
2
|
+
// ADR-0023 D6).
|
|
3
|
+
//
|
|
4
|
+
// Pure orchestration over the seams shipped in #272 (pure-domain QI logic), #279 (model gateway QI
|
|
5
|
+
// dispatcher), and #274 (QI evidence persistence). Shares the run-lifecycle runtime with the
|
|
6
|
+
// model-routed entry via `runtimeCommon.ts`. NO new scheduler, NO event bus, NO duplicated
|
|
7
|
+
// checkpoint store.
|
|
8
|
+
//
|
|
9
|
+
// Structurally inspired by Test Intelligence reference (TI) workflow runners, but rewritten
|
|
10
|
+
// end-to-end against the Keiko contracts surface; no TI runtime, no TI IR.
|
|
11
|
+
import { QualityIntelligence as QI, } from "@oscharko-dev/keiko-contracts";
|
|
12
|
+
import { deduplicateCandidates, deriveIntent, designTestCaseCandidates, validateCandidates, } from "@oscharko-dev/keiko-quality-intelligence";
|
|
13
|
+
import {} from "@oscharko-dev/keiko-model-gateway";
|
|
14
|
+
import {} from "@oscharko-dev/keiko-evidence";
|
|
15
|
+
import { QI_ARTIFACT_REFINEMENT_WORKFLOW_DESCRIPTOR, QI_COVERAGE_REVIEW_WORKFLOW_DESCRIPTOR, QI_TEST_DESIGN_WORKFLOW_DESCRIPTOR, QI_VALIDATION_WORKFLOW_DESCRIPTOR, } from "./descriptors.js";
|
|
16
|
+
import { emit, emitCandidateProposed, emitFindingsRecorded, emitQueuedAndStarted, coverageMatrixFor, finaliseFailureOrCancellation, makeContext, persistRun, truncateCandidates, truncateFindings, withStage, } from "./runtimeCommon.js";
|
|
17
|
+
function contextFor(descriptor, plan, deps) {
|
|
18
|
+
return makeContext({
|
|
19
|
+
descriptor,
|
|
20
|
+
plan,
|
|
21
|
+
sink: deps.sink,
|
|
22
|
+
clock: deps.clock,
|
|
23
|
+
limits: deps.limits,
|
|
24
|
+
policyProfile: deps.policyProfile,
|
|
25
|
+
signal: deps.signal,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
// ─── qi:test-design (scripted) ─────────────────────────────────────────────────
|
|
29
|
+
// The orchestrator follows a strict 6-stage QI lifecycle (queued → started → 4 stages →
|
|
30
|
+
// succeeded); extracting per-stage helpers would obscure the event-emission audit trail.
|
|
31
|
+
// eslint-disable-next-line max-lines-per-function
|
|
32
|
+
export async function runQualityIntelligenceTestDesign(input, deps) {
|
|
33
|
+
const ctx = contextFor(QI_TEST_DESIGN_WORKFLOW_DESCRIPTOR, input.plan, deps);
|
|
34
|
+
emitQueuedAndStarted(ctx);
|
|
35
|
+
try {
|
|
36
|
+
await withStage(ctx, "plan", async () => Promise.resolve());
|
|
37
|
+
// Intent derivation is a deterministic sub-step of candidate design, not a separately surfaced
|
|
38
|
+
// stage. The shared qi:test-design descriptor declares the model-routed lifecycle
|
|
39
|
+
// (plan, candidates, judge, coverage, validate, finalize); emitting an undeclared "intent"
|
|
40
|
+
// stage here threw via assertStageRegistered and made this scripted entry impossible to
|
|
41
|
+
// succeed. Derive intent inside the declared "candidates" stage so the scripted entry stays a
|
|
42
|
+
// strict subset of the descriptor's stage set.
|
|
43
|
+
const rawCandidates = await withStage(ctx, "candidates", async () => {
|
|
44
|
+
const intent = deriveIntent(input.envelopes, ctx.profile);
|
|
45
|
+
return Promise.resolve(designTestCaseCandidates({
|
|
46
|
+
runId: input.plan.id,
|
|
47
|
+
intent,
|
|
48
|
+
atoms: input.atoms,
|
|
49
|
+
profile: ctx.profile,
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
52
|
+
const candidates = truncateCandidates(rawCandidates, ctx.limits.maxCandidatesPerRun);
|
|
53
|
+
emitCandidateProposed(ctx, candidates);
|
|
54
|
+
const coverageMatrix = await withStage(ctx, "coverage", async () => Promise.resolve(coverageMatrixFor(input.plan.id, input.atoms, candidates)));
|
|
55
|
+
const rawFindings = await withStage(ctx, "validate", async () => Promise.resolve(validateCandidates(input.plan.id, candidates)));
|
|
56
|
+
const findings = truncateFindings(rawFindings, ctx.limits.maxFindingsPerRun);
|
|
57
|
+
emitFindingsRecorded(ctx, findings);
|
|
58
|
+
const evidence = await withStage(ctx, "finalize", async () => Promise.resolve(persistRun({
|
|
59
|
+
ctx,
|
|
60
|
+
status: "succeeded",
|
|
61
|
+
candidatesCount: candidates.length,
|
|
62
|
+
findings,
|
|
63
|
+
provenanceRefs: input.provenanceRefs,
|
|
64
|
+
completedAt: ctx.clock.nowIso(),
|
|
65
|
+
evidenceStore: deps.evidenceStore,
|
|
66
|
+
coverageMatrix,
|
|
67
|
+
})));
|
|
68
|
+
emit(ctx, { kind: "run:succeeded" });
|
|
69
|
+
return Object.freeze({
|
|
70
|
+
runId: input.plan.id,
|
|
71
|
+
workflowId: ctx.descriptor.workflowId,
|
|
72
|
+
status: "succeeded",
|
|
73
|
+
eventsEmitted: ctx.sequence,
|
|
74
|
+
modelGatewayCallCount: ctx.modelGatewayCallCount,
|
|
75
|
+
evidence,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
catch (caught) {
|
|
79
|
+
return finaliseFailureOrCancellation(ctx, caught, {
|
|
80
|
+
candidatesCount: 0,
|
|
81
|
+
findings: Object.freeze([]),
|
|
82
|
+
provenanceRefs: input.provenanceRefs,
|
|
83
|
+
evidenceStore: deps.evidenceStore,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// ─── qi:coverage-review ──────────────────────────────────────────────────────
|
|
88
|
+
export async function runQualityIntelligenceCoverageReview(input, deps) {
|
|
89
|
+
const ctx = contextFor(QI_COVERAGE_REVIEW_WORKFLOW_DESCRIPTOR, input.plan, deps);
|
|
90
|
+
emitQueuedAndStarted(ctx);
|
|
91
|
+
try {
|
|
92
|
+
await withStage(ctx, "plan", async () => Promise.resolve());
|
|
93
|
+
const coverageMatrix = await withStage(ctx, "analyse", async () => Promise.resolve(coverageMatrixFor(input.plan.id, input.atoms, input.candidates)));
|
|
94
|
+
const evidence = await withStage(ctx, "report", async () => Promise.resolve(persistRun({
|
|
95
|
+
ctx,
|
|
96
|
+
status: "succeeded",
|
|
97
|
+
candidatesCount: input.candidates.length,
|
|
98
|
+
findings: Object.freeze([]),
|
|
99
|
+
provenanceRefs: input.provenanceRefs,
|
|
100
|
+
completedAt: ctx.clock.nowIso(),
|
|
101
|
+
evidenceStore: deps.evidenceStore,
|
|
102
|
+
coverageMatrix,
|
|
103
|
+
})));
|
|
104
|
+
emit(ctx, { kind: "run:succeeded" });
|
|
105
|
+
return Object.freeze({
|
|
106
|
+
runId: input.plan.id,
|
|
107
|
+
workflowId: ctx.descriptor.workflowId,
|
|
108
|
+
status: "succeeded",
|
|
109
|
+
eventsEmitted: ctx.sequence,
|
|
110
|
+
modelGatewayCallCount: ctx.modelGatewayCallCount,
|
|
111
|
+
evidence,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (caught) {
|
|
115
|
+
return finaliseFailureOrCancellation(ctx, caught, {
|
|
116
|
+
candidatesCount: input.candidates.length,
|
|
117
|
+
findings: Object.freeze([]),
|
|
118
|
+
provenanceRefs: input.provenanceRefs,
|
|
119
|
+
evidenceStore: deps.evidenceStore,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ─── qi:validation ───────────────────────────────────────────────────────────
|
|
124
|
+
// Minimal stand-in for the qi:judge-logic profile so this module does not have to plumb a profile
|
|
125
|
+
// id through every caller. The profile lookup itself stays the dispatcher's responsibility.
|
|
126
|
+
const QI_JUDGE_LOGIC_PROFILE = Object.freeze({
|
|
127
|
+
id: "qi:judge-logic",
|
|
128
|
+
requiredCapabilities: Object.freeze(["text"]),
|
|
129
|
+
tokenBudgetHint: 1024,
|
|
130
|
+
timeoutMsHint: 30_000,
|
|
131
|
+
retriesMax: 1,
|
|
132
|
+
cacheable: false,
|
|
133
|
+
temperatureHint: 0,
|
|
134
|
+
});
|
|
135
|
+
async function maybeRunJudges(ctx, candidates, modelRouted) {
|
|
136
|
+
if (modelRouted === undefined) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
if (candidates.length === 0) {
|
|
140
|
+
return modelRouted.initialBudget;
|
|
141
|
+
}
|
|
142
|
+
let budget = modelRouted.initialBudget;
|
|
143
|
+
if (ctx.modelGatewayCallCount >= ctx.limits.maxModelCallsPerRun) {
|
|
144
|
+
return budget;
|
|
145
|
+
}
|
|
146
|
+
const evidence = candidates.slice(0, 4).map((c) => ({
|
|
147
|
+
kind: "normalised-text",
|
|
148
|
+
value: `candidate:${String(c.id)}`,
|
|
149
|
+
}));
|
|
150
|
+
const result = await modelRouted.dispatch.dispatch({
|
|
151
|
+
profile: QI_JUDGE_LOGIC_PROFILE,
|
|
152
|
+
instruction: "Evaluate the listed candidates for logic defects (Keiko QI judge).",
|
|
153
|
+
evidence,
|
|
154
|
+
model: modelRouted.model,
|
|
155
|
+
providerConfig: modelRouted.providerConfig,
|
|
156
|
+
port: modelRouted.port,
|
|
157
|
+
cache: modelRouted.cache,
|
|
158
|
+
budget,
|
|
159
|
+
signal: ctx.signal,
|
|
160
|
+
});
|
|
161
|
+
ctx.modelGatewayCallCount += 1;
|
|
162
|
+
budget = result.budget;
|
|
163
|
+
return budget;
|
|
164
|
+
}
|
|
165
|
+
export async function runQualityIntelligenceValidation(input, deps) {
|
|
166
|
+
const ctx = contextFor(QI_VALIDATION_WORKFLOW_DESCRIPTOR, input.plan, deps);
|
|
167
|
+
emitQueuedAndStarted(ctx);
|
|
168
|
+
try {
|
|
169
|
+
await withStage(ctx, "plan", async () => Promise.resolve());
|
|
170
|
+
await withStage(ctx, "run-judges", async () => {
|
|
171
|
+
await maybeRunJudges(ctx, input.candidates, deps.modelRouted);
|
|
172
|
+
});
|
|
173
|
+
const rawFindings = await withStage(ctx, "reconcile", async () => Promise.resolve(validateCandidates(input.plan.id, input.candidates)));
|
|
174
|
+
const findings = truncateFindings(rawFindings, ctx.limits.maxFindingsPerRun);
|
|
175
|
+
emitFindingsRecorded(ctx, findings);
|
|
176
|
+
const evidence = await withStage(ctx, "report", async () => Promise.resolve(persistRun({
|
|
177
|
+
ctx,
|
|
178
|
+
status: "succeeded",
|
|
179
|
+
candidatesCount: input.candidates.length,
|
|
180
|
+
findings,
|
|
181
|
+
provenanceRefs: input.provenanceRefs,
|
|
182
|
+
completedAt: ctx.clock.nowIso(),
|
|
183
|
+
evidenceStore: deps.evidenceStore,
|
|
184
|
+
})));
|
|
185
|
+
emit(ctx, { kind: "run:succeeded" });
|
|
186
|
+
return Object.freeze({
|
|
187
|
+
runId: input.plan.id,
|
|
188
|
+
workflowId: ctx.descriptor.workflowId,
|
|
189
|
+
status: "succeeded",
|
|
190
|
+
eventsEmitted: ctx.sequence,
|
|
191
|
+
modelGatewayCallCount: ctx.modelGatewayCallCount,
|
|
192
|
+
evidence,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
catch (caught) {
|
|
196
|
+
return finaliseFailureOrCancellation(ctx, caught, {
|
|
197
|
+
candidatesCount: input.candidates.length,
|
|
198
|
+
findings: Object.freeze([]),
|
|
199
|
+
provenanceRefs: input.provenanceRefs,
|
|
200
|
+
evidenceStore: deps.evidenceStore,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// ─── qi:artifact-refinement ──────────────────────────────────────────────────
|
|
205
|
+
export async function runQualityIntelligenceArtifactRefinement(input, deps) {
|
|
206
|
+
const ctx = contextFor(QI_ARTIFACT_REFINEMENT_WORKFLOW_DESCRIPTOR, input.plan, deps);
|
|
207
|
+
emitQueuedAndStarted(ctx);
|
|
208
|
+
try {
|
|
209
|
+
await withStage(ctx, "plan", async () => Promise.resolve());
|
|
210
|
+
const refinedRaw = await withStage(ctx, "refine", async () => Promise.resolve(deduplicateCandidates(input.candidates)));
|
|
211
|
+
const refined = truncateCandidates(refinedRaw, ctx.limits.maxCandidatesPerRun);
|
|
212
|
+
emitCandidateProposed(ctx, refined);
|
|
213
|
+
const rawFindings = await withStage(ctx, "validate", async () => Promise.resolve(validateCandidates(input.plan.id, refined)));
|
|
214
|
+
const findings = truncateFindings(rawFindings, ctx.limits.maxFindingsPerRun);
|
|
215
|
+
emitFindingsRecorded(ctx, findings);
|
|
216
|
+
const evidence = await withStage(ctx, "report", async () => Promise.resolve(persistRun({
|
|
217
|
+
ctx,
|
|
218
|
+
status: "succeeded",
|
|
219
|
+
candidatesCount: refined.length,
|
|
220
|
+
findings,
|
|
221
|
+
provenanceRefs: input.provenanceRefs,
|
|
222
|
+
completedAt: ctx.clock.nowIso(),
|
|
223
|
+
evidenceStore: deps.evidenceStore,
|
|
224
|
+
})));
|
|
225
|
+
emit(ctx, { kind: "run:succeeded" });
|
|
226
|
+
return Object.freeze({
|
|
227
|
+
runId: input.plan.id,
|
|
228
|
+
workflowId: ctx.descriptor.workflowId,
|
|
229
|
+
status: "succeeded",
|
|
230
|
+
eventsEmitted: ctx.sequence,
|
|
231
|
+
modelGatewayCallCount: ctx.modelGatewayCallCount,
|
|
232
|
+
evidence,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
catch (caught) {
|
|
236
|
+
return finaliseFailureOrCancellation(ctx, caught, {
|
|
237
|
+
candidatesCount: input.candidates.length,
|
|
238
|
+
findings: Object.freeze([]),
|
|
239
|
+
provenanceRefs: input.provenanceRefs,
|
|
240
|
+
evidenceStore: deps.evidenceStore,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { QualityIntelligence as QI } from "@oscharko-dev/keiko-contracts";
|
|
2
|
+
import { type QualityIntelligenceCoverageMatrixRow, type QualityIntelligenceLocalStore, type QualityIntelligenceRecordInput, type QualityIntelligenceRecordOptions, type QualityIntelligenceRecordResult } from "@oscharko-dev/keiko-evidence";
|
|
3
|
+
import { type AtomCoverageStatus, type PolicyProfile } from "@oscharko-dev/keiko-quality-intelligence";
|
|
4
|
+
import type { QualityIntelligenceWorkflowDescriptor, QualityIntelligenceWorkflowLimits } from "./descriptors.js";
|
|
5
|
+
/** Sink for QI run events. Mirrors the harness EventSink shape but typed for the QI envelope. */
|
|
6
|
+
export interface QualityIntelligenceRunEventSink {
|
|
7
|
+
readonly emit: (event: QI.QualityIntelligenceRunEvent) => void;
|
|
8
|
+
}
|
|
9
|
+
/** Wall-clock port. Defaults to `Date.now`; injected for deterministic tests. */
|
|
10
|
+
export interface QualityIntelligenceClock {
|
|
11
|
+
readonly nowIso: () => string;
|
|
12
|
+
}
|
|
13
|
+
export declare const DEFAULT_CLOCK: QualityIntelligenceClock;
|
|
14
|
+
export type QualityIntelligenceProvenanceRefs = QualityIntelligenceRecordInput["provenanceRefs"];
|
|
15
|
+
export type QualityIntelligenceRunStatus = "succeeded" | "failed" | "cancelled";
|
|
16
|
+
export interface QualityIntelligenceRunSummary {
|
|
17
|
+
readonly runId: QI.QualityIntelligenceRunId;
|
|
18
|
+
readonly workflowId: QualityIntelligenceWorkflowDescriptor["workflowId"];
|
|
19
|
+
readonly status: QualityIntelligenceRunStatus;
|
|
20
|
+
readonly eventsEmitted: number;
|
|
21
|
+
readonly modelGatewayCallCount: number;
|
|
22
|
+
readonly evidence?: QualityIntelligenceRecordResult | undefined;
|
|
23
|
+
readonly reasonSummary?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Run quality score: the percentage of candidates with a strong judge outcome [0-100] (Epic #736).
|
|
26
|
+
* Null only when the judge stage was skipped/unavailable or there were no candidates to judge.
|
|
27
|
+
*/
|
|
28
|
+
readonly qualityScore?: number | null;
|
|
29
|
+
}
|
|
30
|
+
export interface RunContext {
|
|
31
|
+
readonly descriptor: QualityIntelligenceWorkflowDescriptor;
|
|
32
|
+
readonly plan: QI.QualityIntelligenceRunPlan;
|
|
33
|
+
readonly sink: QualityIntelligenceRunEventSink;
|
|
34
|
+
readonly clock: QualityIntelligenceClock;
|
|
35
|
+
readonly limits: QualityIntelligenceWorkflowLimits;
|
|
36
|
+
readonly profile: PolicyProfile;
|
|
37
|
+
readonly signal: AbortSignal | undefined;
|
|
38
|
+
sequence: number;
|
|
39
|
+
modelGatewayCallCount: number;
|
|
40
|
+
}
|
|
41
|
+
export interface RunContextInit {
|
|
42
|
+
readonly descriptor: QualityIntelligenceWorkflowDescriptor;
|
|
43
|
+
readonly plan: QI.QualityIntelligenceRunPlan;
|
|
44
|
+
readonly sink: QualityIntelligenceRunEventSink;
|
|
45
|
+
readonly clock?: QualityIntelligenceClock | undefined;
|
|
46
|
+
readonly limits?: QualityIntelligenceWorkflowLimits | undefined;
|
|
47
|
+
readonly policyProfile?: PolicyProfile | undefined;
|
|
48
|
+
readonly signal?: AbortSignal | undefined;
|
|
49
|
+
}
|
|
50
|
+
export declare function makeContext(init: RunContextInit): RunContext;
|
|
51
|
+
export declare function emit(ctx: RunContext, payload: QI.QualityIntelligenceRunEventPayload): void;
|
|
52
|
+
export declare function emitQueuedAndStarted(ctx: RunContext): void;
|
|
53
|
+
export declare class StageCancelledError extends Error {
|
|
54
|
+
constructor();
|
|
55
|
+
}
|
|
56
|
+
export declare function checkCancelled(ctx: RunContext): void;
|
|
57
|
+
export declare function safeReasonSummary(error: unknown): string;
|
|
58
|
+
export declare function withStage<T>(ctx: RunContext, stageName: string, body: () => Promise<T>): Promise<T>;
|
|
59
|
+
export declare function truncateCandidates(candidates: readonly QI.QualityIntelligenceTestCaseCandidate[], limit: number): readonly QI.QualityIntelligenceTestCaseCandidate[];
|
|
60
|
+
export declare function truncateFindings(findings: readonly QI.QualityIntelligenceValidationFinding[], limit: number): readonly QI.QualityIntelligenceValidationFinding[];
|
|
61
|
+
/**
|
|
62
|
+
* Project per-atom coverage statuses into persistable matrix rows (Epic #734). When the caller
|
|
63
|
+
* supplies `excerptByAtomId` (atom id -> already-redacted excerpt, see `buildRequirementExcerpt`),
|
|
64
|
+
* each row additionally carries `requirementExcerptRedacted` so coverage/traceability surfaces are
|
|
65
|
+
* auditor-readable (#790); rows without a map entry stay refs-only.
|
|
66
|
+
*/
|
|
67
|
+
export declare function toCoverageMatrixRows(statuses: readonly AtomCoverageStatus[], excerptByAtomId?: ReadonlyMap<string, string>): readonly QualityIntelligenceCoverageMatrixRow[];
|
|
68
|
+
/**
|
|
69
|
+
* Build the persistable coverage matrix for a run from its atoms + candidates. Used by every run
|
|
70
|
+
* path so coverage is persisted consistently (the scripted paths previously discarded it).
|
|
71
|
+
*/
|
|
72
|
+
export declare function coverageMatrixFor(runId: QI.QualityIntelligenceRunId, atoms: readonly QI.QualityIntelligenceEvidenceAtom[], candidates: readonly QI.QualityIntelligenceTestCaseCandidate[], excerptByAtomId?: ReadonlyMap<string, string>): readonly QualityIntelligenceCoverageMatrixRow[];
|
|
73
|
+
export declare function emitCandidateProposed(ctx: RunContext, candidates: readonly QI.QualityIntelligenceTestCaseCandidate[]): void;
|
|
74
|
+
export declare function emitFindingsRecorded(ctx: RunContext, findings: readonly QI.QualityIntelligenceValidationFinding[]): void;
|
|
75
|
+
export type EvidenceStatus = "running" | "succeeded" | "failed" | "cancelled";
|
|
76
|
+
export interface PersistArgs {
|
|
77
|
+
readonly ctx: RunContext;
|
|
78
|
+
readonly status: EvidenceStatus;
|
|
79
|
+
readonly candidatesCount: number;
|
|
80
|
+
readonly findings: readonly QI.QualityIntelligenceValidationFinding[];
|
|
81
|
+
readonly evidenceRefs?: QualityIntelligenceRecordInput["evidenceRefs"] | undefined;
|
|
82
|
+
readonly provenanceRefs: QualityIntelligenceProvenanceRefs;
|
|
83
|
+
readonly completedAt: string | undefined;
|
|
84
|
+
readonly evidenceStore: QualityIntelligenceLocalStore;
|
|
85
|
+
readonly coverageMatrix?: QualityIntelligenceRecordInput["coverageMatrix"];
|
|
86
|
+
readonly qualityScore?: number | null;
|
|
87
|
+
readonly redaction?: QualityIntelligenceRecordOptions["redaction"];
|
|
88
|
+
readonly sourceFingerprints?: QualityIntelligenceRecordInput["sourceFingerprints"];
|
|
89
|
+
readonly atomFingerprints?: QualityIntelligenceRecordInput["atomFingerprints"];
|
|
90
|
+
/** Model id that generated the candidates (Epic #761). */
|
|
91
|
+
readonly modelId?: string;
|
|
92
|
+
/** Redaction-safe request parameter scalars (Epic #761). */
|
|
93
|
+
readonly modelParameters?: Record<string, unknown>;
|
|
94
|
+
/** Seed used for deterministic sampling (Epic #761). */
|
|
95
|
+
readonly seedUsed?: number | null;
|
|
96
|
+
}
|
|
97
|
+
export declare function persistRun(args: PersistArgs): QualityIntelligenceRecordResult;
|
|
98
|
+
export interface FinaliseArgs {
|
|
99
|
+
readonly candidatesCount: number;
|
|
100
|
+
readonly findings: readonly QI.QualityIntelligenceValidationFinding[];
|
|
101
|
+
readonly evidenceRefs?: QualityIntelligenceRecordInput["evidenceRefs"] | undefined;
|
|
102
|
+
readonly provenanceRefs: QualityIntelligenceProvenanceRefs;
|
|
103
|
+
readonly evidenceStore: QualityIntelligenceLocalStore;
|
|
104
|
+
}
|
|
105
|
+
export declare function finaliseFailureOrCancellation(ctx: RunContext, caught: unknown, args: FinaliseArgs): QualityIntelligenceRunSummary;
|
|
106
|
+
//# sourceMappingURL=runtimeCommon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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C,IAAI,EAAE,WAAW,GAAG,+BAA+B,CAkC7E;AAID,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAC,oCAAoC,EAAE,CAAC;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,8BAA8B,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IACnF,QAAQ,CAAC,cAAc,EAAE,iCAAiC,CAAC;IAC3D,QAAQ,CAAC,aAAa,EAAE,6BAA6B,CAAC;CACvD;AAED,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,YAAY,GACjB,6BAA6B,CAuC/B"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
// Shared Quality Intelligence run-lifecycle runtime (Epic #270, Issue #273, ADR-0023 D6).
|
|
2
|
+
//
|
|
3
|
+
// Behaviour-preserving extraction of the run-event emission, stage tracking, cancellation, and
|
|
4
|
+
// evidence-persistence helpers shared by every QI run entry (the deterministic test-design /
|
|
5
|
+
// coverage / validation / refinement entries in `runEntries.ts` and the model-routed test-design
|
|
6
|
+
// entry in `modelRoutedTestDesign.ts`). NO new scheduler, NO event bus: this composes the existing
|
|
7
|
+
// Harness world and emits the versioned QI run-event envelope from `@oscharko-dev/keiko-contracts`.
|
|
8
|
+
import { QualityIntelligence as QI } from "@oscharko-dev/keiko-contracts";
|
|
9
|
+
import { recordQualityIntelligenceRun, } from "@oscharko-dev/keiko-evidence";
|
|
10
|
+
import { QualityIntelligenceSafeErrorException } from "@oscharko-dev/keiko-model-gateway";
|
|
11
|
+
import { buildAtomCoverageStatuses, buildCoverageMap, regressionDefault, } from "@oscharko-dev/keiko-quality-intelligence";
|
|
12
|
+
import { QUALITY_INTELLIGENCE_DEFAULT_RETENTION_PROFILE_ID } from "@oscharko-dev/keiko-evidence";
|
|
13
|
+
import { composeStageCancellation, isCancelled } from "./cancellation.js";
|
|
14
|
+
export const DEFAULT_CLOCK = Object.freeze({
|
|
15
|
+
nowIso: () => new Date().toISOString(),
|
|
16
|
+
});
|
|
17
|
+
export function makeContext(init) {
|
|
18
|
+
return {
|
|
19
|
+
descriptor: init.descriptor,
|
|
20
|
+
plan: init.plan,
|
|
21
|
+
sink: init.sink,
|
|
22
|
+
clock: init.clock ?? DEFAULT_CLOCK,
|
|
23
|
+
limits: init.limits ?? init.descriptor.defaultLimits,
|
|
24
|
+
profile: init.policyProfile ?? regressionDefault,
|
|
25
|
+
signal: init.signal,
|
|
26
|
+
sequence: 0,
|
|
27
|
+
modelGatewayCallCount: 0,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function nextSequence(ctx) {
|
|
31
|
+
const value = ctx.sequence;
|
|
32
|
+
ctx.sequence = value + 1;
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
export function emit(ctx, payload) {
|
|
36
|
+
const event = Object.freeze({
|
|
37
|
+
eventSchemaVersion: QI.QUALITY_INTELLIGENCE_EVENT_SCHEMA_VERSION,
|
|
38
|
+
runId: ctx.plan.id,
|
|
39
|
+
sequence: nextSequence(ctx),
|
|
40
|
+
timestamp: ctx.clock.nowIso(),
|
|
41
|
+
payload: Object.freeze(payload),
|
|
42
|
+
});
|
|
43
|
+
ctx.sink.emit(event);
|
|
44
|
+
}
|
|
45
|
+
export function emitQueuedAndStarted(ctx) {
|
|
46
|
+
emit(ctx, { kind: "run:queued" });
|
|
47
|
+
emit(ctx, { kind: "run:started" });
|
|
48
|
+
}
|
|
49
|
+
function assertStageRegistered(descriptor, stageName) {
|
|
50
|
+
if (!descriptor.stageNames.includes(stageName)) {
|
|
51
|
+
throw new Error(`Stage "${stageName}" is not declared by descriptor ${descriptor.workflowId}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class StageCancelledError extends Error {
|
|
55
|
+
constructor() {
|
|
56
|
+
super("Quality Intelligence run cancelled before completion");
|
|
57
|
+
this.name = "StageCancelledError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export function checkCancelled(ctx) {
|
|
61
|
+
if (isCancelled(ctx.signal)) {
|
|
62
|
+
throw new StageCancelledError();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Error names raised inside the QI server/workflow layers whose identity (and, for coded errors,
|
|
66
|
+
// whose `QI_*` code) is authored, static, and secret-free — safe to surface so a failed run stays
|
|
67
|
+
// actionable. Matched by name rather than `instanceof` because the coded server errors
|
|
68
|
+
// (QiGenerationError / QiIngestionError) live in a higher layer this package must not import.
|
|
69
|
+
const SAFE_QI_ERROR_NAMES = new Set([
|
|
70
|
+
"EmptyEvidenceError",
|
|
71
|
+
"UnparseableModelOutputError",
|
|
72
|
+
"QiGenerationError",
|
|
73
|
+
"QiIngestionError",
|
|
74
|
+
]);
|
|
75
|
+
const QI_ERROR_CODE_PATTERN = /^QI_[A-Z0-9_]+$/;
|
|
76
|
+
// Derive a redaction-safe, statically-bounded failure summary for a run/stage event (#279 AC3).
|
|
77
|
+
//
|
|
78
|
+
// FAIL-CLOSED: the raw `.message` of an arbitrary error is NEVER echoed. A productive model call
|
|
79
|
+
// rejects through the Keiko Model Gateway with a `GatewayError` whose message can carry the
|
|
80
|
+
// provider base URL, a deployment endpoint, or a credential-shaped substring (see
|
|
81
|
+
// keiko-server `conversation-audit.test.ts`); that string must not reach the SSE `reasonSummary`
|
|
82
|
+
// or any persisted field. Only three shapes produce a non-generic summary:
|
|
83
|
+
// 1. a QI safe-error exception -> its `qi/*` code (already secret-free by construction);
|
|
84
|
+
// 2. an allow-listed in-repo QI error -> its `QI_*` code when present, else its error name;
|
|
85
|
+
// 3. everything else (gateway/provider/unexpected) -> a fixed generic code, no message.
|
|
86
|
+
export function safeReasonSummary(error) {
|
|
87
|
+
if (error instanceof QualityIntelligenceSafeErrorException) {
|
|
88
|
+
return `qi-safe-error: ${error.safe.code}`;
|
|
89
|
+
}
|
|
90
|
+
if (error instanceof Error && SAFE_QI_ERROR_NAMES.has(error.name)) {
|
|
91
|
+
const code = error.code;
|
|
92
|
+
if (typeof code === "string" && QI_ERROR_CODE_PATTERN.test(code)) {
|
|
93
|
+
return `qi-error: ${code}`;
|
|
94
|
+
}
|
|
95
|
+
return `qi-error: ${error.name}`;
|
|
96
|
+
}
|
|
97
|
+
return "qi-run-error";
|
|
98
|
+
}
|
|
99
|
+
export async function withStage(ctx, stageName, body) {
|
|
100
|
+
assertStageRegistered(ctx.descriptor, stageName);
|
|
101
|
+
checkCancelled(ctx);
|
|
102
|
+
emit(ctx, { kind: "stage:started", stageName });
|
|
103
|
+
const handle = composeStageCancellation(ctx.signal);
|
|
104
|
+
try {
|
|
105
|
+
const result = await body();
|
|
106
|
+
checkCancelled(ctx);
|
|
107
|
+
emit(ctx, { kind: "stage:completed", stageName });
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
catch (caught) {
|
|
111
|
+
if (caught instanceof StageCancelledError) {
|
|
112
|
+
throw caught;
|
|
113
|
+
}
|
|
114
|
+
if (isCancelled(ctx.signal)) {
|
|
115
|
+
// The stage work threw because the run was cancelled mid-flight (e.g. the model call's
|
|
116
|
+
// AbortSignal fired and the gateway rejected). That is a cancellation, not a stage failure:
|
|
117
|
+
// do not emit stage:failed, and let the finaliser classify the run as "cancelled".
|
|
118
|
+
throw new StageCancelledError();
|
|
119
|
+
}
|
|
120
|
+
emit(ctx, { kind: "stage:failed", stageName, reasonSummary: safeReasonSummary(caught) });
|
|
121
|
+
throw caught;
|
|
122
|
+
}
|
|
123
|
+
finally {
|
|
124
|
+
handle.dispose();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// ─── Candidate / finding helpers ─────────────────────────────────────────────
|
|
128
|
+
export function truncateCandidates(candidates, limit) {
|
|
129
|
+
return candidates.length <= limit ? candidates : Object.freeze(candidates.slice(0, limit));
|
|
130
|
+
}
|
|
131
|
+
export function truncateFindings(findings, limit) {
|
|
132
|
+
return findings.length <= limit ? findings : Object.freeze(findings.slice(0, limit));
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Project per-atom coverage statuses into persistable matrix rows (Epic #734). When the caller
|
|
136
|
+
* supplies `excerptByAtomId` (atom id -> already-redacted excerpt, see `buildRequirementExcerpt`),
|
|
137
|
+
* each row additionally carries `requirementExcerptRedacted` so coverage/traceability surfaces are
|
|
138
|
+
* auditor-readable (#790); rows without a map entry stay refs-only.
|
|
139
|
+
*/
|
|
140
|
+
export function toCoverageMatrixRows(statuses, excerptByAtomId) {
|
|
141
|
+
return Object.freeze(statuses.map((s) => {
|
|
142
|
+
const excerpt = excerptByAtomId?.get(String(s.atomId));
|
|
143
|
+
return Object.freeze({
|
|
144
|
+
atomId: String(s.atomId),
|
|
145
|
+
status: s.status,
|
|
146
|
+
confidence: s.confidence,
|
|
147
|
+
coveringCandidateIds: Object.freeze(s.coveringCandidateIds.map(String)),
|
|
148
|
+
...(excerpt !== undefined ? { requirementExcerptRedacted: excerpt } : {}),
|
|
149
|
+
});
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Build the persistable coverage matrix for a run from its atoms + candidates. Used by every run
|
|
154
|
+
* path so coverage is persisted consistently (the scripted paths previously discarded it).
|
|
155
|
+
*/
|
|
156
|
+
export function coverageMatrixFor(runId, atoms, candidates, excerptByAtomId) {
|
|
157
|
+
const coverageMap = buildCoverageMap({ runId, atoms, candidates });
|
|
158
|
+
return toCoverageMatrixRows(buildAtomCoverageStatuses(atoms, coverageMap), excerptByAtomId);
|
|
159
|
+
}
|
|
160
|
+
export function emitCandidateProposed(ctx, candidates) {
|
|
161
|
+
for (const candidate of candidates) {
|
|
162
|
+
emit(ctx, {
|
|
163
|
+
kind: "candidate:proposed",
|
|
164
|
+
candidateId: candidate.id,
|
|
165
|
+
derivedFromAtomIds: candidate.derivedFromAtomIds,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export function emitFindingsRecorded(ctx, findings) {
|
|
170
|
+
for (const finding of findings) {
|
|
171
|
+
emit(ctx, { kind: "finding:recorded", findingId: finding.id });
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function mapFindingsToRows(findings) {
|
|
175
|
+
return Object.freeze(findings.map((f) => Object.freeze({
|
|
176
|
+
id: String(f.id),
|
|
177
|
+
kind: f.kind,
|
|
178
|
+
severity: f.severity,
|
|
179
|
+
summaryRedacted: f.summary,
|
|
180
|
+
...(f.candidateId !== undefined ? { candidateId: String(f.candidateId) } : {}),
|
|
181
|
+
})));
|
|
182
|
+
}
|
|
183
|
+
export function persistRun(args) {
|
|
184
|
+
const findingRows = mapFindingsToRows(args.findings);
|
|
185
|
+
const evidenceRefs = args.evidenceRefs ?? Object.freeze([]);
|
|
186
|
+
const input = {
|
|
187
|
+
runId: String(args.ctx.plan.id),
|
|
188
|
+
planAt: args.ctx.plan.requestedAt,
|
|
189
|
+
completedAt: args.completedAt,
|
|
190
|
+
status: args.status,
|
|
191
|
+
policyProfileIds: Object.freeze([args.ctx.profile.id]),
|
|
192
|
+
retentionPolicyId: QUALITY_INTELLIGENCE_DEFAULT_RETENTION_PROFILE_ID,
|
|
193
|
+
modelGatewayCallCount: args.ctx.modelGatewayCallCount,
|
|
194
|
+
totals: Object.freeze({
|
|
195
|
+
candidates: args.candidatesCount,
|
|
196
|
+
findings: findingRows.length,
|
|
197
|
+
exports: 0,
|
|
198
|
+
}),
|
|
199
|
+
findings: findingRows,
|
|
200
|
+
exports: Object.freeze([]),
|
|
201
|
+
evidenceRefs,
|
|
202
|
+
provenanceRefs: args.provenanceRefs,
|
|
203
|
+
coverageMatrix: args.coverageMatrix,
|
|
204
|
+
...(args.qualityScore !== undefined ? { qualityScore: args.qualityScore } : {}),
|
|
205
|
+
...(args.sourceFingerprints !== undefined
|
|
206
|
+
? { sourceFingerprints: args.sourceFingerprints }
|
|
207
|
+
: {}),
|
|
208
|
+
...(args.atomFingerprints !== undefined ? { atomFingerprints: args.atomFingerprints } : {}),
|
|
209
|
+
...(args.modelId !== undefined ? { modelId: args.modelId } : {}),
|
|
210
|
+
...(args.modelParameters !== undefined ? { modelParameters: args.modelParameters } : {}),
|
|
211
|
+
...(args.seedUsed !== undefined ? { seedUsed: args.seedUsed } : {}),
|
|
212
|
+
};
|
|
213
|
+
return recordQualityIntelligenceRun(input, {
|
|
214
|
+
store: args.evidenceStore,
|
|
215
|
+
...(args.redaction !== undefined ? { redaction: args.redaction } : {}),
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
export function finaliseFailureOrCancellation(ctx, caught, args) {
|
|
219
|
+
// A StageCancelledError, or any error raised while the run signal is aborted, is a cancellation
|
|
220
|
+
// (defense-in-depth: an abort-induced rejection that bypassed withStage must not look like a failure).
|
|
221
|
+
if (caught instanceof StageCancelledError || isCancelled(ctx.signal)) {
|
|
222
|
+
emit(ctx, { kind: "run:cancelled" });
|
|
223
|
+
return Object.freeze({
|
|
224
|
+
runId: ctx.plan.id,
|
|
225
|
+
workflowId: ctx.descriptor.workflowId,
|
|
226
|
+
status: "cancelled",
|
|
227
|
+
eventsEmitted: ctx.sequence,
|
|
228
|
+
modelGatewayCallCount: ctx.modelGatewayCallCount,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
const reasonSummary = safeReasonSummary(caught);
|
|
232
|
+
emit(ctx, { kind: "run:failed", reasonSummary });
|
|
233
|
+
let evidence;
|
|
234
|
+
try {
|
|
235
|
+
evidence = persistRun({
|
|
236
|
+
ctx,
|
|
237
|
+
status: "failed",
|
|
238
|
+
candidatesCount: args.candidatesCount,
|
|
239
|
+
findings: args.findings,
|
|
240
|
+
evidenceRefs: args.evidenceRefs,
|
|
241
|
+
provenanceRefs: args.provenanceRefs,
|
|
242
|
+
completedAt: ctx.clock.nowIso(),
|
|
243
|
+
evidenceStore: args.evidenceStore,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
evidence = undefined;
|
|
248
|
+
}
|
|
249
|
+
return Object.freeze({
|
|
250
|
+
runId: ctx.plan.id,
|
|
251
|
+
workflowId: ctx.descriptor.workflowId,
|
|
252
|
+
status: "failed",
|
|
253
|
+
eventsEmitted: ctx.sequence,
|
|
254
|
+
modelGatewayCallCount: ctx.modelGatewayCallCount,
|
|
255
|
+
evidence,
|
|
256
|
+
reasonSummary,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { QualityIntelligence as QI } from "@oscharko-dev/keiko-contracts";
|
|
2
|
+
import type { QualityIntelligenceModelRoutedTestDesignDeps } from "./modelRoutedTestDesign.js";
|
|
3
|
+
import type { QualityIntelligenceIngestedAtom } from "./modelRoutedTestDesign.js";
|
|
4
|
+
import type { QualityIntelligenceRunSummary, QualityIntelligenceProvenanceRefs } from "./runtimeCommon.js";
|
|
5
|
+
export interface ScopedRegenerationInput {
|
|
6
|
+
/** Fresh run id for the regenerated run (must be different from the original). */
|
|
7
|
+
readonly newRunId: string;
|
|
8
|
+
readonly requestedAt: string;
|
|
9
|
+
/** All envelopes from re-ingesting the current sources. */
|
|
10
|
+
readonly envelopes: readonly QI.QualityIntelligenceSourceEnvelope[];
|
|
11
|
+
/** NARROWED to atoms belonging to stale candidates only. */
|
|
12
|
+
readonly ingestedAtoms: readonly QualityIntelligenceIngestedAtom[];
|
|
13
|
+
readonly provenanceRefs: QualityIntelligenceProvenanceRefs;
|
|
14
|
+
}
|
|
15
|
+
export interface ScopedRegenerationResult {
|
|
16
|
+
readonly summary: QualityIntelligenceRunSummary;
|
|
17
|
+
/** Number of atoms that were submitted for regeneration. */
|
|
18
|
+
readonly narrowedAtomCount: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Run the model-routed test-design workflow scoped to a narrowed set of atoms. Returns the full run
|
|
22
|
+
* summary plus a count of narrowed atoms for caller bookkeeping. The caller is responsible for
|
|
23
|
+
* merging the regenerated candidates with preserved-fresh candidates from the original run.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runScopedRegeneration(input: ScopedRegenerationInput, deps: QualityIntelligenceModelRoutedTestDesignDeps): Promise<ScopedRegenerationResult>;
|
|
26
|
+
//# sourceMappingURL=scopedRegeneration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopedRegeneration.d.ts","sourceRoot":"","sources":["../../src/qualityIntelligence/scopedRegeneration.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,IAAI,EAAE,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,4BAA4B,CAAC;AAE/F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,oBAAoB,CAAC;AAW5B,MAAM,WAAW,uBAAuB;IACtC,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,iCAAiC,EAAE,CAAC;IACpE,4DAA4D;IAC5D,QAAQ,CAAC,aAAa,EAAE,SAAS,+BAA+B,EAAE,CAAC;IACnE,QAAQ,CAAC,cAAc,EAAE,iCAAiC,CAAC;CAC5D;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAChD,4DAA4D;IAC5D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,uBAAuB,EAC9B,IAAI,EAAE,4CAA4C,GACjD,OAAO,CAAC,wBAAwB,CAAC,CAmBnC"}
|