@velum-labs/routekit-eval-setup 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/authoring-responses-request.d.ts +5 -0
- package/dist/adapters/authoring-responses-request.js +38 -0
- package/dist/adapters/evaluation-evidence-freshness.d.ts +7 -0
- package/dist/adapters/evaluation-evidence-freshness.js +76 -0
- package/dist/adapters/git-task-history.d.ts +67 -0
- package/dist/adapters/git-task-history.js +171 -0
- package/dist/adapters/integrated-repository-history.d.ts +21 -0
- package/dist/adapters/integrated-repository-history.js +175 -0
- package/dist/adapters/repository-command-diagnostic.d.ts +8 -0
- package/dist/adapters/repository-command-diagnostic.js +46 -0
- package/dist/adapters/repository-command-evidence.d.ts +13 -0
- package/dist/adapters/repository-command-evidence.js +102 -0
- package/dist/adapters/repository-command-runner.d.ts +238 -0
- package/dist/adapters/repository-command-runner.js +1483 -0
- package/dist/adapters/repository-import-context.d.ts +47 -0
- package/dist/adapters/repository-import-context.js +469 -0
- package/dist/adapters/repository-node-test-reporter.d.ts +3 -0
- package/dist/adapters/repository-node-test-reporter.js +27 -0
- package/dist/adapters/repository-review-evidence.d.ts +39 -0
- package/dist/adapters/repository-review-evidence.js +632 -0
- package/dist/adapters/repository-seed-selection.d.ts +7 -0
- package/dist/adapters/repository-seed-selection.js +79 -0
- package/dist/adapters/repository-solution-edits.d.ts +49 -0
- package/dist/adapters/repository-solution-edits.js +136 -0
- package/dist/adapters/repository-vitest-phase-adapter.d.ts +8 -0
- package/dist/adapters/repository-vitest-phase-adapter.js +310 -0
- package/dist/adapters/repository-vitest-reporter.d.ts +24 -0
- package/dist/adapters/repository-vitest-reporter.js +314 -0
- package/dist/adapters/strict-authoring-schema.d.ts +5 -0
- package/dist/adapters/strict-authoring-schema.js +158 -0
- package/dist/adapters/test-discovery.d.ts +30 -0
- package/dist/adapters/test-discovery.js +124 -0
- package/dist/adapters/typescript-repository-index.d.ts +51 -0
- package/dist/adapters/typescript-repository-index.js +226 -0
- package/dist/agentic-capabilities-protocol.d.ts +1373 -0
- package/dist/agentic-capabilities-protocol.js +786 -0
- package/dist/case-checkpoint-store.d.ts +29 -0
- package/dist/case-checkpoint-store.js +133 -0
- package/dist/case-pipeline-protocol-v2.d.ts +184 -0
- package/dist/case-pipeline-protocol-v2.js +193 -0
- package/dist/case-pipeline-protocol.d.ts +2626 -0
- package/dist/case-pipeline-protocol.js +371 -0
- package/dist/effect-api.d.ts +74 -10
- package/dist/effect-api.js +56 -6
- package/dist/errors.d.ts +31 -0
- package/dist/errors.js +10 -0
- package/dist/eval-capability-execution-envelope.d.ts +64 -0
- package/dist/eval-capability-execution-envelope.js +98 -0
- package/dist/eval-capability-policy.d.ts +90 -0
- package/dist/eval-capability-policy.js +107 -0
- package/dist/eval-event-log.d.ts +140 -0
- package/dist/eval-event-log.js +220 -0
- package/dist/evaluation-authoring-policy.d.ts +18 -0
- package/dist/evaluation-authoring-policy.js +19 -0
- package/dist/evaluation-authoring-validation.d.ts +22 -0
- package/dist/evaluation-authoring-validation.js +72 -0
- package/dist/evaluation-evidence.d.ts +20 -0
- package/dist/evaluation-evidence.js +319 -0
- package/dist/evaluation-grader-calibration-protocol.d.ts +108 -0
- package/dist/evaluation-grader-calibration-protocol.js +80 -0
- package/dist/evaluation-grader-calibration.d.ts +18 -0
- package/dist/evaluation-grader-calibration.js +334 -0
- package/dist/evaluation-grading-policy.d.ts +24 -0
- package/dist/evaluation-grading-policy.js +54 -0
- package/dist/evaluation-proposal-policy.d.ts +4 -0
- package/dist/evaluation-proposal-policy.js +91 -0
- package/dist/evaluation-source-retrieval.d.ts +68 -0
- package/dist/evaluation-source-retrieval.js +513 -0
- package/dist/evaluation-structure-policy.d.ts +29 -0
- package/dist/evaluation-structure-policy.js +138 -0
- package/dist/index.d.ts +124 -17
- package/dist/index.js +69 -11
- package/dist/inspection.js +2 -3
- package/dist/project-artifacts.d.ts +7 -2
- package/dist/project-artifacts.js +49 -136
- package/dist/project-authoring.d.ts +66 -5
- package/dist/project-authoring.js +783 -109
- package/dist/project-contracts.d.ts +419 -84
- package/dist/project-contracts.js +160 -52
- package/dist/project-store.js +2 -1
- package/dist/project-workflow.d.ts +5 -4
- package/dist/project-workflow.js +154 -35
- package/dist/repository-adversary-protocol.d.ts +64 -0
- package/dist/repository-adversary-protocol.js +105 -0
- package/dist/repository-behavior-protocol.d.ts +188 -0
- package/dist/repository-behavior-protocol.js +202 -0
- package/dist/repository-benchmark-protocol.d.ts +487 -0
- package/dist/repository-benchmark-protocol.js +96 -0
- package/dist/repository-execution-protocol.d.ts +150 -0
- package/dist/repository-execution-protocol.js +38 -0
- package/dist/repository-fixture-instructions.d.ts +3 -0
- package/dist/repository-fixture-instructions.js +91 -0
- package/dist/repository-fixture-protocol.d.ts +79 -0
- package/dist/repository-fixture-protocol.js +79 -0
- package/dist/repository-foundry-plan-protocol.d.ts +118 -0
- package/dist/repository-foundry-plan-protocol.js +296 -0
- package/dist/repository-foundry-progress-protocol.d.ts +52 -0
- package/dist/repository-foundry-progress-protocol.js +52 -0
- package/dist/repository-improvement-protocol.d.ts +100 -0
- package/dist/repository-improvement-protocol.js +106 -0
- package/dist/repository-language-model-protocol.d.ts +43 -0
- package/dist/repository-language-model-protocol.js +146 -0
- package/dist/repository-oracle-coverage-protocol.d.ts +18 -0
- package/dist/repository-oracle-coverage-protocol.js +39 -0
- package/dist/repository-oracle-execution-binding.d.ts +27 -0
- package/dist/repository-oracle-execution-binding.js +59 -0
- package/dist/repository-oracle-protocol.d.ts +230 -0
- package/dist/repository-oracle-protocol.js +156 -0
- package/dist/repository-oracle-scope-policy.d.ts +22 -0
- package/dist/repository-oracle-scope-policy.js +92 -0
- package/dist/repository-quality-policy.d.ts +15 -0
- package/dist/repository-quality-policy.js +357 -0
- package/dist/repository-routing-benchmark-protocol.d.ts +176 -0
- package/dist/repository-routing-benchmark-protocol.js +103 -0
- package/dist/repository-routing-model-protocol.d.ts +36 -0
- package/dist/repository-routing-model-protocol.js +89 -0
- package/dist/repository-routing-plan-protocol.d.ts +112 -0
- package/dist/repository-routing-plan-protocol.js +58 -0
- package/dist/repository-routing-quality-policy.d.ts +9 -0
- package/dist/repository-routing-quality-policy.js +191 -0
- package/dist/repository-seed-qualification-progress-protocol.d.ts +205 -0
- package/dist/repository-seed-qualification-progress-protocol.js +28 -0
- package/dist/repository-semantic-calibration-protocol.d.ts +768 -0
- package/dist/repository-semantic-calibration-protocol.js +276 -0
- package/dist/repository-semantic-calibration.d.ts +163 -0
- package/dist/repository-semantic-calibration.js +581 -0
- package/dist/repository-specification-contract-facts-protocol.d.ts +224 -0
- package/dist/repository-specification-contract-facts-protocol.js +276 -0
- package/dist/repository-specification-critique-protocol.d.ts +189 -0
- package/dist/repository-specification-critique-protocol.js +103 -0
- package/dist/repository-task-family-protocol.d.ts +24 -0
- package/dist/repository-task-family-protocol.js +37 -0
- package/dist/repository-task-seed-protocol.d.ts +384 -0
- package/dist/repository-task-seed-protocol.js +236 -0
- package/dist/repository-trajectory-protocol.d.ts +20 -0
- package/dist/repository-trajectory-protocol.js +42 -0
- package/dist/service.js +1 -1
- package/dist/services/adversary/service.d.ts +64 -0
- package/dist/services/adversary/service.js +330 -0
- package/dist/services/benchmark-compiler/service.d.ts +450 -0
- package/dist/services/benchmark-compiler/service.js +9 -0
- package/dist/services/budgeted-model/service.d.ts +118 -0
- package/dist/services/budgeted-model/service.js +460 -0
- package/dist/services/case-authoring/service.d.ts +163 -0
- package/dist/services/case-authoring/service.js +1456 -0
- package/dist/services/case-finalization/service.d.ts +283 -0
- package/dist/services/case-finalization/service.js +370 -0
- package/dist/services/case-generation/service.d.ts +619 -0
- package/dist/services/case-generation/service.js +2628 -0
- package/dist/services/case-pipeline/service.d.ts +31 -0
- package/dist/services/case-pipeline/service.js +485 -0
- package/dist/services/case-pipeline-v2/service.d.ts +70 -0
- package/dist/services/case-pipeline-v2/service.js +477 -0
- package/dist/services/command-observability/service.d.ts +13 -0
- package/dist/services/command-observability/service.js +3 -0
- package/dist/services/dimension-labeling/service.d.ts +77 -0
- package/dist/services/dimension-labeling/service.js +188 -0
- package/dist/services/eval-candidate/service.d.ts +208 -0
- package/dist/services/eval-candidate/service.js +64 -0
- package/dist/services/eval-capabilities/service.d.ts +183 -0
- package/dist/services/eval-capabilities/service.js +1433 -0
- package/dist/services/eval-environment/service.d.ts +173 -0
- package/dist/services/eval-environment/service.js +127 -0
- package/dist/services/evidence-reconstruction/service.d.ts +36 -0
- package/dist/services/evidence-reconstruction/service.js +145 -0
- package/dist/services/fixture-builder/service.d.ts +62 -0
- package/dist/services/fixture-builder/service.js +36 -0
- package/dist/services/fixture-validation/service.d.ts +75 -0
- package/dist/services/fixture-validation/service.js +295 -0
- package/dist/services/foundry/service.d.ts +831 -0
- package/dist/services/foundry/service.js +442 -0
- package/dist/services/foundry-progress/service.d.ts +62 -0
- package/dist/services/foundry-progress/service.js +149 -0
- package/dist/services/foundry-v2/service.d.ts +54 -0
- package/dist/services/foundry-v2/service.js +28 -0
- package/dist/services/grounded-authoring/service.d.ts +126 -0
- package/dist/services/grounded-authoring/service.js +822 -0
- package/dist/services/historical-case/service.d.ts +722 -0
- package/dist/services/historical-case/service.js +177 -0
- package/dist/services/improvement-loop/service.d.ts +59 -0
- package/dist/services/improvement-loop/service.js +176 -0
- package/dist/services/language-model/service.d.ts +52 -0
- package/dist/services/language-model/service.js +194 -0
- package/dist/services/oracle-builder/service.d.ts +146 -0
- package/dist/services/oracle-builder/service.js +513 -0
- package/dist/services/oracle-coverage/service.d.ts +28 -0
- package/dist/services/oracle-coverage/service.js +50 -0
- package/dist/services/oracle-coverage-witness/service.d.ts +130 -0
- package/dist/services/oracle-coverage-witness/service.js +538 -0
- package/dist/services/pipeline-challenge/service.d.ts +551 -0
- package/dist/services/pipeline-challenge/service.js +427 -0
- package/dist/services/pipeline-controls/service.d.ts +130 -0
- package/dist/services/pipeline-controls/service.js +483 -0
- package/dist/services/pipeline-oracle/service.d.ts +8 -0
- package/dist/services/pipeline-oracle/service.js +256 -0
- package/dist/services/pipeline-seed/service.d.ts +298 -0
- package/dist/services/pipeline-seed/service.js +428 -0
- package/dist/services/pipeline-spec/service.d.ts +103 -0
- package/dist/services/pipeline-spec/service.js +619 -0
- package/dist/services/pipeline-tournament/service.d.ts +258 -0
- package/dist/services/pipeline-tournament/service.js +476 -0
- package/dist/services/quality-gate/service.d.ts +233 -0
- package/dist/services/quality-gate/service.js +136 -0
- package/dist/services/repository-bundle/service.d.ts +33 -0
- package/dist/services/repository-bundle/service.js +114 -0
- package/dist/services/repository-model/service.d.ts +105 -0
- package/dist/services/repository-model/service.js +250 -0
- package/dist/services/repository-public-artifact/service.d.ts +133 -0
- package/dist/services/repository-public-artifact/service.js +330 -0
- package/dist/services/routing-benchmark/service.d.ts +362 -0
- package/dist/services/routing-benchmark/service.js +96 -0
- package/dist/services/specification-critic/service.d.ts +92 -0
- package/dist/services/specification-critic/service.js +172 -0
- package/dist/services/task-family/service.d.ts +40 -0
- package/dist/services/task-family/service.js +55 -0
- package/dist/services/task-seed/service.d.ts +906 -0
- package/dist/services/task-seed/service.js +1406 -0
- package/dist/services/task-specification/service.d.ts +27 -0
- package/dist/services/task-specification/service.js +40 -0
- package/dist/services/trajectory-policy/service.d.ts +110 -0
- package/dist/services/trajectory-policy/service.js +216 -0
- package/dist/test/agentic-capabilities-protocol.test.d.ts +1 -0
- package/dist/test/agentic-capabilities-protocol.test.js +570 -0
- package/dist/test/agentic-capabilities.test.d.ts +1 -0
- package/dist/test/agentic-capabilities.test.js +1461 -0
- package/dist/test/agentic-environment.test.d.ts +1 -0
- package/dist/test/agentic-environment.test.js +213 -0
- package/dist/test/case-pipeline-foundation.test.d.ts +1 -0
- package/dist/test/case-pipeline-foundation.test.js +535 -0
- package/dist/test/case-pipeline-protocol-v2.test.d.ts +1 -0
- package/dist/test/case-pipeline-protocol-v2.test.js +124 -0
- package/dist/test/case-pipeline-v2.test.d.ts +1 -0
- package/dist/test/case-pipeline-v2.test.js +286 -0
- package/dist/test/case-pipeline.test.d.ts +1 -0
- package/dist/test/case-pipeline.test.js +851 -0
- package/dist/test/eval-capability-policy.test.d.ts +1 -0
- package/dist/test/eval-capability-policy.test.js +50 -0
- package/dist/test/eval-event-log.test.d.ts +1 -0
- package/dist/test/eval-event-log.test.js +125 -0
- package/dist/test/evaluation-evidence-freshness.test.d.ts +1 -0
- package/dist/test/evaluation-evidence-freshness.test.js +44 -0
- package/dist/test/evaluation-evidence.test.d.ts +1 -0
- package/dist/test/evaluation-evidence.test.js +230 -0
- package/dist/test/evaluation-grader-calibration.test.d.ts +1 -0
- package/dist/test/evaluation-grader-calibration.test.js +373 -0
- package/dist/test/evaluation-proposal-digest.test.d.ts +1 -0
- package/dist/test/evaluation-proposal-digest.test.js +187 -0
- package/dist/test/evaluation-source-retrieval.test.d.ts +1 -0
- package/dist/test/evaluation-source-retrieval.test.js +237 -0
- package/dist/test/evaluation-structure-policy.test.d.ts +1 -0
- package/dist/test/evaluation-structure-policy.test.js +196 -0
- package/dist/test/fixtures/repository-resource-panel.d.ts +39 -0
- package/dist/test/fixtures/repository-resource-panel.js +111 -0
- package/dist/test/fixtures/vitest-boundary-panel.d.ts +84 -0
- package/dist/test/fixtures/vitest-boundary-panel.js +120 -0
- package/dist/test/fixtures/vitest-phase-panel.d.ts +135 -0
- package/dist/test/fixtures/vitest-phase-panel.js +213 -0
- package/dist/test/fixtures/vitest-reporter-results.d.ts +76 -0
- package/dist/test/fixtures/vitest-reporter-results.js +94 -0
- package/dist/test/grounded-authoring.test.d.ts +1 -0
- package/dist/test/grounded-authoring.test.js +565 -0
- package/dist/test/integrated-repository-history.test.d.ts +1 -0
- package/dist/test/integrated-repository-history.test.js +227 -0
- package/dist/test/project-authoring.test.js +593 -43
- package/dist/test/project-workflow.test.js +419 -40
- package/dist/test/repository-authoring-artifacts.test.d.ts +1 -0
- package/dist/test/repository-authoring-artifacts.test.js +185 -0
- package/dist/test/repository-bundle.test.d.ts +1 -0
- package/dist/test/repository-bundle.test.js +52 -0
- package/dist/test/repository-case-generation.test.d.ts +1 -0
- package/dist/test/repository-case-generation.test.js +3465 -0
- package/dist/test/repository-command-diagnostic.test.d.ts +1 -0
- package/dist/test/repository-command-diagnostic.test.js +55 -0
- package/dist/test/repository-command-signals.test.d.ts +1 -0
- package/dist/test/repository-command-signals.test.js +124 -0
- package/dist/test/repository-fixture-scope-coverage.test.d.ts +1 -0
- package/dist/test/repository-fixture-scope-coverage.test.js +127 -0
- package/dist/test/repository-fixture-validation.test.d.ts +1 -0
- package/dist/test/repository-fixture-validation.test.js +362 -0
- package/dist/test/repository-foundry-progress.test.d.ts +1 -0
- package/dist/test/repository-foundry-progress.test.js +110 -0
- package/dist/test/repository-foundry-quality.test.d.ts +1 -0
- package/dist/test/repository-foundry-quality.test.js +1138 -0
- package/dist/test/repository-import-context.test.d.ts +1 -0
- package/dist/test/repository-import-context.test.js +354 -0
- package/dist/test/repository-model-authoring.test.d.ts +1 -0
- package/dist/test/repository-model-authoring.test.js +544 -0
- package/dist/test/repository-model.test.d.ts +1 -0
- package/dist/test/repository-model.test.js +2195 -0
- package/dist/test/repository-node-test-reporter.test.d.ts +1 -0
- package/dist/test/repository-node-test-reporter.test.js +104 -0
- package/dist/test/repository-oracle-concurrency.test.d.ts +1 -0
- package/dist/test/repository-oracle-concurrency.test.js +542 -0
- package/dist/test/repository-oracle-coverage-witness.test.d.ts +1 -0
- package/dist/test/repository-oracle-coverage-witness.test.js +511 -0
- package/dist/test/repository-oracle-coverage.test.d.ts +1 -0
- package/dist/test/repository-oracle-coverage.test.js +168 -0
- package/dist/test/repository-oracle-evidence.test.d.ts +1 -0
- package/dist/test/repository-oracle-evidence.test.js +185 -0
- package/dist/test/repository-oracle-plan.test.d.ts +1 -0
- package/dist/test/repository-oracle-plan.test.js +176 -0
- package/dist/test/repository-overlay-isolation.test.d.ts +1 -0
- package/dist/test/repository-overlay-isolation.test.js +85 -0
- package/dist/test/repository-preparation-cache.test.d.ts +1 -0
- package/dist/test/repository-preparation-cache.test.js +414 -0
- package/dist/test/repository-public-artifact.test.d.ts +1 -0
- package/dist/test/repository-public-artifact.test.js +273 -0
- package/dist/test/repository-qualification-diagnostics.test.d.ts +1 -0
- package/dist/test/repository-qualification-diagnostics.test.js +524 -0
- package/dist/test/repository-reference-authoring.test.d.ts +1 -0
- package/dist/test/repository-reference-authoring.test.js +1633 -0
- package/dist/test/repository-review-evidence-v2.test.d.ts +1 -0
- package/dist/test/repository-review-evidence-v2.test.js +183 -0
- package/dist/test/repository-review-evidence.test.d.ts +1 -0
- package/dist/test/repository-review-evidence.test.js +124 -0
- package/dist/test/repository-seed-exclusions.test.d.ts +1 -0
- package/dist/test/repository-seed-exclusions.test.js +96 -0
- package/dist/test/repository-seed-selection.test.d.ts +1 -0
- package/dist/test/repository-seed-selection.test.js +504 -0
- package/dist/test/repository-semantic-calibration.test.d.ts +1 -0
- package/dist/test/repository-semantic-calibration.test.js +688 -0
- package/dist/test/repository-solution-edits.test.d.ts +1 -0
- package/dist/test/repository-solution-edits.test.js +377 -0
- package/dist/test/repository-specification-budget.test.d.ts +1 -0
- package/dist/test/repository-specification-budget.test.js +171 -0
- package/dist/test/repository-specification-contract-checkpoint.test.d.ts +1 -0
- package/dist/test/repository-specification-contract-checkpoint.test.js +228 -0
- package/dist/test/repository-specification-contract-facts.test.d.ts +1 -0
- package/dist/test/repository-specification-contract-facts.test.js +177 -0
- package/dist/test/repository-trajectory-authoring.test.d.ts +1 -0
- package/dist/test/repository-trajectory-authoring.test.js +176 -0
- package/dist/test/repository-valid-control-plan.test.d.ts +1 -0
- package/dist/test/repository-valid-control-plan.test.js +45 -0
- package/dist/test/repository-vitest-phase.test.d.ts +1 -0
- package/dist/test/repository-vitest-phase.test.js +848 -0
- package/dist/test/repository-vitest-reporter.test.d.ts +1 -0
- package/dist/test/repository-vitest-reporter.test.js +158 -0
- package/dist/test/repository-workspace-build.test.d.ts +1 -0
- package/dist/test/repository-workspace-build.test.js +160 -0
- package/dist/test/strict-authoring-schema.test.d.ts +1 -0
- package/dist/test/strict-authoring-schema.test.js +169 -0
- package/package.json +48 -6
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { assertRoutingBasisV3, routingContractDigest } from "@velum-labs/routekit-eval-contracts";
|
|
2
|
+
import { assertRepositoryReviewedDimensionLabelV1, assertRepositoryRoutingEligibilityPolicyV1 } from "./repository-routing-benchmark-protocol.js";
|
|
3
|
+
const duplicateValues = (values) => {
|
|
4
|
+
const seen = new Set();
|
|
5
|
+
const duplicates = new Set();
|
|
6
|
+
for (const value of values) {
|
|
7
|
+
if (seen.has(value))
|
|
8
|
+
duplicates.add(value);
|
|
9
|
+
seen.add(value);
|
|
10
|
+
}
|
|
11
|
+
return [...duplicates].sort();
|
|
12
|
+
};
|
|
13
|
+
const labelPurityRejectionReasons = (input) => {
|
|
14
|
+
const ordered = [...input.scores].sort((left, right) => right.score - left.score || left.dimensionId.localeCompare(right.dimensionId));
|
|
15
|
+
const primaryScore = ordered[0]?.score ?? 0;
|
|
16
|
+
const secondaryScore = ordered[1]?.score ?? 0;
|
|
17
|
+
const activeCount = ordered.filter((score) => score.score >= input.policy.activeDimensionThreshold).length;
|
|
18
|
+
return [
|
|
19
|
+
...(JSON.stringify(input.scores.map((score) => score.dimensionId)) ===
|
|
20
|
+
JSON.stringify(input.basisDimensionIds)
|
|
21
|
+
? []
|
|
22
|
+
: [`${input.source} does not cover basis dimensions in canonical order`]),
|
|
23
|
+
...(primaryScore >= input.policy.activeDimensionThreshold
|
|
24
|
+
? []
|
|
25
|
+
: [`${input.source} primary dimension is below the active threshold`]),
|
|
26
|
+
...(activeCount === 1
|
|
27
|
+
? []
|
|
28
|
+
: [`${input.source} activates ${String(activeCount)} dimensions instead of exactly one`]),
|
|
29
|
+
...(primaryScore - secondaryScore >= input.policy.minimumDominanceMargin
|
|
30
|
+
? []
|
|
31
|
+
: [`${input.source} primary dimension does not dominate its nearest competitor`]),
|
|
32
|
+
...(input.unknownProbability <= input.policy.maximumUnknownProbability
|
|
33
|
+
? []
|
|
34
|
+
: [`${input.source} unknown probability exceeds the routing threshold`])
|
|
35
|
+
];
|
|
36
|
+
};
|
|
37
|
+
const assignmentFor = (input) => {
|
|
38
|
+
if (input.reviewed === undefined) {
|
|
39
|
+
return {
|
|
40
|
+
caseId: input.benchmarkCase.id,
|
|
41
|
+
basisDigest: input.basis.basisDigest,
|
|
42
|
+
labelDigest: routingContractDigest("routekit.repository-routing-label.v1", "missing", {
|
|
43
|
+
caseId: input.benchmarkCase.id,
|
|
44
|
+
basisDigest: input.basis.basisDigest
|
|
45
|
+
}),
|
|
46
|
+
primaryScore: 0,
|
|
47
|
+
secondaryScore: 0,
|
|
48
|
+
unknownProbability: 1,
|
|
49
|
+
eligible: false,
|
|
50
|
+
rejectionReasons: ["case has no independently reviewed dimension label"]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
assertRepositoryReviewedDimensionLabelV1(input.reviewed);
|
|
54
|
+
const basisDimensionIds = input.basis.dimensions.map((dimension) => dimension.id);
|
|
55
|
+
const labelDimensionIds = input.reviewed.label.scores.map((score) => score.dimensionId);
|
|
56
|
+
const ordered = [...input.reviewed.label.scores].sort((left, right) => right.score - left.score || left.dimensionId.localeCompare(right.dimensionId));
|
|
57
|
+
const primary = ordered[0];
|
|
58
|
+
const secondary = ordered[1];
|
|
59
|
+
const primaryScore = primary?.score ?? 0;
|
|
60
|
+
const secondaryScore = secondary?.score ?? 0;
|
|
61
|
+
const activeDimensionIds = ordered
|
|
62
|
+
.filter((score) => score.score >= input.policy.activeDimensionThreshold)
|
|
63
|
+
.map((score) => score.dimensionId);
|
|
64
|
+
const approvedReviews = input.reviewed.reviews.filter((review) => review.outcome === "approve" && review.primaryDimensionId === primary?.dimensionId);
|
|
65
|
+
const criticPurityRejections = input.reviewed.reviews.flatMap((review) => labelPurityRejectionReasons({
|
|
66
|
+
source: `independent ${review.model} review`,
|
|
67
|
+
scores: review.independentLabel.scores,
|
|
68
|
+
unknownProbability: review.independentLabel.unknownProbability,
|
|
69
|
+
basisDimensionIds,
|
|
70
|
+
policy: input.policy
|
|
71
|
+
}));
|
|
72
|
+
const rejectionReasons = [
|
|
73
|
+
...(input.benchmarkCase.status === "valid-library"
|
|
74
|
+
? []
|
|
75
|
+
: [`benchmark case status is ${input.benchmarkCase.status}, not valid-library`]),
|
|
76
|
+
...(input.reviewed.caseId === input.benchmarkCase.id
|
|
77
|
+
? []
|
|
78
|
+
: ["dimension label case id does not match benchmark case"]),
|
|
79
|
+
...(input.reviewed.basisDigest === input.basis.basisDigest
|
|
80
|
+
? []
|
|
81
|
+
: ["dimension label basis digest does not match routing basis"]),
|
|
82
|
+
...(JSON.stringify(labelDimensionIds) === JSON.stringify(basisDimensionIds)
|
|
83
|
+
? []
|
|
84
|
+
: ["dimension label does not cover basis dimensions in canonical order"]),
|
|
85
|
+
...(primary === undefined
|
|
86
|
+
? ["dimension label has no primary dimension"]
|
|
87
|
+
: basisDimensionIds.includes(primary.dimensionId)
|
|
88
|
+
? []
|
|
89
|
+
: ["dimension label primary dimension is absent from the routing basis"]),
|
|
90
|
+
...(primaryScore >= input.policy.activeDimensionThreshold
|
|
91
|
+
? []
|
|
92
|
+
: ["primary dimension score is below the active threshold"]),
|
|
93
|
+
...(activeDimensionIds.length === 1
|
|
94
|
+
? []
|
|
95
|
+
: [
|
|
96
|
+
`case activates ${String(activeDimensionIds.length)} dimensions; routing evals require exactly one`
|
|
97
|
+
]),
|
|
98
|
+
...(primaryScore - secondaryScore >= input.policy.minimumDominanceMargin
|
|
99
|
+
? []
|
|
100
|
+
: ["primary dimension does not dominate the nearest confusable dimension"]),
|
|
101
|
+
...(input.reviewed.label.unknownProbability <= input.policy.maximumUnknownProbability
|
|
102
|
+
? []
|
|
103
|
+
: ["dimension label unknown probability exceeds the routing threshold"]),
|
|
104
|
+
...(approvedReviews.length === 2
|
|
105
|
+
? []
|
|
106
|
+
: ["independent Terra and Luna reviews did not both approve the primary dimension"]),
|
|
107
|
+
...criticPurityRejections
|
|
108
|
+
];
|
|
109
|
+
return {
|
|
110
|
+
caseId: input.benchmarkCase.id,
|
|
111
|
+
basisDigest: input.basis.basisDigest,
|
|
112
|
+
labelDigest: routingContractDigest("routekit.repository-routing-label.v1", "reviewed-label", input.reviewed),
|
|
113
|
+
...(primary === undefined ? {} : { primaryDimensionId: primary.dimensionId }),
|
|
114
|
+
primaryScore,
|
|
115
|
+
secondaryScore,
|
|
116
|
+
unknownProbability: input.reviewed.label.unknownProbability,
|
|
117
|
+
eligible: rejectionReasons.length === 0,
|
|
118
|
+
rejectionReasons
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export function compileRepositoryRoutingBenchmarkV1(input) {
|
|
122
|
+
assertRoutingBasisV3(input.basis);
|
|
123
|
+
assertRepositoryRoutingEligibilityPolicyV1(input.policy);
|
|
124
|
+
for (const label of input.labels) {
|
|
125
|
+
assertRepositoryReviewedDimensionLabelV1(label);
|
|
126
|
+
}
|
|
127
|
+
const duplicateCaseIds = duplicateValues(input.library.cases.map((benchmarkCase) => benchmarkCase.id));
|
|
128
|
+
const duplicateLabelIds = duplicateValues(input.labels.map((label) => label.caseId));
|
|
129
|
+
if (duplicateCaseIds.length > 0 || duplicateLabelIds.length > 0) {
|
|
130
|
+
throw new Error([
|
|
131
|
+
...(duplicateCaseIds.length === 0
|
|
132
|
+
? []
|
|
133
|
+
: [`duplicate benchmark cases: ${duplicateCaseIds.join(", ")}`]),
|
|
134
|
+
...(duplicateLabelIds.length === 0
|
|
135
|
+
? []
|
|
136
|
+
: [`duplicate dimension labels: ${duplicateLabelIds.join(", ")}`])
|
|
137
|
+
].join("; "));
|
|
138
|
+
}
|
|
139
|
+
const caseIds = new Set(input.library.cases.map((benchmarkCase) => benchmarkCase.id));
|
|
140
|
+
const unknownLabelIds = input.labels
|
|
141
|
+
.map((label) => label.caseId)
|
|
142
|
+
.filter((caseId) => !caseIds.has(caseId))
|
|
143
|
+
.sort();
|
|
144
|
+
if (unknownLabelIds.length > 0) {
|
|
145
|
+
throw new Error(`dimension labels reference unknown benchmark cases: ${unknownLabelIds.join(", ")}`);
|
|
146
|
+
}
|
|
147
|
+
const labels = new Map(input.labels.map((label) => [label.caseId, label]));
|
|
148
|
+
const assignments = input.library.cases
|
|
149
|
+
.map((benchmarkCase) => assignmentFor({
|
|
150
|
+
basis: input.basis,
|
|
151
|
+
benchmarkCase,
|
|
152
|
+
reviewed: labels.get(benchmarkCase.id),
|
|
153
|
+
policy: input.policy
|
|
154
|
+
}))
|
|
155
|
+
.sort((left, right) => left.caseId.localeCompare(right.caseId));
|
|
156
|
+
const dimensions = input.basis.dimensions.map((dimension) => {
|
|
157
|
+
const caseIdsForDimension = assignments
|
|
158
|
+
.filter((assignment) => assignment.eligible && assignment.primaryDimensionId === dimension.id)
|
|
159
|
+
.map((assignment) => assignment.caseId)
|
|
160
|
+
.sort();
|
|
161
|
+
return {
|
|
162
|
+
dimensionId: dimension.id,
|
|
163
|
+
caseIds: caseIdsForDimension,
|
|
164
|
+
minimumRequired: input.policy.minimumCasesPerDimension,
|
|
165
|
+
routingReady: caseIdsForDimension.length >= input.policy.minimumCasesPerDimension
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
const eligibleCaseIds = assignments
|
|
169
|
+
.filter((assignment) => assignment.eligible)
|
|
170
|
+
.map((assignment) => assignment.caseId)
|
|
171
|
+
.sort();
|
|
172
|
+
const eligible = new Set(eligibleCaseIds);
|
|
173
|
+
const libraryOnlyCaseIds = input.library.cases
|
|
174
|
+
.map((benchmarkCase) => benchmarkCase.id)
|
|
175
|
+
.filter((caseId) => !eligible.has(caseId))
|
|
176
|
+
.sort();
|
|
177
|
+
const coverageGaps = dimensions
|
|
178
|
+
.filter((dimension) => !dimension.routingReady)
|
|
179
|
+
.map((dimension) => `${dimension.dimensionId} has ${String(dimension.caseIds.length)}/${String(dimension.minimumRequired)} routing-eligible cases`);
|
|
180
|
+
return {
|
|
181
|
+
version: 1,
|
|
182
|
+
basis: input.basis,
|
|
183
|
+
policy: input.policy,
|
|
184
|
+
assignments,
|
|
185
|
+
dimensions,
|
|
186
|
+
eligibleCaseIds,
|
|
187
|
+
libraryOnlyCaseIds,
|
|
188
|
+
routingReady: coverageGaps.length === 0,
|
|
189
|
+
coverageGaps
|
|
190
|
+
};
|
|
191
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Durable execution units below the final seed checkpoint. These rows are
|
|
4
|
+
* scientifically incomplete by construction and become admission evidence only
|
|
5
|
+
* after every required phase and independent batch is assembled and validated.
|
|
6
|
+
*
|
|
7
|
+
* This protocol intentionally lives outside both the task-seed and execution
|
|
8
|
+
* protocols: qualification progress composes those two stable boundaries but
|
|
9
|
+
* neither boundary owns or depends on the resumable orchestration state.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RepositorySeedQualificationProgressV1: Schema.Struct<{
|
|
12
|
+
readonly version: Schema.Literal<1>;
|
|
13
|
+
readonly bindingDigest: Schema.String;
|
|
14
|
+
readonly batchesRequired: Schema.Finite;
|
|
15
|
+
readonly repetitionsPerBatch: Schema.Finite;
|
|
16
|
+
readonly completedBatches: Schema.$Array<Schema.Struct<{
|
|
17
|
+
readonly batch: Schema.Finite;
|
|
18
|
+
readonly seed: Schema.Struct<{
|
|
19
|
+
readonly version: Schema.Literal<1>;
|
|
20
|
+
readonly id: Schema.String;
|
|
21
|
+
readonly status: Schema.Literals<readonly ["candidate", "qualified", "rejected"]>;
|
|
22
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
23
|
+
readonly kind: Schema.Literal<"historical-fix">;
|
|
24
|
+
readonly changeEpisodeId: Schema.String;
|
|
25
|
+
}>, Schema.Struct<{
|
|
26
|
+
readonly kind: Schema.Literal<"historical-feature">;
|
|
27
|
+
readonly changeEpisodeId: Schema.String;
|
|
28
|
+
}>, Schema.Struct<{
|
|
29
|
+
readonly kind: Schema.Literal<"historical-refactor">;
|
|
30
|
+
readonly changeEpisodeId: Schema.String;
|
|
31
|
+
}>, Schema.Struct<{
|
|
32
|
+
readonly kind: Schema.Literal<"existing-test">;
|
|
33
|
+
readonly testIds: Schema.$Array<Schema.String>;
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
readonly kind: Schema.Literal<"public-api">;
|
|
36
|
+
readonly surfaceIds: Schema.$Array<Schema.String>;
|
|
37
|
+
}>, Schema.Struct<{
|
|
38
|
+
readonly kind: Schema.Literal<"schema-contract">;
|
|
39
|
+
readonly protocolIds: Schema.$Array<Schema.String>;
|
|
40
|
+
}>, Schema.Struct<{
|
|
41
|
+
readonly kind: Schema.Literal<"production-request">;
|
|
42
|
+
readonly requestId: Schema.String;
|
|
43
|
+
}>, Schema.Struct<{
|
|
44
|
+
readonly kind: Schema.Literal<"reviewed-synthetic-gap">;
|
|
45
|
+
readonly reviewId: Schema.String;
|
|
46
|
+
}>]>;
|
|
47
|
+
readonly summary: Schema.String;
|
|
48
|
+
readonly capabilityEvidence: Schema.$Array<Schema.Struct<{
|
|
49
|
+
readonly kind: Schema.Literals<readonly ["package", "public-surface", "symbol", "protocol", "schema", "test", "command", "history-episode", "workload-signal", "documentation"]>;
|
|
50
|
+
readonly id: Schema.String;
|
|
51
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
52
|
+
}>>;
|
|
53
|
+
readonly initialState: Schema.Struct<{
|
|
54
|
+
readonly commit: Schema.String;
|
|
55
|
+
readonly parentCommit: Schema.optionalKey<Schema.String>;
|
|
56
|
+
}>;
|
|
57
|
+
readonly targetBehavior: Schema.$Array<Schema.Struct<{
|
|
58
|
+
readonly id: Schema.String;
|
|
59
|
+
readonly description: Schema.String;
|
|
60
|
+
readonly critical: Schema.Boolean;
|
|
61
|
+
readonly evidence: Schema.$Array<Schema.Struct<{
|
|
62
|
+
readonly kind: Schema.Literals<readonly ["package", "public-surface", "symbol", "protocol", "schema", "test", "command", "history-episode", "workload-signal", "documentation"]>;
|
|
63
|
+
readonly id: Schema.String;
|
|
64
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
65
|
+
}>>;
|
|
66
|
+
}>>;
|
|
67
|
+
readonly referenceCommit: Schema.optionalKey<Schema.String>;
|
|
68
|
+
readonly baselineObservations: Schema.$Array<Schema.Struct<{
|
|
69
|
+
readonly id: Schema.String;
|
|
70
|
+
readonly kind: Schema.Literals<readonly ["test-command", "schema", "property", "event-trace", "structural"]>;
|
|
71
|
+
readonly subjectId: Schema.String;
|
|
72
|
+
readonly outcome: Schema.Literals<readonly ["pass", "fail", "unknown"]>;
|
|
73
|
+
readonly detail: Schema.String;
|
|
74
|
+
}>>;
|
|
75
|
+
readonly preChangeObservations: Schema.$Array<Schema.Struct<{
|
|
76
|
+
readonly id: Schema.String;
|
|
77
|
+
readonly kind: Schema.Literals<readonly ["test-command", "schema", "property", "event-trace", "structural"]>;
|
|
78
|
+
readonly subjectId: Schema.String;
|
|
79
|
+
readonly outcome: Schema.Literals<readonly ["pass", "fail", "unknown"]>;
|
|
80
|
+
readonly detail: Schema.String;
|
|
81
|
+
}>>;
|
|
82
|
+
readonly postChangeObservations: Schema.$Array<Schema.Struct<{
|
|
83
|
+
readonly id: Schema.String;
|
|
84
|
+
readonly kind: Schema.Literals<readonly ["test-command", "schema", "property", "event-trace", "structural"]>;
|
|
85
|
+
readonly subjectId: Schema.String;
|
|
86
|
+
readonly outcome: Schema.Literals<readonly ["pass", "fail", "unknown"]>;
|
|
87
|
+
readonly detail: Schema.String;
|
|
88
|
+
}>>;
|
|
89
|
+
readonly candidateTestIds: Schema.$Array<Schema.String>;
|
|
90
|
+
readonly environment: Schema.Struct<{
|
|
91
|
+
readonly packageManager: Schema.optionalKey<Schema.Struct<{
|
|
92
|
+
readonly name: Schema.Literal<"pnpm">;
|
|
93
|
+
readonly version: Schema.String;
|
|
94
|
+
}>>;
|
|
95
|
+
readonly lockfilePath: Schema.optionalKey<Schema.String>;
|
|
96
|
+
readonly protectedControlPaths: Schema.$Array<Schema.String>;
|
|
97
|
+
readonly trustedPreparationRecipes: Schema.$Array<Schema.Struct<{
|
|
98
|
+
readonly id: Schema.String;
|
|
99
|
+
readonly kind: Schema.Literals<readonly ["build", "test", "check", "schema", "custom"]>;
|
|
100
|
+
readonly cwd: Schema.String;
|
|
101
|
+
readonly executable: Schema.String;
|
|
102
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
103
|
+
readonly timeoutMs: Schema.Finite;
|
|
104
|
+
}>>;
|
|
105
|
+
readonly candidateValidationRecipes: Schema.$Array<Schema.Struct<{
|
|
106
|
+
readonly id: Schema.String;
|
|
107
|
+
readonly kind: Schema.Literals<readonly ["build", "test", "check", "schema", "custom"]>;
|
|
108
|
+
readonly cwd: Schema.String;
|
|
109
|
+
readonly executable: Schema.String;
|
|
110
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
111
|
+
readonly timeoutMs: Schema.Finite;
|
|
112
|
+
}>>;
|
|
113
|
+
readonly baselineGradeRecipes: Schema.$Array<Schema.Struct<{
|
|
114
|
+
readonly id: Schema.String;
|
|
115
|
+
readonly kind: Schema.Literals<readonly ["build", "test", "check", "schema", "custom"]>;
|
|
116
|
+
readonly cwd: Schema.String;
|
|
117
|
+
readonly executable: Schema.String;
|
|
118
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
119
|
+
readonly timeoutMs: Schema.Finite;
|
|
120
|
+
}>>;
|
|
121
|
+
readonly gradeRecipes: Schema.$Array<Schema.Struct<{
|
|
122
|
+
readonly id: Schema.String;
|
|
123
|
+
readonly kind: Schema.Literals<readonly ["build", "test", "check", "schema", "custom"]>;
|
|
124
|
+
readonly cwd: Schema.String;
|
|
125
|
+
readonly executable: Schema.String;
|
|
126
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
127
|
+
readonly timeoutMs: Schema.Finite;
|
|
128
|
+
}>>;
|
|
129
|
+
}>;
|
|
130
|
+
readonly confidence: Schema.Literals<readonly ["high", "medium", "review-required"]>;
|
|
131
|
+
readonly risks: Schema.$Array<Schema.Literals<readonly ["ambiguous-intent", "bundled-change", "external-service", "flaky-baseline", "reference-only-oracle", "weak-test-delta", "unrealistic-mutation", "private-context", "cross-batch-instability", "review-required"]>>;
|
|
132
|
+
readonly rejectionReasons: Schema.$Array<Schema.String>;
|
|
133
|
+
}>;
|
|
134
|
+
}>>;
|
|
135
|
+
readonly activeUnits: Schema.$Array<Schema.Struct<{
|
|
136
|
+
readonly batch: Schema.Finite;
|
|
137
|
+
readonly phase: Schema.Literals<readonly ["baseline", "pre-change", "post-change"]>;
|
|
138
|
+
readonly repetition: Schema.Finite;
|
|
139
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
140
|
+
readonly gradeExecuted: Schema.Boolean;
|
|
141
|
+
readonly trustedPreparationResults: Schema.$Array<Schema.Struct<{
|
|
142
|
+
readonly recipeId: Schema.String;
|
|
143
|
+
readonly commit: Schema.String;
|
|
144
|
+
readonly repetition: Schema.Finite;
|
|
145
|
+
readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
|
|
146
|
+
readonly exitCode: Schema.NullOr<Schema.Finite>;
|
|
147
|
+
readonly timedOut: Schema.Boolean;
|
|
148
|
+
readonly outputTruncated: Schema.Boolean;
|
|
149
|
+
readonly stdout: Schema.String;
|
|
150
|
+
readonly stderr: Schema.String;
|
|
151
|
+
readonly durationMs: Schema.Finite;
|
|
152
|
+
readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
|
|
153
|
+
}>>;
|
|
154
|
+
readonly candidateValidationResults: Schema.$Array<Schema.Struct<{
|
|
155
|
+
readonly recipeId: Schema.String;
|
|
156
|
+
readonly commit: Schema.String;
|
|
157
|
+
readonly repetition: Schema.Finite;
|
|
158
|
+
readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
|
|
159
|
+
readonly exitCode: Schema.NullOr<Schema.Finite>;
|
|
160
|
+
readonly timedOut: Schema.Boolean;
|
|
161
|
+
readonly outputTruncated: Schema.Boolean;
|
|
162
|
+
readonly stdout: Schema.String;
|
|
163
|
+
readonly stderr: Schema.String;
|
|
164
|
+
readonly durationMs: Schema.Finite;
|
|
165
|
+
readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
|
|
166
|
+
}>>;
|
|
167
|
+
readonly isolationTimings: Schema.optionalKey<Schema.Struct<{
|
|
168
|
+
readonly checkoutDurationMs: Schema.Finite;
|
|
169
|
+
readonly overlayDurationMs: Schema.Finite;
|
|
170
|
+
readonly cleanupDurationMs: Schema.Finite;
|
|
171
|
+
}>>;
|
|
172
|
+
readonly preparation: Schema.optionalKey<Schema.Struct<{
|
|
173
|
+
readonly kind: Schema.Literal<"pristine-install-template">;
|
|
174
|
+
readonly templateKey: Schema.String;
|
|
175
|
+
readonly sourceCommit: Schema.String;
|
|
176
|
+
readonly cloneDurationMs: Schema.Finite;
|
|
177
|
+
readonly sharedResults: Schema.$Array<Schema.Struct<{
|
|
178
|
+
readonly recipeId: Schema.String;
|
|
179
|
+
readonly commit: Schema.String;
|
|
180
|
+
readonly repetition: Schema.Finite;
|
|
181
|
+
readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
|
|
182
|
+
readonly exitCode: Schema.NullOr<Schema.Finite>;
|
|
183
|
+
readonly timedOut: Schema.Boolean;
|
|
184
|
+
readonly outputTruncated: Schema.Boolean;
|
|
185
|
+
readonly stdout: Schema.String;
|
|
186
|
+
readonly stderr: Schema.String;
|
|
187
|
+
readonly durationMs: Schema.Finite;
|
|
188
|
+
readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
|
|
189
|
+
}>>;
|
|
190
|
+
}>>;
|
|
191
|
+
readonly recipeId: Schema.String;
|
|
192
|
+
readonly commit: Schema.String;
|
|
193
|
+
readonly repetition: Schema.Finite;
|
|
194
|
+
readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
|
|
195
|
+
readonly exitCode: Schema.NullOr<Schema.Finite>;
|
|
196
|
+
readonly timedOut: Schema.Boolean;
|
|
197
|
+
readonly outputTruncated: Schema.Boolean;
|
|
198
|
+
readonly stdout: Schema.String;
|
|
199
|
+
readonly stderr: Schema.String;
|
|
200
|
+
readonly durationMs: Schema.Finite;
|
|
201
|
+
readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
|
|
202
|
+
}>>;
|
|
203
|
+
}>>;
|
|
204
|
+
}>;
|
|
205
|
+
export type RepositorySeedQualificationProgressV1 = typeof RepositorySeedQualificationProgressV1.Type;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { RepositoryCommandResultV1 } from "./repository-execution-protocol.js";
|
|
3
|
+
import { RepositorySeedQualificationPhaseV1, RepositoryTaskSeedV1 } from "./repository-task-seed-protocol.js";
|
|
4
|
+
/**
|
|
5
|
+
* Durable execution units below the final seed checkpoint. These rows are
|
|
6
|
+
* scientifically incomplete by construction and become admission evidence only
|
|
7
|
+
* after every required phase and independent batch is assembled and validated.
|
|
8
|
+
*
|
|
9
|
+
* This protocol intentionally lives outside both the task-seed and execution
|
|
10
|
+
* protocols: qualification progress composes those two stable boundaries but
|
|
11
|
+
* neither boundary owns or depends on the resumable orchestration state.
|
|
12
|
+
*/
|
|
13
|
+
export const RepositorySeedQualificationProgressV1 = Schema.Struct({
|
|
14
|
+
version: Schema.Literal(1),
|
|
15
|
+
bindingDigest: Schema.String,
|
|
16
|
+
batchesRequired: Schema.Finite,
|
|
17
|
+
repetitionsPerBatch: Schema.Finite,
|
|
18
|
+
completedBatches: Schema.Array(Schema.Struct({
|
|
19
|
+
batch: Schema.Finite,
|
|
20
|
+
seed: RepositoryTaskSeedV1
|
|
21
|
+
})),
|
|
22
|
+
activeUnits: Schema.Array(Schema.Struct({
|
|
23
|
+
batch: Schema.Finite,
|
|
24
|
+
phase: RepositorySeedQualificationPhaseV1,
|
|
25
|
+
repetition: Schema.Finite,
|
|
26
|
+
results: Schema.Array(RepositoryCommandResultV1)
|
|
27
|
+
}))
|
|
28
|
+
});
|