ppef 1.0.0 → 1.1.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/README.md +172 -0
- package/bin/ppef.mjs +20 -0
- package/dist/__tests__/framework-pipeline.integration.test.d.ts +7 -0
- package/dist/__tests__/framework-pipeline.integration.test.d.ts.map +1 -0
- package/dist/__tests__/framework-pipeline.integration.test.js +415 -0
- package/dist/__tests__/framework-pipeline.integration.test.js.map +1 -0
- package/dist/__tests__/index-exports.unit.test.d.ts +8 -0
- package/dist/__tests__/index-exports.unit.test.d.ts.map +1 -0
- package/dist/__tests__/index-exports.unit.test.js +127 -0
- package/dist/__tests__/index-exports.unit.test.js.map +1 -0
- package/dist/__tests__/registry-executor.integration.test.d.ts +5 -0
- package/dist/__tests__/registry-executor.integration.test.d.ts.map +1 -0
- package/dist/__tests__/registry-executor.integration.test.js +352 -0
- package/dist/__tests__/registry-executor.integration.test.js.map +1 -0
- package/dist/__tests__/test-helpers.d.ts +94 -0
- package/dist/__tests__/test-helpers.d.ts.map +1 -0
- package/dist/__tests__/test-helpers.js +271 -0
- package/dist/__tests__/test-helpers.js.map +1 -0
- package/dist/aggregation/__tests__/aggregators.unit.test.d.ts +7 -0
- package/dist/aggregation/__tests__/aggregators.unit.test.d.ts.map +1 -0
- package/dist/aggregation/__tests__/aggregators.unit.test.js +350 -0
- package/dist/aggregation/__tests__/aggregators.unit.test.js.map +1 -0
- package/dist/aggregation/__tests__/pipeline.unit.test.d.ts +7 -0
- package/dist/aggregation/__tests__/pipeline.unit.test.d.ts.map +1 -0
- package/dist/aggregation/__tests__/pipeline.unit.test.js +213 -0
- package/dist/aggregation/__tests__/pipeline.unit.test.js.map +1 -0
- package/dist/aggregation/aggregators.d.ts +63 -0
- package/dist/aggregation/aggregators.d.ts.map +1 -0
- package/dist/aggregation/aggregators.js +228 -0
- package/dist/aggregation/aggregators.js.map +1 -0
- package/dist/aggregation/index.d.ts +8 -0
- package/dist/aggregation/index.d.ts.map +1 -0
- package/dist/aggregation/index.js +8 -0
- package/dist/aggregation/index.js.map +1 -0
- package/dist/aggregation/pipeline.d.ts +38 -0
- package/dist/aggregation/pipeline.d.ts.map +1 -0
- package/dist/aggregation/pipeline.js +198 -0
- package/dist/aggregation/pipeline.js.map +1 -0
- package/dist/claims/__tests__/evaluator.unit.test.d.ts +12 -0
- package/dist/claims/__tests__/evaluator.unit.test.d.ts.map +1 -0
- package/dist/claims/__tests__/evaluator.unit.test.js +801 -0
- package/dist/claims/__tests__/evaluator.unit.test.js.map +1 -0
- package/dist/claims/evaluator.d.ts +33 -0
- package/dist/claims/evaluator.d.ts.map +1 -0
- package/dist/claims/evaluator.js +174 -0
- package/dist/claims/evaluator.js.map +1 -0
- package/dist/claims/index.d.ts +7 -0
- package/dist/claims/index.d.ts.map +1 -0
- package/dist/claims/index.js +7 -0
- package/dist/claims/index.js.map +1 -0
- package/dist/cli/__tests__/aggregate.command.unit.test.d.ts +7 -0
- package/dist/cli/__tests__/aggregate.command.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/aggregate.command.unit.test.js +396 -0
- package/dist/cli/__tests__/aggregate.command.unit.test.js.map +1 -0
- package/dist/cli/__tests__/commands.unit.test.d.ts +10 -0
- package/dist/cli/__tests__/commands.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/commands.unit.test.js +217 -0
- package/dist/cli/__tests__/commands.unit.test.js.map +1 -0
- package/dist/cli/__tests__/index.unit.test.d.ts +10 -0
- package/dist/cli/__tests__/index.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/index.unit.test.js +65 -0
- package/dist/cli/__tests__/index.unit.test.js.map +1 -0
- package/dist/cli/__tests__/logger.unit.test.d.ts +11 -0
- package/dist/cli/__tests__/logger.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/logger.unit.test.js +180 -0
- package/dist/cli/__tests__/logger.unit.test.js.map +1 -0
- package/dist/cli/__tests__/module-loader.unit.test.d.ts +11 -0
- package/dist/cli/__tests__/module-loader.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/module-loader.unit.test.js +262 -0
- package/dist/cli/__tests__/module-loader.unit.test.js.map +1 -0
- package/dist/cli/__tests__/output-writer.unit.test.d.ts +10 -0
- package/dist/cli/__tests__/output-writer.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/output-writer.unit.test.js +216 -0
- package/dist/cli/__tests__/output-writer.unit.test.js.map +1 -0
- package/dist/cli/__tests__/plan.command.unit.test.d.ts +7 -0
- package/dist/cli/__tests__/plan.command.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/plan.command.unit.test.js +289 -0
- package/dist/cli/__tests__/plan.command.unit.test.js.map +1 -0
- package/dist/cli/__tests__/run.command.unit.test.d.ts +7 -0
- package/dist/cli/__tests__/run.command.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/run.command.unit.test.js +422 -0
- package/dist/cli/__tests__/run.command.unit.test.js.map +1 -0
- package/dist/cli/__tests__/validate.command.unit.test.d.ts +7 -0
- package/dist/cli/__tests__/validate.command.unit.test.d.ts.map +1 -0
- package/dist/cli/__tests__/validate.command.unit.test.js +226 -0
- package/dist/cli/__tests__/validate.command.unit.test.js.map +1 -0
- package/dist/cli/command-deps.d.ts +125 -0
- package/dist/cli/command-deps.d.ts.map +1 -0
- package/dist/cli/command-deps.js +7 -0
- package/dist/cli/command-deps.js.map +1 -0
- package/dist/cli/commands/aggregate.d.ts +35 -0
- package/dist/cli/commands/aggregate.d.ts.map +1 -0
- package/dist/cli/commands/aggregate.js +121 -0
- package/dist/cli/commands/aggregate.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +36 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +109 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/run.d.ts +33 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +185 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +27 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +88 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/config-loader.d.ts +30 -0
- package/dist/cli/config-loader.d.ts.map +1 -0
- package/dist/cli/config-loader.js +181 -0
- package/dist/cli/config-loader.js.map +1 -0
- package/dist/cli/index.d.ts +26 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +58 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/logger.d.ts +75 -0
- package/dist/cli/logger.d.ts.map +1 -0
- package/dist/cli/logger.js +131 -0
- package/dist/cli/logger.js.map +1 -0
- package/dist/cli/module-loader.d.ts +46 -0
- package/dist/cli/module-loader.d.ts.map +1 -0
- package/dist/cli/module-loader.js +116 -0
- package/dist/cli/module-loader.js.map +1 -0
- package/dist/cli/output-writer.d.ts +51 -0
- package/dist/cli/output-writer.d.ts.map +1 -0
- package/dist/cli/output-writer.js +65 -0
- package/dist/cli/output-writer.js.map +1 -0
- package/dist/cli/types.d.ts +174 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +7 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/collector/__tests__/result-collector.unit.test.d.ts +7 -0
- package/dist/collector/__tests__/result-collector.unit.test.d.ts.map +1 -0
- package/dist/collector/__tests__/result-collector.unit.test.js +1021 -0
- package/dist/collector/__tests__/result-collector.unit.test.js.map +1 -0
- package/dist/collector/__tests__/schema.unit.test.d.ts +7 -0
- package/dist/collector/__tests__/schema.unit.test.d.ts.map +1 -0
- package/dist/collector/__tests__/schema.unit.test.js +360 -0
- package/dist/collector/__tests__/schema.unit.test.js.map +1 -0
- package/dist/collector/index.d.ts +8 -0
- package/dist/collector/index.d.ts.map +1 -0
- package/dist/collector/index.js +8 -0
- package/dist/collector/index.js.map +1 -0
- package/dist/collector/result-collector.d.ts +159 -0
- package/dist/collector/result-collector.d.ts.map +1 -0
- package/dist/collector/result-collector.js +213 -0
- package/dist/collector/result-collector.js.map +1 -0
- package/dist/collector/schema.d.ts +34 -0
- package/dist/collector/schema.d.ts.map +1 -0
- package/dist/collector/schema.js +145 -0
- package/dist/collector/schema.js.map +1 -0
- package/dist/executor/__tests__/checkpoint-hash-bug.diagnostic.test.d.ts +10 -0
- package/dist/executor/__tests__/checkpoint-hash-bug.diagnostic.test.d.ts.map +1 -0
- package/dist/executor/__tests__/checkpoint-hash-bug.diagnostic.test.js +122 -0
- package/dist/executor/__tests__/checkpoint-hash-bug.diagnostic.test.js.map +1 -0
- package/dist/executor/__tests__/checkpoint-manager.integration.test.d.ts +7 -0
- package/dist/executor/__tests__/checkpoint-manager.integration.test.d.ts.map +1 -0
- package/dist/executor/__tests__/checkpoint-manager.integration.test.js +330 -0
- package/dist/executor/__tests__/checkpoint-manager.integration.test.js.map +1 -0
- package/dist/executor/__tests__/checkpoint-manager.unit.test.d.ts +7 -0
- package/dist/executor/__tests__/checkpoint-manager.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/checkpoint-manager.unit.test.js +531 -0
- package/dist/executor/__tests__/checkpoint-manager.unit.test.js.map +1 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.diagnostic.test.d.ts +8 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.diagnostic.test.d.ts.map +1 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.diagnostic.test.js +493 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.diagnostic.test.js.map +1 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.unit.test.d.ts +8 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.unit.test.js +164 -0
- package/dist/executor/__tests__/checkpoint-merge-bug.unit.test.js.map +1 -0
- package/dist/executor/__tests__/checkpoint-storage.unit.test.d.ts +7 -0
- package/dist/executor/__tests__/checkpoint-storage.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/checkpoint-storage.unit.test.js +490 -0
- package/dist/executor/__tests__/checkpoint-storage.unit.test.js.map +1 -0
- package/dist/executor/__tests__/executor.unit.test.d.ts +7 -0
- package/dist/executor/__tests__/executor.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/executor.unit.test.js +202 -0
- package/dist/executor/__tests__/executor.unit.test.js.map +1 -0
- package/dist/executor/__tests__/memory-monitor.unit.test.d.ts +7 -0
- package/dist/executor/__tests__/memory-monitor.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/memory-monitor.unit.test.js +285 -0
- package/dist/executor/__tests__/memory-monitor.unit.test.js.map +1 -0
- package/dist/executor/__tests__/parallel-checkpoint-merge.integration.test.d.ts +12 -0
- package/dist/executor/__tests__/parallel-checkpoint-merge.integration.test.d.ts.map +1 -0
- package/dist/executor/__tests__/parallel-checkpoint-merge.integration.test.js +196 -0
- package/dist/executor/__tests__/parallel-checkpoint-merge.integration.test.js.map +1 -0
- package/dist/executor/__tests__/parallel-executor.integration.test.d.ts +7 -0
- package/dist/executor/__tests__/parallel-executor.integration.test.d.ts.map +1 -0
- package/dist/executor/__tests__/parallel-executor.integration.test.js +249 -0
- package/dist/executor/__tests__/parallel-executor.integration.test.js.map +1 -0
- package/dist/executor/__tests__/parallel-executor.unit.test.d.ts +8 -0
- package/dist/executor/__tests__/parallel-executor.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/parallel-executor.unit.test.js +473 -0
- package/dist/executor/__tests__/parallel-executor.unit.test.js.map +1 -0
- package/dist/executor/__tests__/run-id.unit.test.d.ts +8 -0
- package/dist/executor/__tests__/run-id.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/run-id.unit.test.js +156 -0
- package/dist/executor/__tests__/run-id.unit.test.js.map +1 -0
- package/dist/executor/__tests__/worker-entry.integration.test.d.ts +24 -0
- package/dist/executor/__tests__/worker-entry.integration.test.d.ts.map +1 -0
- package/dist/executor/__tests__/worker-entry.integration.test.js +82 -0
- package/dist/executor/__tests__/worker-entry.integration.test.js.map +1 -0
- package/dist/executor/__tests__/worker-entry.unit.test.d.ts +7 -0
- package/dist/executor/__tests__/worker-entry.unit.test.d.ts.map +1 -0
- package/dist/executor/__tests__/worker-entry.unit.test.js +364 -0
- package/dist/executor/__tests__/worker-entry.unit.test.js.map +1 -0
- package/dist/executor/checkpoint-manager.d.ts +231 -0
- package/dist/executor/checkpoint-manager.d.ts.map +1 -0
- package/dist/executor/checkpoint-manager.js +395 -0
- package/dist/executor/checkpoint-manager.js.map +1 -0
- package/dist/executor/checkpoint-storage.d.ts +230 -0
- package/dist/executor/checkpoint-storage.d.ts.map +1 -0
- package/dist/executor/checkpoint-storage.js +370 -0
- package/dist/executor/checkpoint-storage.js.map +1 -0
- package/dist/executor/checkpoint-types.d.ts +48 -0
- package/dist/executor/checkpoint-types.d.ts.map +1 -0
- package/dist/executor/checkpoint-types.js +8 -0
- package/dist/executor/checkpoint-types.js.map +1 -0
- package/dist/executor/executor.d.ts +164 -0
- package/dist/executor/executor.d.ts.map +1 -0
- package/dist/executor/executor.js +408 -0
- package/dist/executor/executor.js.map +1 -0
- package/dist/executor/index.d.ts +11 -0
- package/dist/executor/index.d.ts.map +1 -0
- package/dist/executor/index.js +11 -0
- package/dist/executor/index.js.map +1 -0
- package/dist/executor/memory-monitor.d.ts +115 -0
- package/dist/executor/memory-monitor.d.ts.map +1 -0
- package/dist/executor/memory-monitor.js +168 -0
- package/dist/executor/memory-monitor.js.map +1 -0
- package/dist/executor/parallel-executor.d.ts +239 -0
- package/dist/executor/parallel-executor.d.ts.map +1 -0
- package/dist/executor/parallel-executor.js +329 -0
- package/dist/executor/parallel-executor.js.map +1 -0
- package/dist/executor/run-id.d.ts +71 -0
- package/dist/executor/run-id.d.ts.map +1 -0
- package/dist/executor/run-id.js +74 -0
- package/dist/executor/run-id.js.map +1 -0
- package/dist/executor/worker-entry.d.ts +10 -0
- package/dist/executor/worker-entry.d.ts.map +1 -0
- package/dist/executor/worker-entry.js +42 -0
- package/dist/executor/worker-entry.js.map +1 -0
- package/dist/executor/worker-executor.d.ts +156 -0
- package/dist/executor/worker-executor.d.ts.map +1 -0
- package/dist/executor/worker-executor.js +88 -0
- package/dist/executor/worker-executor.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/registry/case-registry.d.ts +113 -0
- package/dist/registry/case-registry.d.ts.map +1 -0
- package/dist/registry/case-registry.js +160 -0
- package/dist/registry/case-registry.js.map +1 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/sut-registry.d.ts +96 -0
- package/dist/registry/sut-registry.d.ts.map +1 -0
- package/dist/registry/sut-registry.js +126 -0
- package/dist/registry/sut-registry.js.map +1 -0
- package/dist/renderers/index.d.ts +10 -0
- package/dist/renderers/index.d.ts.map +1 -0
- package/dist/renderers/index.js +9 -0
- package/dist/renderers/index.js.map +1 -0
- package/dist/renderers/latex-renderer.d.ts +84 -0
- package/dist/renderers/latex-renderer.d.ts.map +1 -0
- package/dist/renderers/latex-renderer.js +208 -0
- package/dist/renderers/latex-renderer.js.map +1 -0
- package/dist/renderers/types.d.ts +106 -0
- package/dist/renderers/types.d.ts.map +1 -0
- package/dist/renderers/types.js +23 -0
- package/dist/renderers/types.js.map +1 -0
- package/dist/robustness/__tests__/analyzer.unit.test.d.ts +11 -0
- package/dist/robustness/__tests__/analyzer.unit.test.d.ts.map +1 -0
- package/dist/robustness/__tests__/analyzer.unit.test.js +455 -0
- package/dist/robustness/__tests__/analyzer.unit.test.js.map +1 -0
- package/dist/robustness/__tests__/perturbations.unit.test.d.ts +11 -0
- package/dist/robustness/__tests__/perturbations.unit.test.d.ts.map +1 -0
- package/dist/robustness/__tests__/perturbations.unit.test.js +284 -0
- package/dist/robustness/__tests__/perturbations.unit.test.js.map +1 -0
- package/dist/robustness/analyzer.d.ts +61 -0
- package/dist/robustness/analyzer.d.ts.map +1 -0
- package/dist/robustness/analyzer.js +191 -0
- package/dist/robustness/analyzer.js.map +1 -0
- package/dist/robustness/index.d.ts +8 -0
- package/dist/robustness/index.d.ts.map +1 -0
- package/dist/robustness/index.js +8 -0
- package/dist/robustness/index.js.map +1 -0
- package/dist/robustness/perturbations.d.ts +46 -0
- package/dist/robustness/perturbations.d.ts.map +1 -0
- package/dist/robustness/perturbations.js +184 -0
- package/dist/robustness/perturbations.js.map +1 -0
- package/dist/statistical/__tests__/mann-whitney-u.unit.test.d.ts +7 -0
- package/dist/statistical/__tests__/mann-whitney-u.unit.test.d.ts.map +1 -0
- package/dist/statistical/__tests__/mann-whitney-u.unit.test.js +185 -0
- package/dist/statistical/__tests__/mann-whitney-u.unit.test.js.map +1 -0
- package/dist/statistical/index.d.ts +8 -0
- package/dist/statistical/index.d.ts.map +1 -0
- package/dist/statistical/index.js +8 -0
- package/dist/statistical/index.js.map +1 -0
- package/dist/statistical/mann-whitney-u.d.ts +62 -0
- package/dist/statistical/mann-whitney-u.d.ts.map +1 -0
- package/dist/statistical/mann-whitney-u.js +127 -0
- package/dist/statistical/mann-whitney-u.js.map +1 -0
- package/dist/types/aggregate.d.ts +124 -0
- package/dist/types/aggregate.d.ts.map +1 -0
- package/dist/types/aggregate.js +9 -0
- package/dist/types/aggregate.js.map +1 -0
- package/dist/types/case.d.ts +105 -0
- package/dist/types/case.d.ts.map +1 -0
- package/dist/types/case.js +10 -0
- package/dist/types/case.js.map +1 -0
- package/dist/types/claims.d.ts +122 -0
- package/dist/types/claims.d.ts.map +1 -0
- package/dist/types/claims.js +14 -0
- package/dist/types/claims.js.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/perturbation.d.ts +105 -0
- package/dist/types/perturbation.d.ts.map +1 -0
- package/dist/types/perturbation.js +9 -0
- package/dist/types/perturbation.js.map +1 -0
- package/dist/types/result.d.ts +150 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/result.js +12 -0
- package/dist/types/result.js.map +1 -0
- package/dist/types/sut.d.ts +128 -0
- package/dist/types/sut.d.ts.map +1 -0
- package/dist/types/sut.js +12 -0
- package/dist/types/sut.js.map +1 -0
- package/package.json +290 -7
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result Collector
|
|
3
|
+
*
|
|
4
|
+
* Collects, validates, and stores evaluation results.
|
|
5
|
+
* Replaces the simple MetricsCollector with a schema-aware implementation.
|
|
6
|
+
*/
|
|
7
|
+
import type { Primitive } from "../types/case.js";
|
|
8
|
+
import type { EvaluationResult, ResultBatch } from "../types/result.js";
|
|
9
|
+
import type { SutRole } from "../types/sut.js";
|
|
10
|
+
/**
|
|
11
|
+
* Filter criteria for querying results.
|
|
12
|
+
*/
|
|
13
|
+
export interface ResultFilter {
|
|
14
|
+
/** Filter by SUT ID */
|
|
15
|
+
sut?: string;
|
|
16
|
+
/** Filter by SUT role */
|
|
17
|
+
sutRole?: SutRole;
|
|
18
|
+
/** Filter by case ID */
|
|
19
|
+
caseId?: string;
|
|
20
|
+
/** Filter by case class */
|
|
21
|
+
caseClass?: string;
|
|
22
|
+
/** Filter by validity */
|
|
23
|
+
valid?: boolean;
|
|
24
|
+
/** Filter by metric presence */
|
|
25
|
+
hasMetric?: string;
|
|
26
|
+
/** Custom predicate */
|
|
27
|
+
predicate?: (result: EvaluationResult) => boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Aggregation options.
|
|
31
|
+
*/
|
|
32
|
+
export interface AggregationOptions {
|
|
33
|
+
/** Group by SUT */
|
|
34
|
+
groupBySut?: boolean;
|
|
35
|
+
/** Group by case class */
|
|
36
|
+
groupByCaseClass?: boolean;
|
|
37
|
+
/** Metrics to aggregate */
|
|
38
|
+
metrics?: string[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Schema validation error.
|
|
42
|
+
*/
|
|
43
|
+
export interface ValidationError {
|
|
44
|
+
field: string;
|
|
45
|
+
message: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result collector with schema validation and querying.
|
|
49
|
+
*/
|
|
50
|
+
export declare class ResultCollector {
|
|
51
|
+
private results;
|
|
52
|
+
private readonly schemaVersion;
|
|
53
|
+
/**
|
|
54
|
+
* Record a single result with validation.
|
|
55
|
+
*
|
|
56
|
+
* @param result - Result to record
|
|
57
|
+
* @throws Error if result fails validation
|
|
58
|
+
*/
|
|
59
|
+
record(result: EvaluationResult): void;
|
|
60
|
+
/**
|
|
61
|
+
* Record multiple results.
|
|
62
|
+
*
|
|
63
|
+
* @param results - Results to record
|
|
64
|
+
*/
|
|
65
|
+
recordBatch(results: EvaluationResult[]): void;
|
|
66
|
+
/**
|
|
67
|
+
* Validate a result against the schema.
|
|
68
|
+
*
|
|
69
|
+
* @param result - Result to validate
|
|
70
|
+
* @returns Array of validation errors (empty if valid)
|
|
71
|
+
*/
|
|
72
|
+
validate(result: EvaluationResult): ValidationError[];
|
|
73
|
+
/**
|
|
74
|
+
* Query results with filters.
|
|
75
|
+
*
|
|
76
|
+
* @param filter - Filter criteria
|
|
77
|
+
* @returns Matching results
|
|
78
|
+
*/
|
|
79
|
+
query(filter?: ResultFilter): EvaluationResult[];
|
|
80
|
+
/**
|
|
81
|
+
* Get all results for a specific SUT.
|
|
82
|
+
*
|
|
83
|
+
* @param sutId - SUT identifier
|
|
84
|
+
* @returns Results for that SUT
|
|
85
|
+
*/
|
|
86
|
+
getBySut(sutId: string): EvaluationResult[];
|
|
87
|
+
/**
|
|
88
|
+
* Get all results for a specific case class.
|
|
89
|
+
*
|
|
90
|
+
* @param caseClass - Case class
|
|
91
|
+
* @returns Results for that case class
|
|
92
|
+
*/
|
|
93
|
+
getByCaseClass(caseClass: string): EvaluationResult[];
|
|
94
|
+
/**
|
|
95
|
+
* Get unique SUT IDs in the collection.
|
|
96
|
+
*/
|
|
97
|
+
getUniqueSuts(): string[];
|
|
98
|
+
/**
|
|
99
|
+
* Get unique case classes in the collection.
|
|
100
|
+
*/
|
|
101
|
+
getUniqueCaseClasses(): string[];
|
|
102
|
+
/**
|
|
103
|
+
* Get unique metric names in the collection.
|
|
104
|
+
*/
|
|
105
|
+
getUniqueMetrics(): string[];
|
|
106
|
+
/**
|
|
107
|
+
* Get all results.
|
|
108
|
+
*/
|
|
109
|
+
getAll(): EvaluationResult[];
|
|
110
|
+
/**
|
|
111
|
+
* Get result count.
|
|
112
|
+
*/
|
|
113
|
+
get count(): number;
|
|
114
|
+
/**
|
|
115
|
+
* Check if empty.
|
|
116
|
+
*/
|
|
117
|
+
get isEmpty(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Clear all results.
|
|
120
|
+
*/
|
|
121
|
+
clear(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Serialize to ResultBatch format.
|
|
124
|
+
*
|
|
125
|
+
* @param metadata - Optional batch metadata
|
|
126
|
+
* @returns Serializable batch
|
|
127
|
+
*/
|
|
128
|
+
serialize(metadata?: Record<string, Primitive>): ResultBatch;
|
|
129
|
+
/**
|
|
130
|
+
* Load from a ResultBatch.
|
|
131
|
+
*
|
|
132
|
+
* @param batch - Batch to load
|
|
133
|
+
* @param append - Whether to append to existing results
|
|
134
|
+
*/
|
|
135
|
+
load(batch: ResultBatch, append?: boolean): void;
|
|
136
|
+
/**
|
|
137
|
+
* Extract a specific metric across all results.
|
|
138
|
+
*
|
|
139
|
+
* @param metricName - Metric to extract
|
|
140
|
+
* @returns Array of { runId, value } pairs
|
|
141
|
+
*/
|
|
142
|
+
extractMetric(metricName: string): {
|
|
143
|
+
runId: string;
|
|
144
|
+
value: number;
|
|
145
|
+
}[];
|
|
146
|
+
/**
|
|
147
|
+
* Get metric values for a specific SUT.
|
|
148
|
+
*
|
|
149
|
+
* @param sutId - SUT identifier
|
|
150
|
+
* @param metricName - Metric name
|
|
151
|
+
* @returns Array of metric values
|
|
152
|
+
*/
|
|
153
|
+
getMetricValues(sutId: string, metricName: string): number[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Global result collector instance.
|
|
157
|
+
*/
|
|
158
|
+
export declare const resultCollector: ResultCollector;
|
|
159
|
+
//# sourceMappingURL=result-collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result-collector.d.ts","sourceRoot":"","sources":["../../src/collector/result-collector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,yBAAyB;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uBAAuB;IACvB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,mBAAmB;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,0BAA0B;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC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;IASrE;;;;;;OAMG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE;CAK5D;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result Collector
|
|
3
|
+
*
|
|
4
|
+
* Collects, validates, and stores evaluation results.
|
|
5
|
+
* Replaces the simple MetricsCollector with a schema-aware implementation.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Result collector with schema validation and querying.
|
|
9
|
+
*/
|
|
10
|
+
export class ResultCollector {
|
|
11
|
+
results = [];
|
|
12
|
+
schemaVersion = "1.0.0";
|
|
13
|
+
/**
|
|
14
|
+
* Record a single result with validation.
|
|
15
|
+
*
|
|
16
|
+
* @param result - Result to record
|
|
17
|
+
* @throws Error if result fails validation
|
|
18
|
+
*/
|
|
19
|
+
record(result) {
|
|
20
|
+
const errors = this.validate(result);
|
|
21
|
+
if (errors.length > 0) {
|
|
22
|
+
throw new Error(`Invalid result: ${errors.map((e) => `${e.field}: ${e.message}`).join(", ")}`);
|
|
23
|
+
}
|
|
24
|
+
this.results.push(result);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Record multiple results.
|
|
28
|
+
*
|
|
29
|
+
* @param results - Results to record
|
|
30
|
+
*/
|
|
31
|
+
recordBatch(results) {
|
|
32
|
+
for (const result of results) {
|
|
33
|
+
this.record(result);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Validate a result against the schema.
|
|
38
|
+
*
|
|
39
|
+
* @param result - Result to validate
|
|
40
|
+
* @returns Array of validation errors (empty if valid)
|
|
41
|
+
*/
|
|
42
|
+
validate(result) {
|
|
43
|
+
const errors = [];
|
|
44
|
+
// Validate required nested properties have non-empty values
|
|
45
|
+
if (result.run.runId === "") {
|
|
46
|
+
errors.push({ field: "run.runId", message: "Missing run ID" });
|
|
47
|
+
}
|
|
48
|
+
if (result.run.sut === "") {
|
|
49
|
+
errors.push({ field: "run.sut", message: "Missing SUT identifier" });
|
|
50
|
+
}
|
|
51
|
+
if (result.run.caseId === "") {
|
|
52
|
+
errors.push({ field: "run.caseId", message: "Missing case ID" });
|
|
53
|
+
}
|
|
54
|
+
if (Object.keys(result.metrics.numeric).length === 0) {
|
|
55
|
+
errors.push({ field: "metrics.numeric", message: "Missing numeric metrics" });
|
|
56
|
+
}
|
|
57
|
+
if (result.provenance.runtime.platform === "") {
|
|
58
|
+
errors.push({ field: "provenance.runtime.platform", message: "Missing platform" });
|
|
59
|
+
}
|
|
60
|
+
return errors;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Query results with filters.
|
|
64
|
+
*
|
|
65
|
+
* @param filter - Filter criteria
|
|
66
|
+
* @returns Matching results
|
|
67
|
+
*/
|
|
68
|
+
query(filter = {}) {
|
|
69
|
+
return this.results.filter((result) => {
|
|
70
|
+
if (filter.sut && result.run.sut !== filter.sut)
|
|
71
|
+
return false;
|
|
72
|
+
if (filter.sutRole && result.run.sutRole !== filter.sutRole)
|
|
73
|
+
return false;
|
|
74
|
+
if (filter.caseId && result.run.caseId !== filter.caseId)
|
|
75
|
+
return false;
|
|
76
|
+
if (filter.caseClass && result.run.caseClass !== filter.caseClass)
|
|
77
|
+
return false;
|
|
78
|
+
if (filter.valid !== undefined && result.correctness.valid !== filter.valid)
|
|
79
|
+
return false;
|
|
80
|
+
if (filter.hasMetric && !(filter.hasMetric in result.metrics.numeric))
|
|
81
|
+
return false;
|
|
82
|
+
if (filter.predicate && !filter.predicate(result))
|
|
83
|
+
return false;
|
|
84
|
+
return true;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get all results for a specific SUT.
|
|
89
|
+
*
|
|
90
|
+
* @param sutId - SUT identifier
|
|
91
|
+
* @returns Results for that SUT
|
|
92
|
+
*/
|
|
93
|
+
getBySut(sutId) {
|
|
94
|
+
return this.query({ sut: sutId });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get all results for a specific case class.
|
|
98
|
+
*
|
|
99
|
+
* @param caseClass - Case class
|
|
100
|
+
* @returns Results for that case class
|
|
101
|
+
*/
|
|
102
|
+
getByCaseClass(caseClass) {
|
|
103
|
+
return this.query({ caseClass });
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get unique SUT IDs in the collection.
|
|
107
|
+
*/
|
|
108
|
+
getUniqueSuts() {
|
|
109
|
+
return [...new Set(this.results.map((r) => r.run.sut))];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get unique case classes in the collection.
|
|
113
|
+
*/
|
|
114
|
+
getUniqueCaseClasses() {
|
|
115
|
+
const classes = this.results
|
|
116
|
+
.map((r) => r.run.caseClass)
|
|
117
|
+
.filter((c) => c !== undefined);
|
|
118
|
+
return [...new Set(classes)];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get unique metric names in the collection.
|
|
122
|
+
*/
|
|
123
|
+
getUniqueMetrics() {
|
|
124
|
+
const metrics = new Set();
|
|
125
|
+
for (const result of this.results) {
|
|
126
|
+
for (const metric of Object.keys(result.metrics.numeric)) {
|
|
127
|
+
metrics.add(metric);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return [...metrics];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get all results.
|
|
134
|
+
*/
|
|
135
|
+
getAll() {
|
|
136
|
+
return [...this.results];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Get result count.
|
|
140
|
+
*/
|
|
141
|
+
get count() {
|
|
142
|
+
return this.results.length;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check if empty.
|
|
146
|
+
*/
|
|
147
|
+
get isEmpty() {
|
|
148
|
+
return this.results.length === 0;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Clear all results.
|
|
152
|
+
*/
|
|
153
|
+
clear() {
|
|
154
|
+
this.results = [];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Serialize to ResultBatch format.
|
|
158
|
+
*
|
|
159
|
+
* @param metadata - Optional batch metadata
|
|
160
|
+
* @returns Serializable batch
|
|
161
|
+
*/
|
|
162
|
+
serialize(metadata) {
|
|
163
|
+
return {
|
|
164
|
+
version: this.schemaVersion,
|
|
165
|
+
timestamp: new Date().toISOString(),
|
|
166
|
+
results: this.results,
|
|
167
|
+
metadata,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Load from a ResultBatch.
|
|
172
|
+
*
|
|
173
|
+
* @param batch - Batch to load
|
|
174
|
+
* @param append - Whether to append to existing results
|
|
175
|
+
*/
|
|
176
|
+
load(batch, append = false) {
|
|
177
|
+
if (!append) {
|
|
178
|
+
this.results = [];
|
|
179
|
+
}
|
|
180
|
+
this.recordBatch(batch.results);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Extract a specific metric across all results.
|
|
184
|
+
*
|
|
185
|
+
* @param metricName - Metric to extract
|
|
186
|
+
* @returns Array of { runId, value } pairs
|
|
187
|
+
*/
|
|
188
|
+
extractMetric(metricName) {
|
|
189
|
+
return this.results
|
|
190
|
+
.filter((r) => metricName in r.metrics.numeric)
|
|
191
|
+
.map((r) => ({
|
|
192
|
+
runId: r.run.runId,
|
|
193
|
+
value: r.metrics.numeric[metricName],
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Get metric values for a specific SUT.
|
|
198
|
+
*
|
|
199
|
+
* @param sutId - SUT identifier
|
|
200
|
+
* @param metricName - Metric name
|
|
201
|
+
* @returns Array of metric values
|
|
202
|
+
*/
|
|
203
|
+
getMetricValues(sutId, metricName) {
|
|
204
|
+
return this.results
|
|
205
|
+
.filter((r) => r.run.sut === sutId && metricName in r.metrics.numeric)
|
|
206
|
+
.map((r) => r.metrics.numeric[metricName]);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Global result collector instance.
|
|
211
|
+
*/
|
|
212
|
+
export const resultCollector = new ResultCollector();
|
|
213
|
+
//# sourceMappingURL=result-collector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result-collector.js","sourceRoot":"","sources":["../../src/collector/result-collector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsDH;;GAEG;AACH,MAAM,OAAO,eAAe;IACnB,OAAO,GAAuB,EAAE,CAAC;IACxB,aAAa,GAAG,OAAO,CAAC;IAEzC;;;;;OAKG;IACH,MAAM,CAAC,MAAwB;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACd,mBAAmB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC7E,CAAC;QACH,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,OAA2B;QACtC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC;IACF,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,MAAwB;QAChC,MAAM,MAAM,GAAsB,EAAE,CAAC;QAErC,4DAA4D;QAC5D,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAA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,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,OAAO;aACjB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;aAC9C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACZ,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK;YAClB,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;SACpC,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;;;;;OAMG;IACH,eAAe,CAAC,KAAa,EAAE,UAAkB;QAChD,OAAO,IAAI,CAAC,OAAO;aACjB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,IAAI,UAAU,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;aACrE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7C,CAAC;CACD;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema Definitions and Validators
|
|
3
|
+
*
|
|
4
|
+
* Provides schema validation utilities for the evaluation framework.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Schema validation result.
|
|
8
|
+
*/
|
|
9
|
+
export interface SchemaValidation {
|
|
10
|
+
valid: boolean;
|
|
11
|
+
errors: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Validate an EvaluationResult against the schema.
|
|
15
|
+
* @param result
|
|
16
|
+
*/
|
|
17
|
+
export declare const validateResult: (result: unknown) => SchemaValidation;
|
|
18
|
+
/**
|
|
19
|
+
* Validate an EvaluationCase against the schema.
|
|
20
|
+
* @param evaluationCase
|
|
21
|
+
*/
|
|
22
|
+
export declare const validateCase: (evaluationCase: unknown) => SchemaValidation;
|
|
23
|
+
/**
|
|
24
|
+
* Validate a SutRegistration against the schema.
|
|
25
|
+
* @param registration
|
|
26
|
+
*/
|
|
27
|
+
export declare const validateSutRegistration: (registration: unknown) => SchemaValidation;
|
|
28
|
+
/**
|
|
29
|
+
* Deep freeze an object to ensure immutability.
|
|
30
|
+
* @param obj
|
|
31
|
+
* @param object
|
|
32
|
+
*/
|
|
33
|
+
export declare const deepFreeze: <T extends object>(object: T) => Readonly<T>;
|
|
34
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/collector/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,OAAO,KAAG,gBAoEhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,gBAAgB,OAAO,KAAG,gBAqBtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,cAAc,OAAO,KAAG,gBAqC/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,QAAQ,CAAC,KAAG,QAAQ,CAAC,CAAC,CAQlE,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema Definitions and Validators
|
|
3
|
+
*
|
|
4
|
+
* Provides schema validation utilities for the evaluation framework.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Validate an EvaluationResult against the schema.
|
|
8
|
+
* @param result
|
|
9
|
+
*/
|
|
10
|
+
export const validateResult = (result) => {
|
|
11
|
+
const errors = [];
|
|
12
|
+
if (!result || typeof result !== "object") {
|
|
13
|
+
return { valid: false, errors: ["Result must be an object"] };
|
|
14
|
+
}
|
|
15
|
+
const r = result;
|
|
16
|
+
// Validate run context
|
|
17
|
+
if (!r.run || typeof r.run !== "object") {
|
|
18
|
+
errors.push("Missing or invalid run context");
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (typeof r.run.runId !== "string" || r.run.runId.length === 0) {
|
|
22
|
+
errors.push("run.runId must be a non-empty string");
|
|
23
|
+
}
|
|
24
|
+
if (typeof r.run.sut !== "string" || r.run.sut.length === 0) {
|
|
25
|
+
errors.push("run.sut must be a non-empty string");
|
|
26
|
+
}
|
|
27
|
+
if (!["primary", "baseline", "oracle"].includes(r.run.sutRole)) {
|
|
28
|
+
errors.push("run.sutRole must be 'primary', 'baseline', or 'oracle'");
|
|
29
|
+
}
|
|
30
|
+
if (typeof r.run.caseId !== "string" || r.run.caseId.length === 0) {
|
|
31
|
+
errors.push("run.caseId must be a non-empty string");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Validate correctness
|
|
35
|
+
if (!r.correctness || typeof r.correctness !== "object") {
|
|
36
|
+
errors.push("Missing or invalid correctness assessment");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (typeof r.correctness.expectedExists !== "boolean") {
|
|
40
|
+
errors.push("correctness.expectedExists must be a boolean");
|
|
41
|
+
}
|
|
42
|
+
if (typeof r.correctness.producedOutput !== "boolean") {
|
|
43
|
+
errors.push("correctness.producedOutput must be a boolean");
|
|
44
|
+
}
|
|
45
|
+
if (typeof r.correctness.valid !== "boolean") {
|
|
46
|
+
errors.push("correctness.valid must be a boolean");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// Validate metrics
|
|
50
|
+
if (!r.metrics || typeof r.metrics !== "object") {
|
|
51
|
+
errors.push("Missing or invalid metrics");
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
if (typeof r.metrics.numeric !== "object") {
|
|
55
|
+
errors.push("metrics.numeric must be an object");
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
for (const [key, value] of Object.entries(r.metrics.numeric)) {
|
|
59
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
60
|
+
errors.push(`metrics.numeric.${key} must be a finite number`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Validate provenance
|
|
66
|
+
if (!r.provenance || typeof r.provenance !== "object") {
|
|
67
|
+
errors.push("Missing or invalid provenance");
|
|
68
|
+
}
|
|
69
|
+
else if (typeof r.provenance.runtime !== "object") {
|
|
70
|
+
errors.push("provenance.runtime must be an object");
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
valid: errors.length === 0,
|
|
74
|
+
errors,
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Validate an EvaluationCase against the schema.
|
|
79
|
+
* @param evaluationCase
|
|
80
|
+
*/
|
|
81
|
+
export const validateCase = (evaluationCase) => {
|
|
82
|
+
const errors = [];
|
|
83
|
+
if (!evaluationCase || typeof evaluationCase !== "object") {
|
|
84
|
+
return { valid: false, errors: ["Case must be an object"] };
|
|
85
|
+
}
|
|
86
|
+
const c = evaluationCase;
|
|
87
|
+
if (typeof c.caseId !== "string" || c.caseId.length === 0) {
|
|
88
|
+
errors.push("caseId must be a non-empty string");
|
|
89
|
+
}
|
|
90
|
+
if (!c.inputs || typeof c.inputs !== "object") {
|
|
91
|
+
errors.push("inputs must be an object");
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
valid: errors.length === 0,
|
|
95
|
+
errors,
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Validate a SutRegistration against the schema.
|
|
100
|
+
* @param registration
|
|
101
|
+
*/
|
|
102
|
+
export const validateSutRegistration = (registration) => {
|
|
103
|
+
const errors = [];
|
|
104
|
+
if (!registration || typeof registration !== "object") {
|
|
105
|
+
return { valid: false, errors: ["Registration must be an object"] };
|
|
106
|
+
}
|
|
107
|
+
const r = registration;
|
|
108
|
+
if (typeof r.id !== "string" || r.id.length === 0) {
|
|
109
|
+
errors.push("id must be a non-empty string");
|
|
110
|
+
}
|
|
111
|
+
if (typeof r.name !== "string" || r.name.length === 0) {
|
|
112
|
+
errors.push("name must be a non-empty string");
|
|
113
|
+
}
|
|
114
|
+
if (typeof r.version !== "string" || r.version.length === 0) {
|
|
115
|
+
errors.push("version must be a non-empty string");
|
|
116
|
+
}
|
|
117
|
+
if (!["primary", "baseline", "oracle"].includes(r.role ?? "")) {
|
|
118
|
+
errors.push("role must be 'primary', 'baseline', or 'oracle'");
|
|
119
|
+
}
|
|
120
|
+
if (!r.config || typeof r.config !== "object") {
|
|
121
|
+
errors.push("config must be an object");
|
|
122
|
+
}
|
|
123
|
+
if (!Array.isArray(r.tags)) {
|
|
124
|
+
errors.push("tags must be an array");
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
valid: errors.length === 0,
|
|
128
|
+
errors,
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Deep freeze an object to ensure immutability.
|
|
133
|
+
* @param obj
|
|
134
|
+
* @param object
|
|
135
|
+
*/
|
|
136
|
+
export const deepFreeze = (object) => {
|
|
137
|
+
Object.freeze(object);
|
|
138
|
+
for (const value of Object.values(object)) {
|
|
139
|
+
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
140
|
+
deepFreeze(value);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return object;
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRo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CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACtC,CAAC;IAED,OAAO;QACN,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;KACN,CAAC;AACH,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAmB,MAAS,EAAe,EAAE;IACtE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACnE,UAAU,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic Tests for Checkpoint Config Hash Bug
|
|
3
|
+
*
|
|
4
|
+
* Root cause: Config hash calculation includes properties that vary between
|
|
5
|
+
* main process and workers (e.g., 'concurrency'), causing checkpoint invalidation.
|
|
6
|
+
*
|
|
7
|
+
* This test diagnoses and will help fix the hash matching issue.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=checkpoint-hash-bug.diagnostic.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-hash-bug.diagnostic.test.d.ts","sourceRoot":"","sources":["../../../src/executor/__tests__/checkpoint-hash-bug.diagnostic.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|