@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,256 @@
|
|
|
1
|
+
import { Clock, Effect, Schema } from "effect";
|
|
2
|
+
import { checkpointDigestV1, PipelineStageError, pipelineStageToProgressStageV1 } from "../../case-pipeline-protocol.js";
|
|
3
|
+
import { RepositoryFoundryError } from "../../errors.js";
|
|
4
|
+
import { assertRepositoryHiddenFixtureSuiteV1, RepositoryHiddenFixtureSuiteV1 } from "../../repository-fixture-protocol.js";
|
|
5
|
+
import { repositoryFoundryRoleOutputCeilingV1 } from "../../repository-foundry-plan-protocol.js";
|
|
6
|
+
import { repositoryFoundryModelAssignmentV1 } from "../../repository-language-model-protocol.js";
|
|
7
|
+
import { normalizePipelineFailureV1 } from "../budgeted-model/service.js";
|
|
8
|
+
import { repositoryFixturePreflightFeedbackV1, validateRepositoryFixturesV1 } from "../fixture-validation/service.js";
|
|
9
|
+
import { reportFoundryStageV1 } from "../foundry-progress/service.js";
|
|
10
|
+
import { groundedStructuredGenerationV1 } from "../grounded-authoring/service.js";
|
|
11
|
+
import { RepositoryFoundryLanguageModel } from "../language-model/service.js";
|
|
12
|
+
const OracleAuthorSubmissionV1 = Schema.Struct({
|
|
13
|
+
suite: RepositoryHiddenFixtureSuiteV1,
|
|
14
|
+
scopeCoverage: Schema.Array(Schema.Struct({
|
|
15
|
+
scopeId: Schema.String,
|
|
16
|
+
outcome: Schema.Literals(["covered", "unsupported", "contradictory", "uncertain"]),
|
|
17
|
+
fixtureIds: Schema.Array(Schema.String),
|
|
18
|
+
detail: Schema.String
|
|
19
|
+
}))
|
|
20
|
+
});
|
|
21
|
+
const ORACLE_AUTHOR_INSTRUCTIONS = `You are the grounded hidden-oracle author for a repository coding benchmark.
|
|
22
|
+
Use the complete dimension contract, visible task, grounded scope, and the two pinned Git trees. Read and search the trees instead of guessing APIs. Build a suite of isolated hidden test overlays for user-observable behavior. Each fixture must have one complete independently executable overlay at a reviewed test path. Include boundary behavior and at least one counterfactual or metamorphic fixture. Do not inspect or prescribe a solution implementation.
|
|
23
|
+
|
|
24
|
+
Before submitting, call run_fixture separately for EVERY overlay exactly as it will appear in the submitted suite. Repair compile, setup, API, assertion, and execution failures using those observations. A model claim is not evidence: the host will independently execute every submitted overlay against the pinned reference. Never weaken an expectation merely to make the reference pass. Do not use source-text inspection, patch identity, filenames, implementation style, timing guesses, or another test's result as an assertion.
|
|
25
|
+
|
|
26
|
+
Return scopeCoverage as an advisory assessment against every grounded scope clause. Be honest about unsupported, contradictory, or uncertain clauses. A short proposal, missing field, invalid action, or failed execution is feedback for this same role, not a reason to abandon the case. Submit only {suite, scopeCoverage}.`;
|
|
27
|
+
const STAGE = "oracle";
|
|
28
|
+
const failure = (detail, cause) => new RepositoryFoundryError({
|
|
29
|
+
operation: "run-pipeline-stage",
|
|
30
|
+
detail,
|
|
31
|
+
...(cause === undefined ? {} : { cause })
|
|
32
|
+
});
|
|
33
|
+
const stageFailure = (detail, terminal, cause) => new RepositoryFoundryError({
|
|
34
|
+
operation: "run-pipeline-stage",
|
|
35
|
+
detail,
|
|
36
|
+
cause: new PipelineStageError({ stage: STAGE, detail, terminal, cause })
|
|
37
|
+
});
|
|
38
|
+
const describe = (cause) => cause instanceof Error && cause.message.trim().length > 0 ? cause.message : String(cause);
|
|
39
|
+
const allowedTestPathsOf = (seed) => new Set(seed.capabilityEvidence
|
|
40
|
+
.filter((evidence) => evidence.kind === "test" && evidence.path !== undefined)
|
|
41
|
+
.map((evidence) => evidence.path)
|
|
42
|
+
.filter((path) => !seed.environment.protectedControlPaths.includes(path)));
|
|
43
|
+
const preflightFindings = (error) => {
|
|
44
|
+
const detail = repositoryFixturePreflightFeedbackV1(error);
|
|
45
|
+
if (error.detail.startsWith("fixture preflight input failed validation") ||
|
|
46
|
+
error.detail.startsWith("fixture preflight has no independently executable")) {
|
|
47
|
+
return [{ kind: "contract", message: detail }];
|
|
48
|
+
}
|
|
49
|
+
return [{ kind: "execution", message: detail }];
|
|
50
|
+
};
|
|
51
|
+
const validateCoverageSubmission = (value, scopeIds) => {
|
|
52
|
+
const expectedScopeIds = new Set(scopeIds);
|
|
53
|
+
const submittedScopeIds = value.scopeCoverage.map((coverage) => coverage.scopeId);
|
|
54
|
+
const fixtureIds = new Set(value.suite.fixtures.map((fixture) => fixture.id));
|
|
55
|
+
const findings = [];
|
|
56
|
+
if (submittedScopeIds.length !== scopeIds.length ||
|
|
57
|
+
new Set(submittedScopeIds).size !== submittedScopeIds.length ||
|
|
58
|
+
submittedScopeIds.some((scopeId) => !expectedScopeIds.has(scopeId))) {
|
|
59
|
+
findings.push({
|
|
60
|
+
kind: "contract",
|
|
61
|
+
message: "scopeCoverage must contain every grounded scope clause exactly once"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
for (const coverage of value.scopeCoverage) {
|
|
65
|
+
if (coverage.detail.trim().length === 0) {
|
|
66
|
+
findings.push({
|
|
67
|
+
kind: "contract",
|
|
68
|
+
message: `scopeCoverage ${JSON.stringify(coverage.scopeId)} requires a non-empty assessment`
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (coverage.fixtureIds.some((fixtureId) => !fixtureIds.has(fixtureId))) {
|
|
72
|
+
findings.push({
|
|
73
|
+
kind: "contract",
|
|
74
|
+
message: `scopeCoverage ${JSON.stringify(coverage.scopeId)} refers to a fixture that is not in the submitted suite`
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return findings;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Reference execution proves fixture executability, not behavioral coverage.
|
|
82
|
+
* Until a later tournament measures an escape against a solution, every scope
|
|
83
|
+
* remains explicitly uncertain regardless of author self-report.
|
|
84
|
+
*/
|
|
85
|
+
const PREFLIGHT_COVERAGE_ADVISORY = "Reference preflight established executability only; behavioral coverage awaits measured tournament observations.";
|
|
86
|
+
const uncertainScopeCoverage = (input) => input.scopeIds.map((scopeId) => {
|
|
87
|
+
const proposed = input.proposed.find((coverage) => coverage.scopeId === scopeId);
|
|
88
|
+
let detail = proposed?.detail ?? "The oracle author supplied no additional assessment.";
|
|
89
|
+
while (detail.startsWith(PREFLIGHT_COVERAGE_ADVISORY))
|
|
90
|
+
detail = detail.slice(PREFLIGHT_COVERAGE_ADVISORY.length).trimStart();
|
|
91
|
+
return {
|
|
92
|
+
scopeId,
|
|
93
|
+
outcome: "uncertain",
|
|
94
|
+
fixtureIds: [...new Set(proposed?.fixtureIds ?? [])],
|
|
95
|
+
detail: `${PREFLIGHT_COVERAGE_ADVISORY} ${detail}`
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
const checkpointOf = (input) => ({
|
|
99
|
+
version: 1,
|
|
100
|
+
stage: STAGE,
|
|
101
|
+
parentDigest: input.parentDigest,
|
|
102
|
+
createdAt: input.createdAt,
|
|
103
|
+
suite: input.suite,
|
|
104
|
+
fixtureMetadata: input.suite.fixtures.map((fixture) => ({
|
|
105
|
+
id: fixture.id,
|
|
106
|
+
kind: fixture.kind,
|
|
107
|
+
expectationMode: fixture.expectationMode,
|
|
108
|
+
description: fixture.description,
|
|
109
|
+
expectedBehavior: fixture.expectedBehavior,
|
|
110
|
+
testPath: fixture.testPath
|
|
111
|
+
})),
|
|
112
|
+
scopeCoverage: [...input.scopeCoverage],
|
|
113
|
+
preflight: { passed: true, repairs: 0 },
|
|
114
|
+
witnesses: [],
|
|
115
|
+
coverageRounds: 0
|
|
116
|
+
});
|
|
117
|
+
/**
|
|
118
|
+
* Authors and reference-preflights the initial oracle. Proactive coverage
|
|
119
|
+
* criticism and speculative witness generation are intentionally deferred to
|
|
120
|
+
* the tournament, where actual correct and wrong solutions provide measured
|
|
121
|
+
* escapes. Only executed observations can later establish admission evidence.
|
|
122
|
+
*/
|
|
123
|
+
export const runPipelineOracleStageV1 = (input) => Effect.gen(function* () {
|
|
124
|
+
const seedCheckpoint = input.checkpoints.seed;
|
|
125
|
+
const spec = input.checkpoints.spec;
|
|
126
|
+
if (seedCheckpoint === undefined || spec === undefined) {
|
|
127
|
+
return yield* failure("oracle requires accepted seed and specification checkpoints");
|
|
128
|
+
}
|
|
129
|
+
const seed = seedCheckpoint.seed;
|
|
130
|
+
const referenceCommit = seed.referenceCommit;
|
|
131
|
+
if (seed.status !== "qualified" || referenceCommit === undefined) {
|
|
132
|
+
return yield* failure("oracle requires a replay-qualified pinned reference");
|
|
133
|
+
}
|
|
134
|
+
const parentDigest = checkpointDigestV1(spec);
|
|
135
|
+
const resumed = input.checkpoints.oracle;
|
|
136
|
+
if (resumed !== undefined && resumed.parentDigest === parentDigest) {
|
|
137
|
+
const needsMigration = resumed.witnesses.length > 0 ||
|
|
138
|
+
resumed.coverageRounds > 0 ||
|
|
139
|
+
resumed.scopeCoverage.length !== spec.scope.length ||
|
|
140
|
+
spec.scope.some((entry) => {
|
|
141
|
+
const coverage = resumed.scopeCoverage.filter((value) => value.scopeId === entry.id);
|
|
142
|
+
return coverage.length !== 1 || coverage[0]?.outcome !== "uncertain";
|
|
143
|
+
});
|
|
144
|
+
// Resume is not new science. Preserve the exact accepted checkpoint,
|
|
145
|
+
// including its advisory text and preflight metadata, unless migrating
|
|
146
|
+
// a legacy speculative-coverage checkpoint.
|
|
147
|
+
const checkpoint = needsMigration
|
|
148
|
+
? checkpointOf({
|
|
149
|
+
parentDigest,
|
|
150
|
+
createdAt: resumed.createdAt,
|
|
151
|
+
suite: resumed.suite,
|
|
152
|
+
scopeCoverage: uncertainScopeCoverage({
|
|
153
|
+
scopeIds: spec.scope.map((entry) => entry.id),
|
|
154
|
+
proposed: resumed.scopeCoverage
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
: resumed;
|
|
158
|
+
if (needsMigration)
|
|
159
|
+
yield* input.checkpoint(checkpoint);
|
|
160
|
+
yield* reportFoundryStageV1(pipelineStageToProgressStageV1(STAGE), `using checkpointed reference-preflight oracle; fixtures=${String(resumed.suite.fixtures.length)}`);
|
|
161
|
+
return checkpoint;
|
|
162
|
+
}
|
|
163
|
+
const allowedTestPaths = allowedTestPathsOf(seed);
|
|
164
|
+
if (allowedTestPaths.size === 0) {
|
|
165
|
+
return yield* stageFailure("qualified seed exposes no reviewed, unprotected test path", true, { referenceCommit });
|
|
166
|
+
}
|
|
167
|
+
yield* reportFoundryStageV1(pipelineStageToProgressStageV1(STAGE), "grounded oracle authoring with reference execution");
|
|
168
|
+
const languageModel = yield* RepositoryFoundryLanguageModel;
|
|
169
|
+
const scopeIds = spec.scope.map((entry) => entry.id);
|
|
170
|
+
let acceptedSuite;
|
|
171
|
+
const authored = yield* groundedStructuredGenerationV1({
|
|
172
|
+
checkpointStore: input.workCheckpointStore,
|
|
173
|
+
languageModel,
|
|
174
|
+
assignment: repositoryFoundryModelAssignmentV1(input.context.modelPlan, "oracle-designer"),
|
|
175
|
+
operationId: `${input.context.caseId}:pipeline:oracle:author`,
|
|
176
|
+
instructions: ORACLE_AUTHOR_INSTRUCTIONS,
|
|
177
|
+
task: {
|
|
178
|
+
dimension: input.context.dimension,
|
|
179
|
+
visibleTask: spec.visible,
|
|
180
|
+
analysis: spec.analysis,
|
|
181
|
+
groundedScope: spec.scope,
|
|
182
|
+
targetBehavior: seed.targetBehavior,
|
|
183
|
+
initialCommit: seed.initialState.commit,
|
|
184
|
+
referenceCommit,
|
|
185
|
+
gradeRecipes: seed.environment.gradeRecipes,
|
|
186
|
+
allowedTestPaths: [...allowedTestPaths]
|
|
187
|
+
},
|
|
188
|
+
outputSchema: OracleAuthorSubmissionV1,
|
|
189
|
+
schemaName: "routekit_pipeline_oracle_submission_v1",
|
|
190
|
+
tools: {
|
|
191
|
+
repositoryRoot: input.context.repositoryRoot,
|
|
192
|
+
commits: { initial: seed.initialState.commit, reference: referenceCommit },
|
|
193
|
+
allowedTestPaths,
|
|
194
|
+
seed,
|
|
195
|
+
runFixture: true
|
|
196
|
+
},
|
|
197
|
+
validateSubmission: (submission) => Effect.gen(function* () {
|
|
198
|
+
const contractFindings = yield* Effect.sync(() => {
|
|
199
|
+
try {
|
|
200
|
+
assertRepositoryHiddenFixtureSuiteV1(submission.suite);
|
|
201
|
+
return validateCoverageSubmission(submission, scopeIds);
|
|
202
|
+
}
|
|
203
|
+
catch (cause) {
|
|
204
|
+
return [
|
|
205
|
+
{ kind: "contract", message: describe(cause) }
|
|
206
|
+
];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
if (contractFindings.length > 0)
|
|
210
|
+
return contractFindings;
|
|
211
|
+
const preflight = yield* Effect.result(validateRepositoryFixturesV1({
|
|
212
|
+
checkpointStore: input.workCheckpointStore,
|
|
213
|
+
repositoryRoot: input.context.repositoryRoot,
|
|
214
|
+
operationId: `${input.context.caseId}:pipeline:oracle:author-preflight`,
|
|
215
|
+
seed,
|
|
216
|
+
suite: submission.suite,
|
|
217
|
+
allowedTestPaths,
|
|
218
|
+
context: {
|
|
219
|
+
dimension: input.context.dimension,
|
|
220
|
+
visibleTask: spec.visible,
|
|
221
|
+
groundedScope: spec.scope
|
|
222
|
+
},
|
|
223
|
+
modelPlan: input.context.modelPlan,
|
|
224
|
+
maximumRepairAttempts: 0,
|
|
225
|
+
oracleCoverageWitnessVersion: 2,
|
|
226
|
+
oracleRepairFeedbackVersion: 1
|
|
227
|
+
}).pipe(Effect.provideService(RepositoryFoundryLanguageModel, languageModel)));
|
|
228
|
+
if (preflight._tag === "Success") {
|
|
229
|
+
acceptedSuite = preflight.success.suite;
|
|
230
|
+
return [];
|
|
231
|
+
}
|
|
232
|
+
const normalized = normalizePipelineFailureV1(preflight.failure);
|
|
233
|
+
if (normalized._tag === "PipelineBudgetExhaustedError")
|
|
234
|
+
return yield* normalized;
|
|
235
|
+
if (normalized.detail.startsWith("fixture preflight stopped on infrastructure")) {
|
|
236
|
+
return yield* normalized;
|
|
237
|
+
}
|
|
238
|
+
return preflightFindings(normalized);
|
|
239
|
+
}),
|
|
240
|
+
maximumOutputTokens: repositoryFoundryRoleOutputCeilingV1("oracle-designer"),
|
|
241
|
+
maxTurns: Math.max(1, Math.trunc(input.context.budget.maxModelCalls) + 1)
|
|
242
|
+
});
|
|
243
|
+
const suite = acceptedSuite ?? authored.value.suite;
|
|
244
|
+
const checkpoint = checkpointOf({
|
|
245
|
+
parentDigest,
|
|
246
|
+
createdAt: new Date(yield* Clock.currentTimeMillis).toISOString(),
|
|
247
|
+
suite,
|
|
248
|
+
scopeCoverage: uncertainScopeCoverage({
|
|
249
|
+
scopeIds,
|
|
250
|
+
proposed: authored.value.scopeCoverage
|
|
251
|
+
})
|
|
252
|
+
});
|
|
253
|
+
yield* input.checkpoint(checkpoint);
|
|
254
|
+
yield* reportFoundryStageV1(pipelineStageToProgressStageV1(STAGE), `reference-preflight oracle ready; fixtures=${String(suite.fixtures.length)}; measured coverage deferred to tournament`);
|
|
255
|
+
return checkpoint;
|
|
256
|
+
}).pipe(Effect.mapError(normalizePipelineFailureV1));
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type PipelineStageRunV1, type SeedCheckpointV1 } from "../../case-pipeline-protocol.js";
|
|
3
|
+
/**
|
|
4
|
+
* The ranker may return a useful prefix. Omitting candidates is not a terminal
|
|
5
|
+
* exact-count failure: omitted candidates retain their lexical prefilter order
|
|
6
|
+
* and are still replay-qualified.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PipelineSeedRankingV1: Schema.Struct<{
|
|
9
|
+
readonly candidates: Schema.$Array<Schema.Struct<{
|
|
10
|
+
readonly commit: Schema.String;
|
|
11
|
+
readonly score: Schema.Finite;
|
|
12
|
+
readonly rationale: Schema.String;
|
|
13
|
+
}>>;
|
|
14
|
+
}>;
|
|
15
|
+
export type PipelineSeedRankingV1 = typeof PipelineSeedRankingV1.Type;
|
|
16
|
+
/** Rank history once, then let repeated pinned execution select the first viable seed. */
|
|
17
|
+
export declare const runPipelineSeedStageV1: PipelineStageRunV1<SeedCheckpointV1>;
|
|
18
|
+
/** Short name used by the orchestrator. */
|
|
19
|
+
export declare const runPipelineSeedV1: PipelineStageRunV1<{
|
|
20
|
+
readonly seed: {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly source: {
|
|
23
|
+
readonly kind: "historical-fix";
|
|
24
|
+
readonly changeEpisodeId: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: "historical-feature";
|
|
27
|
+
readonly changeEpisodeId: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "historical-refactor";
|
|
30
|
+
readonly changeEpisodeId: string;
|
|
31
|
+
} | {
|
|
32
|
+
readonly kind: "existing-test";
|
|
33
|
+
readonly testIds: readonly string[];
|
|
34
|
+
} | {
|
|
35
|
+
readonly kind: "public-api";
|
|
36
|
+
readonly surfaceIds: readonly string[];
|
|
37
|
+
} | {
|
|
38
|
+
readonly kind: "schema-contract";
|
|
39
|
+
readonly protocolIds: readonly string[];
|
|
40
|
+
} | {
|
|
41
|
+
readonly kind: "production-request";
|
|
42
|
+
readonly requestId: string;
|
|
43
|
+
} | {
|
|
44
|
+
readonly kind: "reviewed-synthetic-gap";
|
|
45
|
+
readonly reviewId: string;
|
|
46
|
+
};
|
|
47
|
+
readonly version: 1;
|
|
48
|
+
readonly rejectionReasons: readonly string[];
|
|
49
|
+
readonly confidence: "high" | "medium" | "review-required";
|
|
50
|
+
readonly status: "candidate" | "qualified" | "rejected";
|
|
51
|
+
readonly capabilityEvidence: readonly {
|
|
52
|
+
readonly kind: "symbol" | "package" | "public-surface" | "protocol" | "schema" | "test" | "command" | "history-episode" | "workload-signal" | "documentation";
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly path?: string | undefined;
|
|
55
|
+
}[];
|
|
56
|
+
readonly initialState: {
|
|
57
|
+
readonly commit: string;
|
|
58
|
+
readonly parentCommit?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
readonly targetBehavior: readonly {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
readonly description: string;
|
|
63
|
+
readonly critical: boolean;
|
|
64
|
+
readonly evidence: readonly {
|
|
65
|
+
readonly kind: "symbol" | "package" | "public-surface" | "protocol" | "schema" | "test" | "command" | "history-episode" | "workload-signal" | "documentation";
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly path?: string | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
}[];
|
|
70
|
+
readonly baselineObservations: readonly {
|
|
71
|
+
readonly id: string;
|
|
72
|
+
readonly kind: "test-command" | "property" | "schema" | "event-trace" | "structural";
|
|
73
|
+
readonly subjectId: string;
|
|
74
|
+
readonly outcome: "pass" | "fail" | "unknown";
|
|
75
|
+
readonly detail: string;
|
|
76
|
+
}[];
|
|
77
|
+
readonly preChangeObservations: readonly {
|
|
78
|
+
readonly id: string;
|
|
79
|
+
readonly kind: "test-command" | "property" | "schema" | "event-trace" | "structural";
|
|
80
|
+
readonly subjectId: string;
|
|
81
|
+
readonly outcome: "pass" | "fail" | "unknown";
|
|
82
|
+
readonly detail: string;
|
|
83
|
+
}[];
|
|
84
|
+
readonly postChangeObservations: readonly {
|
|
85
|
+
readonly id: string;
|
|
86
|
+
readonly kind: "test-command" | "property" | "schema" | "event-trace" | "structural";
|
|
87
|
+
readonly subjectId: string;
|
|
88
|
+
readonly outcome: "pass" | "fail" | "unknown";
|
|
89
|
+
readonly detail: string;
|
|
90
|
+
}[];
|
|
91
|
+
readonly candidateTestIds: readonly string[];
|
|
92
|
+
readonly risks: readonly ("review-required" | "external-service" | "ambiguous-intent" | "bundled-change" | "flaky-baseline" | "reference-only-oracle" | "weak-test-delta" | "unrealistic-mutation" | "private-context" | "cross-batch-instability")[];
|
|
93
|
+
readonly summary: string;
|
|
94
|
+
readonly environment: {
|
|
95
|
+
readonly protectedControlPaths: readonly string[];
|
|
96
|
+
readonly trustedPreparationRecipes: readonly {
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
99
|
+
readonly cwd: string;
|
|
100
|
+
readonly executable: string;
|
|
101
|
+
readonly args: readonly string[];
|
|
102
|
+
readonly timeoutMs: number;
|
|
103
|
+
}[];
|
|
104
|
+
readonly candidateValidationRecipes: readonly {
|
|
105
|
+
readonly id: string;
|
|
106
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
107
|
+
readonly cwd: string;
|
|
108
|
+
readonly executable: string;
|
|
109
|
+
readonly args: readonly string[];
|
|
110
|
+
readonly timeoutMs: number;
|
|
111
|
+
}[];
|
|
112
|
+
readonly baselineGradeRecipes: readonly {
|
|
113
|
+
readonly id: string;
|
|
114
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
115
|
+
readonly cwd: string;
|
|
116
|
+
readonly executable: string;
|
|
117
|
+
readonly args: readonly string[];
|
|
118
|
+
readonly timeoutMs: number;
|
|
119
|
+
}[];
|
|
120
|
+
readonly gradeRecipes: readonly {
|
|
121
|
+
readonly id: string;
|
|
122
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
123
|
+
readonly cwd: string;
|
|
124
|
+
readonly executable: string;
|
|
125
|
+
readonly args: readonly string[];
|
|
126
|
+
readonly timeoutMs: number;
|
|
127
|
+
}[];
|
|
128
|
+
readonly packageManager?: {
|
|
129
|
+
readonly name: "pnpm";
|
|
130
|
+
readonly version: string;
|
|
131
|
+
} | undefined;
|
|
132
|
+
readonly lockfilePath?: string | undefined;
|
|
133
|
+
};
|
|
134
|
+
readonly referenceCommit?: string | undefined;
|
|
135
|
+
};
|
|
136
|
+
readonly qualification: {
|
|
137
|
+
readonly seed: {
|
|
138
|
+
readonly id: string;
|
|
139
|
+
readonly source: {
|
|
140
|
+
readonly kind: "historical-fix";
|
|
141
|
+
readonly changeEpisodeId: string;
|
|
142
|
+
} | {
|
|
143
|
+
readonly kind: "historical-feature";
|
|
144
|
+
readonly changeEpisodeId: string;
|
|
145
|
+
} | {
|
|
146
|
+
readonly kind: "historical-refactor";
|
|
147
|
+
readonly changeEpisodeId: string;
|
|
148
|
+
} | {
|
|
149
|
+
readonly kind: "existing-test";
|
|
150
|
+
readonly testIds: readonly string[];
|
|
151
|
+
} | {
|
|
152
|
+
readonly kind: "public-api";
|
|
153
|
+
readonly surfaceIds: readonly string[];
|
|
154
|
+
} | {
|
|
155
|
+
readonly kind: "schema-contract";
|
|
156
|
+
readonly protocolIds: readonly string[];
|
|
157
|
+
} | {
|
|
158
|
+
readonly kind: "production-request";
|
|
159
|
+
readonly requestId: string;
|
|
160
|
+
} | {
|
|
161
|
+
readonly kind: "reviewed-synthetic-gap";
|
|
162
|
+
readonly reviewId: string;
|
|
163
|
+
};
|
|
164
|
+
readonly version: 1;
|
|
165
|
+
readonly rejectionReasons: readonly string[];
|
|
166
|
+
readonly confidence: "high" | "medium" | "review-required";
|
|
167
|
+
readonly status: "candidate" | "qualified" | "rejected";
|
|
168
|
+
readonly capabilityEvidence: readonly {
|
|
169
|
+
readonly kind: "symbol" | "package" | "public-surface" | "protocol" | "schema" | "test" | "command" | "history-episode" | "workload-signal" | "documentation";
|
|
170
|
+
readonly id: string;
|
|
171
|
+
readonly path?: string | undefined;
|
|
172
|
+
}[];
|
|
173
|
+
readonly initialState: {
|
|
174
|
+
readonly commit: string;
|
|
175
|
+
readonly parentCommit?: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
readonly targetBehavior: readonly {
|
|
178
|
+
readonly id: string;
|
|
179
|
+
readonly description: string;
|
|
180
|
+
readonly critical: boolean;
|
|
181
|
+
readonly evidence: readonly {
|
|
182
|
+
readonly kind: "symbol" | "package" | "public-surface" | "protocol" | "schema" | "test" | "command" | "history-episode" | "workload-signal" | "documentation";
|
|
183
|
+
readonly id: string;
|
|
184
|
+
readonly path?: string | undefined;
|
|
185
|
+
}[];
|
|
186
|
+
}[];
|
|
187
|
+
readonly baselineObservations: readonly {
|
|
188
|
+
readonly id: string;
|
|
189
|
+
readonly kind: "test-command" | "property" | "schema" | "event-trace" | "structural";
|
|
190
|
+
readonly subjectId: string;
|
|
191
|
+
readonly outcome: "pass" | "fail" | "unknown";
|
|
192
|
+
readonly detail: string;
|
|
193
|
+
}[];
|
|
194
|
+
readonly preChangeObservations: readonly {
|
|
195
|
+
readonly id: string;
|
|
196
|
+
readonly kind: "test-command" | "property" | "schema" | "event-trace" | "structural";
|
|
197
|
+
readonly subjectId: string;
|
|
198
|
+
readonly outcome: "pass" | "fail" | "unknown";
|
|
199
|
+
readonly detail: string;
|
|
200
|
+
}[];
|
|
201
|
+
readonly postChangeObservations: readonly {
|
|
202
|
+
readonly id: string;
|
|
203
|
+
readonly kind: "test-command" | "property" | "schema" | "event-trace" | "structural";
|
|
204
|
+
readonly subjectId: string;
|
|
205
|
+
readonly outcome: "pass" | "fail" | "unknown";
|
|
206
|
+
readonly detail: string;
|
|
207
|
+
}[];
|
|
208
|
+
readonly candidateTestIds: readonly string[];
|
|
209
|
+
readonly risks: readonly ("review-required" | "external-service" | "ambiguous-intent" | "bundled-change" | "flaky-baseline" | "reference-only-oracle" | "weak-test-delta" | "unrealistic-mutation" | "private-context" | "cross-batch-instability")[];
|
|
210
|
+
readonly summary: string;
|
|
211
|
+
readonly environment: {
|
|
212
|
+
readonly protectedControlPaths: readonly string[];
|
|
213
|
+
readonly trustedPreparationRecipes: readonly {
|
|
214
|
+
readonly id: string;
|
|
215
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
216
|
+
readonly cwd: string;
|
|
217
|
+
readonly executable: string;
|
|
218
|
+
readonly args: readonly string[];
|
|
219
|
+
readonly timeoutMs: number;
|
|
220
|
+
}[];
|
|
221
|
+
readonly candidateValidationRecipes: readonly {
|
|
222
|
+
readonly id: string;
|
|
223
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
224
|
+
readonly cwd: string;
|
|
225
|
+
readonly executable: string;
|
|
226
|
+
readonly args: readonly string[];
|
|
227
|
+
readonly timeoutMs: number;
|
|
228
|
+
}[];
|
|
229
|
+
readonly baselineGradeRecipes: readonly {
|
|
230
|
+
readonly id: string;
|
|
231
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
232
|
+
readonly cwd: string;
|
|
233
|
+
readonly executable: string;
|
|
234
|
+
readonly args: readonly string[];
|
|
235
|
+
readonly timeoutMs: number;
|
|
236
|
+
}[];
|
|
237
|
+
readonly gradeRecipes: readonly {
|
|
238
|
+
readonly id: string;
|
|
239
|
+
readonly kind: "schema" | "test" | "build" | "check" | "custom";
|
|
240
|
+
readonly cwd: string;
|
|
241
|
+
readonly executable: string;
|
|
242
|
+
readonly args: readonly string[];
|
|
243
|
+
readonly timeoutMs: number;
|
|
244
|
+
}[];
|
|
245
|
+
readonly packageManager?: {
|
|
246
|
+
readonly name: "pnpm";
|
|
247
|
+
readonly version: string;
|
|
248
|
+
} | undefined;
|
|
249
|
+
readonly lockfilePath?: string | undefined;
|
|
250
|
+
};
|
|
251
|
+
readonly referenceCommit?: string | undefined;
|
|
252
|
+
};
|
|
253
|
+
readonly stability: {
|
|
254
|
+
readonly version: 1;
|
|
255
|
+
readonly seedId: string;
|
|
256
|
+
readonly batchesRequired: number;
|
|
257
|
+
readonly repetitionsPerBatch: number;
|
|
258
|
+
readonly stable: boolean;
|
|
259
|
+
readonly batches: readonly {
|
|
260
|
+
readonly batch: number;
|
|
261
|
+
readonly status: "qualified" | "rejected";
|
|
262
|
+
readonly phaseSignatures: readonly {
|
|
263
|
+
readonly phase: "baseline" | "pre-change" | "post-change";
|
|
264
|
+
readonly signatures: readonly string[];
|
|
265
|
+
}[];
|
|
266
|
+
readonly rejectionReasons: readonly string[];
|
|
267
|
+
}[];
|
|
268
|
+
readonly divergentPhases: readonly ("baseline" | "pre-change" | "post-change")[];
|
|
269
|
+
readonly failureSignatures: readonly {
|
|
270
|
+
readonly signature: string;
|
|
271
|
+
readonly count: number;
|
|
272
|
+
}[];
|
|
273
|
+
readonly rejectionReasons: readonly string[];
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
readonly repository: {
|
|
277
|
+
readonly root: string;
|
|
278
|
+
readonly commit: string;
|
|
279
|
+
readonly tree: string;
|
|
280
|
+
};
|
|
281
|
+
readonly selection: {
|
|
282
|
+
readonly candidates: readonly {
|
|
283
|
+
readonly commit: string;
|
|
284
|
+
readonly subject: string;
|
|
285
|
+
readonly score: number;
|
|
286
|
+
readonly rationale: string;
|
|
287
|
+
}[];
|
|
288
|
+
readonly selectedCommit: string;
|
|
289
|
+
readonly rejected: readonly {
|
|
290
|
+
readonly commit: string;
|
|
291
|
+
readonly reason: string;
|
|
292
|
+
}[];
|
|
293
|
+
};
|
|
294
|
+
readonly version: 1;
|
|
295
|
+
readonly stage: "seed";
|
|
296
|
+
readonly parentDigest: string;
|
|
297
|
+
readonly createdAt: string;
|
|
298
|
+
}>;
|