audit-tools 0.52.5 → 0.54.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/audit/cli/auditStep.d.ts +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +2 -2
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +6 -5
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +3 -16
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +22 -1
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.js +1 -1
- package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
- package/dist/audit/cli/functionalPreflight.d.ts.map +1 -1
- package/dist/audit/cli/functionalPreflight.js +6 -3
- package/dist/audit/cli/functionalPreflight.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +57 -34
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +3 -3
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +52 -77
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +1 -2
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +2 -12
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +2 -2
- package/dist/audit/cli/semanticReviewStep.d.ts +11 -2
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +14 -10
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +14 -14
- package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +1 -3
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +2 -3
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +21 -1
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.d.ts +25 -0
- package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -0
- package/dist/audit/orchestrator/architectureDiscovery.js +193 -0
- package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts +20 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +47 -0
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +37 -3
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts +2 -6
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +2 -6
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +2 -2
- package/dist/audit/orchestrator/designReviewPrompt.js +2 -2
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts +2 -3
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +2 -3
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +1 -22
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +0 -12
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +38 -37
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +2 -28
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +4 -37
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/obligationDerive.d.ts +2 -3
- package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationDerive.js +2 -3
- package/dist/audit/orchestrator/obligationDerive.js.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.d.ts +2 -0
- package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.js +5 -1
- package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +9 -0
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
- package/dist/audit/orchestrator/resultBaseline.d.ts +5 -5
- package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultBaseline.js +24 -47
- package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +2 -0
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +14 -10
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.js +1 -1
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +3 -0
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/flowCoverage.d.ts +6 -6
- package/dist/audit/types.d.ts +24 -13
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +92 -11
- package/dist/audit/types.js.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.d.ts +1908 -0
- package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/executionPlan.js +467 -0
- package/dist/remediate/contractPipeline/executionPlan.js.map +1 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +12 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js +41 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -0
- package/dist/remediate/dedup/crossLensDedup.d.ts +3 -16
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.js +2 -32
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
- package/dist/remediate/index.d.ts +2 -19
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +22 -138
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +10 -10
- package/dist/remediate/intent/intentOrdering.d.ts +6 -8
- package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
- package/dist/remediate/intent/intentOrdering.js +24 -47
- package/dist/remediate/intent/intentOrdering.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +25 -17
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +278 -218
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeAcceptance.d.ts +42 -0
- package/dist/remediate/phases/closeAcceptance.d.ts.map +1 -0
- package/dist/remediate/phases/closeAcceptance.js +66 -0
- package/dist/remediate/phases/closeAcceptance.js.map +1 -0
- package/dist/remediate/phases/closeReviewProvenance.d.ts +1 -1
- package/dist/remediate/phases/closeReviewProvenance.d.ts.map +1 -1
- package/dist/remediate/phases/closeReviewProvenance.js +9 -8
- package/dist/remediate/phases/closeReviewProvenance.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +11 -9
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +21 -86
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +30 -19
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
- package/dist/remediate/phases/plan.d.ts +3 -60
- package/dist/remediate/phases/plan.d.ts.map +1 -1
- package/dist/remediate/phases/plan.js +3 -227
- package/dist/remediate/phases/plan.js.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +19 -30
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/riskSignal.d.ts +9 -43
- package/dist/remediate/riskSignal.d.ts.map +1 -1
- package/dist/remediate/riskSignal.js +7 -28
- package/dist/remediate/riskSignal.js.map +1 -1
- package/dist/remediate/state/disposition.d.ts +2 -1
- package/dist/remediate/state/disposition.d.ts.map +1 -1
- package/dist/remediate/state/disposition.js +37 -1
- package/dist/remediate/state/disposition.js.map +1 -1
- package/dist/remediate/state/runIdentity.d.ts +2 -13
- package/dist/remediate/state/runIdentity.d.ts.map +1 -1
- package/dist/remediate/state/runIdentity.js +3 -13
- package/dist/remediate/state/runIdentity.js.map +1 -1
- package/dist/remediate/state/store.d.ts +12 -36
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +58 -150
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +406 -504
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +24 -104
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +7 -661
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +264 -3851
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +20 -142
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +48 -581
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +4 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +6 -3
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.d.ts +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +4 -21
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +161 -383
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +34 -0
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +44 -4
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/frictionCloseout.d.ts +1 -30
- package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
- package/dist/remediate/steps/frictionCloseout.js +6 -99
- package/dist/remediate/steps/frictionCloseout.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +2 -15
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +254 -1042
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.js +16 -16
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/stepUtils.d.ts +1 -1
- package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +9 -0
- package/dist/remediate/types/options.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +10 -56
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts +2 -2
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +17 -77
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/remediate/validation/verificationReport.d.ts +3 -0
- package/dist/remediate/validation/verificationReport.d.ts.map +1 -0
- package/dist/remediate/validation/verificationReport.js +28 -0
- package/dist/remediate/validation/verificationReport.js.map +1 -0
- package/dist/shared/analyzers/types.d.ts +10 -10
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/friction/triage.d.ts +7 -28
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +7 -28
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/graph/orderedReachability.js +1 -1
- package/dist/shared/graph/orderedReachability.js.map +1 -1
- package/dist/shared/index.d.ts +5 -6
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +3 -4
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +37 -5
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/prompts.d.ts +24 -10
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +27 -13
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
- package/dist/shared/reReview/projectionDiff.js +6 -14
- package/dist/shared/reReview/projectionDiff.js.map +1 -1
- package/dist/shared/types/executionPlan.d.ts +416 -0
- package/dist/shared/types/executionPlan.d.ts.map +1 -0
- package/dist/shared/types/executionPlan.js +132 -0
- package/dist/shared/types/executionPlan.js.map +1 -0
- package/dist/shared/types/remediationOutcome.d.ts +1378 -12
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +29 -1
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/{contractPipeline/verification.d.ts → verificationReport.d.ts} +9 -37
- package/dist/shared/types/verificationReport.d.ts.map +1 -0
- package/dist/shared/types/verificationReport.js +4 -0
- package/dist/shared/types/verificationReport.js.map +1 -0
- package/dist/shared/validation/findingGrounding.d.ts +3 -5
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +4 -7
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/package.json +2 -1
- package/scripts/shared/primitives.mjs +20 -0
- package/skills/audit-code/SKILL.md +5 -12
- package/skills/audit-code/audit-code.prompt.md +5 -8
- package/skills/audit-code/opencode-command-template.txt +2 -2
- package/skills/remediate-code/SKILL.md +5 -7
- package/skills/remediate-code/remediate-code.prompt.md +5 -5
- package/dispatch/lens-definitions.json +0 -46
- package/dist/remediate/contractPipeline/artifactNames.d.ts +0 -8
- package/dist/remediate/contractPipeline/artifactNames.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/artifactNames.js +0 -28
- package/dist/remediate/contractPipeline/artifactNames.js.map +0 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +0 -219
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/artifactStore.js +0 -436
- package/dist/remediate/contractPipeline/artifactStore.js.map +0 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts +0 -130
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/changeClassification.js +0 -446
- package/dist/remediate/contractPipeline/changeClassification.js.map +0 -1
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts +0 -28
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/contractReviewBinding.js +0 -75
- package/dist/remediate/contractPipeline/contractReviewBinding.js.map +0 -1
- package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts +0 -27
- package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/counterexampleFingerprint.js +0 -37
- package/dist/remediate/contractPipeline/counterexampleFingerprint.js.map +0 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +0 -131
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +0 -257
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +0 -1
- package/dist/remediate/contractPipeline/derive.d.ts +0 -173
- package/dist/remediate/contractPipeline/derive.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/derive.js +0 -477
- package/dist/remediate/contractPipeline/derive.js.map +0 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +0 -50
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.js +0 -77
- package/dist/remediate/contractPipeline/finalizedContractFields.js.map +0 -1
- package/dist/remediate/contractPipeline/idRegistry.d.ts +0 -144
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/idRegistry.js +0 -214
- package/dist/remediate/contractPipeline/idRegistry.js.map +0 -1
- package/dist/remediate/contractPipeline/obligationKinds.d.ts +0 -27
- package/dist/remediate/contractPipeline/obligationKinds.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/obligationKinds.js +0 -18
- package/dist/remediate/contractPipeline/obligationKinds.js.map +0 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +0 -125
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/phaseCut.js +0 -339
- package/dist/remediate/contractPipeline/phaseCut.js.map +0 -1
- package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts +0 -31
- package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/phaseCutArtifact.js +0 -48
- package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +0 -1
- package/dist/remediate/contractPipeline/repairState.d.ts +0 -110
- package/dist/remediate/contractPipeline/repairState.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/repairState.js +0 -185
- package/dist/remediate/contractPipeline/repairState.js.map +0 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +0 -79
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.js +0 -140
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +0 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +0 -64
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +0 -136
- package/dist/remediate/contractPipeline/semanticProjection.js.map +0 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +0 -194
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/sketchSource.js +0 -262
- package/dist/remediate/contractPipeline/sketchSource.js.map +0 -1
- package/dist/remediate/contractPipeline/testPlanCarry.d.ts +0 -17
- package/dist/remediate/contractPipeline/testPlanCarry.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/testPlanCarry.js +0 -72
- package/dist/remediate/contractPipeline/testPlanCarry.js.map +0 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts +0 -7
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/marshal.js +0 -11
- package/dist/remediate/steps/dispatch/marshal.js.map +0 -1
- package/dist/remediate/validation/contractPipeline.d.ts +0 -35
- package/dist/remediate/validation/contractPipeline.d.ts.map +0 -1
- package/dist/remediate/validation/contractPipeline.js +0 -613
- package/dist/remediate/validation/contractPipeline.js.map +0 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +0 -272
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +0 -1
- package/dist/remediate/validation/contractPipelineGates.js +0 -1397
- package/dist/remediate/validation/contractPipelineGates.js.map +0 -1
- package/dist/shared/types/contractPipeline/design.d.ts +0 -79
- package/dist/shared/types/contractPipeline/design.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/design.js +0 -16
- package/dist/shared/types/contractPipeline/design.js.map +0 -1
- package/dist/shared/types/contractPipeline/goal.d.ts +0 -41
- package/dist/shared/types/contractPipeline/goal.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/goal.js +0 -10
- package/dist/shared/types/contractPipeline/goal.js.map +0 -1
- package/dist/shared/types/contractPipeline/implementation.d.ts +0 -118
- package/dist/shared/types/contractPipeline/implementation.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/implementation.js +0 -13
- package/dist/shared/types/contractPipeline/implementation.js.map +0 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +0 -283
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/obligations.js +0 -84
- package/dist/shared/types/contractPipeline/obligations.js.map +0 -1
- package/dist/shared/types/contractPipeline/verification.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/verification.js +0 -10
- package/dist/shared/types/contractPipeline/verification.js.map +0 -1
- package/dist/shared/types/contractPipeline.d.ts +0 -48
- package/dist/shared/types/contractPipeline.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline.js +0 -32
- package/dist/shared/types/contractPipeline.js.map +0 -1
- package/dist/shared/types/obligationLedger.d.ts +0 -39
- package/dist/shared/types/obligationLedger.d.ts.map +0 -1
- package/dist/shared/types/obligationLedger.js +0 -49
- package/dist/shared/types/obligationLedger.js.map +0 -1
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Semantic projection for contract-pipeline staleness (B3).
|
|
3
|
-
*
|
|
4
|
-
* The staleness DAG used to key every dependency on the upstream's RAW payload
|
|
5
|
-
* content hash, so any byte change to an upstream — a reworded rationale, a
|
|
6
|
-
* regenerated `created_at` stamp, a reordered list — re-staled the entire
|
|
7
|
-
* downstream chain and forced a full (often LLM-driven) re-authoring of
|
|
8
|
-
* artifacts whose load-bearing inputs had not actually changed. That is the
|
|
9
|
-
* exact friction B3 names: "an edit to finalized_module_contracts re-stales
|
|
10
|
-
* obligation_ledger → test_validator_plan → contract_assessment even when the
|
|
11
|
-
* obligation set is unchanged."
|
|
12
|
-
*
|
|
13
|
-
* The fix is to make staleness content/semantics-aware: a dependency is recorded
|
|
14
|
-
* and compared by the hash of its *semantic projection* — only the structure a
|
|
15
|
-
* downstream actually consumes — not its raw bytes. A cosmetic upstream edit
|
|
16
|
-
* projects to the same value, so downstreams stay fresh; a real change to the
|
|
17
|
-
* load-bearing structure (a new module invariant, a changed interface) projects
|
|
18
|
-
* differently and correctly re-stales.
|
|
19
|
-
*
|
|
20
|
-
* This mirrors audit-code's `normalizeForMetadataHash`
|
|
21
|
-
* (`src/shared/artifactFreshness.ts`): strip non-semantic provenance fields
|
|
22
|
-
* universally, then apply a per-artifact structural projection. The two
|
|
23
|
-
* orchestrators stay in conceptual parity (semantic-projection staleness) while
|
|
24
|
-
* each owns the projection table for its own artifact set.
|
|
25
|
-
*/
|
|
26
|
-
import { isRecord, stableStringifyProjection } from "audit-tools/shared";
|
|
27
|
-
import { DERIVABLE_MODULE_CONTRACT_FIELDS } from "./finalizedContractFields.js";
|
|
28
|
-
export { stableStringifyProjection };
|
|
29
|
-
/**
|
|
30
|
-
* Non-semantic top-level fields stripped from EVERY artifact before projecting.
|
|
31
|
-
* These are provenance (wall-clock stamps), never meaning: re-deriving the
|
|
32
|
-
* obligation ledger or re-emitting any artifact mints a fresh `created_at`, and
|
|
33
|
-
* without stripping it the artifact's hash churns on every rebuild and
|
|
34
|
-
* perpetually re-stales its downstreams — a finalization-oscillation hazard.
|
|
35
|
-
*/
|
|
36
|
-
const UNIVERSAL_NON_SEMANTIC_FIELDS = ["created_at", "generated_at"];
|
|
37
|
-
/**
|
|
38
|
-
* The module-contract fields that are load-bearing for ALL downstreams, at BOTH
|
|
39
|
-
* layers (the intermediate `module_contracts` draft and the
|
|
40
|
-
* `finalized_module_contracts`). These are the fields the deterministic
|
|
41
|
-
* consumers read: `deriveObligationLedger` derives the obligation set and
|
|
42
|
-
* test-plan premises from them, and `buildBaselineSymbolCorpus`
|
|
43
|
-
* (`contractPipeline/changeClassification.ts`) additionally builds the
|
|
44
|
-
* change-vs-addition corpus from the declared interface surface — `inputs`,
|
|
45
|
-
* `outputs`, `side_effects`, `validation_boundary` — so a side_effects-only
|
|
46
|
-
* edit is exactly as load-bearing as an interface edit and re-stales the
|
|
47
|
-
* obligation_ledger like any other consumed field (CP-NODE-19). Never the
|
|
48
|
-
* surrounding rationale/narrative/seam prose: a pure-prose edit leaves the
|
|
49
|
-
* whole obligation-bearing chain fresh, while a changed interface, a new
|
|
50
|
-
* invariant, or a changed side effect correctly re-stales it.
|
|
51
|
-
*/
|
|
52
|
-
// The projection's field list is the COPIED half of the ONE module-contract
|
|
53
|
-
// vocabulary (`finalizedContractFields.ts`) — see that module for why
|
|
54
|
-
// `seam_adjustments` (DERIVED at finalization, read by no deterministic
|
|
55
|
-
// consumer) is excluded: a re-agreed seam must not re-stale the ledger.
|
|
56
|
-
export { DERIVABLE_MODULE_CONTRACT_FIELDS };
|
|
57
|
-
function stripFields(record, fields) {
|
|
58
|
-
const drop = new Set(fields);
|
|
59
|
-
return Object.fromEntries(Object.entries(record).filter(([key]) => !drop.has(key)));
|
|
60
|
-
}
|
|
61
|
-
function projectModuleContract(value, fields) {
|
|
62
|
-
const record = isRecord(value) ? value : {};
|
|
63
|
-
const out = {};
|
|
64
|
-
for (const field of fields) {
|
|
65
|
-
// Skip ABSENT fields rather than projecting them as undefined: a projection
|
|
66
|
-
// must be stable across a JSON round-trip (the review snapshot stores its
|
|
67
|
-
// reviewed_inputs as JSON, and JSON.stringify drops undefined values), so
|
|
68
|
-
// `side_effects: undefined` on the live side would read as an ADDED field
|
|
69
|
-
// against the round-tripped snapshot and fabricate a re-review delta.
|
|
70
|
-
if (record[field] === undefined)
|
|
71
|
-
continue;
|
|
72
|
-
out[field] = record[field];
|
|
73
|
-
}
|
|
74
|
-
return out;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Collapse cosmetic whitespace in every projected string (trim + runs → single
|
|
78
|
-
* space), recursively. A reflow / trailing-space / indentation edit to a contract
|
|
79
|
-
* field is not a semantic change, but without this it churns the projection hash
|
|
80
|
-
* and re-stales the downstream chain. Safe: the downstream gates/derivers match on
|
|
81
|
-
* word boundaries and substrings, which whitespace normalization never alters.
|
|
82
|
-
*/
|
|
83
|
-
function normalizeWhitespaceDeep(value) {
|
|
84
|
-
if (typeof value === "string")
|
|
85
|
-
return value.replace(/\s+/g, " ").trim();
|
|
86
|
-
if (Array.isArray(value))
|
|
87
|
-
return value.map(normalizeWhitespaceDeep);
|
|
88
|
-
if (isRecord(value)) {
|
|
89
|
-
const out = {};
|
|
90
|
-
for (const [key, v] of Object.entries(value))
|
|
91
|
-
out[key] = normalizeWhitespaceDeep(v);
|
|
92
|
-
return out;
|
|
93
|
-
}
|
|
94
|
-
return value;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Project a contract-pipeline artifact payload to only its load-bearing
|
|
98
|
-
* structure for downstream-staleness purposes. The universal provenance strip
|
|
99
|
-
* applies to every artifact; both module-contract artifacts
|
|
100
|
-
* (`module_contracts` and `finalized_module_contracts`) additionally project
|
|
101
|
-
* their `module_contracts` entries to the derivable fields. Artifacts with no
|
|
102
|
-
* special case fall back to the provenance-stripped payload (conservative:
|
|
103
|
-
* behaves like the raw payload minus stamps).
|
|
104
|
-
*
|
|
105
|
-
* Non-object payloads pass through unchanged.
|
|
106
|
-
*/
|
|
107
|
-
export function semanticProjection(name, payload) {
|
|
108
|
-
if (!isRecord(payload))
|
|
109
|
-
return payload;
|
|
110
|
-
const stripped = stripFields(payload, UNIVERSAL_NON_SEMANTIC_FIELDS);
|
|
111
|
-
// Both the intermediate `module_contracts` and the `finalized_module_contracts`
|
|
112
|
-
// carry the same module-entry shape; narrow each entry to the derivable fields —
|
|
113
|
-
// including `side_effects`, which the baseline symbol corpus reads at both
|
|
114
|
-
// layers. A reworded per-module rationale / a tweaked non-derivable array
|
|
115
|
-
// (seam_adjustments / neighbor_needs) projects identically while a changed
|
|
116
|
-
// interface / new invariant / side effect does not. Keep every top-level field
|
|
117
|
-
// (contract_version, goal_id, …): the narrowing is per-entry, so any top-level
|
|
118
|
-
// field a downstream might read still participates in staleness.
|
|
119
|
-
if (name === "finalized_module_contracts" || name === "module_contracts") {
|
|
120
|
-
if (Array.isArray(stripped.module_contracts)) {
|
|
121
|
-
return normalizeWhitespaceDeep({
|
|
122
|
-
...stripped,
|
|
123
|
-
module_contracts: stripped.module_contracts.map((entry) => projectModuleContract(entry, DERIVABLE_MODULE_CONTRACT_FIELDS)),
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
return normalizeWhitespaceDeep(stripped);
|
|
127
|
-
}
|
|
128
|
-
return normalizeWhitespaceDeep(stripped);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* The order-independent stable serialization used to hash a projection is the
|
|
132
|
-
* shared `stableStringifyProjection` (re-exported above) — single-sourced in
|
|
133
|
-
* `audit-tools/shared` so audit-code and remediate-code hash projections
|
|
134
|
-
* identically.
|
|
135
|
-
*/
|
|
136
|
-
//# sourceMappingURL=semanticProjection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticProjection.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/semanticProjection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,6BAA6B,GAAsB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAExF;;;;;;;;;;;;;;GAcG;AACH,4EAA4E;AAC5E,sEAAsE;AACtE,wEAAwE;AACxE,wEAAwE;AACxE,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAE5C,SAAS,WAAW,CAClB,MAA+B,EAC/B,MAAyB;IAEzB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAC5B,KAAc,EACd,MAAyB;IAEzB,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,C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A2E;IAC3E,0EAA0E;IAC1E,2EAA2E;IAC3E,+EAA+E;IAC/E,+EAA+E;IAC/E,iEAAiE;IACjE,IAAI,IAAI,KAAK,4BAA4B,IAAI,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACzE,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC7C,OAAO,uBAAuB,CAAC;gBAC7B,GAAG,QAAQ;gBACX,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACxD,qBAAqB,CAAC,KAAK,EAAE,gCAAgC,CAAC,CAC/D;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG"}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
export { CONCEPTUAL_CRITIQUE_REPAIR_TARGETS } from "../../shared/types/contractPipeline/design.js";
|
|
2
|
-
/**
|
|
3
|
-
* The value vocabularies a step prompt's schema sketch and its VALIDATOR both
|
|
4
|
-
* read — declared once, here, so they cannot disagree.
|
|
5
|
-
*
|
|
6
|
-
* Why this module exists. A step prompt hands the worker a JSON shape to write,
|
|
7
|
-
* and a validator in `src/remediate/validation/` decides whether what came back
|
|
8
|
-
* is admissible. Those were two independent statements of the same fact: the
|
|
9
|
-
* prompt carried a hand-written sketch (`contractPipelinePrompts.ts`, plus two
|
|
10
|
-
* extra sketches in `contractPipeline.ts`) and the validator carried its own
|
|
11
|
-
* literal list. Measured drifts at HEAD before this module existed:
|
|
12
|
-
*
|
|
13
|
-
* - `cyclic_seam_resolution.status` — sketch offered 2 values, the validator
|
|
14
|
-
* admits 4 (`user_decision_required` and `blocked` were unrenderable but
|
|
15
|
-
* required by the refusal path);
|
|
16
|
-
* - `judge_report.repair_directive.target` — sketch offered 3, the validator 4
|
|
17
|
-
* (the fourth, `counterexample`, could never be asked for);
|
|
18
|
-
* - `verification_report.finding.traces[].kind` — sketch offered 5, the
|
|
19
|
-
* validator 6;
|
|
20
|
-
* - `implementation_dag.node.status` — sketch showed exactly 1 of the 4 the
|
|
21
|
-
* validator admits.
|
|
22
|
-
*
|
|
23
|
-
* Every one is the same failure: a worker reads the sketch, emits a value the
|
|
24
|
-
* sketch allowed, and the tool refuses it — or, worse in the opposite
|
|
25
|
-
* direction, never learns a legal value exists. A drift test made of "remember
|
|
26
|
-
* to update the other one" is exactly the class of guarantee this repo bans
|
|
27
|
-
* (enforce in tooling, never host — or author — discretion), so the fix is not
|
|
28
|
-
* a test that watches two lists. It is ONE declaration, with the validator and
|
|
29
|
-
* the sketch both deriving from it.
|
|
30
|
-
*
|
|
31
|
-
* What is MINED vs DECLARED. The values are declared here; they are NOT read out
|
|
32
|
-
* of the validator module, because a validator states its values as inline
|
|
33
|
-
* `requireOneOf(...)` literals inside a function body — a declaration a test can
|
|
34
|
-
* only reach by parsing source text, which is the brittle thing this replaces.
|
|
35
|
-
* Instead the exported constants are the single declaration and the VALIDATOR
|
|
36
|
-
* imports them, so the drift is impossible by construction rather than detected
|
|
37
|
-
* after the fact. The test in
|
|
38
|
-
* `tests/remediate/step-prompt-sketch-drift.test.ts` then re-derives each
|
|
39
|
-
* vocabulary from what each validator actually REFUSES (by feeding it values),
|
|
40
|
-
* and compares that to the sketch the prompt renders — so a value added to a
|
|
41
|
-
* validator without the sketch still reds, without depending on how the
|
|
42
|
-
* validator happens to spell its list.
|
|
43
|
-
*
|
|
44
|
-
* NOT A LIST. Every value vocabulary that the CONTRACT-PIPELINE role sketches
|
|
45
|
-
* render as an alternation is declared here — the four drifted ones above, the
|
|
46
|
-
* obligation/test-plan pairs, and the nine that were still hand-written literals
|
|
47
|
-
* in `contractPipelinePrompts.ts` (goal `source_type`; context-entry `kind`; the
|
|
48
|
-
* critique item `kind` and `severity`; the critique `verdict`; the assessment
|
|
49
|
-
* finding `status` and report `verdict`; the judge `verdict`; and the judge's
|
|
50
|
-
* counterexample `classification`). That is the whole point: a vocabulary kept
|
|
51
|
-
* as a literal is only safe while someone remembers, and the drift test below
|
|
52
|
-
* sweeps every rendered alternation of those sketches rather than a hand-kept
|
|
53
|
-
* field list, so the next literal to appear reds immediately instead of waiting
|
|
54
|
-
* to be noticed.
|
|
55
|
-
*
|
|
56
|
-
* The scope is those sketches, NOT every sketch in the repository, and the
|
|
57
|
-
* difference is recorded rather than implied: the sweep reaches the modules in
|
|
58
|
-
* `SKETCH_SOURCE_MODULES`, and the clarification-resolution sketch in
|
|
59
|
-
* `steps/prompts.ts` is outside them — a declared-gap row in
|
|
60
|
-
* `tests/shared/promptContractRegistry.ts`. So this module claims nothing about
|
|
61
|
-
* that one, and widening the sweep is its own change.
|
|
62
|
-
*/
|
|
63
|
-
/**
|
|
64
|
-
* `cyclic_seam_resolution.status` — what the validator admits. `no_cycles` is
|
|
65
|
-
* the tool's own record, written when the ledger has no cycle; `resolved` is the
|
|
66
|
-
* worker's record of the breaks it made. The escalation states
|
|
67
|
-
* (`user_decision_required`, `blocked`) are routes the gate takes, never a
|
|
68
|
-
* record: nothing wrote them, and a worker that wrote one moved the pipeline
|
|
69
|
-
* forward with the cycles still in the ledger.
|
|
70
|
-
*/
|
|
71
|
-
export declare const CYCLIC_SEAM_RESOLUTION_STATUSES: readonly ["no_cycles", "resolved"];
|
|
72
|
-
/**
|
|
73
|
-
* The subset of {@link CYCLIC_SEAM_RESOLUTION_STATUSES} the worker's sketch
|
|
74
|
-
* offers. The worker is emitted only when the ledger has a cycle, so its one
|
|
75
|
-
* answer is `resolved`; the re-check refuses any record while a cycle remains.
|
|
76
|
-
*/
|
|
77
|
-
export declare const CYCLIC_SEAM_RESOLUTION_STATUSES_OFFERED: readonly ["resolved"];
|
|
78
|
-
/** `cyclic_seam_resolution.cycles[].break_strategy`. */
|
|
79
|
-
export declare const CYCLIC_SEAM_BREAK_STRATEGIES: readonly ["mediator", "single_authority"];
|
|
80
|
-
/**
|
|
81
|
-
* `judge_report.repair_directive.target`, its legacy aliases, and the offered
|
|
82
|
-
* subset — DECLARED in `src/shared/types/contractPipeline/obligations.ts`,
|
|
83
|
-
* beside the `JudgeRepairTarget` type that derives from them, and re-exported
|
|
84
|
-
* here so the validator and the prompt sketches keep reading them from this
|
|
85
|
-
* module.
|
|
86
|
-
*
|
|
87
|
-
* Why they moved. `src/shared` is the base layer; this module lives in
|
|
88
|
-
* `src/remediate`. A value import from the base layer into an orchestrator is
|
|
89
|
-
* the dependency direction inverted, and the declaration had to live on the
|
|
90
|
-
* side the TYPE could reach.
|
|
91
|
-
*/
|
|
92
|
-
export { CONTRACT_REPAIR_TARGETS, CONTRACT_REPAIR_TARGETS_LEGACY, CONTRACT_REPAIR_TARGETS_OFFERED, } from "audit-tools/shared";
|
|
93
|
-
/** `verification_report` trace `kind`. */
|
|
94
|
-
export declare const VERIFICATION_TRACE_KINDS: readonly ["requirement", "invariant", "counterexample", "task", "file", "command"];
|
|
95
|
-
/** `verification_report` finding-level `overall_status` (report level excludes `skipped`). */
|
|
96
|
-
export declare const VERIFICATION_FINDING_STATUSES: readonly ["passed", "failed", "skipped"];
|
|
97
|
-
/** `verification_report` report-level `overall_status`. */
|
|
98
|
-
export declare const VERIFICATION_REPORT_STATUSES: readonly ["passed", "failed"];
|
|
99
|
-
/** `verification_report` trace `status`. */
|
|
100
|
-
export declare const VERIFICATION_TRACE_STATUSES: readonly ["passed", "failed"];
|
|
101
|
-
/** `implementation_dag.nodes[].status`. */
|
|
102
|
-
export declare const IMPLEMENTATION_NODE_STATUSES: readonly ["pending", "in_progress", "resolved", "blocked"];
|
|
103
|
-
/** `implementation_dag.edges[].kind`. */
|
|
104
|
-
export declare const IMPLEMENTATION_EDGE_KINDS: readonly ["dependency", "verification"];
|
|
105
|
-
/**
|
|
106
|
-
* `obligation_ledger.obligations[].status`. `satisfied` is reachable only
|
|
107
|
-
* through the tool's own derivation (`contractPipeline/derive.ts`) — a worker
|
|
108
|
-
* emits `pending` and the tool advances it — but the value is part of the
|
|
109
|
-
* contract the prompt describes, so it is declared here rather than implied.
|
|
110
|
-
*/
|
|
111
|
-
export declare const OBLIGATION_STATUSES: readonly ["pending", "satisfied", "failed"];
|
|
112
|
-
/** `obligation_ledger.obligations[].kind`. */
|
|
113
|
-
export declare const OBLIGATION_KINDS: readonly ["invariant", "behavioral", "structural", "test"];
|
|
114
|
-
/** `test_validator_plan.test_specs[].kind`. */
|
|
115
|
-
export declare const TEST_SPEC_KINDS: readonly ["unit", "integration", "schema", "invariant", "e2e"];
|
|
116
|
-
/** `goal_spec.source_type`. */
|
|
117
|
-
export declare const GOAL_SOURCE_TYPES: readonly ["conversation", "document", "structured_audit", "mixed"];
|
|
118
|
-
/** `context_bundle.entries[].kind`. */
|
|
119
|
-
export declare const CONTEXT_ENTRY_KINDS: readonly ["source", "test", "config", "doc"];
|
|
120
|
-
/** `conceptual_design_critique.items[].kind`. */
|
|
121
|
-
export declare const CRITIQUE_ITEM_KINDS: readonly ["concern", "alternative", "suggestion"];
|
|
122
|
-
/** `conceptual_design_critique.items[].severity`. */
|
|
123
|
-
export declare const CRITIQUE_ITEM_SEVERITIES: readonly ["blocking", "advisory"];
|
|
124
|
-
/** `conceptual_design_critique.verdict`. */
|
|
125
|
-
export declare const CRITIQUE_VERDICTS: readonly ["approved", "approved_with_concerns", "rejected"];
|
|
126
|
-
/** `contract_assessment_report.findings[].status`. */
|
|
127
|
-
export declare const ASSESSMENT_FINDING_STATUSES: readonly ["satisfied", "violated", "uncertain"];
|
|
128
|
-
/** `contract_assessment_report.verdict`. */
|
|
129
|
-
export declare const ASSESSMENT_VERDICTS: readonly ["passed", "failed", "partial"];
|
|
130
|
-
/** `judge_report.verdict`. */
|
|
131
|
-
export declare const JUDGE_VERDICTS: readonly ["approved", "needs_repair"];
|
|
132
|
-
/**
|
|
133
|
-
* `judge_report.classifications[].classification` — what the judge may decide
|
|
134
|
-
* about one counterexample.
|
|
135
|
-
*
|
|
136
|
-
* Declared here rather than in the validator that reads it, because the judge
|
|
137
|
-
* role's prompt sketch states the same five values and a sketch that renders a
|
|
138
|
-
* hand-written copy of a validator's list is the drift this module bans. The
|
|
139
|
-
* validator imports THIS declaration (it was a local `as const` beside
|
|
140
|
-
* `validateJudgeReport`), so the two are one fact.
|
|
141
|
-
*/
|
|
142
|
-
export declare const COUNTEREXAMPLE_CLASSIFICATIONS: readonly ["accepted", "out_of_scope", "duplicate", "invalid", "residual_risk"];
|
|
143
|
-
/**
|
|
144
|
-
* `seam_reconciliation_report.mismatches[].resolution.decision` — which side of
|
|
145
|
-
* a seam adjusts. Declared here beside the rest for ONE reason: the alternative
|
|
146
|
-
* would be to exclude it from the drift test by hand, and an exclusion list is
|
|
147
|
-
* the drift this module exists to make impossible (see the test's alternation
|
|
148
|
-
* sweep, which matches EVERY rendered alternation to a validator probe).
|
|
149
|
-
*/
|
|
150
|
-
export declare const SEAM_RESOLUTION_DECISIONS: readonly ["A", "B", "both"];
|
|
151
|
-
/**
|
|
152
|
-
* The vocabularies that carry a `created_at`, and the ones that do not.
|
|
153
|
-
*
|
|
154
|
-
* `created_at` asymmetry, resolved in one place. Every contract-pipeline
|
|
155
|
-
* validator ends with `requireString(v.created_at, ...)`, and NO sketch
|
|
156
|
-
* declares the field — the reconciliation is `stampToolCreatedAt`
|
|
157
|
-
* (`contractPipeline/artifactStore.ts`), which the tool calls on the payload at
|
|
158
|
-
* ingest and at the `validate-artifact` self-check. The host has no clock, so
|
|
159
|
-
* asking it for a timestamp is asking it to invent one; the tool owns the field
|
|
160
|
-
* and stamps it.
|
|
161
|
-
*
|
|
162
|
-
* The decision, stated once rather than left implicit: THE VALIDATORS KEEP
|
|
163
|
-
* REQUIRING IT AND THE SKETCHES KEEP OMITTING IT — because the requirement is
|
|
164
|
-
* enforced on the POST-STAMP payload, not on what the worker wrote. The
|
|
165
|
-
* asymmetry is not a drift to be closed in either direction: declaring
|
|
166
|
-
* `created_at` in the sketches would tell the worker to supply a value the tool
|
|
167
|
-
* then overrides (the stamp is `created_at`-wins-if-present, but a host-invented
|
|
168
|
-
* clock reading is still worse than the tool's), and dropping the requirement
|
|
169
|
-
* from the validators would let an artifact that never passed the stamp path —
|
|
170
|
-
* a hand-written file validated directly — carry no timestamp at all.
|
|
171
|
-
*
|
|
172
|
-
* This is a DECISION, not a drift (see the drift test's `created_at` block):
|
|
173
|
-
* the validators keep requiring it and the sketches keep omitting it, because
|
|
174
|
-
* the requirement is enforced on the POST-STAMP payload rather than on what the
|
|
175
|
-
* worker wrote. Closing the asymmetry in either direction is worse — declaring
|
|
176
|
-
* it in the sketches asks the host for a clock reading the tool then overrides,
|
|
177
|
-
* and dropping it from the validators lets a directly-validated hand-written
|
|
178
|
-
* file carry no timestamp at all.
|
|
179
|
-
*/
|
|
180
|
-
export declare const CREATED_AT_OWNER: "stampToolCreatedAt";
|
|
181
|
-
/**
|
|
182
|
-
* Whether `value` is one of {@link CYCLIC_SEAM_BREAK_STRATEGIES} — the ONE
|
|
183
|
-
* membership test for the vocabulary, so the tool's post-hoc cycle-break check
|
|
184
|
-
* and the prompt's sketch read the same declaration.
|
|
185
|
-
*/
|
|
186
|
-
export declare function isCyclicSeamBreakStrategy(value: unknown): value is (typeof CYCLIC_SEAM_BREAK_STRATEGIES)[number];
|
|
187
|
-
/**
|
|
188
|
-
* Render a sketch fragment for a value vocabulary: `"a | b | c"`.
|
|
189
|
-
*
|
|
190
|
-
* The ONE renderer for every `requireOneOf`-style vocabulary in the sketches,
|
|
191
|
-
* so the separators and quoting in a prompt cannot drift from each other either.
|
|
192
|
-
*/
|
|
193
|
-
export declare function sketchValues(values: readonly string[]): string;
|
|
194
|
-
//# sourceMappingURL=sketchSource.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sketchSource.d.ts","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/sketchSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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9B,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB,0CAA2C,CAAC;AAE5E,8BAA8B;AAC9B,eAAO,MAAM,cAAc,uCAAwC,CAAC;AAEpE;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,gFAMjC,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,6BAA8B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,gBAAgB,EAAG,oBAA6B,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE9D"}
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
export { CONCEPTUAL_CRITIQUE_REPAIR_TARGETS } from "../../shared/types/contractPipeline/design.js";
|
|
2
|
-
// sites-pinned: tests/remediate/step-prompt-sketch-drift.test.ts
|
|
3
|
-
/**
|
|
4
|
-
* The value vocabularies a step prompt's schema sketch and its VALIDATOR both
|
|
5
|
-
* read — declared once, here, so they cannot disagree.
|
|
6
|
-
*
|
|
7
|
-
* Why this module exists. A step prompt hands the worker a JSON shape to write,
|
|
8
|
-
* and a validator in `src/remediate/validation/` decides whether what came back
|
|
9
|
-
* is admissible. Those were two independent statements of the same fact: the
|
|
10
|
-
* prompt carried a hand-written sketch (`contractPipelinePrompts.ts`, plus two
|
|
11
|
-
* extra sketches in `contractPipeline.ts`) and the validator carried its own
|
|
12
|
-
* literal list. Measured drifts at HEAD before this module existed:
|
|
13
|
-
*
|
|
14
|
-
* - `cyclic_seam_resolution.status` — sketch offered 2 values, the validator
|
|
15
|
-
* admits 4 (`user_decision_required` and `blocked` were unrenderable but
|
|
16
|
-
* required by the refusal path);
|
|
17
|
-
* - `judge_report.repair_directive.target` — sketch offered 3, the validator 4
|
|
18
|
-
* (the fourth, `counterexample`, could never be asked for);
|
|
19
|
-
* - `verification_report.finding.traces[].kind` — sketch offered 5, the
|
|
20
|
-
* validator 6;
|
|
21
|
-
* - `implementation_dag.node.status` — sketch showed exactly 1 of the 4 the
|
|
22
|
-
* validator admits.
|
|
23
|
-
*
|
|
24
|
-
* Every one is the same failure: a worker reads the sketch, emits a value the
|
|
25
|
-
* sketch allowed, and the tool refuses it — or, worse in the opposite
|
|
26
|
-
* direction, never learns a legal value exists. A drift test made of "remember
|
|
27
|
-
* to update the other one" is exactly the class of guarantee this repo bans
|
|
28
|
-
* (enforce in tooling, never host — or author — discretion), so the fix is not
|
|
29
|
-
* a test that watches two lists. It is ONE declaration, with the validator and
|
|
30
|
-
* the sketch both deriving from it.
|
|
31
|
-
*
|
|
32
|
-
* What is MINED vs DECLARED. The values are declared here; they are NOT read out
|
|
33
|
-
* of the validator module, because a validator states its values as inline
|
|
34
|
-
* `requireOneOf(...)` literals inside a function body — a declaration a test can
|
|
35
|
-
* only reach by parsing source text, which is the brittle thing this replaces.
|
|
36
|
-
* Instead the exported constants are the single declaration and the VALIDATOR
|
|
37
|
-
* imports them, so the drift is impossible by construction rather than detected
|
|
38
|
-
* after the fact. The test in
|
|
39
|
-
* `tests/remediate/step-prompt-sketch-drift.test.ts` then re-derives each
|
|
40
|
-
* vocabulary from what each validator actually REFUSES (by feeding it values),
|
|
41
|
-
* and compares that to the sketch the prompt renders — so a value added to a
|
|
42
|
-
* validator without the sketch still reds, without depending on how the
|
|
43
|
-
* validator happens to spell its list.
|
|
44
|
-
*
|
|
45
|
-
* NOT A LIST. Every value vocabulary that the CONTRACT-PIPELINE role sketches
|
|
46
|
-
* render as an alternation is declared here — the four drifted ones above, the
|
|
47
|
-
* obligation/test-plan pairs, and the nine that were still hand-written literals
|
|
48
|
-
* in `contractPipelinePrompts.ts` (goal `source_type`; context-entry `kind`; the
|
|
49
|
-
* critique item `kind` and `severity`; the critique `verdict`; the assessment
|
|
50
|
-
* finding `status` and report `verdict`; the judge `verdict`; and the judge's
|
|
51
|
-
* counterexample `classification`). That is the whole point: a vocabulary kept
|
|
52
|
-
* as a literal is only safe while someone remembers, and the drift test below
|
|
53
|
-
* sweeps every rendered alternation of those sketches rather than a hand-kept
|
|
54
|
-
* field list, so the next literal to appear reds immediately instead of waiting
|
|
55
|
-
* to be noticed.
|
|
56
|
-
*
|
|
57
|
-
* The scope is those sketches, NOT every sketch in the repository, and the
|
|
58
|
-
* difference is recorded rather than implied: the sweep reaches the modules in
|
|
59
|
-
* `SKETCH_SOURCE_MODULES`, and the clarification-resolution sketch in
|
|
60
|
-
* `steps/prompts.ts` is outside them — a declared-gap row in
|
|
61
|
-
* `tests/shared/promptContractRegistry.ts`. So this module claims nothing about
|
|
62
|
-
* that one, and widening the sweep is its own change.
|
|
63
|
-
*/
|
|
64
|
-
/**
|
|
65
|
-
* `cyclic_seam_resolution.status` — what the validator admits. `no_cycles` is
|
|
66
|
-
* the tool's own record, written when the ledger has no cycle; `resolved` is the
|
|
67
|
-
* worker's record of the breaks it made. The escalation states
|
|
68
|
-
* (`user_decision_required`, `blocked`) are routes the gate takes, never a
|
|
69
|
-
* record: nothing wrote them, and a worker that wrote one moved the pipeline
|
|
70
|
-
* forward with the cycles still in the ledger.
|
|
71
|
-
*/
|
|
72
|
-
export const CYCLIC_SEAM_RESOLUTION_STATUSES = ["no_cycles", "resolved"];
|
|
73
|
-
/**
|
|
74
|
-
* The subset of {@link CYCLIC_SEAM_RESOLUTION_STATUSES} the worker's sketch
|
|
75
|
-
* offers. The worker is emitted only when the ledger has a cycle, so its one
|
|
76
|
-
* answer is `resolved`; the re-check refuses any record while a cycle remains.
|
|
77
|
-
*/
|
|
78
|
-
export const CYCLIC_SEAM_RESOLUTION_STATUSES_OFFERED = ["resolved"];
|
|
79
|
-
/** `cyclic_seam_resolution.cycles[].break_strategy`. */
|
|
80
|
-
export const CYCLIC_SEAM_BREAK_STRATEGIES = [
|
|
81
|
-
"mediator",
|
|
82
|
-
"single_authority",
|
|
83
|
-
];
|
|
84
|
-
/**
|
|
85
|
-
* `judge_report.repair_directive.target`, its legacy aliases, and the offered
|
|
86
|
-
* subset — DECLARED in `src/shared/types/contractPipeline/obligations.ts`,
|
|
87
|
-
* beside the `JudgeRepairTarget` type that derives from them, and re-exported
|
|
88
|
-
* here so the validator and the prompt sketches keep reading them from this
|
|
89
|
-
* module.
|
|
90
|
-
*
|
|
91
|
-
* Why they moved. `src/shared` is the base layer; this module lives in
|
|
92
|
-
* `src/remediate`. A value import from the base layer into an orchestrator is
|
|
93
|
-
* the dependency direction inverted, and the declaration had to live on the
|
|
94
|
-
* side the TYPE could reach.
|
|
95
|
-
*/
|
|
96
|
-
export { CONTRACT_REPAIR_TARGETS, CONTRACT_REPAIR_TARGETS_LEGACY, CONTRACT_REPAIR_TARGETS_OFFERED, } from "audit-tools/shared";
|
|
97
|
-
/** `verification_report` trace `kind`. */
|
|
98
|
-
export const VERIFICATION_TRACE_KINDS = [
|
|
99
|
-
"requirement",
|
|
100
|
-
"invariant",
|
|
101
|
-
"counterexample",
|
|
102
|
-
"task",
|
|
103
|
-
"file",
|
|
104
|
-
"command",
|
|
105
|
-
];
|
|
106
|
-
/** `verification_report` finding-level `overall_status` (report level excludes `skipped`). */
|
|
107
|
-
export const VERIFICATION_FINDING_STATUSES = [
|
|
108
|
-
"passed",
|
|
109
|
-
"failed",
|
|
110
|
-
"skipped",
|
|
111
|
-
];
|
|
112
|
-
/** `verification_report` report-level `overall_status`. */
|
|
113
|
-
export const VERIFICATION_REPORT_STATUSES = ["passed", "failed"];
|
|
114
|
-
/** `verification_report` trace `status`. */
|
|
115
|
-
export const VERIFICATION_TRACE_STATUSES = ["passed", "failed"];
|
|
116
|
-
/** `implementation_dag.nodes[].status`. */
|
|
117
|
-
export const IMPLEMENTATION_NODE_STATUSES = [
|
|
118
|
-
"pending",
|
|
119
|
-
"in_progress",
|
|
120
|
-
"resolved",
|
|
121
|
-
"blocked",
|
|
122
|
-
];
|
|
123
|
-
/** `implementation_dag.edges[].kind`. */
|
|
124
|
-
export const IMPLEMENTATION_EDGE_KINDS = ["dependency", "verification"];
|
|
125
|
-
/**
|
|
126
|
-
* `obligation_ledger.obligations[].status`. `satisfied` is reachable only
|
|
127
|
-
* through the tool's own derivation (`contractPipeline/derive.ts`) — a worker
|
|
128
|
-
* emits `pending` and the tool advances it — but the value is part of the
|
|
129
|
-
* contract the prompt describes, so it is declared here rather than implied.
|
|
130
|
-
*/
|
|
131
|
-
export const OBLIGATION_STATUSES = [
|
|
132
|
-
"pending",
|
|
133
|
-
"satisfied",
|
|
134
|
-
"failed",
|
|
135
|
-
];
|
|
136
|
-
/** `obligation_ledger.obligations[].kind`. */
|
|
137
|
-
export const OBLIGATION_KINDS = [
|
|
138
|
-
"invariant",
|
|
139
|
-
"behavioral",
|
|
140
|
-
"structural",
|
|
141
|
-
"test",
|
|
142
|
-
];
|
|
143
|
-
/** `test_validator_plan.test_specs[].kind`. */
|
|
144
|
-
export const TEST_SPEC_KINDS = [
|
|
145
|
-
"unit",
|
|
146
|
-
"integration",
|
|
147
|
-
"schema",
|
|
148
|
-
"invariant",
|
|
149
|
-
"e2e",
|
|
150
|
-
];
|
|
151
|
-
/** `goal_spec.source_type`. */
|
|
152
|
-
export const GOAL_SOURCE_TYPES = [
|
|
153
|
-
"conversation",
|
|
154
|
-
"document",
|
|
155
|
-
"structured_audit",
|
|
156
|
-
"mixed",
|
|
157
|
-
];
|
|
158
|
-
/** `context_bundle.entries[].kind`. */
|
|
159
|
-
export const CONTEXT_ENTRY_KINDS = [
|
|
160
|
-
"source",
|
|
161
|
-
"test",
|
|
162
|
-
"config",
|
|
163
|
-
"doc",
|
|
164
|
-
];
|
|
165
|
-
/** `conceptual_design_critique.items[].kind`. */
|
|
166
|
-
export const CRITIQUE_ITEM_KINDS = [
|
|
167
|
-
"concern",
|
|
168
|
-
"alternative",
|
|
169
|
-
"suggestion",
|
|
170
|
-
];
|
|
171
|
-
/** `conceptual_design_critique.items[].severity`. */
|
|
172
|
-
export const CRITIQUE_ITEM_SEVERITIES = ["blocking", "advisory"];
|
|
173
|
-
/** `conceptual_design_critique.verdict`. */
|
|
174
|
-
export const CRITIQUE_VERDICTS = [
|
|
175
|
-
"approved",
|
|
176
|
-
"approved_with_concerns",
|
|
177
|
-
"rejected",
|
|
178
|
-
];
|
|
179
|
-
/** `contract_assessment_report.findings[].status`. */
|
|
180
|
-
export const ASSESSMENT_FINDING_STATUSES = [
|
|
181
|
-
"satisfied",
|
|
182
|
-
"violated",
|
|
183
|
-
"uncertain",
|
|
184
|
-
];
|
|
185
|
-
/** `contract_assessment_report.verdict`. */
|
|
186
|
-
export const ASSESSMENT_VERDICTS = ["passed", "failed", "partial"];
|
|
187
|
-
/** `judge_report.verdict`. */
|
|
188
|
-
export const JUDGE_VERDICTS = ["approved", "needs_repair"];
|
|
189
|
-
/**
|
|
190
|
-
* `judge_report.classifications[].classification` — what the judge may decide
|
|
191
|
-
* about one counterexample.
|
|
192
|
-
*
|
|
193
|
-
* Declared here rather than in the validator that reads it, because the judge
|
|
194
|
-
* role's prompt sketch states the same five values and a sketch that renders a
|
|
195
|
-
* hand-written copy of a validator's list is the drift this module bans. The
|
|
196
|
-
* validator imports THIS declaration (it was a local `as const` beside
|
|
197
|
-
* `validateJudgeReport`), so the two are one fact.
|
|
198
|
-
*/
|
|
199
|
-
export const COUNTEREXAMPLE_CLASSIFICATIONS = [
|
|
200
|
-
"accepted",
|
|
201
|
-
"out_of_scope",
|
|
202
|
-
"duplicate",
|
|
203
|
-
"invalid",
|
|
204
|
-
"residual_risk",
|
|
205
|
-
];
|
|
206
|
-
/**
|
|
207
|
-
* `seam_reconciliation_report.mismatches[].resolution.decision` — which side of
|
|
208
|
-
* a seam adjusts. Declared here beside the rest for ONE reason: the alternative
|
|
209
|
-
* would be to exclude it from the drift test by hand, and an exclusion list is
|
|
210
|
-
* the drift this module exists to make impossible (see the test's alternation
|
|
211
|
-
* sweep, which matches EVERY rendered alternation to a validator probe).
|
|
212
|
-
*/
|
|
213
|
-
export const SEAM_RESOLUTION_DECISIONS = ["A", "B", "both"];
|
|
214
|
-
/**
|
|
215
|
-
* The vocabularies that carry a `created_at`, and the ones that do not.
|
|
216
|
-
*
|
|
217
|
-
* `created_at` asymmetry, resolved in one place. Every contract-pipeline
|
|
218
|
-
* validator ends with `requireString(v.created_at, ...)`, and NO sketch
|
|
219
|
-
* declares the field — the reconciliation is `stampToolCreatedAt`
|
|
220
|
-
* (`contractPipeline/artifactStore.ts`), which the tool calls on the payload at
|
|
221
|
-
* ingest and at the `validate-artifact` self-check. The host has no clock, so
|
|
222
|
-
* asking it for a timestamp is asking it to invent one; the tool owns the field
|
|
223
|
-
* and stamps it.
|
|
224
|
-
*
|
|
225
|
-
* The decision, stated once rather than left implicit: THE VALIDATORS KEEP
|
|
226
|
-
* REQUIRING IT AND THE SKETCHES KEEP OMITTING IT — because the requirement is
|
|
227
|
-
* enforced on the POST-STAMP payload, not on what the worker wrote. The
|
|
228
|
-
* asymmetry is not a drift to be closed in either direction: declaring
|
|
229
|
-
* `created_at` in the sketches would tell the worker to supply a value the tool
|
|
230
|
-
* then overrides (the stamp is `created_at`-wins-if-present, but a host-invented
|
|
231
|
-
* clock reading is still worse than the tool's), and dropping the requirement
|
|
232
|
-
* from the validators would let an artifact that never passed the stamp path —
|
|
233
|
-
* a hand-written file validated directly — carry no timestamp at all.
|
|
234
|
-
*
|
|
235
|
-
* This is a DECISION, not a drift (see the drift test's `created_at` block):
|
|
236
|
-
* the validators keep requiring it and the sketches keep omitting it, because
|
|
237
|
-
* the requirement is enforced on the POST-STAMP payload rather than on what the
|
|
238
|
-
* worker wrote. Closing the asymmetry in either direction is worse — declaring
|
|
239
|
-
* it in the sketches asks the host for a clock reading the tool then overrides,
|
|
240
|
-
* and dropping it from the validators lets a directly-validated hand-written
|
|
241
|
-
* file carry no timestamp at all.
|
|
242
|
-
*/
|
|
243
|
-
export const CREATED_AT_OWNER = "stampToolCreatedAt";
|
|
244
|
-
/**
|
|
245
|
-
* Whether `value` is one of {@link CYCLIC_SEAM_BREAK_STRATEGIES} — the ONE
|
|
246
|
-
* membership test for the vocabulary, so the tool's post-hoc cycle-break check
|
|
247
|
-
* and the prompt's sketch read the same declaration.
|
|
248
|
-
*/
|
|
249
|
-
export function isCyclicSeamBreakStrategy(value) {
|
|
250
|
-
return (typeof value === "string" &&
|
|
251
|
-
CYCLIC_SEAM_BREAK_STRATEGIES.includes(value));
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Render a sketch fragment for a value vocabulary: `"a | b | c"`.
|
|
255
|
-
*
|
|
256
|
-
* The ONE renderer for every `requireOneOf`-style vocabulary in the sketches,
|
|
257
|
-
* so the separators and quoting in a prompt cannot drift from each other either.
|
|
258
|
-
*/
|
|
259
|
-
export function sketchValues(values) {
|
|
260
|
-
return values.join(" | ");
|
|
261
|
-
}
|
|
262
|
-
//# sourceMappingURL=sketchSource.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sketchSource.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/sketchSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,+CAA+C,CAAC;AACnG,iEAAiE;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,WAAW,EAAE,UAAU,CAAU,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,UAAU,CAAU,CAAC;AAE7E,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,kBAAkB;CACV,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,OAAO,EACL,uBAAuB,EACvB,8B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
|
-
import type { PriorTestSpec } from "./derive.js";
|
|
2
|
-
export declare function testPlanCarryPath(artifactsDir: string): string;
|
|
3
|
-
/**
|
|
4
|
-
* Snapshot a freshly-ingested test-plan's authored specs (identity + assertions)
|
|
5
|
-
* keyed by obligation_id, overwriting any prior snapshot. Only specs with at
|
|
6
|
-
* least one assertion are carried (an `inapplicable_claim` spec re-authors).
|
|
7
|
-
*/
|
|
8
|
-
export declare function captureTestPlanCarry(artifactsDir: string, payload: unknown, capturedAt: string): Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* Read the carried prior specs keyed by obligation_id; empty when none.
|
|
11
|
-
*
|
|
12
|
-
* The carry is REGENERABLE state — a carry from another schema version is
|
|
13
|
-
* discarded rather than reinterpreted, which costs one re-authoring of the
|
|
14
|
-
* affected specs and is the same fail-shape as an absent file (below).
|
|
15
|
-
*/
|
|
16
|
-
export declare function readTestPlanCarry(artifactsDir: string): Promise<Record<string, PriorTestSpec>>;
|
|
17
|
-
//# sourceMappingURL=testPlanCarry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testPlanCarry.d.ts","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/testPlanCarry.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAajD,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE9D;AAQD;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAMxC"}
|