@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,42 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const RepositoryTrajectoryPolicyV1 = Schema.Struct({
|
|
3
|
+
version: Schema.Literal(1),
|
|
4
|
+
caseId: Schema.String,
|
|
5
|
+
purpose: Schema.Literal("routing-signal"),
|
|
6
|
+
validationRecipeIds: Schema.Array(Schema.String),
|
|
7
|
+
protectedPaths: Schema.Array(Schema.String),
|
|
8
|
+
thresholds: Schema.Struct({
|
|
9
|
+
maximumToolCalls: Schema.Finite,
|
|
10
|
+
maximumFailedToolCalls: Schema.Finite,
|
|
11
|
+
maximumRepeatedFailedActions: Schema.Finite
|
|
12
|
+
}),
|
|
13
|
+
requirements: Schema.Struct({
|
|
14
|
+
passingValidationAfterLastMutation: Schema.Boolean,
|
|
15
|
+
noProtectedPathMutations: Schema.Boolean
|
|
16
|
+
}),
|
|
17
|
+
rationale: Schema.String
|
|
18
|
+
});
|
|
19
|
+
export function assertRepositoryTrajectoryPolicyV1(value) {
|
|
20
|
+
const policy = Schema.decodeUnknownSync(RepositoryTrajectoryPolicyV1)(value);
|
|
21
|
+
const { maximumToolCalls, maximumFailedToolCalls, maximumRepeatedFailedActions } = policy.thresholds;
|
|
22
|
+
if (policy.caseId.trim().length === 0 ||
|
|
23
|
+
policy.rationale.trim().length < 40 ||
|
|
24
|
+
policy.validationRecipeIds.length === 0 ||
|
|
25
|
+
new Set(policy.validationRecipeIds).size !== policy.validationRecipeIds.length ||
|
|
26
|
+
new Set(policy.protectedPaths).size !== policy.protectedPaths.length ||
|
|
27
|
+
policy.validationRecipeIds.some((id) => id.trim().length === 0) ||
|
|
28
|
+
policy.protectedPaths.some((path) => path.trim().length === 0) ||
|
|
29
|
+
!Number.isSafeInteger(maximumToolCalls) ||
|
|
30
|
+
!Number.isSafeInteger(maximumFailedToolCalls) ||
|
|
31
|
+
!Number.isSafeInteger(maximumRepeatedFailedActions) ||
|
|
32
|
+
maximumToolCalls < 16 ||
|
|
33
|
+
maximumToolCalls > 200 ||
|
|
34
|
+
maximumFailedToolCalls < 4 ||
|
|
35
|
+
maximumFailedToolCalls > Math.min(50, maximumToolCalls) ||
|
|
36
|
+
maximumRepeatedFailedActions < 2 ||
|
|
37
|
+
maximumRepeatedFailedActions > Math.min(10, maximumFailedToolCalls) ||
|
|
38
|
+
!policy.requirements.passingValidationAfterLastMutation ||
|
|
39
|
+
!policy.requirements.noProtectedPathMutations) {
|
|
40
|
+
throw new Error("repository trajectory policy requires bounded integer thresholds, post-mutation validation, protected-path discipline, and a substantive rationale");
|
|
41
|
+
}
|
|
42
|
+
}
|
package/dist/service.js
CHANGED
|
@@ -98,7 +98,7 @@ const requireHost = (host, profileId) => {
|
|
|
98
98
|
const requireResult = (host, detail) => {
|
|
99
99
|
if (host.lastResult === undefined) {
|
|
100
100
|
throw new EvalSetupTransitionError({
|
|
101
|
-
stage:
|
|
101
|
+
stage: "prepared",
|
|
102
102
|
detail
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Context, Effect, Layer } from "effect";
|
|
2
|
+
import { type RepositoryAdversaryGenerationReportV1 } from "../../repository-adversary-protocol.js";
|
|
3
|
+
import type { RepositoryCommandRecipeV1 } from "../../repository-behavior-protocol.js";
|
|
4
|
+
import type { RepositoryTaskSeedV1 } from "../../repository-task-seed-protocol.js";
|
|
5
|
+
import type { RepositoryExecutableSolutionV1 } from "../oracle-builder/service.js";
|
|
6
|
+
export declare const repositoryIntegrationMutationFamilyV1: (path: string) => string;
|
|
7
|
+
export type AdversaryShape = {
|
|
8
|
+
readonly generateDeterministic: (input: {
|
|
9
|
+
readonly repositoryRoot: string;
|
|
10
|
+
readonly seed: RepositoryTaskSeedV1;
|
|
11
|
+
readonly validationRecipe: RepositoryCommandRecipeV1;
|
|
12
|
+
readonly repetitions?: number;
|
|
13
|
+
}) => Effect.Effect<RepositoryAdversaryGenerationResultV1, import("../../errors.js").RepositoryFoundryError>;
|
|
14
|
+
};
|
|
15
|
+
export type RepositoryAdversaryGenerationResultV1 = {
|
|
16
|
+
readonly report: RepositoryAdversaryGenerationReportV1;
|
|
17
|
+
readonly solutions: readonly RepositoryExecutableSolutionV1[];
|
|
18
|
+
};
|
|
19
|
+
declare const Adversary_base: Context.ServiceClass<Adversary, "@velum-labs/routekit-eval-setup/Adversary", AdversaryShape>;
|
|
20
|
+
export declare class Adversary extends Adversary_base {
|
|
21
|
+
}
|
|
22
|
+
export declare const generateDeterministicAdversariesV1: (input: {
|
|
23
|
+
readonly repositoryRoot: string;
|
|
24
|
+
readonly seed: RepositoryTaskSeedV1;
|
|
25
|
+
readonly validationRecipe: RepositoryCommandRecipeV1;
|
|
26
|
+
readonly repetitions?: number;
|
|
27
|
+
}) => Effect.Effect<{
|
|
28
|
+
report: {
|
|
29
|
+
readonly version: 1;
|
|
30
|
+
readonly seedId: string;
|
|
31
|
+
readonly generationCoverage: {
|
|
32
|
+
readonly implementationPathCount: number;
|
|
33
|
+
readonly changedPathCount: number;
|
|
34
|
+
readonly generatedCrossFileCandidateCount: number;
|
|
35
|
+
readonly omittedCrossFileCandidateCount: number;
|
|
36
|
+
};
|
|
37
|
+
readonly candidates: readonly {
|
|
38
|
+
readonly version: 1;
|
|
39
|
+
readonly id: string;
|
|
40
|
+
readonly solutionId: string;
|
|
41
|
+
readonly family: string;
|
|
42
|
+
readonly operator: "condition-negation" | "boundary-operator" | "partial-output-drop" | "cross-file-omission";
|
|
43
|
+
readonly sourcePath: string;
|
|
44
|
+
readonly relatedPaths: readonly string[];
|
|
45
|
+
readonly sourceCommit: string;
|
|
46
|
+
readonly originalSnippet: string;
|
|
47
|
+
readonly mutatedSnippet: string;
|
|
48
|
+
readonly validationRecipeId: string;
|
|
49
|
+
readonly compilationStatus: "passed" | "failed";
|
|
50
|
+
readonly validationObservations: readonly {
|
|
51
|
+
readonly repetition: number;
|
|
52
|
+
readonly outcome: "pass" | "fail";
|
|
53
|
+
readonly detail: string;
|
|
54
|
+
}[];
|
|
55
|
+
readonly rejectionReasons: readonly string[];
|
|
56
|
+
}[];
|
|
57
|
+
readonly admittedCandidateIds: readonly string[];
|
|
58
|
+
readonly rejectedCandidateIds: readonly string[];
|
|
59
|
+
};
|
|
60
|
+
solutions: RepositoryExecutableSolutionV1[];
|
|
61
|
+
}, import("../../errors.js").RepositoryFoundryError, never>;
|
|
62
|
+
export declare const makeAdversary: Effect.Effect<AdversaryShape, never, never>;
|
|
63
|
+
export declare const AdversaryLive: Layer.Layer<Adversary, never, never>;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { Context, Effect, Layer } from "effect";
|
|
2
|
+
import { captureGitTreeSnapshotV1, readGitTreeFileV1 } from "../../adapters/git-task-history.js";
|
|
3
|
+
import { replayRepositoryCommandV1 } from "../../adapters/repository-command-runner.js";
|
|
4
|
+
import { assertRepositoryAdversaryGenerationReportV1 } from "../../repository-adversary-protocol.js";
|
|
5
|
+
const MAX_CROSS_FILE_MUTATIONS = 12;
|
|
6
|
+
const MAX_RELATED_PATHS = 16;
|
|
7
|
+
const implementationPaths = (seed) => [
|
|
8
|
+
...new Set(seed.capabilityEvidence
|
|
9
|
+
.filter((evidence) => (evidence.kind === "symbol" ||
|
|
10
|
+
evidence.kind === "protocol" ||
|
|
11
|
+
evidence.kind === "schema") &&
|
|
12
|
+
evidence.path !== undefined)
|
|
13
|
+
.map((evidence) => evidence.path))
|
|
14
|
+
];
|
|
15
|
+
const changedReferenceRanges = (initialContent, referenceContent) => {
|
|
16
|
+
if (initialContent === undefined) {
|
|
17
|
+
return [{ start: 0, end: referenceContent.length }];
|
|
18
|
+
}
|
|
19
|
+
const initialLineCounts = new Map();
|
|
20
|
+
for (const line of initialContent.split("\n")) {
|
|
21
|
+
initialLineCounts.set(line, (initialLineCounts.get(line) ?? 0) + 1);
|
|
22
|
+
}
|
|
23
|
+
const ranges = [];
|
|
24
|
+
let offset = 0;
|
|
25
|
+
for (const line of referenceContent.split("\n")) {
|
|
26
|
+
const remaining = initialLineCounts.get(line) ?? 0;
|
|
27
|
+
const end = offset + line.length;
|
|
28
|
+
if (remaining > 0) {
|
|
29
|
+
initialLineCounts.set(line, remaining - 1);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
ranges.push({ start: offset, end });
|
|
33
|
+
}
|
|
34
|
+
offset = end + 1;
|
|
35
|
+
}
|
|
36
|
+
return ranges;
|
|
37
|
+
};
|
|
38
|
+
const mutationCandidates = (path, content, eligibleRanges) => {
|
|
39
|
+
const candidates = [];
|
|
40
|
+
const eligible = (index, length) => eligibleRanges.some((range) => index < range.end && index + length > range.start);
|
|
41
|
+
const addFirstEligible = (pattern, operator, replacement) => {
|
|
42
|
+
const flags = pattern.flags.includes("g")
|
|
43
|
+
? pattern.flags
|
|
44
|
+
: `${pattern.flags}g`;
|
|
45
|
+
const matcher = new RegExp(pattern.source, flags);
|
|
46
|
+
for (const match of content.matchAll(matcher)) {
|
|
47
|
+
if (match.index === undefined || !eligible(match.index, match[0].length)) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const mutatedSnippet = replacement(match);
|
|
51
|
+
candidates.push({
|
|
52
|
+
operator,
|
|
53
|
+
originalSnippet: match[0],
|
|
54
|
+
mutatedSnippet,
|
|
55
|
+
content: content.slice(0, match.index) +
|
|
56
|
+
mutatedSnippet +
|
|
57
|
+
content.slice(match.index + match[0].length)
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
addFirstEligible(/(?<![=!])===(?!=)/u, "condition-negation", () => "!==");
|
|
63
|
+
addFirstEligible(/(?<![<>])<=(?!=)/u, "boundary-operator", () => "<");
|
|
64
|
+
addFirstEligible(/\[\.\.\.[^,\]\n]+,\s*([A-Za-z_$][\w$]*)\]/u, "partial-output-drop", (match) => `[${match[1]}]`);
|
|
65
|
+
return candidates.map((candidate) => ({
|
|
66
|
+
...candidate,
|
|
67
|
+
content: candidate.content.endsWith("\n")
|
|
68
|
+
? candidate.content
|
|
69
|
+
: `${candidate.content}\n`
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
export const repositoryIntegrationMutationFamilyV1 = (path) => {
|
|
73
|
+
const lower = path.toLowerCase();
|
|
74
|
+
const base = lower.split("/").at(-1) ?? lower;
|
|
75
|
+
if (/adapter/u.test(base) || /(^|\/)adapters?(\/|$)/u.test(lower)) {
|
|
76
|
+
return "adapter-change-omission";
|
|
77
|
+
}
|
|
78
|
+
if (/schema|protocol|contract/u.test(base)) {
|
|
79
|
+
return "schema-protocol-change-omission";
|
|
80
|
+
}
|
|
81
|
+
if (/(?:^|[._-])(?:index|facade|façade|exports?)(?:[._-]|$)/u.test(base)) {
|
|
82
|
+
return "facade-export-omission";
|
|
83
|
+
}
|
|
84
|
+
if (/reader|decode|parse|deserialize/u.test(base)) {
|
|
85
|
+
return "reader-change-omission";
|
|
86
|
+
}
|
|
87
|
+
if (/writer|encode|serialize|persist/u.test(base)) {
|
|
88
|
+
return "writer-change-omission";
|
|
89
|
+
}
|
|
90
|
+
if (/(?:cli|command|options?|flags?)/u.test(base) ||
|
|
91
|
+
/(^|\/)(?:cli|commands?)(\/|$)/u.test(lower)) {
|
|
92
|
+
return "cli-forwarding-change-omission";
|
|
93
|
+
}
|
|
94
|
+
if (/service/u.test(base) ||
|
|
95
|
+
/(^|\/)services?(\/|$)/u.test(lower)) {
|
|
96
|
+
return "service-change-omission";
|
|
97
|
+
}
|
|
98
|
+
return "cross-file-change-omission";
|
|
99
|
+
};
|
|
100
|
+
const crossFileFamily = (changed) => changed.referenceContent === undefined
|
|
101
|
+
? "removed-path-resurrection"
|
|
102
|
+
: changed.initialContent === undefined
|
|
103
|
+
? "new-path-deletion"
|
|
104
|
+
: repositoryIntegrationMutationFamilyV1(changed.path);
|
|
105
|
+
const selectCrossFileMutations = (changedPaths) => {
|
|
106
|
+
if (changedPaths.length < 2)
|
|
107
|
+
return [];
|
|
108
|
+
const byFamily = new Map();
|
|
109
|
+
for (const changed of [...changedPaths].sort((left, right) => left.path.localeCompare(right.path))) {
|
|
110
|
+
const family = crossFileFamily(changed);
|
|
111
|
+
const members = byFamily.get(family) ?? [];
|
|
112
|
+
members.push(changed);
|
|
113
|
+
byFamily.set(family, members);
|
|
114
|
+
}
|
|
115
|
+
const selected = [];
|
|
116
|
+
const families = [...byFamily.keys()].sort();
|
|
117
|
+
for (let familyIndex = 0; selected.length < MAX_CROSS_FILE_MUTATIONS; familyIndex += 1) {
|
|
118
|
+
let added = false;
|
|
119
|
+
for (const family of families) {
|
|
120
|
+
const member = byFamily.get(family)?.[familyIndex];
|
|
121
|
+
if (member === undefined)
|
|
122
|
+
continue;
|
|
123
|
+
selected.push(member);
|
|
124
|
+
added = true;
|
|
125
|
+
if (selected.length === MAX_CROSS_FILE_MUTATIONS)
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
if (!added)
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
return selected;
|
|
132
|
+
};
|
|
133
|
+
const validateGeneratedMutationV1 = Effect.fn("Adversary.validateGeneratedMutation")(function* (input) {
|
|
134
|
+
const candidateId = `adversary-${input.mutation.operator}-${String(input.sequence)}`;
|
|
135
|
+
const solutionId = `mutation-${input.mutation.operator}-${String(input.sequence)}`;
|
|
136
|
+
const validation = yield* replayRepositoryCommandV1({
|
|
137
|
+
repositoryRoot: input.repositoryRoot,
|
|
138
|
+
commit: input.referenceCommit,
|
|
139
|
+
recipe: input.validationRecipe,
|
|
140
|
+
trustedPreparationRecipes: input.seed.environment.trustedPreparationRecipes,
|
|
141
|
+
candidateValidationRecipes: input.seed.environment.candidateValidationRecipes.filter((recipe) => recipe.id !== input.validationRecipe.id),
|
|
142
|
+
fileOverrides: input.mutation.fileOverrides,
|
|
143
|
+
repetitions: input.repetitions
|
|
144
|
+
});
|
|
145
|
+
const observations = validation.map((result) => ({
|
|
146
|
+
repetition: result.repetition,
|
|
147
|
+
outcome: result.gradeExecuted &&
|
|
148
|
+
result.exitCode === 0 &&
|
|
149
|
+
!result.timedOut
|
|
150
|
+
? "pass"
|
|
151
|
+
: "fail",
|
|
152
|
+
detail: [
|
|
153
|
+
`exit=${String(result.exitCode)}`,
|
|
154
|
+
`timeout=${String(result.timedOut)}`,
|
|
155
|
+
`durationMs=${String(result.durationMs)}`,
|
|
156
|
+
...(result.outputTruncated ? ["output=truncated"] : [])
|
|
157
|
+
].join("; ")
|
|
158
|
+
}));
|
|
159
|
+
const compiled = observations.every((observation) => observation.outcome === "pass");
|
|
160
|
+
const candidate = {
|
|
161
|
+
version: 1,
|
|
162
|
+
id: candidateId,
|
|
163
|
+
solutionId,
|
|
164
|
+
family: input.mutation.family,
|
|
165
|
+
operator: input.mutation.operator,
|
|
166
|
+
sourcePath: input.mutation.sourcePath,
|
|
167
|
+
relatedPaths: [...input.mutation.relatedPaths],
|
|
168
|
+
sourceCommit: input.referenceCommit,
|
|
169
|
+
originalSnippet: input.mutation.originalSnippet,
|
|
170
|
+
mutatedSnippet: input.mutation.mutatedSnippet,
|
|
171
|
+
validationRecipeId: input.validationRecipe.id,
|
|
172
|
+
compilationStatus: compiled ? "passed" : "failed",
|
|
173
|
+
validationObservations: observations,
|
|
174
|
+
rejectionReasons: compiled
|
|
175
|
+
? []
|
|
176
|
+
: ["mutation does not pass the reviewed build or check command"]
|
|
177
|
+
};
|
|
178
|
+
const solution = compiled
|
|
179
|
+
? {
|
|
180
|
+
id: solutionId,
|
|
181
|
+
kind: "mutation",
|
|
182
|
+
family: input.mutation.family,
|
|
183
|
+
expectedClass: "wrong",
|
|
184
|
+
commit: input.referenceCommit,
|
|
185
|
+
fileOverrides: input.mutation.fileOverrides
|
|
186
|
+
}
|
|
187
|
+
: undefined;
|
|
188
|
+
return { candidate, solution };
|
|
189
|
+
});
|
|
190
|
+
export class Adversary extends Context.Service()("@velum-labs/routekit-eval-setup/Adversary") {
|
|
191
|
+
}
|
|
192
|
+
export const generateDeterministicAdversariesV1 = Effect.fn("Adversary.generateDeterministic")(function* (input) {
|
|
193
|
+
if (input.seed.referenceCommit === undefined) {
|
|
194
|
+
const report = {
|
|
195
|
+
version: 1,
|
|
196
|
+
seedId: input.seed.id,
|
|
197
|
+
generationCoverage: {
|
|
198
|
+
implementationPathCount: implementationPaths(input.seed).length,
|
|
199
|
+
changedPathCount: 0,
|
|
200
|
+
generatedCrossFileCandidateCount: 0,
|
|
201
|
+
omittedCrossFileCandidateCount: 0
|
|
202
|
+
},
|
|
203
|
+
candidates: [],
|
|
204
|
+
admittedCandidateIds: [],
|
|
205
|
+
rejectedCandidateIds: []
|
|
206
|
+
};
|
|
207
|
+
return {
|
|
208
|
+
report,
|
|
209
|
+
solutions: []
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
if (input.validationRecipe.kind !== "build" &&
|
|
213
|
+
input.validationRecipe.kind !== "check") {
|
|
214
|
+
throw new Error("deterministic adversary validation requires a reviewed build or check command");
|
|
215
|
+
}
|
|
216
|
+
const snapshot = yield* captureGitTreeSnapshotV1({
|
|
217
|
+
repositoryRoot: input.repositoryRoot,
|
|
218
|
+
requestedRef: input.seed.referenceCommit
|
|
219
|
+
});
|
|
220
|
+
const initialSnapshot = yield* captureGitTreeSnapshotV1({
|
|
221
|
+
repositoryRoot: input.repositoryRoot,
|
|
222
|
+
requestedRef: input.seed.initialState.commit
|
|
223
|
+
});
|
|
224
|
+
const candidates = [];
|
|
225
|
+
const solutions = [];
|
|
226
|
+
for (const path of implementationPaths(input.seed)) {
|
|
227
|
+
if (!snapshot.files.includes(path))
|
|
228
|
+
continue;
|
|
229
|
+
const content = yield* readGitTreeFileV1({ snapshot, path });
|
|
230
|
+
const initialContent = initialSnapshot.files.includes(path)
|
|
231
|
+
? yield* readGitTreeFileV1({ snapshot: initialSnapshot, path })
|
|
232
|
+
: undefined;
|
|
233
|
+
for (const mutation of mutationCandidates(path, content, changedReferenceRanges(initialContent, content))) {
|
|
234
|
+
const generated = yield* validateGeneratedMutationV1({
|
|
235
|
+
repositoryRoot: input.repositoryRoot,
|
|
236
|
+
referenceCommit: input.seed.referenceCommit,
|
|
237
|
+
seed: input.seed,
|
|
238
|
+
validationRecipe: input.validationRecipe,
|
|
239
|
+
repetitions: input.repetitions ?? 2,
|
|
240
|
+
sequence: candidates.length + 1,
|
|
241
|
+
mutation: {
|
|
242
|
+
operator: mutation.operator,
|
|
243
|
+
family: mutation.operator,
|
|
244
|
+
sourcePath: path,
|
|
245
|
+
relatedPaths: [],
|
|
246
|
+
originalSnippet: mutation.originalSnippet,
|
|
247
|
+
mutatedSnippet: mutation.mutatedSnippet,
|
|
248
|
+
fileOverrides: [{ path, content: mutation.content }]
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
candidates.push(generated.candidate);
|
|
252
|
+
if (generated.solution !== undefined) {
|
|
253
|
+
solutions.push(generated.solution);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
const changedPaths = [];
|
|
258
|
+
for (const path of implementationPaths(input.seed)) {
|
|
259
|
+
const referenceContent = snapshot.files.includes(path)
|
|
260
|
+
? yield* readGitTreeFileV1({ snapshot, path })
|
|
261
|
+
: undefined;
|
|
262
|
+
const initialContent = initialSnapshot.files.includes(path)
|
|
263
|
+
? yield* readGitTreeFileV1({ snapshot: initialSnapshot, path })
|
|
264
|
+
: undefined;
|
|
265
|
+
if (referenceContent !== initialContent) {
|
|
266
|
+
changedPaths.push({
|
|
267
|
+
path,
|
|
268
|
+
...(referenceContent === undefined ? {} : { referenceContent }),
|
|
269
|
+
...(initialContent === undefined ? {} : { initialContent })
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
const selectedCrossFilePaths = selectCrossFileMutations(changedPaths);
|
|
274
|
+
if (selectedCrossFilePaths.length > 0) {
|
|
275
|
+
for (const changed of selectedCrossFilePaths) {
|
|
276
|
+
const relatedPaths = changedPaths
|
|
277
|
+
.map((entry) => entry.path)
|
|
278
|
+
.filter((path) => path !== changed.path)
|
|
279
|
+
.sort()
|
|
280
|
+
.slice(0, MAX_RELATED_PATHS);
|
|
281
|
+
const fileOverrides = changed.initialContent === undefined
|
|
282
|
+
? [{ path: changed.path, delete: true }]
|
|
283
|
+
: [{ path: changed.path, content: changed.initialContent }];
|
|
284
|
+
const generated = yield* validateGeneratedMutationV1({
|
|
285
|
+
repositoryRoot: input.repositoryRoot,
|
|
286
|
+
referenceCommit: input.seed.referenceCommit,
|
|
287
|
+
seed: input.seed,
|
|
288
|
+
validationRecipe: input.validationRecipe,
|
|
289
|
+
repetitions: input.repetitions ?? 2,
|
|
290
|
+
sequence: candidates.length + 1,
|
|
291
|
+
mutation: {
|
|
292
|
+
operator: "cross-file-omission",
|
|
293
|
+
family: crossFileFamily(changed),
|
|
294
|
+
sourcePath: changed.path,
|
|
295
|
+
relatedPaths,
|
|
296
|
+
originalSnippet: changed.referenceContent ?? "<path absent>",
|
|
297
|
+
mutatedSnippet: changed.initialContent ?? "<path deleted>",
|
|
298
|
+
fileOverrides
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
candidates.push(generated.candidate);
|
|
302
|
+
if (generated.solution !== undefined) {
|
|
303
|
+
solutions.push(generated.solution);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
const report = {
|
|
308
|
+
version: 1,
|
|
309
|
+
seedId: input.seed.id,
|
|
310
|
+
generationCoverage: {
|
|
311
|
+
implementationPathCount: implementationPaths(input.seed).length,
|
|
312
|
+
changedPathCount: changedPaths.length,
|
|
313
|
+
generatedCrossFileCandidateCount: selectedCrossFilePaths.length,
|
|
314
|
+
omittedCrossFileCandidateCount: changedPaths.length >= 2
|
|
315
|
+
? changedPaths.length - selectedCrossFilePaths.length
|
|
316
|
+
: 0
|
|
317
|
+
},
|
|
318
|
+
candidates,
|
|
319
|
+
admittedCandidateIds: candidates
|
|
320
|
+
.filter((candidate) => candidate.compilationStatus === "passed")
|
|
321
|
+
.map((candidate) => candidate.id),
|
|
322
|
+
rejectedCandidateIds: candidates
|
|
323
|
+
.filter((candidate) => candidate.compilationStatus === "failed")
|
|
324
|
+
.map((candidate) => candidate.id)
|
|
325
|
+
};
|
|
326
|
+
assertRepositoryAdversaryGenerationReportV1(report);
|
|
327
|
+
return { report, solutions };
|
|
328
|
+
});
|
|
329
|
+
export const makeAdversary = Effect.succeed(Adversary.of({ generateDeterministic: generateDeterministicAdversariesV1 }));
|
|
330
|
+
export const AdversaryLive = Layer.effect(Adversary, makeAdversary);
|