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,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallel executor using child processes.
|
|
3
|
+
*
|
|
4
|
+
* Spawns multiple Node.js processes, each executing a subset of runs.
|
|
5
|
+
* Each worker writes to its own sharded checkpoint file to avoid race conditions.
|
|
6
|
+
*
|
|
7
|
+
* Sharded checkpoint files:
|
|
8
|
+
* results/execute/checkpoint-worker-00.json
|
|
9
|
+
* results/execute/checkpoint-worker-01.json
|
|
10
|
+
* ...
|
|
11
|
+
*
|
|
12
|
+
* Dependency Injection:
|
|
13
|
+
* - Logger interface enables testing of log output
|
|
14
|
+
* - ProcessSpawner interface enables mocking spawn() calls
|
|
15
|
+
* - SystemInfo interface enables testing CPU count and node path logic
|
|
16
|
+
*/
|
|
17
|
+
import { spawn } from "node:child_process";
|
|
18
|
+
import { randomBytes } from "node:crypto";
|
|
19
|
+
import { cpus } from "node:os";
|
|
20
|
+
import { dirname, resolve } from "node:path";
|
|
21
|
+
/**
|
|
22
|
+
* Production logger using console.
|
|
23
|
+
*/
|
|
24
|
+
export class ConsoleLogger {
|
|
25
|
+
log(message) {
|
|
26
|
+
console.log(message);
|
|
27
|
+
}
|
|
28
|
+
debug(message) {
|
|
29
|
+
console.log(message);
|
|
30
|
+
}
|
|
31
|
+
info(message) {
|
|
32
|
+
console.log(message);
|
|
33
|
+
}
|
|
34
|
+
warn(message) {
|
|
35
|
+
console.warn(message);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Production process spawner using node:child_process.
|
|
40
|
+
*/
|
|
41
|
+
export class ProcessSpawner {
|
|
42
|
+
spawn(command, args, options) {
|
|
43
|
+
return spawn(command, args, options);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Production system info using node:os and process.
|
|
48
|
+
*/
|
|
49
|
+
export class SystemInfo {
|
|
50
|
+
cpuCount = cpus().length;
|
|
51
|
+
nodePath = process.execPath;
|
|
52
|
+
env = process.env;
|
|
53
|
+
packageRoot;
|
|
54
|
+
constructor() {
|
|
55
|
+
this.packageRoot = this.getPackageRoot();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Get the package root directory by resolving from the entry point script.
|
|
59
|
+
* The CLI entry point is dist/cli.js, so we go up one level from there.
|
|
60
|
+
*/
|
|
61
|
+
getPackageRoot() {
|
|
62
|
+
// Get the directory containing the entry point script
|
|
63
|
+
// process.argv[1] is the path to the executed script (e.g., /path/to/graphbox/dist/cli.js)
|
|
64
|
+
const entryPoint = process.argv[1];
|
|
65
|
+
// Resolve to absolute path first (handles relative paths like "dist/cli.js")
|
|
66
|
+
const absoluteEntry = resolve(entryPoint);
|
|
67
|
+
const entryDir = dirname(absoluteEntry);
|
|
68
|
+
// If entry point is in dist/, go up one level to get package root
|
|
69
|
+
if (entryDir.endsWith("/dist") || entryDir.endsWith(String.raw `\dist`)) {
|
|
70
|
+
return entryDir.slice(0, -5); // Remove "/dist"
|
|
71
|
+
}
|
|
72
|
+
// Fallback: use current directory
|
|
73
|
+
return process.cwd();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Generate random worker names using tech-themed adjectives.
|
|
78
|
+
* Returns unique names for each worker.
|
|
79
|
+
* @param count
|
|
80
|
+
*/
|
|
81
|
+
export const generateWorkerNames = (count) => {
|
|
82
|
+
const adjectives = [
|
|
83
|
+
"swift",
|
|
84
|
+
"nimble",
|
|
85
|
+
"quick",
|
|
86
|
+
"brisk",
|
|
87
|
+
"speedy",
|
|
88
|
+
"rapid",
|
|
89
|
+
"fast",
|
|
90
|
+
"agile",
|
|
91
|
+
"crisp",
|
|
92
|
+
"snappy",
|
|
93
|
+
"zippy",
|
|
94
|
+
"flash",
|
|
95
|
+
"bolt",
|
|
96
|
+
"dash",
|
|
97
|
+
"zoom",
|
|
98
|
+
"jet",
|
|
99
|
+
"rocket",
|
|
100
|
+
"comet",
|
|
101
|
+
"meteor",
|
|
102
|
+
"star",
|
|
103
|
+
"nova",
|
|
104
|
+
"spark",
|
|
105
|
+
"flare",
|
|
106
|
+
"blaze",
|
|
107
|
+
"quantum",
|
|
108
|
+
"cyber",
|
|
109
|
+
"digital",
|
|
110
|
+
"pixel",
|
|
111
|
+
"byte",
|
|
112
|
+
"bit",
|
|
113
|
+
"logic",
|
|
114
|
+
"circuit",
|
|
115
|
+
];
|
|
116
|
+
const nouns = [
|
|
117
|
+
"runner",
|
|
118
|
+
"worker",
|
|
119
|
+
"processor",
|
|
120
|
+
"executor",
|
|
121
|
+
"cruncher",
|
|
122
|
+
"solver",
|
|
123
|
+
"engine",
|
|
124
|
+
"motor",
|
|
125
|
+
"driver",
|
|
126
|
+
"pilot",
|
|
127
|
+
"agent",
|
|
128
|
+
"bot",
|
|
129
|
+
"node",
|
|
130
|
+
"core",
|
|
131
|
+
];
|
|
132
|
+
// Generate unique names using random adjectives + nouns + hex suffix
|
|
133
|
+
const usedNames = new Set();
|
|
134
|
+
const names = [];
|
|
135
|
+
while (names.length < count) {
|
|
136
|
+
const adj = adjectives[Math.floor(Math.random() * adjectives.length)];
|
|
137
|
+
const noun = nouns[Math.floor(Math.random() * nouns.length)];
|
|
138
|
+
const suffix = randomBytes(2).toString("hex");
|
|
139
|
+
const name = `${adj}-${noun}-${suffix}`;
|
|
140
|
+
if (!usedNames.has(name)) {
|
|
141
|
+
usedNames.add(name);
|
|
142
|
+
names.push(name);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return names;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Generate sharded checkpoint path for a worker.
|
|
149
|
+
*
|
|
150
|
+
* @param checkpointDir - Base checkpoint directory
|
|
151
|
+
* @param workerIndex - Worker index (0-based)
|
|
152
|
+
* @returns Path to the worker's checkpoint file
|
|
153
|
+
*/
|
|
154
|
+
export const shardPath = (checkpointDir, workerIndex) => resolve(checkpointDir, `checkpoint-worker-${String(workerIndex).padStart(2, "0")}.json`);
|
|
155
|
+
/**
|
|
156
|
+
* Parallel executor class with dependency injection.
|
|
157
|
+
*
|
|
158
|
+
* Spawns multiple Node.js processes, each executing a subset of runs.
|
|
159
|
+
* Each worker writes to its own sharded checkpoint file to avoid race conditions.
|
|
160
|
+
*/
|
|
161
|
+
export class ParallelExecutor {
|
|
162
|
+
logger;
|
|
163
|
+
spawner;
|
|
164
|
+
systemInfo;
|
|
165
|
+
constructor(logger, spawner, systemInfo) {
|
|
166
|
+
this.logger = logger ?? new ConsoleLogger();
|
|
167
|
+
this.spawner = spawner ?? new ProcessSpawner();
|
|
168
|
+
this.systemInfo = systemInfo ?? new SystemInfo();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Split runs into batches for parallel processing.
|
|
172
|
+
* @param runs - Runs to distribute
|
|
173
|
+
* @param numberWorkers - Number of worker processes
|
|
174
|
+
* @returns Array of run batches
|
|
175
|
+
*/
|
|
176
|
+
_createBatches(runs, numberWorkers) {
|
|
177
|
+
const batchSize = Math.ceil(runs.length / numberWorkers);
|
|
178
|
+
const batches = [];
|
|
179
|
+
for (let i = 0; i < runs.length; i += batchSize) {
|
|
180
|
+
const batch = runs.slice(i, i + batchSize);
|
|
181
|
+
const batchIndex = Math.floor(i / batchSize);
|
|
182
|
+
const runIds = new Set(batch.map((r) => r.runId));
|
|
183
|
+
batches.push({
|
|
184
|
+
index: batchIndex,
|
|
185
|
+
runIds: [...runIds],
|
|
186
|
+
filter: JSON.stringify([...runIds]),
|
|
187
|
+
firstRunId: batch[0]?.runId ?? "none",
|
|
188
|
+
lastRunId: batch.at(-1)?.runId ?? "none",
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return batches;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Create worker configurations for all batches.
|
|
195
|
+
* @param batches - Run batches
|
|
196
|
+
* @param workerNames - Names for each worker
|
|
197
|
+
* @param cliPath - Path to CLI entry point
|
|
198
|
+
* @param checkpointDir - Base checkpoint directory
|
|
199
|
+
* @param timeoutMs - Per-run timeout in milliseconds
|
|
200
|
+
* @returns Array of worker configurations
|
|
201
|
+
*/
|
|
202
|
+
_createWorkerConfigs(batches, workerNames, cliPath, checkpointDir, timeoutMs) {
|
|
203
|
+
return batches.map((batch) => {
|
|
204
|
+
const workerName = workerNames[batch.index];
|
|
205
|
+
const workerCheckpointPath = shardPath(checkpointDir, batch.index);
|
|
206
|
+
const arguments_ = [
|
|
207
|
+
cliPath,
|
|
208
|
+
"evaluate",
|
|
209
|
+
"--phase=execute",
|
|
210
|
+
"--checkpoint-mode=file",
|
|
211
|
+
`--run-filter=${batch.filter}`,
|
|
212
|
+
];
|
|
213
|
+
// Add timeout if specified
|
|
214
|
+
if (timeoutMs > 0) {
|
|
215
|
+
arguments_.push(`--timeout=${timeoutMs}`);
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
index: batch.index,
|
|
219
|
+
name: workerName,
|
|
220
|
+
checkpointPath: workerCheckpointPath,
|
|
221
|
+
arguments: arguments_,
|
|
222
|
+
env: {
|
|
223
|
+
...this.systemInfo.env,
|
|
224
|
+
NODE_OPTIONS: "--max-old-space-size=4096",
|
|
225
|
+
GRAPHBOX_WORKER_NAME: workerName,
|
|
226
|
+
GRAPHBOX_WORKER_INDEX: batch.index.toString(),
|
|
227
|
+
GRAPHBOX_TOTAL_WORKERS: batches.length.toString(),
|
|
228
|
+
GRAPHBOX_CHECKPOINT_DIR: checkpointDir,
|
|
229
|
+
GRAPHBOX_CHECKPOINT_PATH: workerCheckpointPath,
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Spawn worker processes for all configurations.
|
|
236
|
+
* @param workerConfigs - Worker configurations
|
|
237
|
+
* @param nodePath - Path to node executable
|
|
238
|
+
* @param packageRoot - Package root directory
|
|
239
|
+
* @returns Array of child processes
|
|
240
|
+
*/
|
|
241
|
+
_spawnWorkers(workerConfigs, nodePath, packageRoot) {
|
|
242
|
+
return workerConfigs.map((config) => {
|
|
243
|
+
this.logger.debug(`Spawning worker ${config.index}: ${config.name} with ${config.arguments.length} args`);
|
|
244
|
+
return this.spawner.spawn(nodePath, config.arguments, {
|
|
245
|
+
stdio: "inherit",
|
|
246
|
+
cwd: packageRoot,
|
|
247
|
+
env: config.env,
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Wait for all workers to complete.
|
|
253
|
+
* @param workers - Child processes
|
|
254
|
+
* @returns Promise that resolves when all workers exit
|
|
255
|
+
*/
|
|
256
|
+
async _waitForWorkers(workers) {
|
|
257
|
+
return Promise.all(workers.map((w) => new Promise((resolve) => {
|
|
258
|
+
w.on("exit", (code) => {
|
|
259
|
+
resolve(code);
|
|
260
|
+
});
|
|
261
|
+
})));
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Execute runs using multiple parallel processes.
|
|
265
|
+
*
|
|
266
|
+
* Each worker writes to its own sharded checkpoint file to avoid race conditions.
|
|
267
|
+
* After all workers complete, the main process should merge the shards.
|
|
268
|
+
*
|
|
269
|
+
* @param runs - Planned runs to execute
|
|
270
|
+
* @param suts - SUT definitions (not used directly, passed to workers)
|
|
271
|
+
* @param cases - Case definitions (not used directly, passed to workers)
|
|
272
|
+
* @param config - Executor configuration
|
|
273
|
+
* @param options - Parallel executor options
|
|
274
|
+
* @returns Execution results (empty - CLI will load from shards)
|
|
275
|
+
*/
|
|
276
|
+
async execute(runs, _suts, _cases, config, options = {}) {
|
|
277
|
+
const numberWorkers = options.workers ?? this.systemInfo.cpuCount;
|
|
278
|
+
const nodePath = options.nodePath ?? this.systemInfo.nodePath;
|
|
279
|
+
const checkpointDir = options.checkpointDir ?? resolve(this.systemInfo.packageRoot, "results/execute");
|
|
280
|
+
const timeoutMs = options.timeoutMs ?? config.timeoutMs;
|
|
281
|
+
this.logger.info(`ParallelExecutor: Spawning ${numberWorkers} processes for ${runs.length} runs`);
|
|
282
|
+
this.logger.info(`Checkpoint directory: ${checkpointDir}`);
|
|
283
|
+
if (timeoutMs > 0) {
|
|
284
|
+
this.logger.info(`Per-run timeout: ${timeoutMs}ms (${Math.round(timeoutMs / 1000)}s)`);
|
|
285
|
+
}
|
|
286
|
+
// Generate unique names for each worker
|
|
287
|
+
const workerNames = generateWorkerNames(numberWorkers);
|
|
288
|
+
this.logger.info(`Workers: ${workerNames.map((name, index) => `${index + 1}. ${name}`).join(", ")}`);
|
|
289
|
+
// Split runs into batches
|
|
290
|
+
const batches = this._createBatches(runs, numberWorkers);
|
|
291
|
+
// Log batch information
|
|
292
|
+
for (const batch of batches) {
|
|
293
|
+
this.logger.debug(`Batch ${batch.index} has ${batch.runIds.length} runs, filter length: ${batch.filter.length}`);
|
|
294
|
+
this.logger.debug(` First run: ${batch.firstRunId}, Last run: ${batch.lastRunId}`);
|
|
295
|
+
}
|
|
296
|
+
// Create worker configurations
|
|
297
|
+
const cliPath = resolve(this.systemInfo.packageRoot, "dist/cli.js");
|
|
298
|
+
const workerConfigs = this._createWorkerConfigs(batches, workerNames, cliPath, checkpointDir, timeoutMs);
|
|
299
|
+
// Spawn worker processes
|
|
300
|
+
const workers = this._spawnWorkers(workerConfigs, nodePath, this.systemInfo.packageRoot);
|
|
301
|
+
// Wait for all workers to complete
|
|
302
|
+
const exitCodes = await this._waitForWorkers(workers);
|
|
303
|
+
this.logger.debug(`All workers exited with codes: ${exitCodes.join(", ")}`);
|
|
304
|
+
// Load and return aggregated results
|
|
305
|
+
// For now, return empty - the CLI will handle results and merge shards
|
|
306
|
+
return { results: [], errors: [] };
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Execute runs using multiple parallel processes.
|
|
311
|
+
*
|
|
312
|
+
* Each worker writes to its own sharded checkpoint file to avoid race conditions.
|
|
313
|
+
* After all workers complete, the main process should merge the shards.
|
|
314
|
+
*
|
|
315
|
+
* This is a convenience function that creates a ParallelExecutor with default dependencies.
|
|
316
|
+
* For testing or custom behavior, use the ParallelExecutor class directly.
|
|
317
|
+
*
|
|
318
|
+
* @param runs - Planned runs to execute
|
|
319
|
+
* @param suts - SUT definitions (not used directly, passed to workers)
|
|
320
|
+
* @param cases - Case definitions (not used directly, passed to workers)
|
|
321
|
+
* @param config - Executor configuration
|
|
322
|
+
* @param options - Parallel executor options
|
|
323
|
+
* @returns Execution results (empty - CLI will load from shards)
|
|
324
|
+
*/
|
|
325
|
+
export const executeParallel = async (runs, suts, cases, config, options = {}) => {
|
|
326
|
+
const executor = new ParallelExecutor();
|
|
327
|
+
return executor.execute(runs, suts, cases, config, options);
|
|
328
|
+
};
|
|
329
|
+
//# sourceMappingURL=parallel-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallel-executor.js","sourceRoot":"","sources":["../../src/executor/parallel-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgB7C;;GAEG;AACH,MAAM,OAAO,aAAa;IACzB,GAAG,CAAC,OAAe;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,OAAe;QACpB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC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AAC,CAAC;AAC7D,CAAC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic Run ID Generation
|
|
3
|
+
*
|
|
4
|
+
* Generates reproducible run IDs based on canonical inputs.
|
|
5
|
+
* The same inputs will always produce the same run ID, enabling
|
|
6
|
+
* exact result matching across executions.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Input components for run ID generation.
|
|
10
|
+
*/
|
|
11
|
+
export interface RunIdInputs {
|
|
12
|
+
/** SUT identifier */
|
|
13
|
+
sutId: string;
|
|
14
|
+
/** Case identifier */
|
|
15
|
+
caseId: string;
|
|
16
|
+
/** Random seed (if applicable) */
|
|
17
|
+
seed?: number;
|
|
18
|
+
/** Configuration hash (optional) */
|
|
19
|
+
configHash?: string;
|
|
20
|
+
/** Repetition number for statistical runs */
|
|
21
|
+
repetition?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generate a deterministic run ID from inputs.
|
|
25
|
+
*
|
|
26
|
+
* The run ID is a SHA-256 hash of the canonical JSON representation
|
|
27
|
+
* of the inputs, truncated to 16 hex characters.
|
|
28
|
+
*
|
|
29
|
+
* @param inputs - Components to hash
|
|
30
|
+
* @returns 16-character hex string
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const runId = generateRunId({
|
|
35
|
+
* sutId: "degree-prioritised-v1.0.0",
|
|
36
|
+
* caseId: "karate-v1",
|
|
37
|
+
* seed: 42,
|
|
38
|
+
* repetition: 1,
|
|
39
|
+
* });
|
|
40
|
+
* // Always returns the same value for the same inputs
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const generateRunId: (inputs: RunIdInputs) => string;
|
|
44
|
+
/**
|
|
45
|
+
* Generate a configuration hash from arbitrary config object.
|
|
46
|
+
*
|
|
47
|
+
* @param config - Configuration object
|
|
48
|
+
* @returns 8-character hex string
|
|
49
|
+
*/
|
|
50
|
+
export declare const generateConfigHash: (config: Record<string, unknown>) => string;
|
|
51
|
+
/**
|
|
52
|
+
* Validate that a run ID matches expected inputs.
|
|
53
|
+
*
|
|
54
|
+
* @param runId - Run ID to validate
|
|
55
|
+
* @param inputs - Expected inputs
|
|
56
|
+
* @returns true if run ID matches
|
|
57
|
+
*/
|
|
58
|
+
export declare const validateRunId: (runId: string, inputs: RunIdInputs) => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Parse a run ID into its components.
|
|
61
|
+
* Note: This is not reversible - run IDs are hashes.
|
|
62
|
+
* This function only validates the format.
|
|
63
|
+
*
|
|
64
|
+
* @param runId - Run ID to parse
|
|
65
|
+
* @returns Object with validation info
|
|
66
|
+
*/
|
|
67
|
+
export declare const parseRunId: (runId: string) => {
|
|
68
|
+
valid: boolean;
|
|
69
|
+
length: number;
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=run-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-id.d.ts","sourceRoot":"","sources":["../../src/executor/run-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IAEd,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IAEf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,WAAW,KAAG,MAInD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAUpE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,QAAQ,WAAW,KAAG,OACnC,CAAC;AAEjC;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAM1E,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic Run ID Generation
|
|
3
|
+
*
|
|
4
|
+
* Generates reproducible run IDs based on canonical inputs.
|
|
5
|
+
* The same inputs will always produce the same run ID, enabling
|
|
6
|
+
* exact result matching across executions.
|
|
7
|
+
*/
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
/**
|
|
10
|
+
* Generate a deterministic run ID from inputs.
|
|
11
|
+
*
|
|
12
|
+
* The run ID is a SHA-256 hash of the canonical JSON representation
|
|
13
|
+
* of the inputs, truncated to 16 hex characters.
|
|
14
|
+
*
|
|
15
|
+
* @param inputs - Components to hash
|
|
16
|
+
* @returns 16-character hex string
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const runId = generateRunId({
|
|
21
|
+
* sutId: "degree-prioritised-v1.0.0",
|
|
22
|
+
* caseId: "karate-v1",
|
|
23
|
+
* seed: 42,
|
|
24
|
+
* repetition: 1,
|
|
25
|
+
* });
|
|
26
|
+
* // Always returns the same value for the same inputs
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export const generateRunId = (inputs) => {
|
|
30
|
+
// Sort keys for canonical ordering
|
|
31
|
+
const canonical = JSON.stringify(inputs, Object.keys(inputs).sort());
|
|
32
|
+
return createHash("sha256").update(canonical).digest("hex").slice(0, 16);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Generate a configuration hash from arbitrary config object.
|
|
36
|
+
*
|
|
37
|
+
* @param config - Configuration object
|
|
38
|
+
* @returns 8-character hex string
|
|
39
|
+
*/
|
|
40
|
+
export const generateConfigHash = (config) => {
|
|
41
|
+
// Sort keys for consistent ordering, then stringify without replacer
|
|
42
|
+
// (using replacer array would filter nested properties)
|
|
43
|
+
const sortedKeys = Object.keys(config).sort();
|
|
44
|
+
const sortedObj = {};
|
|
45
|
+
for (const key of sortedKeys) {
|
|
46
|
+
sortedObj[key] = config[key];
|
|
47
|
+
}
|
|
48
|
+
const canonical = JSON.stringify(sortedObj);
|
|
49
|
+
return createHash("sha256").update(canonical).digest("hex").slice(0, 8);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Validate that a run ID matches expected inputs.
|
|
53
|
+
*
|
|
54
|
+
* @param runId - Run ID to validate
|
|
55
|
+
* @param inputs - Expected inputs
|
|
56
|
+
* @returns true if run ID matches
|
|
57
|
+
*/
|
|
58
|
+
export const validateRunId = (runId, inputs) => runId === generateRunId(inputs);
|
|
59
|
+
/**
|
|
60
|
+
* Parse a run ID into its components.
|
|
61
|
+
* Note: This is not reversible - run IDs are hashes.
|
|
62
|
+
* This function only validates the format.
|
|
63
|
+
*
|
|
64
|
+
* @param runId - Run ID to parse
|
|
65
|
+
* @returns Object with validation info
|
|
66
|
+
*/
|
|
67
|
+
export const parseRunId = (runId) => {
|
|
68
|
+
const isHex = /^[0-9a-f]+$/i.test(runId);
|
|
69
|
+
return {
|
|
70
|
+
valid: isHex && runId.length === 16,
|
|
71
|
+
length: runId.length,
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=run-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-id.js","sourceRoot":"","sources":["../../src/executor/run-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAsBzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAmB,EAAU,EAAE;IAC5D,mCAAmC;IACnC,MAAM,SAAS,GAAG,I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E,KAAK,CAAC,MAAM;KACpB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker entry point for parallel execution.
|
|
3
|
+
*
|
|
4
|
+
* This file is loaded as a worker thread and receives messages
|
|
5
|
+
* with batches of runs to execute.
|
|
6
|
+
*
|
|
7
|
+
* It uses dependency injection to allow testing of the core logic.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=worker-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-entry.d.ts","sourceRoot":"","sources":["../../src/executor/worker-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker entry point for parallel execution.
|
|
3
|
+
*
|
|
4
|
+
* This file is loaded as a worker thread and receives messages
|
|
5
|
+
* with batches of runs to execute.
|
|
6
|
+
*
|
|
7
|
+
* It uses dependency injection to allow testing of the core logic.
|
|
8
|
+
*/
|
|
9
|
+
import { dirname, resolve } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { parentPort } from "node:worker_threads";
|
|
12
|
+
import { WorkerExecutor, } from "./worker-executor.js";
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
const projectRoot = resolve(__dirname, "../../../");
|
|
16
|
+
/**
|
|
17
|
+
* Real module loader implementation for production use.
|
|
18
|
+
*/
|
|
19
|
+
class RealModuleLoader {
|
|
20
|
+
async loadExecutor() {
|
|
21
|
+
return (await import(`${projectRoot}/dist/experiments/framework/executor/executor.js`));
|
|
22
|
+
}
|
|
23
|
+
async loadEvaluate() {
|
|
24
|
+
return (await import(`${projectRoot}/dist/cli-commands/evaluate.js`));
|
|
25
|
+
}
|
|
26
|
+
async loadRegistry() {
|
|
27
|
+
return (await import(`${projectRoot}/dist/experiments/framework/registry/index.js`));
|
|
28
|
+
}
|
|
29
|
+
async loadSuts() {
|
|
30
|
+
return (await import(`${projectRoot}/dist/experiments/framework/suts/index.js`));
|
|
31
|
+
}
|
|
32
|
+
async loadDatasets() {
|
|
33
|
+
return (await import(`${projectRoot}/dist/experiments/evaluation/fixtures/benchmark-datasets.js`));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Create executor with real dependencies and start listening
|
|
37
|
+
if (parentPort) {
|
|
38
|
+
const moduleLoader = new RealModuleLoader();
|
|
39
|
+
const executor = new WorkerExecutor(parentPort, moduleLoader, projectRoot);
|
|
40
|
+
executor.start();
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=worker-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-entry.js","sourceRoot":"","sources":["../../src/executor/worker-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAON,cAAc,GACd,MAAM,sBAAsB,CAAC;AAE9B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAEpD;;GAEG;AACH,MAAM,gBAAgB;IACd,KAAK,CAAC,YAAY;QACxB,OAAO,CAAC,MAAM,MAAM,CACnB,GAAG,WAAW,kDAAkD,CAChE,CAA+B,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,YAAY;QACxB,OAAO,CAAC,MAAM,MAAM,CACnB,GAAG,WAAW,gCAAgC,CAC9C,CA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