@mcoda/mswarm 0.1.89 → 0.1.91
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/codali-executor.d.ts +107 -6
- package/dist/codali-executor.d.ts.map +1 -1
- package/dist/codali-executor.js +500 -26
- package/dist/codali-executor.js.map +1 -1
- package/dist/runtime.d.ts +6 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +18 -5
- package/dist/runtime.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +18 -3
- package/dist/server.js.map +1 -1
- package/dist/vendor/codali/cli/DatasetCommand.d.ts +38 -0
- package/dist/vendor/codali/cli/DatasetCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/DatasetCommand.js +959 -0
- package/dist/vendor/codali/cli/EvalCommand.d.ts +3 -0
- package/dist/vendor/codali/cli/EvalCommand.d.ts.map +1 -1
- package/dist/vendor/codali/cli/EvalCommand.js +55 -1
- package/dist/vendor/codali/cli/ImprovementCommand.d.ts +97 -0
- package/dist/vendor/codali/cli/ImprovementCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/ImprovementCommand.js +1879 -0
- package/dist/vendor/codali/cli.d.ts.map +1 -1
- package/dist/vendor/codali/cli.js +15 -0
- package/dist/vendor/codali/dataset-cli.d.ts +3 -0
- package/dist/vendor/codali/dataset-cli.d.ts.map +1 -0
- package/dist/vendor/codali/dataset-cli.js +30 -0
- package/dist/vendor/codali/eval/CodaliGatewayLiveHarness.d.ts +90 -1
- package/dist/vendor/codali/eval/CodaliGatewayLiveHarness.d.ts.map +1 -1
- package/dist/vendor/codali/eval/CodaliGatewayLiveHarness.js +443 -9
- package/dist/vendor/codali/eval/GatewayDatasetEval.d.ts +70 -0
- package/dist/vendor/codali/eval/GatewayDatasetEval.d.ts.map +1 -0
- package/dist/vendor/codali/eval/GatewayDatasetEval.js +477 -0
- package/dist/vendor/codali/eval/GatewayEvalSuite.d.ts +52 -0
- package/dist/vendor/codali/eval/GatewayEvalSuite.d.ts.map +1 -1
- package/dist/vendor/codali/eval/GatewayEvalSuite.js +135 -1
- package/dist/vendor/codali/gateway/CodaliGateway.d.ts +4 -0
- package/dist/vendor/codali/gateway/CodaliGateway.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/CodaliGateway.js +37 -1
- package/dist/vendor/codali/gateway/CodaliGatewaySchemas.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/CodaliGatewaySchemas.js +0 -4
- package/dist/vendor/codali/gateway/CodaliGatewayStore.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/CodaliGatewayStore.js +1 -0
- package/dist/vendor/codali/gateway/GatewayPlanner.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/GatewayPlanner.js +355 -41
- package/dist/vendor/codali/gateway/GatewayStateMachine.d.ts +1 -0
- package/dist/vendor/codali/gateway/GatewayStateMachine.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/GatewayStateMachine.js +221 -5
- package/dist/vendor/codali/improvement/CandidateReleaseBuilder.d.ts +201 -0
- package/dist/vendor/codali/improvement/CandidateReleaseBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/CandidateReleaseBuilder.js +1175 -0
- package/dist/vendor/codali/improvement/DatasetEligibilityGate.d.ts +75 -0
- package/dist/vendor/codali/improvement/DatasetEligibilityGate.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/DatasetEligibilityGate.js +497 -0
- package/dist/vendor/codali/improvement/DatasetExportManifestReader.d.ts +88 -0
- package/dist/vendor/codali/improvement/DatasetExportManifestReader.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/DatasetExportManifestReader.js +333 -0
- package/dist/vendor/codali/improvement/DocdexRetrievalCandidateBuilder.d.ts +192 -0
- package/dist/vendor/codali/improvement/DocdexRetrievalCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/DocdexRetrievalCandidateBuilder.js +625 -0
- package/dist/vendor/codali/improvement/EvalReplayCandidateBuilder.d.ts +173 -0
- package/dist/vendor/codali/improvement/EvalReplayCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/EvalReplayCandidateBuilder.js +363 -0
- package/dist/vendor/codali/improvement/FineTuneJobPlanner.d.ts +281 -0
- package/dist/vendor/codali/improvement/FineTuneJobPlanner.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/FineTuneJobPlanner.js +823 -0
- package/dist/vendor/codali/improvement/ImprovementEvalRunner.d.ts +50 -0
- package/dist/vendor/codali/improvement/ImprovementEvalRunner.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ImprovementEvalRunner.js +648 -0
- package/dist/vendor/codali/improvement/ImprovementPolicy.d.ts +272 -0
- package/dist/vendor/codali/improvement/ImprovementPolicy.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ImprovementPolicy.js +1450 -0
- package/dist/vendor/codali/improvement/ModelRouterCandidateBuilder.d.ts +186 -0
- package/dist/vendor/codali/improvement/ModelRouterCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ModelRouterCandidateBuilder.js +880 -0
- package/dist/vendor/codali/improvement/OperatorInspector.d.ts +182 -0
- package/dist/vendor/codali/improvement/OperatorInspector.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/OperatorInspector.js +604 -0
- package/dist/vendor/codali/improvement/ProductionGovernance.d.ts +91 -0
- package/dist/vendor/codali/improvement/ProductionGovernance.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ProductionGovernance.js +329 -0
- package/dist/vendor/codali/improvement/PromptSchemaToolMetadataCandidateBuilder.d.ts +152 -0
- package/dist/vendor/codali/improvement/PromptSchemaToolMetadataCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/PromptSchemaToolMetadataCandidateBuilder.js +480 -0
- package/dist/vendor/codali/improvement/PublishOrchestrator.d.ts +113 -0
- package/dist/vendor/codali/improvement/PublishOrchestrator.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/PublishOrchestrator.js +590 -0
- package/dist/vendor/codali/improvement/ReleaseOutcomeReporter.d.ts +133 -0
- package/dist/vendor/codali/improvement/ReleaseOutcomeReporter.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ReleaseOutcomeReporter.js +501 -0
- package/dist/vendor/codali/improvement/StorageServiceImprovementClient.d.ts +71 -0
- package/dist/vendor/codali/improvement/StorageServiceImprovementClient.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/StorageServiceImprovementClient.js +245 -0
- package/dist/vendor/codali/index.d.ts +43 -0
- package/dist/vendor/codali/index.d.ts.map +1 -1
- package/dist/vendor/codali/index.js +21 -0
- package/dist/vendor/codali/runtime/CodaliRuntime.d.ts +0 -2
- package/dist/vendor/codali/runtime/CodaliRuntime.d.ts.map +1 -1
- package/dist/vendor/codali/runtime/CodaliRuntime.js +0 -5
- package/dist/vendor/codali/storage/CodaliDatasetPrivacyEngine.d.ts +138 -0
- package/dist/vendor/codali/storage/CodaliDatasetPrivacyEngine.d.ts.map +1 -0
- package/dist/vendor/codali/storage/CodaliDatasetPrivacyEngine.js +417 -0
- package/dist/vendor/codali/storage/CodaliFeedbackReviewIngestion.d.ts +50 -0
- package/dist/vendor/codali/storage/CodaliFeedbackReviewIngestion.d.ts.map +1 -0
- package/dist/vendor/codali/storage/CodaliFeedbackReviewIngestion.js +141 -0
- package/dist/vendor/codali/storage/CodaliStorageContracts.d.ts +337 -0
- package/dist/vendor/codali/storage/CodaliStorageContracts.d.ts.map +1 -0
- package/dist/vendor/codali/storage/CodaliStorageContracts.js +1555 -0
- package/dist/vendor/codali/storage/DatasetExportJob.d.ts +51 -0
- package/dist/vendor/codali/storage/DatasetExportJob.d.ts.map +1 -0
- package/dist/vendor/codali/storage/DatasetExportJob.js +358 -0
- package/dist/vendor/codali/storage/DatasetReviewQueue.d.ts +98 -0
- package/dist/vendor/codali/storage/DatasetReviewQueue.d.ts.map +1 -0
- package/dist/vendor/codali/storage/DatasetReviewQueue.js +426 -0
- package/dist/vendor/codali/storage/GatewayDatasetStore.d.ts +233 -0
- package/dist/vendor/codali/storage/GatewayDatasetStore.d.ts.map +1 -0
- package/dist/vendor/codali/storage/GatewayDatasetStore.js +2070 -0
- package/package.json +3 -3
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { CODALI_STORAGE_CONTRACT_SCHEMA_VERSION, } from "../storage/CodaliStorageContracts.js";
|
|
3
|
+
import { CODALI_DATASET_REPLAY_FIXTURE_SCHEMA_VERSION } from "../storage/DatasetExportJob.js";
|
|
4
|
+
import { createGatewayDatasetLocalOnlyObjectPrivacyFlags, } from "../storage/GatewayDatasetStore.js";
|
|
5
|
+
export const CODALI_GATEWAY_DATASET_EVAL_SCHEMA_VERSION = 1;
|
|
6
|
+
export const CODALI_GATEWAY_DATASET_EVAL_STAGES = [
|
|
7
|
+
"classifier",
|
|
8
|
+
"planner",
|
|
9
|
+
"tool_router",
|
|
10
|
+
"rag_retrieval",
|
|
11
|
+
"evidence_extractor",
|
|
12
|
+
"verifier",
|
|
13
|
+
"context_pack",
|
|
14
|
+
"final_answer",
|
|
15
|
+
"schema_repair",
|
|
16
|
+
"policy_event",
|
|
17
|
+
];
|
|
18
|
+
export const CODALI_GATEWAY_DATASET_EVAL_PROMPT_VERSIONS = {
|
|
19
|
+
classifier: "codali.gateway.dataset.classifier.prompt.v1",
|
|
20
|
+
planner: "codali.gateway.dataset.planner.prompt.v1",
|
|
21
|
+
tool_router: "codali.gateway.dataset.tool-router.prompt.v1",
|
|
22
|
+
rag_retrieval: "codali.gateway.dataset.rag-retrieval.prompt.v1",
|
|
23
|
+
evidence_extractor: "codali.gateway.dataset.evidence-extractor.prompt.v1",
|
|
24
|
+
verifier: "codali.gateway.dataset.verifier.prompt.v1",
|
|
25
|
+
context_pack: "codali.gateway.dataset.context-pack.prompt.v1",
|
|
26
|
+
final_answer: "codali.gateway.dataset.final-answer.prompt.v1",
|
|
27
|
+
schema_repair: "codali.gateway.dataset.schema-repair.prompt.v1",
|
|
28
|
+
policy_event: "codali.gateway.dataset.policy-event.prompt.v1",
|
|
29
|
+
};
|
|
30
|
+
export class CodaliGatewayDatasetEvalImportError extends Error {
|
|
31
|
+
constructor(code, message) {
|
|
32
|
+
super(`${code}: ${message}`);
|
|
33
|
+
this.name = "CodaliGatewayDatasetEvalImportError";
|
|
34
|
+
this.code = code;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const isRecord = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
38
|
+
const metadataString = (metadata, key) => {
|
|
39
|
+
const value = metadata?.[key];
|
|
40
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
|
|
41
|
+
};
|
|
42
|
+
const safeIdPart = (value) => value.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "record";
|
|
43
|
+
const uniqueInOrder = (values) => {
|
|
44
|
+
const seen = new Set();
|
|
45
|
+
const output = [];
|
|
46
|
+
for (const value of values) {
|
|
47
|
+
if (!value || seen.has(value))
|
|
48
|
+
continue;
|
|
49
|
+
seen.add(value);
|
|
50
|
+
output.push(value);
|
|
51
|
+
}
|
|
52
|
+
return output;
|
|
53
|
+
};
|
|
54
|
+
const emptyStageCounts = () => CODALI_GATEWAY_DATASET_EVAL_STAGES.reduce((output, stage) => {
|
|
55
|
+
output[stage] = 0;
|
|
56
|
+
return output;
|
|
57
|
+
}, {});
|
|
58
|
+
const stageFromMetadata = (metadata) => {
|
|
59
|
+
const explicitStage = metadataString(metadata, "evalStage")
|
|
60
|
+
?? metadataString(metadata, "eval_stage")
|
|
61
|
+
?? metadataString(metadata, "gatewayEvalStage")
|
|
62
|
+
?? metadataString(metadata, "gateway_eval_stage");
|
|
63
|
+
if (explicitStage
|
|
64
|
+
&& CODALI_GATEWAY_DATASET_EVAL_STAGES.includes(explicitStage)) {
|
|
65
|
+
return explicitStage;
|
|
66
|
+
}
|
|
67
|
+
const exampleType = metadataString(metadata, "exampleType")
|
|
68
|
+
?? metadataString(metadata, "example_type");
|
|
69
|
+
if (exampleType === "tool_decision")
|
|
70
|
+
return "tool_router";
|
|
71
|
+
if (exampleType === "rag_retrieval")
|
|
72
|
+
return "rag_retrieval";
|
|
73
|
+
if (exampleType === "evidence_item")
|
|
74
|
+
return "evidence_extractor";
|
|
75
|
+
if (exampleType === "context_pack")
|
|
76
|
+
return "context_pack";
|
|
77
|
+
if (exampleType === "final_answer" || exampleType === "gold_target")
|
|
78
|
+
return "final_answer";
|
|
79
|
+
if (exampleType === "schema_failure")
|
|
80
|
+
return "schema_repair";
|
|
81
|
+
if (exampleType === "policy_event")
|
|
82
|
+
return "policy_event";
|
|
83
|
+
if (exampleType !== "model_stage")
|
|
84
|
+
return undefined;
|
|
85
|
+
const role = metadataString(metadata, "role") ?? "";
|
|
86
|
+
if (role.includes("classifier"))
|
|
87
|
+
return "classifier";
|
|
88
|
+
if (role.includes("planner"))
|
|
89
|
+
return "planner";
|
|
90
|
+
if (role.includes("verifier"))
|
|
91
|
+
return "verifier";
|
|
92
|
+
if (role.includes("final"))
|
|
93
|
+
return "final_answer";
|
|
94
|
+
if (metadata?.schemaFailureRecordId || metadata?.repairAttempts)
|
|
95
|
+
return "schema_repair";
|
|
96
|
+
return undefined;
|
|
97
|
+
};
|
|
98
|
+
const stageForRecord = (record) => {
|
|
99
|
+
const stage = stageFromMetadata(record.metadata);
|
|
100
|
+
if (stage)
|
|
101
|
+
return stage;
|
|
102
|
+
if (record.datasetKind === "tool_trace")
|
|
103
|
+
return "tool_router";
|
|
104
|
+
if (record.datasetKind === "gateway_answer")
|
|
105
|
+
return "final_answer";
|
|
106
|
+
if (record.datasetKind === "evaluation")
|
|
107
|
+
return "evidence_extractor";
|
|
108
|
+
if (record.datasetKind === "model_call")
|
|
109
|
+
return "planner";
|
|
110
|
+
return undefined;
|
|
111
|
+
};
|
|
112
|
+
const refsForRecord = (record) => [
|
|
113
|
+
record.inputRef,
|
|
114
|
+
...(record.outputRef ? [record.outputRef] : []),
|
|
115
|
+
...(record.evidenceRefs ?? []),
|
|
116
|
+
];
|
|
117
|
+
const refsAllowEvalReplay = (record) => refsForRecord(record).every((ref) => ref.privacyFlags.evalAllowed && ref.privacyFlags.replayAllowed);
|
|
118
|
+
const taskTypeForStage = (stage) => {
|
|
119
|
+
if (stage === "tool_router")
|
|
120
|
+
return "product_tool_question";
|
|
121
|
+
if (stage === "policy_event")
|
|
122
|
+
return "disabled_integration_question";
|
|
123
|
+
if (stage === "rag_retrieval"
|
|
124
|
+
|| stage === "evidence_extractor"
|
|
125
|
+
|| stage === "context_pack"
|
|
126
|
+
|| stage === "planner"
|
|
127
|
+
|| stage === "verifier") {
|
|
128
|
+
return "code_repo_question";
|
|
129
|
+
}
|
|
130
|
+
return "generic_question";
|
|
131
|
+
};
|
|
132
|
+
const sourceTypeForRecord = (record) => metadataString(record.metadata, "sourceType")
|
|
133
|
+
?? metadataString(record.metadata, "source_type")
|
|
134
|
+
?? "docdex";
|
|
135
|
+
const toolForRecord = (record, fallback) => metadataString(record.metadata, "tool") ?? fallback;
|
|
136
|
+
const expectationsForStage = (stage, record) => {
|
|
137
|
+
const base = {
|
|
138
|
+
requiresFinalLargeModel: true,
|
|
139
|
+
maxLatencyMs: 8000,
|
|
140
|
+
maxTokens: 2400,
|
|
141
|
+
maxModelCalls: 5,
|
|
142
|
+
maxCostUsd: 0.35,
|
|
143
|
+
};
|
|
144
|
+
if (stage === "tool_router") {
|
|
145
|
+
const tool = toolForRecord(record, "app_tool_gateway");
|
|
146
|
+
return {
|
|
147
|
+
...base,
|
|
148
|
+
allowedTools: [tool],
|
|
149
|
+
requiredTools: [tool],
|
|
150
|
+
requiredSourceTypes: ["app_tool_gateway"],
|
|
151
|
+
requiresEvidence: true,
|
|
152
|
+
maxToolCalls: 2,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
if (stage === "rag_retrieval") {
|
|
156
|
+
return {
|
|
157
|
+
...base,
|
|
158
|
+
allowedTools: ["docdex_search"],
|
|
159
|
+
requiredTools: ["docdex_search"],
|
|
160
|
+
requiredSourceTypes: ["docdex"],
|
|
161
|
+
requiresEvidence: true,
|
|
162
|
+
maxToolCalls: 3,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
if (stage === "evidence_extractor" || stage === "context_pack") {
|
|
166
|
+
return {
|
|
167
|
+
...base,
|
|
168
|
+
allowedTools: ["docdex_search"],
|
|
169
|
+
requiredTools: ["docdex_search"],
|
|
170
|
+
requiredSourceTypes: [sourceTypeForRecord(record)],
|
|
171
|
+
requiresEvidence: true,
|
|
172
|
+
maxToolCalls: 3,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
if (stage === "verifier") {
|
|
176
|
+
return {
|
|
177
|
+
...base,
|
|
178
|
+
allowedTools: ["docdex_search"],
|
|
179
|
+
requiredTools: ["docdex_search"],
|
|
180
|
+
requiredSourceTypes: [sourceTypeForRecord(record)],
|
|
181
|
+
requiresEvidence: true,
|
|
182
|
+
maxToolCalls: 2,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
if (stage === "policy_event") {
|
|
186
|
+
return {
|
|
187
|
+
...base,
|
|
188
|
+
allowedTools: [],
|
|
189
|
+
deniedTools: [toolForRecord(record, "write_file")],
|
|
190
|
+
maxToolCalls: 0,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
...base,
|
|
195
|
+
allowedTools: [],
|
|
196
|
+
maxToolCalls: 0,
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
const summarizePayload = (payload) => {
|
|
200
|
+
if (!isRecord(payload))
|
|
201
|
+
return undefined;
|
|
202
|
+
for (const key of ["prompt", "query", "tool", "role", "eventType", "event_type"]) {
|
|
203
|
+
const value = payload[key];
|
|
204
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
205
|
+
return `${key}: ${value.trim().slice(0, 160)}`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return undefined;
|
|
209
|
+
};
|
|
210
|
+
const readObjectPayload = async (objectStore, ref) => {
|
|
211
|
+
if (!objectStore?.readObject)
|
|
212
|
+
return undefined;
|
|
213
|
+
return objectStore.readObject(ref);
|
|
214
|
+
};
|
|
215
|
+
const caseForRecord = async (input) => {
|
|
216
|
+
const payload = await readObjectPayload(input.objectStore, input.record.inputRef);
|
|
217
|
+
const payloadSummary = summarizePayload(payload);
|
|
218
|
+
const prompt = [
|
|
219
|
+
`Replay dataset-backed ${input.stage} example ${input.record.recordId}.`,
|
|
220
|
+
payloadSummary ? `Input ${payloadSummary}.` : "Use the imported object references as replay inputs.",
|
|
221
|
+
].join(" ");
|
|
222
|
+
const promptVersion = CODALI_GATEWAY_DATASET_EVAL_PROMPT_VERSIONS[input.stage];
|
|
223
|
+
const sourceObjectHashes = refsForRecord(input.record).map((ref) => ref.contentHash);
|
|
224
|
+
const dataset = {
|
|
225
|
+
source: "dataset_replay_fixture",
|
|
226
|
+
stage: input.stage,
|
|
227
|
+
sourceRecordId: input.record.recordId,
|
|
228
|
+
sourceGatewayRecordId: input.record.sourceGatewayRecordId,
|
|
229
|
+
datasetKind: input.record.datasetKind,
|
|
230
|
+
promptVersion,
|
|
231
|
+
schemaVersions: {
|
|
232
|
+
gatewayEval: 1,
|
|
233
|
+
datasetEval: CODALI_GATEWAY_DATASET_EVAL_SCHEMA_VERSION,
|
|
234
|
+
storageContract: CODALI_STORAGE_CONTRACT_SCHEMA_VERSION,
|
|
235
|
+
datasetReplayFixture: CODALI_DATASET_REPLAY_FIXTURE_SCHEMA_VERSION,
|
|
236
|
+
datasetRecord: CODALI_STORAGE_CONTRACT_SCHEMA_VERSION,
|
|
237
|
+
},
|
|
238
|
+
sourceObjectHashes,
|
|
239
|
+
replayFixtureId: input.fixtureId,
|
|
240
|
+
exportKind: input.fixture.exportKind,
|
|
241
|
+
generatedAt: input.fixture.generatedAt,
|
|
242
|
+
};
|
|
243
|
+
return {
|
|
244
|
+
id: `dataset-${input.stage}-${safeIdPart(input.record.recordId)}`,
|
|
245
|
+
type: taskTypeForStage(input.stage),
|
|
246
|
+
prompt,
|
|
247
|
+
expectations: expectationsForStage(input.stage, input.record),
|
|
248
|
+
dataset,
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
const parseFixtureRecord = (value, index) => {
|
|
252
|
+
if (!isRecord(value)) {
|
|
253
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_RECORD_INVALID", `Replay fixture record ${index + 1} is not an object.`);
|
|
254
|
+
}
|
|
255
|
+
if (typeof value.recordId !== "string" || value.recordId.length === 0) {
|
|
256
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_RECORD_ID_MISSING", `Replay fixture record ${index + 1} is missing recordId.`);
|
|
257
|
+
}
|
|
258
|
+
if (typeof value.datasetKind !== "string") {
|
|
259
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_KIND_MISSING", `Replay fixture record ${value.recordId} is missing datasetKind.`);
|
|
260
|
+
}
|
|
261
|
+
if (!isRecord(value.inputRef)) {
|
|
262
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_INPUT_REF_MISSING", `Replay fixture record ${value.recordId} is missing inputRef.`);
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
recordId: value.recordId,
|
|
266
|
+
datasetKind: value.datasetKind,
|
|
267
|
+
sourceGatewayRecordId: typeof value.sourceGatewayRecordId === "string"
|
|
268
|
+
? value.sourceGatewayRecordId
|
|
269
|
+
: undefined,
|
|
270
|
+
inputRef: value.inputRef,
|
|
271
|
+
outputRef: isRecord(value.outputRef)
|
|
272
|
+
? value.outputRef
|
|
273
|
+
: undefined,
|
|
274
|
+
evidenceRefs: Array.isArray(value.evidenceRefs)
|
|
275
|
+
? value.evidenceRefs.filter(isRecord).map((ref) => ref)
|
|
276
|
+
: undefined,
|
|
277
|
+
quality: isRecord(value.quality) ? value.quality : undefined,
|
|
278
|
+
metadata: isRecord(value.metadata) ? value.metadata : undefined,
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
export const parseCodaliGatewayDatasetReplayFixture = (fixture) => {
|
|
282
|
+
if (!isRecord(fixture)) {
|
|
283
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_FIXTURE_INVALID", "Replay fixture must be a JSON object.");
|
|
284
|
+
}
|
|
285
|
+
if (fixture.schemaVersion !== CODALI_DATASET_REPLAY_FIXTURE_SCHEMA_VERSION) {
|
|
286
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_FIXTURE_SCHEMA_UNSUPPORTED", `Unsupported replay fixture schemaVersion: ${String(fixture.schemaVersion)}.`);
|
|
287
|
+
}
|
|
288
|
+
if (typeof fixture.exportKind !== "string") {
|
|
289
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_EXPORT_KIND_MISSING", "Replay fixture is missing exportKind.");
|
|
290
|
+
}
|
|
291
|
+
if (typeof fixture.generatedAt !== "string") {
|
|
292
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_GENERATED_AT_MISSING", "Replay fixture is missing generatedAt.");
|
|
293
|
+
}
|
|
294
|
+
if (!Array.isArray(fixture.records)) {
|
|
295
|
+
throw new CodaliGatewayDatasetEvalImportError("CODALI_GATEWAY_DATASET_EVAL_RECORDS_MISSING", "Replay fixture is missing records.");
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
schemaVersion: CODALI_DATASET_REPLAY_FIXTURE_SCHEMA_VERSION,
|
|
299
|
+
exportKind: fixture.exportKind,
|
|
300
|
+
generatedAt: fixture.generatedAt,
|
|
301
|
+
records: fixture.records.map(parseFixtureRecord),
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
export const importCodaliGatewayDatasetReplayFixture = async (options) => {
|
|
305
|
+
const fixture = parseCodaliGatewayDatasetReplayFixture(options.fixture);
|
|
306
|
+
const now = options.now ?? (() => new Date());
|
|
307
|
+
const limitPerStage = options.limitPerStage ?? 1;
|
|
308
|
+
const stages = options.stages ?? CODALI_GATEWAY_DATASET_EVAL_STAGES;
|
|
309
|
+
const stageSet = new Set(stages);
|
|
310
|
+
const stageCounts = emptyStageCounts();
|
|
311
|
+
const skippedRecords = [];
|
|
312
|
+
const cases = [];
|
|
313
|
+
for (const record of fixture.records) {
|
|
314
|
+
const stage = stageForRecord(record);
|
|
315
|
+
if (!stage || !stageSet.has(stage)) {
|
|
316
|
+
skippedRecords.push({ recordId: record.recordId, reason: "stage_not_selected" });
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
if (!refsAllowEvalReplay(record)) {
|
|
320
|
+
skippedRecords.push({ recordId: record.recordId, stage, reason: "eval_or_replay_not_allowed" });
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if (stageCounts[stage] >= limitPerStage) {
|
|
324
|
+
skippedRecords.push({ recordId: record.recordId, stage, reason: "stage_limit_reached" });
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
cases.push(await caseForRecord({
|
|
328
|
+
record,
|
|
329
|
+
stage,
|
|
330
|
+
fixture,
|
|
331
|
+
fixtureId: options.fixtureId,
|
|
332
|
+
objectStore: options.objectStore,
|
|
333
|
+
}));
|
|
334
|
+
stageCounts[stage] += 1;
|
|
335
|
+
}
|
|
336
|
+
const sourceRecordIds = cases.map((evalCase) => evalCase.dataset?.sourceRecordId);
|
|
337
|
+
const sourceGatewayRecordIds = cases.map((evalCase) => evalCase.dataset?.sourceGatewayRecordId);
|
|
338
|
+
const sourceObjectHashes = cases.flatMap((evalCase) => evalCase.dataset?.sourceObjectHashes ?? []);
|
|
339
|
+
return {
|
|
340
|
+
cases,
|
|
341
|
+
lineage: {
|
|
342
|
+
schemaVersion: CODALI_GATEWAY_DATASET_EVAL_SCHEMA_VERSION,
|
|
343
|
+
source: "dataset_replay_fixture",
|
|
344
|
+
fixtureId: options.fixtureId,
|
|
345
|
+
fixtureSchemaVersion: CODALI_DATASET_REPLAY_FIXTURE_SCHEMA_VERSION,
|
|
346
|
+
exportKind: fixture.exportKind,
|
|
347
|
+
generatedAt: fixture.generatedAt,
|
|
348
|
+
importedAt: now().toISOString(),
|
|
349
|
+
selectedRecordCount: cases.length,
|
|
350
|
+
skippedRecordCount: skippedRecords.length,
|
|
351
|
+
sourceRecordIds: uniqueInOrder(sourceRecordIds),
|
|
352
|
+
sourceGatewayRecordIds: uniqueInOrder(sourceGatewayRecordIds),
|
|
353
|
+
sourceObjectHashes: uniqueInOrder(sourceObjectHashes),
|
|
354
|
+
stageCounts,
|
|
355
|
+
skippedRecords,
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
const sha256 = (value) => createHash("sha256").update(value).digest("hex");
|
|
360
|
+
const defaultObjectRef = (stage, recordId, part) => {
|
|
361
|
+
const hash = sha256(`${stage}:${recordId}:${part}`);
|
|
362
|
+
return {
|
|
363
|
+
schemaVersion: CODALI_STORAGE_CONTRACT_SCHEMA_VERSION,
|
|
364
|
+
refId: `ref-${safeIdPart(recordId)}-${part}`,
|
|
365
|
+
kind: part === "evidence" ? "evidence" : "dataset",
|
|
366
|
+
contentHash: `sha256:${hash}`,
|
|
367
|
+
byteSize: 128,
|
|
368
|
+
mimeType: "application/json",
|
|
369
|
+
privacyFlags: createGatewayDatasetLocalOnlyObjectPrivacyFlags({
|
|
370
|
+
containsPersonalData: false,
|
|
371
|
+
containsTenantPrivateData: false,
|
|
372
|
+
containsCustomerData: false,
|
|
373
|
+
exportAllowed: true,
|
|
374
|
+
evalAllowed: true,
|
|
375
|
+
replayAllowed: true,
|
|
376
|
+
trainingAllowed: false,
|
|
377
|
+
}),
|
|
378
|
+
ownerScope: {
|
|
379
|
+
tenantHash: "tenant-local-hash",
|
|
380
|
+
productId: "product-neutral",
|
|
381
|
+
deploymentId: "local",
|
|
382
|
+
runId: "gateway-dataset-eval",
|
|
383
|
+
ownerType: "dataset_record",
|
|
384
|
+
ownerId: recordId,
|
|
385
|
+
},
|
|
386
|
+
deletionGroupId: `dg-${safeIdPart(recordId)}`,
|
|
387
|
+
retentionClass: "dataset",
|
|
388
|
+
metadata: { part },
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
const defaultFixtureRecord = (stage, input) => {
|
|
392
|
+
const recordId = `default-${stage}`;
|
|
393
|
+
return {
|
|
394
|
+
recordId,
|
|
395
|
+
datasetKind: input.datasetKind,
|
|
396
|
+
sourceGatewayRecordId: "default-gateway-run",
|
|
397
|
+
inputRef: defaultObjectRef(stage, recordId, "input"),
|
|
398
|
+
outputRef: defaultObjectRef(stage, recordId, "output"),
|
|
399
|
+
evidenceRefs: input.sourceType ? [defaultObjectRef(stage, recordId, "evidence")] : undefined,
|
|
400
|
+
quality: {
|
|
401
|
+
score: 0.9,
|
|
402
|
+
labels: [`eval:${stage}`, "reviewed:auto"],
|
|
403
|
+
reviewed: true,
|
|
404
|
+
},
|
|
405
|
+
metadata: {
|
|
406
|
+
evalStage: stage,
|
|
407
|
+
exampleType: input.exampleType,
|
|
408
|
+
role: input.role,
|
|
409
|
+
tool: input.tool,
|
|
410
|
+
sourceType: input.sourceType,
|
|
411
|
+
collectionMode: "gateway_dataset_eval_default",
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
export const createDefaultCodaliGatewayDatasetReplayFixture = () => ({
|
|
416
|
+
schemaVersion: CODALI_DATASET_REPLAY_FIXTURE_SCHEMA_VERSION,
|
|
417
|
+
exportKind: "eval-replay",
|
|
418
|
+
generatedAt: new Date(0).toISOString(),
|
|
419
|
+
records: [
|
|
420
|
+
defaultFixtureRecord("classifier", {
|
|
421
|
+
datasetKind: "model_call",
|
|
422
|
+
exampleType: "model_stage",
|
|
423
|
+
role: "classifier",
|
|
424
|
+
}),
|
|
425
|
+
defaultFixtureRecord("planner", {
|
|
426
|
+
datasetKind: "model_call",
|
|
427
|
+
exampleType: "model_stage",
|
|
428
|
+
role: "planner",
|
|
429
|
+
}),
|
|
430
|
+
defaultFixtureRecord("tool_router", {
|
|
431
|
+
datasetKind: "tool_trace",
|
|
432
|
+
exampleType: "tool_decision",
|
|
433
|
+
tool: "app_tool_gateway",
|
|
434
|
+
}),
|
|
435
|
+
defaultFixtureRecord("rag_retrieval", {
|
|
436
|
+
datasetKind: "tool_trace",
|
|
437
|
+
exampleType: "rag_retrieval",
|
|
438
|
+
tool: "docdex_search",
|
|
439
|
+
sourceType: "docdex",
|
|
440
|
+
}),
|
|
441
|
+
defaultFixtureRecord("evidence_extractor", {
|
|
442
|
+
datasetKind: "evaluation",
|
|
443
|
+
exampleType: "evidence_item",
|
|
444
|
+
sourceType: "docdex",
|
|
445
|
+
}),
|
|
446
|
+
defaultFixtureRecord("verifier", {
|
|
447
|
+
datasetKind: "model_call",
|
|
448
|
+
exampleType: "model_stage",
|
|
449
|
+
role: "verifier",
|
|
450
|
+
sourceType: "docdex",
|
|
451
|
+
}),
|
|
452
|
+
defaultFixtureRecord("context_pack", {
|
|
453
|
+
datasetKind: "evaluation",
|
|
454
|
+
exampleType: "context_pack",
|
|
455
|
+
sourceType: "docdex",
|
|
456
|
+
}),
|
|
457
|
+
defaultFixtureRecord("final_answer", {
|
|
458
|
+
datasetKind: "gateway_answer",
|
|
459
|
+
exampleType: "final_answer",
|
|
460
|
+
}),
|
|
461
|
+
defaultFixtureRecord("schema_repair", {
|
|
462
|
+
datasetKind: "evaluation",
|
|
463
|
+
exampleType: "schema_failure",
|
|
464
|
+
role: "planner",
|
|
465
|
+
}),
|
|
466
|
+
defaultFixtureRecord("policy_event", {
|
|
467
|
+
datasetKind: "tool_trace",
|
|
468
|
+
exampleType: "policy_event",
|
|
469
|
+
tool: "write_file",
|
|
470
|
+
}),
|
|
471
|
+
],
|
|
472
|
+
});
|
|
473
|
+
export const createDefaultCodaliGatewayDatasetEvalImport = async () => importCodaliGatewayDatasetReplayFixture({
|
|
474
|
+
fixture: createDefaultCodaliGatewayDatasetReplayFixture(),
|
|
475
|
+
fixtureId: "codali-gateway-dataset-default-eval-replay",
|
|
476
|
+
now: () => new Date(0),
|
|
477
|
+
});
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import type { PercentileMetric, RateMetric } from "./MetricTypes.js";
|
|
2
2
|
import type { CodaliGatewayModelTier } from "../gateway/CodaliGatewayTypes.js";
|
|
3
|
+
import { CODALI_GATEWAY_DATASET_EVAL_SCHEMA_VERSION, type CodaliGatewayDatasetEvalImportLineage, type CodaliGatewayDatasetEvalStage } from "./GatewayDatasetEval.js";
|
|
3
4
|
export type CodaliGatewayEvalTaskType = "generic_question" | "code_repo_question" | "encrypted_docdex_search_question" | "product_tool_question" | "disabled_integration_question" | "image_generation_question" | "missing_evidence_question";
|
|
4
5
|
export type CodaliGatewayEvalRunStatus = "passed" | "failed";
|
|
6
|
+
export interface CodaliGatewayEvalDatasetSchemaVersions {
|
|
7
|
+
gatewayEval: 1;
|
|
8
|
+
datasetEval: typeof CODALI_GATEWAY_DATASET_EVAL_SCHEMA_VERSION;
|
|
9
|
+
storageContract: string;
|
|
10
|
+
datasetReplayFixture: string;
|
|
11
|
+
datasetRecord: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CodaliGatewayEvalDatasetMetadata {
|
|
14
|
+
source: "dataset_replay_fixture";
|
|
15
|
+
stage: CodaliGatewayDatasetEvalStage;
|
|
16
|
+
sourceRecordId: string;
|
|
17
|
+
sourceGatewayRecordId?: string;
|
|
18
|
+
datasetKind: string;
|
|
19
|
+
promptVersion: string;
|
|
20
|
+
schemaVersions: CodaliGatewayEvalDatasetSchemaVersions;
|
|
21
|
+
sourceObjectHashes: string[];
|
|
22
|
+
replayFixtureId?: string;
|
|
23
|
+
exportKind?: string;
|
|
24
|
+
generatedAt?: string;
|
|
25
|
+
}
|
|
5
26
|
export interface CodaliGatewayEvalCaseExpectations {
|
|
6
27
|
allowedTools?: string[];
|
|
7
28
|
deniedTools?: string[];
|
|
@@ -23,6 +44,7 @@ export interface CodaliGatewayEvalCase {
|
|
|
23
44
|
type: CodaliGatewayEvalTaskType;
|
|
24
45
|
prompt: string;
|
|
25
46
|
expectations: CodaliGatewayEvalCaseExpectations;
|
|
47
|
+
dataset?: CodaliGatewayEvalDatasetMetadata;
|
|
26
48
|
}
|
|
27
49
|
export interface CodaliGatewayEvalEvidenceRecord {
|
|
28
50
|
id: string;
|
|
@@ -89,6 +111,7 @@ export interface CodaliGatewayEvalCaseResult {
|
|
|
89
111
|
costUsd?: number;
|
|
90
112
|
toolCallCount?: number;
|
|
91
113
|
modelCallCount?: number;
|
|
114
|
+
dataset?: CodaliGatewayEvalDatasetMetadata;
|
|
92
115
|
}
|
|
93
116
|
export interface CodaliGatewayEvalMetrics {
|
|
94
117
|
schemaVersion: 1;
|
|
@@ -106,6 +129,10 @@ export interface CodaliGatewayEvalMetrics {
|
|
|
106
129
|
costUsd: PercentileMetric;
|
|
107
130
|
toolCallCount: PercentileMetric;
|
|
108
131
|
modelCallCount: PercentileMetric;
|
|
132
|
+
datasetCaseCount: number;
|
|
133
|
+
datasetStageCoverageRate: RateMetric;
|
|
134
|
+
datasetLineageCoverageRate: RateMetric;
|
|
135
|
+
promptSchemaVersionCoverageRate: RateMetric;
|
|
109
136
|
}
|
|
110
137
|
export interface CodaliGatewayEvalThresholds {
|
|
111
138
|
plannerSchemaValidityMin: number;
|
|
@@ -119,6 +146,9 @@ export interface CodaliGatewayEvalThresholds {
|
|
|
119
146
|
costP95UsdMax?: number;
|
|
120
147
|
latencyRegressionRatioMax: number;
|
|
121
148
|
costRegressionRatioMax: number;
|
|
149
|
+
datasetStageCoverageMin: number;
|
|
150
|
+
datasetLineageCoverageMin: number;
|
|
151
|
+
promptSchemaVersionCoverageMin: number;
|
|
122
152
|
}
|
|
123
153
|
export interface CodaliGatewayEvalMetricDelta {
|
|
124
154
|
key: "latency_ms.p95" | "cost_usd.p95" | "tokens_used.p95";
|
|
@@ -152,6 +182,23 @@ export interface CodaliGatewayEvalGateResult {
|
|
|
152
182
|
thresholds: CodaliGatewayEvalThresholds;
|
|
153
183
|
failures: CodaliGatewayEvalGateFailure[];
|
|
154
184
|
}
|
|
185
|
+
export interface CodaliGatewayEvalReportLineage {
|
|
186
|
+
schemaVersion: 1;
|
|
187
|
+
source: "static_cases" | "dataset_replay_fixture" | "mixed";
|
|
188
|
+
staticCaseIds: string[];
|
|
189
|
+
dataset?: CodaliGatewayDatasetEvalImportLineage;
|
|
190
|
+
datasetSourceRecordIds: string[];
|
|
191
|
+
datasetSourceGatewayRecordIds: string[];
|
|
192
|
+
datasetSourceObjectHashes: string[];
|
|
193
|
+
datasetStageCounts: Record<CodaliGatewayDatasetEvalStage, number>;
|
|
194
|
+
}
|
|
195
|
+
export interface CodaliGatewayEvalReportVersions {
|
|
196
|
+
schemaVersion: 1;
|
|
197
|
+
gatewayEval: 1;
|
|
198
|
+
datasetEval: typeof CODALI_GATEWAY_DATASET_EVAL_SCHEMA_VERSION;
|
|
199
|
+
promptVersions: Record<string, string>;
|
|
200
|
+
schemaVersions: Record<string, string | number>;
|
|
201
|
+
}
|
|
155
202
|
export interface CodaliGatewayEvalReport {
|
|
156
203
|
schemaVersion: 1;
|
|
157
204
|
reportId: string;
|
|
@@ -165,6 +212,8 @@ export interface CodaliGatewayEvalReport {
|
|
|
165
212
|
metrics: CodaliGatewayEvalMetrics;
|
|
166
213
|
regression: CodaliGatewayEvalRegressionComparison;
|
|
167
214
|
gates: CodaliGatewayEvalGateResult;
|
|
215
|
+
lineage: CodaliGatewayEvalReportLineage;
|
|
216
|
+
versions: CodaliGatewayEvalReportVersions;
|
|
168
217
|
summary: {
|
|
169
218
|
status: CodaliGatewayEvalRunStatus;
|
|
170
219
|
total: number;
|
|
@@ -182,6 +231,9 @@ export interface CodaliGatewayEvalSuiteOptions {
|
|
|
182
231
|
runner?: CodaliGatewayEvalRunner;
|
|
183
232
|
thresholds?: Partial<CodaliGatewayEvalThresholds>;
|
|
184
233
|
baseline?: CodaliGatewayEvalReport | CodaliGatewayEvalMetrics;
|
|
234
|
+
datasetCases?: CodaliGatewayEvalCase[];
|
|
235
|
+
datasetLineage?: CodaliGatewayDatasetEvalImportLineage;
|
|
236
|
+
includeDatasetCases?: boolean;
|
|
185
237
|
}
|
|
186
238
|
export declare const DEFAULT_CODALI_GATEWAY_EVAL_THRESHOLDS: CodaliGatewayEvalThresholds;
|
|
187
239
|
export declare const CODALI_GATEWAY_EVAL_CASES: CodaliGatewayEvalCase[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatewayEvalSuite.d.ts","sourceRoot":"","sources":["../../src/eval/GatewayEvalSuite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"GatewayEvalSuite.d.ts","sourceRoot":"","sources":["../../src/eval/GatewayEvalSuite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAEL,0CAA0C,EAG1C,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EACnC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,yBAAyB,GACjC,kBAAkB,GAClB,oBAAoB,GACpB,kCAAkC,GAClC,uBAAuB,GACvB,+BAA+B,GAC/B,2BAA2B,GAC3B,2BAA2B,CAAC;AAEhC,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7D,MAAM,WAAW,sCAAsC;IACrD,WAAW,EAAE,CAAC,CAAC;IACf,WAAW,EAAE,OAAO,0CAA0C,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