audit-tools 0.52.3 → 0.52.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -1
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +6 -2
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/argumentContract.d.ts +11 -0
- package/dist/audit/cli/argumentContract.d.ts.map +1 -0
- package/dist/audit/cli/argumentContract.js +45 -0
- package/dist/audit/cli/argumentContract.js.map +1 -0
- package/dist/audit/cli/auditReviewBindings.d.ts +49 -0
- package/dist/audit/cli/auditReviewBindings.d.ts.map +1 -0
- package/dist/audit/cli/auditReviewBindings.js +61 -0
- package/dist/audit/cli/auditReviewBindings.js.map +1 -0
- package/dist/audit/cli/auditStep.d.ts +1 -27
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +7 -32
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +2 -0
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.js +9 -0
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +17 -3
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +15 -2
- 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 +10 -17
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +231 -229
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/explainTaskCommand.d.ts.map +1 -1
- package/dist/audit/cli/explainTaskCommand.js +3 -1
- package/dist/audit/cli/explainTaskCommand.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +10 -14
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +50 -16
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/functionalPreflight.d.ts +96 -0
- package/dist/audit/cli/functionalPreflight.d.ts.map +1 -0
- package/dist/audit/cli/functionalPreflight.js +103 -0
- package/dist/audit/cli/functionalPreflight.js.map +1 -0
- package/dist/audit/cli/laneSubmissions.d.ts +5 -1
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +45 -34
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +1 -9
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +101 -38
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +10 -25
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +57 -67
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +9 -4
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.js +8 -1
- package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
- package/dist/audit/cli/reviewRun.js +1 -1
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/reviewSubmission.d.ts +24 -0
- package/dist/audit/cli/reviewSubmission.d.ts.map +1 -0
- package/dist/audit/cli/reviewSubmission.js +97 -0
- package/dist/audit/cli/reviewSubmission.js.map +1 -0
- package/dist/audit/cli/sampleRunCommand.d.ts +3 -3
- package/dist/audit/cli/steps.d.ts +18 -18
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +1 -0
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.js +2 -1
- package/dist/audit/cli/unacceptResultsCommand.js.map +1 -1
- package/dist/audit/cli.d.ts +2 -1
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +27 -19
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +10 -10
- package/dist/audit/contracts/wrapperResponse.d.ts +34 -34
- package/dist/audit/extractors/commentDecomposition.d.ts +14 -0
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +2 -1
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +12 -7
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphPythonImports.d.ts +3 -0
- package/dist/audit/extractors/graphPythonImports.d.ts.map +1 -1
- package/dist/audit/extractors/graphPythonImports.js +24 -5
- package/dist/audit/extractors/graphPythonImports.js.map +1 -1
- package/dist/audit/extractors/graphRouteSources.d.ts +7 -0
- package/dist/audit/extractors/graphRouteSources.d.ts.map +1 -0
- package/dist/audit/extractors/graphRouteSources.js +208 -0
- package/dist/audit/extractors/graphRouteSources.js.map +1 -0
- package/dist/audit/extractors/graphRoutes.d.ts +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +65 -68
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +1 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +29 -10
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +1 -1
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +3 -0
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +11 -32
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts +2 -3
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +1 -2
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +2 -2
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts +2 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.js +6 -1
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts +2 -0
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +6 -0
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts +5 -8
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +7 -1
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +3 -47
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +28 -135
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts +24 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +8 -2
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/designReviewTask.d.ts +46 -0
- package/dist/audit/orchestrator/designReviewTask.d.ts.map +1 -0
- package/dist/audit/orchestrator/designReviewTask.js +44 -0
- package/dist/audit/orchestrator/designReviewTask.js.map +1 -0
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +4 -2
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +3 -0
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js +2 -0
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -9
- package/dist/audit/orchestrator/intentInterpreter.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +6 -11
- package/dist/audit/orchestrator/intentInterpreter.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +2 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +32 -40
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +8 -14
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +19 -0
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +15 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.d.ts +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.d.ts.map +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.js +4 -2
- package/dist/audit/reporting/criticalFlowFallbackPrompt.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +43 -2
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/types/auditScope.d.ts +2 -2
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/conceptualAdjudication.d.ts +19 -19
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +3 -3
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types.d.ts +17 -19
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +19 -20
- package/dist/audit/types.js.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +3 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +26 -31
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.js +20 -8
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts +28 -0
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/contractReviewBinding.js +75 -0
- package/dist/remediate/contractPipeline/contractReviewBinding.js.map +1 -0
- package/dist/remediate/contractPipeline/repairState.d.ts +3 -1
- package/dist/remediate/contractPipeline/repairState.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/repairState.js +1 -0
- package/dist/remediate/contractPipeline/repairState.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +1 -0
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.js +1 -0
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.d.ts +1 -2
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.js +1 -0
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +92 -52
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +54 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +15 -1
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/intakeSelection.d.ts +27 -0
- package/dist/remediate/intakeSelection.d.ts.map +1 -0
- package/dist/remediate/intakeSelection.js +37 -0
- package/dist/remediate/intakeSelection.js.map +1 -0
- package/dist/remediate/intent/intentPersistence.d.ts +41 -0
- package/dist/remediate/intent/intentPersistence.d.ts.map +1 -0
- package/dist/remediate/intent/intentPersistence.js +129 -0
- package/dist/remediate/intent/intentPersistence.js.map +1 -0
- package/dist/remediate/phases/close.d.ts +2 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +19 -2
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeReviewProvenance.d.ts +4 -0
- package/dist/remediate/phases/closeReviewProvenance.d.ts.map +1 -0
- package/dist/remediate/phases/closeReviewProvenance.js +16 -0
- package/dist/remediate/phases/closeReviewProvenance.js.map +1 -0
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +3 -1
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/review/filterDispositions.d.ts +13 -0
- package/dist/remediate/review/filterDispositions.d.ts.map +1 -0
- package/dist/remediate/review/filterDispositions.js +32 -0
- package/dist/remediate/review/filterDispositions.js.map +1 -0
- package/dist/remediate/state/runIdentity.d.ts +27 -0
- package/dist/remediate/state/runIdentity.d.ts.map +1 -0
- package/dist/remediate/state/runIdentity.js +38 -0
- package/dist/remediate/state/runIdentity.js.map +1 -0
- package/dist/remediate/state/store.d.ts +80 -1
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +82 -1
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +215 -42
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +11 -3
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +61 -3
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +121 -47
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +27 -4
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +34 -32
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +31 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +98 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -0
- package/dist/remediate/steps/dispatch/hostContracts.d.ts +133 -0
- package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/hostContracts.js +104 -0
- package/dist/remediate/steps/dispatch/hostContracts.js.map +1 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts +70 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.js +350 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.js.map +1 -0
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +8 -162
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +137 -690
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.d.ts +83 -0
- package/dist/remediate/steps/dispatch/requiredTests.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/requiredTests.js +262 -0
- package/dist/remediate/steps/dispatch/requiredTests.js.map +1 -0
- package/dist/remediate/steps/finalGate.d.ts +8 -7
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +14 -11
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/frictionCloseout.d.ts +34 -0
- package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -0
- package/dist/remediate/steps/frictionCloseout.js +113 -0
- package/dist/remediate/steps/frictionCloseout.js.map +1 -0
- package/dist/remediate/steps/gateCommands.d.ts +7 -9
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +37 -11
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +2 -0
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +36 -11
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +23 -110
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +232 -508
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +1 -1
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +7 -2
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/recoverIngest.d.ts +57 -0
- package/dist/remediate/steps/recoverIngest.d.ts.map +1 -0
- package/dist/remediate/steps/recoverIngest.js +171 -0
- package/dist/remediate/steps/recoverIngest.js.map +1 -0
- package/dist/remediate/steps/stepWriter.d.ts +5 -4
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +2 -1
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +2 -3
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +5 -12
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +10 -7
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +13 -67
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +65 -139
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +9 -3
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/agentReflections.d.ts +2 -2
- package/dist/shared/analyzerPolicy.d.ts +2 -16
- package/dist/shared/analyzerPolicy.d.ts.map +1 -1
- package/dist/shared/analyzerPolicy.js +22 -24
- package/dist/shared/analyzerPolicy.js.map +1 -1
- package/dist/shared/analyzerRunConsent.d.ts +33 -0
- package/dist/shared/analyzerRunConsent.d.ts.map +1 -0
- package/dist/shared/analyzerRunConsent.js +42 -0
- package/dist/shared/analyzerRunConsent.js.map +1 -0
- package/dist/shared/analyzers/acquisitionEngine.d.ts +3 -8
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +1 -0
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +8 -8
- package/dist/shared/decompose/systemicChallenge.d.ts +12 -12
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +16 -0
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/graph/orderedReachability.d.ts +9 -0
- package/dist/shared/graph/orderedReachability.d.ts.map +1 -0
- package/dist/shared/graph/orderedReachability.js +21 -0
- package/dist/shared/graph/orderedReachability.js.map +1 -0
- package/dist/shared/index.d.ts +9 -3
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +6 -3
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intake/guidanceBootstrap.d.ts +2 -0
- package/dist/shared/intake/guidanceBootstrap.d.ts.map +1 -1
- package/dist/shared/intake/guidanceBootstrap.js +10 -1
- package/dist/shared/intake/guidanceBootstrap.js.map +1 -1
- package/dist/shared/intent/constraintClauses.d.ts +3 -0
- package/dist/shared/intent/constraintClauses.d.ts.map +1 -1
- package/dist/shared/intent/constraintClauses.js +9 -0
- package/dist/shared/intent/constraintClauses.js.map +1 -1
- package/dist/shared/io/artifactTreeHold.d.ts +5 -0
- package/dist/shared/io/artifactTreeHold.d.ts.map +1 -0
- package/dist/shared/io/artifactTreeHold.js +13 -0
- package/dist/shared/io/artifactTreeHold.js.map +1 -0
- package/dist/shared/io/auditToolsPaths.d.ts +3 -1
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +6 -1
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/collectFilesSorted.d.ts +10 -0
- package/dist/shared/io/collectFilesSorted.d.ts.map +1 -0
- package/dist/shared/io/collectFilesSorted.js +38 -0
- package/dist/shared/io/collectFilesSorted.js.map +1 -0
- package/dist/shared/io/json.d.ts.map +1 -1
- package/dist/shared/io/json.js +11 -4
- package/dist/shared/io/json.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +8 -0
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +9 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/observability/rootLogObservations.d.ts +10 -0
- package/dist/shared/observability/rootLogObservations.d.ts.map +1 -0
- package/dist/shared/observability/rootLogObservations.js +147 -0
- package/dist/shared/observability/rootLogObservations.js.map +1 -0
- package/dist/shared/prompts.d.ts +7 -7
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +11 -11
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +7 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +8 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/testCommand.d.ts +1 -0
- package/dist/shared/tooling/testCommand.d.ts.map +1 -1
- package/dist/shared/tooling/testCommand.js +4 -0
- package/dist/shared/tooling/testCommand.js.map +1 -1
- package/dist/shared/types/charter.d.ts +8 -8
- package/dist/shared/types/conceptualPerspective.d.ts +66 -0
- package/dist/shared/types/conceptualPerspective.d.ts.map +1 -0
- package/dist/shared/types/conceptualPerspective.js +135 -0
- package/dist/shared/types/conceptualPerspective.js.map +1 -0
- package/dist/shared/types/contractPipeline/design.d.ts +5 -0
- package/dist/shared/types/contractPipeline/design.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/design.js +6 -0
- package/dist/shared/types/contractPipeline/design.js.map +1 -1
- package/dist/shared/types/contractPipeline/implementation.d.ts +54 -0
- package/dist/shared/types/contractPipeline/implementation.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/implementation.js +10 -5
- package/dist/shared/types/contractPipeline/implementation.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +21 -10
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +13 -1
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/disposition.d.ts +6 -6
- package/dist/shared/types/finding.d.ts +50 -50
- package/dist/shared/types/intentCheckpoint.d.ts +66 -11
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +10 -2
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +252 -24
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +4 -0
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/reviewIndependence.d.ts +225 -0
- package/dist/shared/types/reviewIndependence.d.ts.map +1 -0
- package/dist/shared/types/reviewIndependence.js +67 -0
- package/dist/shared/types/reviewIndependence.js.map +1 -0
- package/dist/shared/types/stepContract.d.ts +8 -2
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +4 -1
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +13 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +38 -2
- package/docs/audit-pkg/operator-guide.md +59 -4
- package/package.json +5 -5
- package/remediate-code.mjs +16 -3
- package/skills/audit-code/audit-code.prompt.md +1 -31
- package/skills/remediate-code/remediate-code.prompt.md +12 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractPipeline.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/contractPipeline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contractPipeline.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/contractPipeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,KAAK,8BAA8B,EAAE,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;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,EAAE,MAAM,GACd,yBAAyB,CAoB3B;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,EAAE,CAAC,CAgBnB;AAsHD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAsBnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAuBvF;AAED;;;;;;;GAOG;AACH,wBAAsB,uCAAuC,CAC3D,YAAY,EAAE,MAAM,EACpB,IAAI,GAAE,MAA2C,GAChD,OAAO,CAAC,IAAI,CAAC,CAqWf"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { bindContractReviewPrompt, validateContractReviewInput } from "../contractPipeline/contractReviewBinding.js";
|
|
2
|
+
import { CONCEPTUAL_CRITIQUE_REPAIR_TARGETS } from "../../shared/types/contractPipeline/design.js";
|
|
3
|
+
import { ImplementationContextSchema } from "../../shared/types/contractPipeline/implementation.js";
|
|
4
|
+
import { CounterexampleSchema } from "../../shared/types/contractPipeline/obligations.js";
|
|
1
5
|
// sites-pinned: tests/remediate/contract-pipeline.test.ts, tests/remediate/dc3.test.ts, tests/remediate/contract-pipeline-adversarial.test.ts, tests/remediate/step-prompt-sketch-drift.test.ts
|
|
2
6
|
// contract-pipeline: the promotion computes no finding field FindingSchema would drop.
|
|
3
7
|
// dc3: the fan-out wording (needs, not mechanism) and the TRANSPORT report for a
|
|
@@ -26,7 +30,7 @@
|
|
|
26
30
|
import { existsSync } from "node:fs";
|
|
27
31
|
import { mkdir, readFile, rename, rm } from "node:fs/promises";
|
|
28
32
|
import { isAbsolute, join, resolve } from "node:path";
|
|
29
|
-
import { writeJsonFile, readOptionalJsonFile, formatValidationIssues, hashContent, isRecord, withFsRetry, auditReadOf, projectApprovedFindings, captureStepBoundaryFriction, climbOutOfAuditTools, partitionCommandsByDeclaredShape, splitSequentialCommandChain, normalizeRepoPath, repoRelativePath, toPosixPath, neutralProjectFacts, } from "audit-tools/shared";
|
|
33
|
+
import { writeJsonFile, readOptionalJsonFile, formatValidationIssues, hashContent, stableStringify, isRecord, withFsRetry, auditReadOf, projectApprovedFindings, captureStepBoundaryFriction, climbOutOfAuditTools, partitionCommandsByDeclaredShape, splitSequentialCommandChain, normalizeRepoPath, repoRelativePath, toPosixPath, neutralProjectFacts, } from "audit-tools/shared";
|
|
30
34
|
import { createStepEmissionScaffold, } from "../../shared/steps/stepEmissionScaffold.js";
|
|
31
35
|
import { OBLIGATION_KIND_PRIORITY, } from "../contractPipeline/obligationKinds.js";
|
|
32
36
|
import { CP_ARTIFACT_NAMES, contractArtifactExists, contractArtifactFilePath, contractInputFilePath, contractPipelineDir, detectStaleArtifacts, dropReviewSnapshot, envelopePayload, envelopeSemanticHash, isEnvelope, pathASeedFilePath, payloadSemanticHash, readContractArtifact, stampToolCreatedAt, writeContractArtifact, writeDerivedContractArtifact, } from "../contractPipeline/artifactStore.js";
|
|
@@ -40,7 +44,7 @@ import { captureReviewSnapshot, computeReReviewDelta, isReviewArtifact, readRevi
|
|
|
40
44
|
import { captureTestPlanCarry, readTestPlanCarry, } from "../contractPipeline/testPlanCarry.js";
|
|
41
45
|
import { CYCLIC_SEAM_BREAK_STRATEGIES, CYCLIC_SEAM_RESOLUTION_STATUSES_OFFERED, isCyclicSeamBreakStrategy, sketchValues, } from "../contractPipeline/sketchSource.js";
|
|
42
46
|
import { readRepairState, writeRepairState, counterexamplesByIdOf, counterexampleKeyOf, counterexampleWaiversPath, foldCounterexampleWaivers, waivedAcceptedIds, waivedJudgeAcceptedIds, } from "../contractPipeline/repairState.js";
|
|
43
|
-
import { renderContractPipelinePrompt, renderContractRepairPrompt, CONTRACT_PIPELINE_PHASE_ORDER, PHASE_TO_ARTIFACT, } from "./contractPipelinePrompts.js";
|
|
47
|
+
import { renderContractPipelinePrompt, renderContractRepairPrompt, CONTRACT_PIPELINE_PHASE_ORDER, PHASE_TO_ARTIFACT, reviewRequirementForRole, } from "./contractPipelinePrompts.js";
|
|
44
48
|
// The seven cross-artifact validators this module used to call one by one are
|
|
45
49
|
// gone from this list on purpose: every one of them is now reached through
|
|
46
50
|
// `evaluateContractPipelineCrossGateOutcomes`, so a call site cannot read a
|
|
@@ -297,16 +301,32 @@ export function rejectionRewriteInstruction(archived) {
|
|
|
297
301
|
* dependencies are enveloped before their dependents and dependency hashes are
|
|
298
302
|
* always available.
|
|
299
303
|
*/
|
|
300
|
-
export async function ingestContractArtifacts(artifactsDir) {
|
|
304
|
+
export async function ingestContractArtifacts(artifactsDir, adversarialDepth) {
|
|
301
305
|
const ingested = [];
|
|
302
306
|
const invalid = [];
|
|
307
|
+
const stale = [];
|
|
308
|
+
const depth = adversarialDepth ?? (await resolveAdversarialDepth(artifactsDir)).adversarialDepth;
|
|
303
309
|
for (const name of CP_ARTIFACT_NAMES) {
|
|
304
310
|
const raw = await readOptionalJsonFile(contractInputFilePath(artifactsDir, name));
|
|
305
311
|
if (raw === undefined || raw === null)
|
|
306
312
|
continue;
|
|
307
313
|
// The host writes a plain payload; defensively unwrap if an envelope slipped
|
|
308
314
|
// into the input path so ingest and the validate-artifact self-check agree.
|
|
309
|
-
const
|
|
315
|
+
const role = ARTIFACT_TO_PHASE[name] ?? "";
|
|
316
|
+
const requirement = reviewRequirementForRole(role, depth);
|
|
317
|
+
const reviewed = await validateContractReviewInput({
|
|
318
|
+
artifactsDir, artifact: name, role, requirement,
|
|
319
|
+
raw: requirement === "ordinary" && isEnvelope(raw) ? raw.payload : raw,
|
|
320
|
+
});
|
|
321
|
+
if (!reviewed.ok) {
|
|
322
|
+
if (reviewed.code === "dependency_stale") {
|
|
323
|
+
stale.push(name);
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
invalid.push({ name, issues: [{ severity: "error", path: `${name}.review`, message: reviewed.issue }], ...(reviewed.code === "review_unavailable" ? { unavailable: true } : {}) });
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
const bare = reviewed.payload;
|
|
310
330
|
// The host has no clock: stamp the tool-owned `created_at` before validation
|
|
311
331
|
// so the host never has to invent a timestamp (B4). No-op when already present.
|
|
312
332
|
const payload = stampToolCreatedAt(bare, new Date().toISOString());
|
|
@@ -315,16 +335,26 @@ export async function ingestContractArtifacts(artifactsDir) {
|
|
|
315
335
|
// semantic projection strips the tool-stamped `created_at`, so a no-op
|
|
316
336
|
// re-ingest is stable (it does NOT re-fire snapshots or rewrite the
|
|
317
337
|
// envelope); only a genuine host edit re-derives.
|
|
338
|
+
const requiredIssues = reviewed.provenance
|
|
339
|
+
? CONTRACT_PIPELINE_VALIDATORS[name](payload, name).filter(issue => issue.severity === "error")
|
|
340
|
+
: undefined;
|
|
341
|
+
if (requiredIssues && requiredIssues.length > 0) {
|
|
342
|
+
invalid.push({ name, issues: requiredIssues });
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
318
345
|
const existing = await readContractArtifact(artifactsDir, name);
|
|
319
|
-
|
|
346
|
+
const sameReview = !reviewed.provenance || (existing?.review_provenance?.prompt_sha256 === reviewed.provenance.prompt_sha256 &&
|
|
347
|
+
existing.review_provenance.requirement === reviewed.provenance.requirement &&
|
|
348
|
+
stableStringify(existing.review_provenance.review) === stableStringify(reviewed.provenance.review));
|
|
349
|
+
if (existing && sameReview && envelopeSemanticHash(existing) === payloadSemanticHash(name, payload)) {
|
|
320
350
|
continue;
|
|
321
351
|
}
|
|
322
|
-
const issues = CONTRACT_PIPELINE_VALIDATORS[name](payload, name).filter((issue) => issue.severity === "error");
|
|
352
|
+
const issues = requiredIssues ?? CONTRACT_PIPELINE_VALIDATORS[name](payload, name).filter((issue) => issue.severity === "error");
|
|
323
353
|
if (issues.length > 0) {
|
|
324
354
|
invalid.push({ name, issues });
|
|
325
355
|
continue;
|
|
326
356
|
}
|
|
327
|
-
await writeContractArtifact(artifactsDir, name, payload);
|
|
357
|
+
await writeContractArtifact(artifactsDir, name, payload, reviewed.provenance);
|
|
328
358
|
ingested.push(name);
|
|
329
359
|
// Repair-revert fix: an ingested aggregated `module_contracts` payload (a
|
|
330
360
|
// degenerate single-agent draft, or a direct edit) is written back through to
|
|
@@ -346,7 +376,7 @@ export async function ingestContractArtifacts(artifactsDir) {
|
|
|
346
376
|
await captureTestPlanCarry(artifactsDir, payload, new Date().toISOString());
|
|
347
377
|
}
|
|
348
378
|
}
|
|
349
|
-
return { ingested, invalid };
|
|
379
|
+
return { ingested, invalid, ...(stale.length > 0 ? { stale } : {}) };
|
|
350
380
|
}
|
|
351
381
|
/**
|
|
352
382
|
* Determine whether the contract pipeline should be entered for this run.
|
|
@@ -623,7 +653,7 @@ function acceptedCeIdsOf(judge) {
|
|
|
623
653
|
* is gone: a deep-but-converging run is no longer cut mid-convergence, and a
|
|
624
654
|
* genuinely non-converging run is surfaced rather than buried.
|
|
625
655
|
*/
|
|
626
|
-
async function evaluateJudgeGate(artifactsDir) {
|
|
656
|
+
export async function evaluateJudgeGate(artifactsDir) {
|
|
627
657
|
const judgeEnvelope = await readContractArtifact(artifactsDir, "judge_report");
|
|
628
658
|
if (!judgeEnvelope)
|
|
629
659
|
return { kind: "proceed" };
|
|
@@ -683,7 +713,7 @@ async function evaluateJudgeGate(artifactsDir) {
|
|
|
683
713
|
const alreadyHandled = repairState.repairs.some((repair) => repair.judge_hash === judgeHash);
|
|
684
714
|
// Map judge.repair_directive.target if present; if absent, infer from classifications.
|
|
685
715
|
//
|
|
686
|
-
// The validator admits only the
|
|
716
|
+
// The validator admits only the declared owning artifacts plus the legacy
|
|
687
717
|
// `design_spec` alias (a report from an older release); `counterexample` is
|
|
688
718
|
// refused at ingestion with its reason, never swapped here. The legacy alias
|
|
689
719
|
// falls through to the inferred target, as it always has.
|
|
@@ -696,7 +726,7 @@ async function evaluateJudgeGate(artifactsDir) {
|
|
|
696
726
|
instruction: rawDirective.instruction,
|
|
697
727
|
}
|
|
698
728
|
: inferRepairDirective(judge);
|
|
699
|
-
const addressed = new Set(repairState.repairs.flatMap((r) => r.addressed_ce_fingerprints ??
|
|
729
|
+
const addressed = new Set(repairState.repairs.filter((repair) => (repair.target === "design_spec" ? "finalized_module_contracts" : repair.target) === directive.target).flatMap((r) => r.addressed_ce_fingerprints ??
|
|
700
730
|
(r.accepted_ce_ids ?? []).map((id) => `id:${id}`)));
|
|
701
731
|
const newAccepted = unwaivedAccepted.filter((id) => !addressed.has(keyOf(id)));
|
|
702
732
|
const newAcceptedFingerprints = newAccepted.map(keyOf);
|
|
@@ -762,7 +792,7 @@ function blockingCritiqueIds(critique) {
|
|
|
762
792
|
* is advisory display; the blocking-item set is the contract.
|
|
763
793
|
*
|
|
764
794
|
* Convergence-terminated, mirroring {@link evaluateJudgeGate}: the first blocking
|
|
765
|
-
* critique ⇒ repair
|
|
795
|
+
* critique ⇒ repair its declared owner (legacy: `finalized_module_contracts`); repairing it
|
|
766
796
|
* re-stales and re-emits the critique (it depends on the finalized contracts), so
|
|
767
797
|
* a clean re-critique ⇒ proceed (the fixpoint). A fresh critique whose blocking
|
|
768
798
|
* ids were ALL already addressed by a prior repair, with none new ⇒ escalate
|
|
@@ -777,6 +807,14 @@ export async function evaluateCritiqueGate(artifactsDir) {
|
|
|
777
807
|
const blockingIds = blockingCritiqueIds(critique);
|
|
778
808
|
if (blockingIds.length === 0)
|
|
779
809
|
return { kind: "proceed" };
|
|
810
|
+
const requestedTarget = isRecord(critique) ? critique.repair_target : undefined;
|
|
811
|
+
if (requestedTarget !== undefined &&
|
|
812
|
+
!CONCEPTUAL_CRITIQUE_REPAIR_TARGETS.includes(requestedTarget)) {
|
|
813
|
+
return { kind: "escalate", reason: "unsupported_target", blocking: blockingIds,
|
|
814
|
+
note: `Unsupported critique repair_target ${JSON.stringify(requestedTarget)}; correct the critique to name finalized_module_contracts or module_decomposition.` };
|
|
815
|
+
}
|
|
816
|
+
const target = requestedTarget === "module_decomposition"
|
|
817
|
+
? "module_decomposition" : "finalized_module_contracts";
|
|
780
818
|
const repairState = await readRepairState(artifactsDir);
|
|
781
819
|
const critiqueRepairs = repairState.critique_repairs ?? [];
|
|
782
820
|
const critiqueHash = env.content_hash;
|
|
@@ -789,9 +827,11 @@ export async function evaluateCritiqueGate(artifactsDir) {
|
|
|
789
827
|
// Idempotent re-entry: this exact critique already drove a repair (its design
|
|
790
828
|
// repair has not yet produced a fresh critique). Re-emit the same repair.
|
|
791
829
|
if (alreadyHandled) {
|
|
792
|
-
return { kind: "repair", critiqueHash, blockingIds };
|
|
830
|
+
return { kind: "repair", critiqueHash, blockingIds, target };
|
|
793
831
|
}
|
|
794
|
-
const addressed = new Set(critiqueRepairs
|
|
832
|
+
const addressed = new Set(critiqueRepairs
|
|
833
|
+
.filter((repair) => (repair.target ?? "finalized_module_contracts") === target)
|
|
834
|
+
.flatMap((repair) => repair.blocking_ids ?? []));
|
|
795
835
|
const newBlocking = blockingIds.filter((id) => !addressed.has(id));
|
|
796
836
|
// Runaway backstop (loud) — pathological non-convergence.
|
|
797
837
|
if (critiqueRepairs.length >= MAX_CONTRACT_REPAIR_ITERATIONS) {
|
|
@@ -804,7 +844,7 @@ export async function evaluateCritiqueGate(artifactsDir) {
|
|
|
804
844
|
}
|
|
805
845
|
// Progress: a new blocking concern (or the first round) ⇒ repair the design.
|
|
806
846
|
if (critiqueRepairs.length === 0 || newBlocking.length > 0) {
|
|
807
|
-
return { kind: "repair", critiqueHash, blockingIds };
|
|
847
|
+
return { kind: "repair", critiqueHash, blockingIds, target };
|
|
808
848
|
}
|
|
809
849
|
// Stall: every blocking concern was already addressed by a prior repair, none
|
|
810
850
|
// new ⇒ the design loop is not converging ⇒ escalate to the user.
|
|
@@ -1002,7 +1042,7 @@ async function evaluatePreCriticCitationGrounding(artifactsDir, repoRoot) {
|
|
|
1002
1042
|
// only at a barrel is as unfixable downstream as one that does not ground at
|
|
1003
1043
|
// all, and the decomposition prompt states the rule as binding.
|
|
1004
1044
|
// Its tree-readability issue repeats the citation gate's own, so it is dropped.
|
|
1005
|
-
const shimIssues = (await validateDecompositionFileScope(decomposition, repoRoot)).filter((issue) => issue.path !== "decomposition_file_scope.repo_tree");
|
|
1045
|
+
const shimIssues = (await validateDecompositionFileScope(decomposition, repoRoot)).issues.filter((issue) => issue.path !== "decomposition_file_scope.repo_tree");
|
|
1006
1046
|
const errors = [...result.issues, ...shimIssues].filter((issue) => issue.severity === "error");
|
|
1007
1047
|
if (errors.length === 0)
|
|
1008
1048
|
return null;
|
|
@@ -1349,7 +1389,7 @@ async function propagateAggregateToShards(artifactsDir, name, payload) {
|
|
|
1349
1389
|
* signal is rewritten only on a real raise. Absent signal ⇒ undefined ⇒ the
|
|
1350
1390
|
* renderer applies its fail-safe full depth (floor is `light`, never off).
|
|
1351
1391
|
*/
|
|
1352
|
-
async function resolveAdversarialDepth(artifactsDir) {
|
|
1392
|
+
export async function resolveAdversarialDepth(artifactsDir) {
|
|
1353
1393
|
let riskSignal = await readIntakeRiskSignal(artifactsDir);
|
|
1354
1394
|
if (riskSignal) {
|
|
1355
1395
|
const modules = await readDecomposedModules(artifactsDir);
|
|
@@ -1428,13 +1468,19 @@ async function writeContractPhaseStep(ctx, phase, extraSection) {
|
|
|
1428
1468
|
const rendered = renderContractPipelinePrompt({
|
|
1429
1469
|
role: phase,
|
|
1430
1470
|
artifactPaths: ctx.artifactPaths,
|
|
1471
|
+
artifactReadPaths: ctx.artifactReadPaths,
|
|
1431
1472
|
sourcePaths: ctx.sourcePaths,
|
|
1432
1473
|
repoRoot: ctx.root,
|
|
1433
1474
|
pathASeedPath: ctx.pathASeedPath,
|
|
1434
1475
|
adversarialDepth: ctx.adversarialDepth,
|
|
1435
1476
|
});
|
|
1436
|
-
|
|
1477
|
+
const prompt = await bindContractReviewPrompt({
|
|
1478
|
+
artifactsDir: ctx.artifactsDir, artifact: PHASE_TO_ARTIFACT[phase], role: phase,
|
|
1479
|
+
emissionId: ctx.runId, requirement: reviewRequirementForRole(phase, ctx.adversarialDepth),
|
|
1437
1480
|
prompt: extraSection ? `${rendered.prompt}\n${extraSection}` : rendered.prompt,
|
|
1481
|
+
});
|
|
1482
|
+
return writeContractPromptStep(ctx, {
|
|
1483
|
+
prompt,
|
|
1438
1484
|
outputPath: rendered.outputPath,
|
|
1439
1485
|
stopCondition: `Stop after writing the contract-pipeline output for phase "${phase}" and running next-step.`,
|
|
1440
1486
|
});
|
|
@@ -1477,11 +1523,12 @@ async function collapsedSectionExtra(phase, artifactsDir) {
|
|
|
1477
1523
|
return await buildReReviewSection(phase, artifactsDir);
|
|
1478
1524
|
}
|
|
1479
1525
|
async function writeCollapsedRoundTripStep(ctx, phases) {
|
|
1480
|
-
const sections = await Promise.all(phases.map(async (phase) => ({
|
|
1526
|
+
const sections = await Promise.all(phases.map(async (phase, index) => ({
|
|
1481
1527
|
phase,
|
|
1482
1528
|
rendered: renderContractPipelinePrompt({
|
|
1483
1529
|
role: phase,
|
|
1484
1530
|
artifactPaths: ctx.artifactPaths,
|
|
1531
|
+
artifactReadPaths: Object.fromEntries(Object.entries(ctx.artifactReadPaths).filter(([name]) => !phases.slice(0, index).some(earlier => PHASE_TO_ARTIFACT[earlier] === name))),
|
|
1485
1532
|
sourcePaths: ctx.sourcePaths,
|
|
1486
1533
|
repoRoot: ctx.root,
|
|
1487
1534
|
pathASeedPath: ctx.pathASeedPath,
|
|
@@ -1500,9 +1547,12 @@ If you cannot complete a section (an artifact would be malformed), write the one
|
|
|
1500
1547
|
|
|
1501
1548
|
Artifacts to produce (in order):
|
|
1502
1549
|
${outputPaths.map((p, i) => `${i + 1}. \`${p}\` (${phases[i]})`).join("\n")}`;
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
.
|
|
1550
|
+
const boundSections = await Promise.all(sections.map(async (section) => bindContractReviewPrompt({
|
|
1551
|
+
artifactsDir: ctx.artifactsDir, artifact: PHASE_TO_ARTIFACT[section.phase], role: section.phase,
|
|
1552
|
+
emissionId: ctx.runId, requirement: reviewRequirementForRole(section.phase, ctx.adversarialDepth),
|
|
1553
|
+
prompt: section.extra ? `${section.rendered.prompt}\n${section.extra}` : section.rendered.prompt,
|
|
1554
|
+
})));
|
|
1555
|
+
const body = boundSections.map(prompt => `\n---\n\n${prompt}`).join("\n");
|
|
1506
1556
|
return writeContractPromptStep(ctx, {
|
|
1507
1557
|
prompt: `${header}\n${body}`,
|
|
1508
1558
|
outputPath: outputPaths[outputPaths.length - 1],
|
|
@@ -1864,10 +1914,25 @@ Only as an explicit LAST resort — an accepted, recorded decision to design aga
|
|
|
1864
1914
|
* errors — LLM output is untrusted until validated.
|
|
1865
1915
|
*/
|
|
1866
1916
|
const invalidIngestionGate = async (ctx) => {
|
|
1867
|
-
const ingestion = await ingestContractArtifacts(ctx.artifactsDir);
|
|
1917
|
+
const ingestion = await ingestContractArtifacts(ctx.artifactsDir, ctx.adversarialDepth);
|
|
1918
|
+
for (const name of ingestion.stale ?? []) {
|
|
1919
|
+
const archived = await archiveContractArtifact(ctx.artifactsDir, name, "stale", ctx.options.renameFn);
|
|
1920
|
+
if (!archived.originalFree) {
|
|
1921
|
+
return { via: "blocked", prompt: `# Stale review context could not be archived\n\nThe inputs to ${name} changed. Its old review cannot be accepted. Unlock or remove the stale submission at \`${contractInputFilePath(ctx.artifactsDir, name)}\` and its canonical artifact, then run next-step.`, stopCondition: "Stop until the stale review artifacts can be archived; never accept the old review." };
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
// Continue the existing staleness/consistency walk. Re-emitting this downstream
|
|
1925
|
+
// reviewer now would skip upstream repairs and ask it to review invalid inputs.
|
|
1868
1926
|
if (ingestion.invalid.length === 0)
|
|
1869
1927
|
return null;
|
|
1870
1928
|
const first = ingestion.invalid[0];
|
|
1929
|
+
if (first.unavailable) {
|
|
1930
|
+
return { via: "blocked", prompt: `# Required review context unavailable
|
|
1931
|
+
|
|
1932
|
+
${formatValidationIssues(first.issues)}
|
|
1933
|
+
|
|
1934
|
+
Keep the submitted declaration for diagnosis. When an independent context is available, replace the response at \`${contractInputFilePath(ctx.artifactsDir, first.name)}\` using the current bound prompt, then run \`${loaderCommand("next-step")}\`. Do not substitute self-review or remove the required review.`, stopCondition: "Stop until a review context satisfying the required policy is available." };
|
|
1935
|
+
}
|
|
1871
1936
|
const archived = await archiveContractArtifact(ctx.artifactsDir, first.name, "invalid", ctx.options.renameFn);
|
|
1872
1937
|
return {
|
|
1873
1938
|
via: "phase",
|
|
@@ -2084,6 +2149,7 @@ const conceptualCritiqueGate = async (ctx) => {
|
|
|
2084
2149
|
if (!critiqueRepairs.some((repair) => repair.critique_hash === gate.critiqueHash)) {
|
|
2085
2150
|
critiqueRepairs.push({
|
|
2086
2151
|
critique_hash: gate.critiqueHash,
|
|
2152
|
+
target: gate.target,
|
|
2087
2153
|
at: new Date().toISOString(),
|
|
2088
2154
|
blocking_ids: gate.blockingIds,
|
|
2089
2155
|
});
|
|
@@ -2092,18 +2158,19 @@ const conceptualCritiqueGate = async (ctx) => {
|
|
|
2092
2158
|
}
|
|
2093
2159
|
const rendered = renderContractRepairPrompt({
|
|
2094
2160
|
trigger: "critique",
|
|
2095
|
-
target:
|
|
2161
|
+
target: gate.target,
|
|
2096
2162
|
instruction: "Revise the design to resolve every BLOCKING concern in the conceptual design critique " +
|
|
2097
2163
|
`(${gate.blockingIds.join(", ")}). Read conceptual_design_critique.json for each concern's ` +
|
|
2098
|
-
|
|
2164
|
+
`description, then apply targeted edits to ${gate.target} so the blocking concerns no longer apply.`,
|
|
2099
2165
|
artifactPaths: ctx.artifactPaths,
|
|
2166
|
+
artifactReadPaths: ctx.artifactReadPaths,
|
|
2100
2167
|
repoRoot: ctx.root,
|
|
2101
2168
|
});
|
|
2102
2169
|
return {
|
|
2103
2170
|
via: "step",
|
|
2104
2171
|
prompt: rendered.prompt,
|
|
2105
2172
|
outputPath: rendered.outputPath,
|
|
2106
|
-
stopCondition:
|
|
2173
|
+
stopCondition: `Stop after repairing ${gate.target} to resolve the blocking critique concerns and running next-step.`,
|
|
2107
2174
|
};
|
|
2108
2175
|
}
|
|
2109
2176
|
if (gate.kind === "escalate") {
|
|
@@ -2249,6 +2316,7 @@ const judgeRepairGate = async (ctx) => {
|
|
|
2249
2316
|
target: repairTarget,
|
|
2250
2317
|
instruction: gate.directive.instruction,
|
|
2251
2318
|
artifactPaths: ctx.artifactPaths,
|
|
2319
|
+
artifactReadPaths: ctx.artifactReadPaths,
|
|
2252
2320
|
repoRoot: ctx.root,
|
|
2253
2321
|
});
|
|
2254
2322
|
return {
|
|
@@ -3092,14 +3160,15 @@ export async function buildNextContractPipelineStep(options) {
|
|
|
3092
3160
|
// evidence. The (possibly raised) riskSignal is also consumed by the
|
|
3093
3161
|
// granularity-collapse gate, so it is carried on the context alongside it.
|
|
3094
3162
|
const { riskSignal, adversarialDepth } = await resolveAdversarialDepth(artifactsDir);
|
|
3095
|
-
//
|
|
3096
|
-
//
|
|
3097
|
-
//
|
|
3098
|
-
//
|
|
3099
|
-
// named to the host.
|
|
3163
|
+
// Writes and reads are distinct: hosts submit to *.input.json; accepted
|
|
3164
|
+
// upstreams are canonical envelopes whose payload field holds domain data.
|
|
3165
|
+
// Collapsed ordinary authoring sections may read staged raw outputs earlier
|
|
3166
|
+
// in that same round trip, before they have been ingested.
|
|
3100
3167
|
const artifactPaths = {};
|
|
3168
|
+
const artifactReadPaths = {};
|
|
3101
3169
|
for (const name of CP_ARTIFACT_NAMES) {
|
|
3102
3170
|
artifactPaths[name] = contractInputFilePath(artifactsDir, name);
|
|
3171
|
+
artifactReadPaths[name] = contractArtifactFilePath(artifactsDir, name);
|
|
3103
3172
|
}
|
|
3104
3173
|
const seedPath = pathASeedFilePath(artifactsDir);
|
|
3105
3174
|
const ctx = {
|
|
@@ -3110,6 +3179,7 @@ export async function buildNextContractPipelineStep(options) {
|
|
|
3110
3179
|
sourcePaths,
|
|
3111
3180
|
paths: intakePaths(artifactsDir),
|
|
3112
3181
|
artifactPaths,
|
|
3182
|
+
artifactReadPaths,
|
|
3113
3183
|
// Present only for structured_audit runs.
|
|
3114
3184
|
pathASeedPath: existsSync(seedPath) ? seedPath : undefined,
|
|
3115
3185
|
riskSignal,
|
|
@@ -3669,24 +3739,12 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3669
3739
|
evidence: obligationEvidence.length > 0
|
|
3670
3740
|
? obligationEvidence
|
|
3671
3741
|
: [node.description ?? node.title ?? `Contract-pipeline task ${id}`],
|
|
3672
|
-
//
|
|
3673
|
-
// above already carries exactly that — and no consumer ever read it:
|
|
3674
|
-
// `FindingSchema` never declared it, so the dispatch boundary's
|
|
3675
|
-
// `FindingSchema.parse` stripped it, and no reader recovered it from the
|
|
3676
|
-
// plan in between. A field the pipeline computes onto a finding that
|
|
3677
|
-
// reaches no consumer is not computed.
|
|
3742
|
+
// The implementation description already lives in summary.
|
|
3678
3743
|
contract_goal_id: dag?.goal_id,
|
|
3679
3744
|
contract_obligation_ids: contractObligations,
|
|
3680
3745
|
verification_obligation_ids: verificationObligations,
|
|
3681
3746
|
targeted_commands: node.targeted_commands ?? [],
|
|
3682
|
-
//
|
|
3683
|
-
// Each is a DAG-node fact whose only readers are the node-side gates
|
|
3684
|
-
// (`validateImplementationDAGIntegrity` and `validateCounterexampleThreading`
|
|
3685
|
-
// in `src/remediate/validation/contractPipelineGates.ts`) — they read it
|
|
3686
|
-
// off the NODE, never off a finding. Copied onto the finding they were
|
|
3687
|
-
// declared on no schema, read by no consumer, and dropped by the dispatch
|
|
3688
|
-
// boundary's `FindingSchema.parse`. The counterexample ids still reach the
|
|
3689
|
-
// finding where they ARE consumed: folded into `evidence` above.
|
|
3747
|
+
// Distinct node instructions travel on the block, not the finding.
|
|
3690
3748
|
};
|
|
3691
3749
|
});
|
|
3692
3750
|
if (approvedSource && canonicalItemsByNodeId.size > 0) {
|
|
@@ -3712,8 +3770,7 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3712
3770
|
contract_obligation_ids: contractObligations,
|
|
3713
3771
|
verification_obligation_ids: verificationObligations,
|
|
3714
3772
|
targeted_commands: [...(node.targeted_commands ?? [])],
|
|
3715
|
-
// The
|
|
3716
|
-
// sibling block above for why.
|
|
3773
|
+
// The source finding stays intact; its node instructions travel on the block.
|
|
3717
3774
|
};
|
|
3718
3775
|
});
|
|
3719
3776
|
}
|
|
@@ -3742,6 +3799,10 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3742
3799
|
};
|
|
3743
3800
|
}
|
|
3744
3801
|
}
|
|
3802
|
+
const counterexamplePayload = envelopePayload(await readContractArtifact(artifactsDir, "counterexample"));
|
|
3803
|
+
const counterexampleEntries = isRecord(counterexamplePayload) && Array.isArray(counterexamplePayload.counterexamples)
|
|
3804
|
+
? counterexamplePayload.counterexamples.map(entry => CounterexampleSchema.parse(entry)) : [];
|
|
3805
|
+
const counterexamplesById = new Map(counterexampleEntries.map(entry => [entry.id, entry]));
|
|
3745
3806
|
const blocks = nodes.map((node, index) => {
|
|
3746
3807
|
const nodeId = ensureNodeId(node.id, index);
|
|
3747
3808
|
const deps = (node.depends_on ?? []).map((depId) => toBlockId(depId));
|
|
@@ -3781,9 +3842,22 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3781
3842
|
], slugToOrdinal, lastOrdinal)
|
|
3782
3843
|
: undefined;
|
|
3783
3844
|
const blockModuleContracts = moduleContractsForNode(node);
|
|
3845
|
+
const counterexamples = [...new Set(node.addresses_counterexamples ?? [])].map(id => {
|
|
3846
|
+
const entry = counterexamplesById.get(id);
|
|
3847
|
+
if (!entry)
|
|
3848
|
+
throw new Error(`Implementation node ${nodeId} names missing counterexample ${id}; repair the upstream counterexample binding.`);
|
|
3849
|
+
return entry;
|
|
3850
|
+
});
|
|
3851
|
+
const implementationContext = ImplementationContextSchema.parse({
|
|
3852
|
+
...(approvedSource && node.description ? { description: node.description } : {}),
|
|
3853
|
+
...(node.preconditions !== undefined ? { preconditions: node.preconditions } : {}),
|
|
3854
|
+
...(node.expected_changes !== undefined ? { expected_changes: node.expected_changes } : {}),
|
|
3855
|
+
...(counterexamples.length > 0 ? { counterexamples } : {}),
|
|
3856
|
+
});
|
|
3784
3857
|
return {
|
|
3785
3858
|
block_id: toBlockId(nodeId),
|
|
3786
3859
|
items: canonicalItemsByNodeId.get(nodeId) ?? [nodeId],
|
|
3860
|
+
...(Object.keys(implementationContext).length > 0 ? { implementation_context: implementationContext } : {}),
|
|
3787
3861
|
// INV-remediate-pipeline-02: a block with prerequisites is never
|
|
3788
3862
|
// wave-dispatched as independent — parallel_safe derives from depends_on.
|
|
3789
3863
|
parallel_safe: deps.length === 0,
|