audit-tools 0.51.7 → 0.51.9
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/clarification/blastRadius.d.ts +17 -16
- package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
- package/dist/audit/clarification/blastRadius.js +48 -44
- package/dist/audit/clarification/blastRadius.js.map +1 -1
- package/dist/audit/clarification/dials.d.ts +4 -4
- package/dist/audit/clarification/dials.d.ts.map +1 -1
- package/dist/audit/clarification/dials.js +1 -0
- package/dist/audit/clarification/dials.js.map +1 -1
- package/dist/audit/clarification/partition.d.ts +12 -21
- package/dist/audit/clarification/partition.d.ts.map +1 -1
- package/dist/audit/clarification/partition.js +52 -59
- package/dist/audit/clarification/partition.js.map +1 -1
- package/dist/audit/clarification/riskGate.d.ts +2 -2
- package/dist/audit/clarification/riskGate.d.ts.map +1 -1
- package/dist/audit/clarification/riskGate.js +1 -0
- package/dist/audit/clarification/riskGate.js.map +1 -1
- package/dist/audit/clarification/voiQueue.d.ts +3 -3
- package/dist/audit/clarification/voiQueue.d.ts.map +1 -1
- package/dist/audit/clarification/voiQueue.js +1 -0
- package/dist/audit/clarification/voiQueue.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +14 -2
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +13 -5
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.d.ts +6 -9
- package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.js +35 -47
- package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +14 -0
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterComparisonPrompt.js +111 -0
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -0
- package/dist/audit/cli/charterExtractionPrompt.d.ts +14 -17
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +81 -104
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/charterFidelityPrompt.d.ts +14 -0
- package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterFidelityPrompt.js +58 -0
- package/dist/audit/cli/charterFidelityPrompt.js.map +1 -0
- package/dist/audit/cli/conceptualDispatch.d.ts +39 -6
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +59 -12
- 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 +46 -2
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +18 -6
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +525 -67
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +24 -0
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +9 -1
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
- package/dist/audit/cli/foldTransaction.js +14 -3
- package/dist/audit/cli/foldTransaction.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +4 -1
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
- package/dist/audit/cli/intakeCommand.js +1 -0
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +18 -12
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +40 -4
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +14 -14
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +7 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +206 -31
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +92 -28
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +363 -126
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +10 -0
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +3 -1
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +12 -0
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +242 -29
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +12 -4
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +9 -0
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +71 -30
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +29 -66
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +43 -2
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -1
- package/dist/audit/cli/stepScaffold.js +24 -10
- package/dist/audit/cli/stepScaffold.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +52 -29
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +44 -14
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +4 -1
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +65 -16
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +89 -8
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +14 -21
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +0 -1
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/decompose/findings.d.ts.map +1 -1
- package/dist/audit/decompose/findings.js +10 -2
- package/dist/audit/decompose/findings.js.map +1 -1
- package/dist/audit/extractors/designAssessment.d.ts.map +1 -1
- package/dist/audit/extractors/designAssessment.js +13 -4
- package/dist/audit/extractors/designAssessment.js.map +1 -1
- package/dist/audit/extractors/disposition.d.ts.map +1 -1
- package/dist/audit/extractors/disposition.js +17 -5
- package/dist/audit/extractors/disposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +224 -17
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/extractors/leadLineage.d.ts +10 -0
- package/dist/audit/extractors/leadLineage.d.ts.map +1 -0
- package/dist/audit/extractors/leadLineage.js +44 -0
- package/dist/audit/extractors/leadLineage.js.map +1 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +25 -8
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +76 -1
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +113 -20
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts +15 -0
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +158 -11
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +30 -4
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +28 -5
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +39 -1
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.js +4 -1
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +11 -17
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +61 -93
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts +24 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js +110 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +34 -20
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +80 -106
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts +20 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js +76 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts +7 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js +68 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +9 -8
- 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 +7 -6
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +7 -0
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +58 -19
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +6 -2
- 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 +22 -8
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +1 -0
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +40 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +32 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +5 -3
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +34 -5
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -1
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts +2 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +19 -7
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +1 -0
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.js +3 -1
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts +72 -0
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +177 -20
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts +56 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js +114 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts +70 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +171 -21
- 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 +49 -25
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +7 -5
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +1 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +13 -2
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +166 -12
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +6 -5
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +117 -0
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +277 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +0 -2
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +0 -3
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/systemic/coveredThemes.d.ts +28 -0
- package/dist/audit/systemic/coveredThemes.d.ts.map +1 -0
- package/dist/audit/systemic/coveredThemes.js +52 -0
- package/dist/audit/systemic/coveredThemes.js.map +1 -0
- package/dist/audit/systemic/reviewFileMap.d.ts +81 -0
- package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -0
- package/dist/audit/systemic/reviewFileMap.js +169 -0
- package/dist/audit/systemic/reviewFileMap.js.map +1 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +149 -26
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.d.ts +44 -4
- package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +114 -10
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/charterClarification.d.ts +9 -4
- package/dist/audit/types/charterClarification.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.d.ts +48 -93
- package/dist/audit/types/charterRegister.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.js +15 -26
- package/dist/audit/types/charterRegister.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +88 -18
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +77 -16
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types/designAssessment.d.ts +8 -6
- package/dist/audit/types/designAssessment.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +2 -2
- package/dist/audit/types/systemicChallenge.d.ts +43 -7
- package/dist/audit/types/systemicChallenge.d.ts.map +1 -1
- package/dist/audit/types.d.ts +71 -10
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +23 -2
- package/dist/audit/types.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +30 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +50 -8
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.js +14 -0
- package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +97 -2
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +163 -9
- 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 +93 -3
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +31 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
- package/dist/remediate/contractPipeline/derive.d.ts +0 -14
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +52 -24
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +50 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js +77 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js.map +1 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts +85 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/idRegistry.js +147 -0
- package/dist/remediate/contractPipeline/idRegistry.js.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +13 -16
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.js +15 -30
- package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +20 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.js +23 -7
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +17 -0
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +6 -9
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +183 -0
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/sketchSource.js +255 -0
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -0
- package/dist/remediate/findingFilter.d.ts.map +1 -1
- package/dist/remediate/findingFilter.js +1 -0
- package/dist/remediate/findingFilter.js.map +1 -1
- package/dist/remediate/index.d.ts +81 -0
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +162 -53
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +43 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +82 -13
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +33 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +227 -13
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +154 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +242 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -0
- package/dist/remediate/state/runStatus.d.ts +35 -0
- package/dist/remediate/state/runStatus.d.ts.map +1 -0
- package/dist/remediate/state/runStatus.js +46 -0
- package/dist/remediate/state/runStatus.js.map +1 -0
- package/dist/remediate/state/store.d.ts +52 -2
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +124 -21
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +83 -13
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +65 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +302 -85
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +58 -21
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +87 -2
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +344 -44
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +109 -5
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +135 -27
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +167 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +428 -1
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +2 -13
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +22 -4
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +44 -40
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +501 -106
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/stepWriter.d.ts +1 -1
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +1 -0
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +32 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +1 -0
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +8 -0
- package/dist/remediate/types/options.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.d.ts +8 -0
- package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.js +12 -1
- package/dist/remediate/utils/fileIntegrity.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +19 -2
- 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 +26 -39
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +18 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +33 -5
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +83 -5
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +46 -14
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +35 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +5 -5
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +1 -0
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/clippy.d.ts +9 -1
- package/dist/shared/analyzers/clippy.d.ts.map +1 -1
- package/dist/shared/analyzers/clippy.js +10 -2
- package/dist/shared/analyzers/clippy.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +1 -0
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +7 -1
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +8 -2
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +24 -24
- package/dist/shared/analyzers/types.d.ts.map +1 -1
- package/dist/shared/analyzers/types.js +15 -0
- package/dist/shared/analyzers/types.js.map +1 -1
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +42 -7
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/chunkByBudget.d.ts.map +1 -1
- package/dist/shared/chunkByBudget.js.map +1 -1
- package/dist/shared/continuityScore.d.ts.map +1 -1
- package/dist/shared/continuityScore.js +12 -4
- package/dist/shared/continuityScore.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +49 -45
- package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
- package/dist/shared/decompose/charterClarification.js +50 -57
- package/dist/shared/decompose/charterClarification.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +616 -342
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +590 -488
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts +36 -2
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +45 -5
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts +98 -1
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +89 -8
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +111 -0
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +28 -0
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +8 -2
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findingSimilarity.d.ts +8 -0
- package/dist/shared/findingSimilarity.d.ts.map +1 -1
- package/dist/shared/findingSimilarity.js +10 -3
- package/dist/shared/findingSimilarity.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts +15 -0
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +137 -1
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +14 -1
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +4 -0
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +41 -29
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +14 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +22 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +42 -38
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +35 -23
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/clauseBoundaries.d.ts +75 -0
- package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -0
- package/dist/shared/intent/clauseBoundaries.js +134 -0
- package/dist/shared/intent/clauseBoundaries.js.map +1 -0
- package/dist/shared/intent/clauseInterpreter.d.ts +11 -5
- package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/clauseInterpreter.js +16 -41
- package/dist/shared/intent/clauseInterpreter.js.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts +11 -0
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.js +31 -17
- package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +18 -6
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +25 -5
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +30 -9
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/schemaVersion.d.ts +4 -3
- package/dist/shared/io/schemaVersion.d.ts.map +1 -1
- package/dist/shared/io/schemaVersion.js +27 -4
- package/dist/shared/io/schemaVersion.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +38 -4
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +59 -1
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +8 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/opencodePermissions.d.ts +27 -3
- package/dist/shared/opencodePermissions.d.ts.map +1 -1
- package/dist/shared/opencodePermissions.js +77 -26
- package/dist/shared/opencodePermissions.js.map +1 -1
- package/dist/shared/prompts.d.ts +12 -1
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +11 -1
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reReview/projectionDiff.d.ts +13 -0
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
- package/dist/shared/reReview/projectionDiff.js +1 -1
- package/dist/shared/reReview/projectionDiff.js.map +1 -1
- package/dist/shared/reporting/findingDisplay.d.ts +7 -0
- package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
- package/dist/shared/reporting/findingDisplay.js +8 -1
- package/dist/shared/reporting/findingDisplay.js.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.d.ts +15 -3
- package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.js +8 -6
- package/dist/shared/steps/stepEmissionScaffold.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +37 -12
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
- package/dist/shared/submission/hostHandoffCore.js +81 -18
- package/dist/shared/submission/hostHandoffCore.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +70 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +66 -1
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +86 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +108 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +1 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/analyzerDeps.d.ts +14 -0
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
- package/dist/shared/tooling/analyzerDeps.js +23 -0
- package/dist/shared/tooling/analyzerDeps.js.map +1 -1
- package/dist/shared/tooling/commandShape.d.ts +35 -1
- package/dist/shared/tooling/commandShape.d.ts.map +1 -1
- package/dist/shared/tooling/commandShape.js +66 -4
- package/dist/shared/tooling/commandShape.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +62 -4
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +127 -8
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +674 -156
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +172 -118
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/closingActions.d.ts +25 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -1
- package/dist/shared/types/closingActions.js +26 -0
- package/dist/shared/types/closingActions.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +63 -2
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +51 -0
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/contractPipeline.d.ts +1 -0
- package/dist/shared/types/contractPipeline.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline.js +1 -0
- package/dist/shared/types/contractPipeline.js.map +1 -1
- package/dist/shared/types/contractPropertyShapes.d.ts +34 -0
- package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -0
- package/dist/shared/types/contractPropertyShapes.js +255 -0
- package/dist/shared/types/contractPropertyShapes.js.map +1 -0
- package/dist/shared/types/finding.d.ts +376 -18
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +111 -0
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +214 -2
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +273 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/intentInterpretation.d.ts +1 -1
- package/dist/shared/types/intentInterpretation.js +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +294 -30
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +96 -7
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/stepContract.d.ts +47 -0
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +113 -0
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/charterGate.d.ts +13 -28
- package/dist/shared/validation/charterGate.d.ts.map +1 -1
- package/dist/shared/validation/charterGate.js +13 -35
- package/dist/shared/validation/charterGate.js.map +1 -1
- package/dist/shared/validation/contractConstructionSites.d.ts +116 -0
- package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -0
- package/dist/shared/validation/contractConstructionSites.js +277 -0
- package/dist/shared/validation/contractConstructionSites.js.map +1 -0
- package/dist/shared/validation/designFindingGrounding.d.ts +33 -4
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +40 -6
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +11 -1
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +5 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +8 -2
- package/opencode.json +29 -29
- package/package.json +16 -3
- package/schemas/audit-code-v1alpha1.schema.json +0 -4
- package/scripts/audit/postinstall.mjs +81 -96
- package/scripts/remediate/postinstall.mjs +43 -83
- package/scripts/shared/host-asset-plan.mjs +176 -0
- package/scripts/shared/install-host-assets.mjs +44 -1
- package/scripts/shared/primitives.mjs +89 -0
- package/skills/audit-code/SKILL.md +4 -4
- package/skills/audit-code/audit-code.prompt.md +14 -10
- package/skills/remediate-code/SKILL.md +9 -5
- package/skills/remediate-code/remediate-code.prompt.md +11 -4
- package/wrapper/audit-code-wrapper-build.mjs +6 -3
- package/dist/audit/cli/charterDeltaPrompt.d.ts +0 -18
- package/dist/audit/cli/charterDeltaPrompt.d.ts.map +0 -1
- package/dist/audit/cli/charterDeltaPrompt.js +0 -150
- package/dist/audit/cli/charterDeltaPrompt.js.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts +0 -24
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.js +0 -128
- package/dist/audit/orchestrator/charterDeltaExecutor.js.map +0 -1
- package/dist/audit/supervisor/runLedger.d.ts +0 -3
- package/dist/audit/supervisor/runLedger.d.ts.map +0 -1
- package/dist/audit/supervisor/runLedger.js +0 -69
- package/dist/audit/supervisor/runLedger.js.map +0 -1
- package/dist/shared/types/executionRecord.d.ts +0 -58
- package/dist/shared/types/executionRecord.d.ts.map +0 -1
- package/dist/shared/types/executionRecord.js +0 -26
- package/dist/shared/types/executionRecord.js.map +0 -1
- package/dist/shared/types/runLedger.d.ts +0 -17
- package/dist/shared/types/runLedger.d.ts.map +0 -1
- package/dist/shared/types/runLedger.js +0 -7
- package/dist/shared/types/runLedger.js.map +0 -1
|
@@ -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":"AA2BA,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,WAAW,EAGhB,KAAK,SAAS,EACd,KAAK,aAAa,EAUnB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EACL,wBAAwB,EACxB,KAAK,cAAc,EACpB,MAAM,wCAAwC,CAAC;AAmBhD,OAAO,EACL,oBAAoB,EAKpB,KAAK,gBAAgB,EAEtB,MAAM,kBAAkB,CAAC;AAqC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAuC5D,OAAO,EAKL,KAAK,+BAA+B,EACpC,KAAK,WAAW,EACjB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAGzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,WAAW,EAAoB,MAAM,cAAc,CAAC;AAgE7D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AASrD,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,oEAAoE,CAAC;IACrF;;;;;OAKG;IACH,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,EAAE,EAAE,MAAM,CAAC;QACX,cAAc,EAAE,OAAO,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wBAAsB,sCAAsC,CAC1D,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,EAAE,CAAC,CAInB;AAED;;;;;;;;;;;;;;;;;;;;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;;;;;;;GAOG;AACH,wBAAsB,uCAAuC,CAC3D,YAAY,EAAE,MAAM,EACpB,IAAI,GAAE,MAA2C,GAChD,OAAO,CAAC,IAAI,CAAC,CAgWf"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// sites-pinned: tests/remediate/contract-pipeline.test.ts
|
|
2
|
+
// (the promotion
|
|
3
|
+
// computes no finding field FindingSchema would drop)
|
|
1
4
|
/**
|
|
2
5
|
* Contract-pipeline gate for ALL remediation starts (both paths).
|
|
3
6
|
*
|
|
@@ -22,10 +25,10 @@
|
|
|
22
25
|
import { existsSync } from "node:fs";
|
|
23
26
|
import { mkdir, readFile, rename, rm } from "node:fs/promises";
|
|
24
27
|
import { isAbsolute, join, resolve } from "node:path";
|
|
25
|
-
import { writeJsonFile, readOptionalJsonFile, formatValidationIssues, hashContent, isRecord, withFsRetry, projectApprovedFindings, captureStepBoundaryFriction, climbOutOfAuditTools, partitionCommandsByDeclaredShape, normalizeRepoPath, repoRelativePath, toPosixPath, neutralProjectFacts, } from "audit-tools/shared";
|
|
28
|
+
import { writeJsonFile, readOptionalJsonFile, formatValidationIssues, hashContent, isRecord, withFsRetry, projectApprovedFindings, captureStepBoundaryFriction, climbOutOfAuditTools, partitionCommandsByDeclaredShape, splitSequentialCommandChain, normalizeRepoPath, repoRelativePath, toPosixPath, neutralProjectFacts, } from "audit-tools/shared";
|
|
26
29
|
import { createStepEmissionScaffold, } from "../../shared/steps/stepEmissionScaffold.js";
|
|
27
30
|
import { OBLIGATION_KIND_PRIORITY, } from "../contractPipeline/obligationKinds.js";
|
|
28
|
-
import { CP_ARTIFACT_NAMES, contractArtifactExists, contractArtifactFilePath, contractInputFilePath, contractPipelineDir, detectStaleArtifacts, envelopePayload, envelopeSemanticHash, isEnvelope, pathASeedFilePath, payloadSemanticHash, readContractArtifact, stampToolCreatedAt, writeContractArtifact, writeDerivedContractArtifact, } from "../contractPipeline/artifactStore.js";
|
|
31
|
+
import { CP_ARTIFACT_NAMES, contractArtifactExists, contractArtifactFilePath, contractInputFilePath, contractPipelineDir, detectStaleArtifacts, dropReviewSnapshot, envelopePayload, envelopeSemanticHash, isEnvelope, pathASeedFilePath, payloadSemanticHash, readContractArtifact, stampToolCreatedAt, writeContractArtifact, writeDerivedContractArtifact, } from "../contractPipeline/artifactStore.js";
|
|
29
32
|
import { readIntakeRiskSignal, writeIntakeRiskSignal, escalateRiskSignal, decompositionRiskEvidence, adversarialDepthForTier, roundTripGranularityForTier, } from "../riskSignal.js";
|
|
30
33
|
import { phaseOrdinalForObligations, moduleSlug, moduleSlugForObligationId, renderPhaseCutSection, detectContractTokenCycles, } from "../contractPipeline/phaseCut.js";
|
|
31
34
|
import { ensurePhaseCutArtifact, readPhaseCutArtifact } from "../contractPipeline/phaseCutArtifact.js";
|
|
@@ -34,6 +37,7 @@ import { deriveObligationLedger, deriveFinalizedModuleContracts, buildTestValida
|
|
|
34
37
|
import { ensureNodeId, toBlockId } from "../contractPipeline/idRegistry.js";
|
|
35
38
|
import { captureReviewSnapshot, computeReReviewDelta, isReviewArtifact, readReviewSnapshot, renderReReviewSection, reviewSnapshotExists, } from "../contractPipeline/reviewSnapshot.js";
|
|
36
39
|
import { captureTestPlanCarry, readTestPlanCarry, } from "../contractPipeline/testPlanCarry.js";
|
|
40
|
+
import { CYCLIC_SEAM_BREAK_STRATEGIES, CYCLIC_SEAM_RESOLUTION_STATUSES, isCyclicSeamBreakStrategy, sketchValues, } from "../contractPipeline/sketchSource.js";
|
|
37
41
|
import { readRepairState, writeRepairState, counterexamplesByIdOf, counterexampleKeyOf, counterexampleWaiversPath, foldCounterexampleWaivers, waivedAcceptedIds, waivedJudgeAcceptedIds, } from "../contractPipeline/repairState.js";
|
|
38
42
|
import { renderContractPipelinePrompt, renderContractRepairPrompt, CONTRACT_PIPELINE_PHASE_ORDER, PHASE_TO_ARTIFACT, } from "./contractPipelinePrompts.js";
|
|
39
43
|
// The seven cross-artifact validators this module used to call one by one are
|
|
@@ -213,6 +217,24 @@ export async function archiveContractArtifact(artifactsDir, name, label, renameF
|
|
|
213
217
|
const canonicalSource = contractArtifactFilePath(artifactsDir, name);
|
|
214
218
|
const hasInput = existsSync(inputSource);
|
|
215
219
|
const hasCanonical = existsSync(canonicalSource);
|
|
220
|
+
// The `invalid` label rejects the artifact this snapshot is the verdict FOR, so
|
|
221
|
+
// the snapshot dies with it — unconditionally, and before the nothing-to-
|
|
222
|
+
// archive short-circuit below, so an orphaned snapshot is cleaned up too. A
|
|
223
|
+
// surviving copy is worse than an absent one: ingest captures a fresh snapshot
|
|
224
|
+
// only AFTER its own staleness pass, so the NEXT invocation would diff the new
|
|
225
|
+
// payload against a verdict about content the reviewer never saw. Dropped even
|
|
226
|
+
// when the history move itself fails, because the re-emit that follows tells
|
|
227
|
+
// the worker to overwrite the input in place — the old verdict is void either
|
|
228
|
+
// way.
|
|
229
|
+
//
|
|
230
|
+
// The `stale` label must NOT drop it, and that asymmetry is the whole point:
|
|
231
|
+
// staleness is what re-opens a review phase, and the diff-based re-review only
|
|
232
|
+
// fires when a prior snapshot is there to diff against. Dropping on the stale
|
|
233
|
+
// path would silently turn every staleness re-emit back into the blind full
|
|
234
|
+
// review this mechanism exists to avoid.
|
|
235
|
+
if (label === "invalid") {
|
|
236
|
+
await dropReviewSnapshot(artifactsDir, name);
|
|
237
|
+
}
|
|
216
238
|
if (!hasInput && !hasCanonical)
|
|
217
239
|
return { originalFree: true };
|
|
218
240
|
const historyDir = join(contractPipelineDir(artifactsDir), "history");
|
|
@@ -457,6 +479,69 @@ async function hashSeedSourcePaths(root, auditFindingsPath, affectedFiles) {
|
|
|
457
479
|
}
|
|
458
480
|
return digests;
|
|
459
481
|
}
|
|
482
|
+
/** The tool-named host lane: the operator's drift acceptances land here. */
|
|
483
|
+
export function seedSourceAcceptancesPath(artifactsDir) {
|
|
484
|
+
return join(contractPipelineDir(artifactsDir), "seed-source-acceptances.json");
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Read the operator's acceptances, keyed by the same path normalization the
|
|
488
|
+
* mismatch side uses. A malformed entry is DROPPED, never widened: an acceptance
|
|
489
|
+
* missing its rationale or its decider records no decision, and treating it as
|
|
490
|
+
* one would turn a shape defect into a silent bypass of the alarm.
|
|
491
|
+
*/
|
|
492
|
+
export async function readSeedSourceAcceptances(artifactsDir) {
|
|
493
|
+
const raw = await readOptionalJsonFile(seedSourceAcceptancesPath(artifactsDir));
|
|
494
|
+
const byPath = new Map();
|
|
495
|
+
if (!isRecord(raw) || !Array.isArray(raw.acceptances))
|
|
496
|
+
return byPath;
|
|
497
|
+
for (const entry of raw.acceptances) {
|
|
498
|
+
if (!isRecord(entry))
|
|
499
|
+
continue;
|
|
500
|
+
const path = entry.path;
|
|
501
|
+
const rationale = entry.rationale;
|
|
502
|
+
const acceptedBy = entry.accepted_by;
|
|
503
|
+
if (typeof path !== "string" ||
|
|
504
|
+
path.trim().length === 0 ||
|
|
505
|
+
typeof rationale !== "string" ||
|
|
506
|
+
rationale.trim().length === 0 ||
|
|
507
|
+
typeof acceptedBy !== "string" ||
|
|
508
|
+
acceptedBy.trim().length === 0) {
|
|
509
|
+
continue;
|
|
510
|
+
}
|
|
511
|
+
byPath.set(normalizeRepoPath(path), {
|
|
512
|
+
path: path.trim(),
|
|
513
|
+
rationale: rationale.trim(),
|
|
514
|
+
accepted_by: acceptedBy.trim(),
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
return byPath;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* The seed paths the operator's acceptance file covers, applied to the drifted
|
|
521
|
+
* set under the ONE path normalization both sides share; everything else blocks.
|
|
522
|
+
*
|
|
523
|
+
* This is the accept path and it is deliberately the ONLY automatic one: the
|
|
524
|
+
* gate cannot tell a benign drift from a falsifying one, and the one predicate
|
|
525
|
+
* that claimed to (cited line counts) was unsound — see {@link SeedSourceAcceptance}.
|
|
526
|
+
*/
|
|
527
|
+
export async function partitionSeedSourceDrift(artifactsDir, mismatches) {
|
|
528
|
+
if (mismatches.length === 0)
|
|
529
|
+
return { accepted: [], blocking: [] };
|
|
530
|
+
const acceptances = await readSeedSourceAcceptances(artifactsDir);
|
|
531
|
+
if (acceptances.size === 0)
|
|
532
|
+
return { accepted: [], blocking: [...mismatches] };
|
|
533
|
+
const accepted = [];
|
|
534
|
+
const blocking = [];
|
|
535
|
+
for (const mismatch of mismatches) {
|
|
536
|
+
const acceptance = acceptances.get(normalizeRepoPath(mismatch.path));
|
|
537
|
+
if (acceptance) {
|
|
538
|
+
accepted.push({ ...acceptance, mismatch });
|
|
539
|
+
continue;
|
|
540
|
+
}
|
|
541
|
+
blocking.push(mismatch);
|
|
542
|
+
}
|
|
543
|
+
return { accepted, blocking };
|
|
544
|
+
}
|
|
460
545
|
/**
|
|
461
546
|
* Seed source-digest binding — re-hash every path the path_a seed recorded and
|
|
462
547
|
* report the ones that moved. Pure over (root, seed): the caller decides what a
|
|
@@ -587,14 +672,37 @@ async function evaluateJudgeGate(artifactsDir) {
|
|
|
587
672
|
return { kind: "proceed" };
|
|
588
673
|
}
|
|
589
674
|
const judgeHash = judgeEnvelope.content_hash;
|
|
675
|
+
// ONE-TIME UPGRADE EFFECT: `computeHash` now serializes with
|
|
676
|
+
// `stableStringify` (artifactStore.ts), so a repair-ledger entry recorded
|
|
677
|
+
// before that change stores a key-order-sensitive `judge_hash` the recomputed
|
|
678
|
+
// value can never equal. A run sitting mid-repair-loop across the upgrade
|
|
679
|
+
// therefore misses on this compare and escalates ONCE as "not converging".
|
|
680
|
+
// Deliberate: the escalation is fail-safe (the operator resolves it and the
|
|
681
|
+
// loop re-enters on the freshly hashed report), and back-compat code for a
|
|
682
|
+
// value the next read recomputes would be carried forever for one run.
|
|
590
683
|
const alreadyHandled = repairState.repairs.some((repair) => repair.judge_hash === judgeHash);
|
|
591
684
|
// Map judge.repair_directive.target if present; if absent, infer from classifications.
|
|
685
|
+
//
|
|
686
|
+
// No `design_spec` normalization. The validator and the shared `JudgeRepairTarget`
|
|
687
|
+
// union now derive from ONE declaration of the repair-target vocabulary
|
|
688
|
+
// (`contractPipeline/sketchSource.ts`), so `design_spec` — the pre-redesign name
|
|
689
|
+
// for `finalized_module_contracts` — is not a value the type admits and not a
|
|
690
|
+
// value the validator accepts. The branch that rewrote it used to be the only
|
|
691
|
+
// thing keeping a legacy name working, and carried a cast that erased the very
|
|
692
|
+
// check it was performing.
|
|
693
|
+
//
|
|
694
|
+
// `counterexample` is admitted by the contract and refused HERE, at the one
|
|
695
|
+
// place that would have to act on it: this loop's repair renderer has a schema
|
|
696
|
+
// sketch for the three contract artifacts only (see REPAIR_TARGET_SCHEMA), so a
|
|
697
|
+
// directive naming the critic's own report falls back to the inferred contract
|
|
698
|
+
// repair rather than being carried into a renderer that cannot honour it.
|
|
592
699
|
const rawDirective = judge.repair_directive;
|
|
593
700
|
const directive = rawDirective
|
|
594
701
|
? {
|
|
595
|
-
target:
|
|
596
|
-
|
|
597
|
-
|
|
702
|
+
target: rawDirective.target === "counterexample" ||
|
|
703
|
+
rawDirective.target === "design_spec"
|
|
704
|
+
? inferRepairDirective(judge).target
|
|
705
|
+
: rawDirective.target,
|
|
598
706
|
instruction: rawDirective.instruction,
|
|
599
707
|
}
|
|
600
708
|
: inferRepairDirective(judge);
|
|
@@ -682,6 +790,11 @@ export async function evaluateCritiqueGate(artifactsDir) {
|
|
|
682
790
|
const repairState = await readRepairState(artifactsDir);
|
|
683
791
|
const critiqueRepairs = repairState.critique_repairs ?? [];
|
|
684
792
|
const critiqueHash = env.content_hash;
|
|
793
|
+
// ONE-TIME UPGRADE EFFECT, the critique gate's twin of the judge site above:
|
|
794
|
+
// a `critique_hash` recorded before `computeHash` moved to `stableStringify`
|
|
795
|
+
// cannot equal the recomputed value, so an in-flight design-repair loop
|
|
796
|
+
// crossing the upgrade escalates once as a stall instead of re-emitting.
|
|
797
|
+
// Fail-safe and deliberately not mitigated — see that site for the reasoning.
|
|
685
798
|
const alreadyHandled = critiqueRepairs.some((r) => r.critique_hash === critiqueHash);
|
|
686
799
|
// Idempotent re-entry: this exact critique already drove a repair (its design
|
|
687
800
|
// repair has not yet produced a fresh critique). Re-emit the same repair.
|
|
@@ -1077,13 +1190,21 @@ async function readModuleContractWriteTargets(artifactsDir) {
|
|
|
1077
1190
|
async function buildNodeWriteScopeResolver(artifactsDir) {
|
|
1078
1191
|
const decomposedModules = await readDecomposedModules(artifactsDir);
|
|
1079
1192
|
const contractTargetsBySlug = await readModuleContractWriteTargets(artifactsDir);
|
|
1080
|
-
const moduleScopesBySlug = decomposedModules
|
|
1081
|
-
.map((m) => ({
|
|
1193
|
+
const moduleScopesBySlug = decomposedModules.map((m) => ({
|
|
1082
1194
|
slug: moduleSlug(m.name),
|
|
1083
1195
|
files: m.file_scope,
|
|
1084
1196
|
targets: contractTargetsBySlug.get(moduleSlug(m.name)) ?? [],
|
|
1085
|
-
}))
|
|
1086
|
-
|
|
1197
|
+
}));
|
|
1198
|
+
// The join is the EXACT one (`idRegistry.moduleSlugForObligationId`), not a
|
|
1199
|
+
// longest-prefix match. Longest-prefix guessed whenever one module slug
|
|
1200
|
+
// prefixed another: with `auth` and `auth-service` both decomposed the guess
|
|
1201
|
+
// resolved correctly by luck of the sort, but with `auth-service` out of
|
|
1202
|
+
// scope, `OBL-auth-service-contract` matched `auth` and the node silently
|
|
1203
|
+
// took `auth`'s targets — another module's write boundary, granted without
|
|
1204
|
+
// anyone choosing it. The suffix grammar makes the unresolvable case
|
|
1205
|
+
// UNRESOLVABLE, which the empty-scope refusal below already reports loudly.
|
|
1206
|
+
const scopeBySlug = new Map(moduleScopesBySlug.map((m) => [m.slug, m]));
|
|
1207
|
+
const knownSlugs = new Set(scopeBySlug.keys());
|
|
1087
1208
|
const resolve = (node) => {
|
|
1088
1209
|
const declared = [...new Set(node.output_files ?? node.files_likely_touched ?? [])];
|
|
1089
1210
|
const obligationIds = [
|
|
@@ -1093,7 +1214,8 @@ async function buildNodeWriteScopeResolver(artifactsDir) {
|
|
|
1093
1214
|
const inherited = new Set();
|
|
1094
1215
|
const ownedTargets = new Set();
|
|
1095
1216
|
for (const id of obligationIds) {
|
|
1096
|
-
const
|
|
1217
|
+
const slug = moduleSlugForObligationId(id, knownSlugs);
|
|
1218
|
+
const owner = slug === null ? undefined : scopeBySlug.get(slug);
|
|
1097
1219
|
if (!owner)
|
|
1098
1220
|
continue;
|
|
1099
1221
|
// file_scope inheritance is the scope-less fallback ONLY; the contract's
|
|
@@ -1602,15 +1724,33 @@ const PRE_CRITIC_REQUIRED_GATES = new Set([
|
|
|
1602
1724
|
* a classified blocked step on a mismatch — rather than spending the whole
|
|
1603
1725
|
* design pipeline on content that no longer holds the findings the seed
|
|
1604
1726
|
* enumerates. Runs first, before anything is ingested or derived.
|
|
1727
|
+
*
|
|
1728
|
+
* The refusal names the operator's ACCEPT lane: a drift the operator has
|
|
1729
|
+
* reviewed and judged not to invalidate the findings is recorded in
|
|
1730
|
+
* `seed-source-acceptances.json` and stops blocking. That lane exists because
|
|
1731
|
+
* the gate cannot tell a version bump from a behaviour change, and the honest
|
|
1732
|
+
* answer to "can the tool tell?" is no — see `SeedSourceAcceptance`.
|
|
1605
1733
|
*/
|
|
1606
1734
|
const seedSourceDigestGate = async (ctx) => {
|
|
1607
1735
|
if (!ctx.pathASeedPath)
|
|
1608
1736
|
return null;
|
|
1609
1737
|
const seed = await readOptionalJsonFile(ctx.pathASeedPath);
|
|
1610
|
-
const
|
|
1611
|
-
if (
|
|
1738
|
+
const allMismatches = await detectSeedSourceDigestMismatches(ctx.root, seed);
|
|
1739
|
+
if (allMismatches.length === 0)
|
|
1740
|
+
return null;
|
|
1741
|
+
// A digest is a WHOLE-FILE byte binding, so it moves for changes no finding is
|
|
1742
|
+
// about — a release `version` bump in `package.json` moved the digest of every
|
|
1743
|
+
// finding that cited it and blocked the run. The operator's acceptance file is
|
|
1744
|
+
// the way to say "reviewed, and the findings still hold"; anything it does not
|
|
1745
|
+
// cover still blocks. The tool cannot infer this (see `SeedSourceAcceptance`),
|
|
1746
|
+
// so it enforces the record's shape and the join, never the judgment.
|
|
1747
|
+
const { accepted, blocking } = await partitionSeedSourceDrift(ctx.artifactsDir, allMismatches);
|
|
1748
|
+
if (blocking.length === 0)
|
|
1612
1749
|
return null;
|
|
1613
|
-
const
|
|
1750
|
+
const acceptedLines = accepted
|
|
1751
|
+
.map((entry) => `- \`${entry.path}\` — accepted by ${entry.accepted_by}: ${entry.rationale}`)
|
|
1752
|
+
.join("\n");
|
|
1753
|
+
const lines = blocking
|
|
1614
1754
|
.map((mismatch) => `- \`${mismatch.path}\` — recorded \`${mismatch.expected.slice(0, 12)}…\`, ` +
|
|
1615
1755
|
`now ${mismatch.actual ? `\`${mismatch.actual.slice(0, 12)}…\`` : "**unreadable**"}`)
|
|
1616
1756
|
.join("\n");
|
|
@@ -1625,8 +1765,19 @@ ${lines}
|
|
|
1625
1765
|
The findings this pipeline is designing against were derived from the recorded content, so re-deriving them is the only thing that makes the design sound again. Decide with the user:
|
|
1626
1766
|
|
|
1627
1767
|
1. **Re-run the audit extraction** against the current tree, so the findings describe the code as it now stands; or
|
|
1628
|
-
2. **Restore the drifted sources** to the content the audit read, if the change was unintended
|
|
1768
|
+
2. **Restore the drifted sources** to the content the audit read, if the change was unintended; or
|
|
1769
|
+
3. **Accept the drift**, when the operator has reviewed it and the findings still hold — a release version bump touches no finding the seed enumerates. Write to \`${seedSourceAcceptancesPath(ctx.artifactsDir)}\`:
|
|
1770
|
+
|
|
1771
|
+
\`\`\`json
|
|
1772
|
+
{
|
|
1773
|
+
"acceptances": [
|
|
1774
|
+
{ "path": "<the path above, repo-relative>", "rationale": "<why the findings still hold>", "accepted_by": "<who decided>" }
|
|
1775
|
+
]
|
|
1776
|
+
}
|
|
1777
|
+
\`\`\`
|
|
1629
1778
|
|
|
1779
|
+
The tool does not and cannot infer this: it can see that bytes moved and cannot see whether a finding citing those bytes is still true. Record an acceptance ONLY for a decision the operator actually made — the record names its decider.
|
|
1780
|
+
${acceptedLines ? `\nAlready accepted this run (not blocking):\n\n${acceptedLines}\n` : ""}
|
|
1630
1781
|
Only as an explicit LAST resort — an accepted, recorded decision to design against findings that no longer match the code — delete \`${ctx.pathASeedPath}\` and re-run next-step. That rebuilds the seed from the CURRENT sources while keeping the OLD findings, which clears this alarm without re-deriving anything.`,
|
|
1631
1782
|
stopCondition: "Stop — the contract pipeline is blocked on a source whose content no longer matches the audit seed.",
|
|
1632
1783
|
};
|
|
@@ -2142,10 +2293,21 @@ Each node's source_finding_ids must name exactly one canonical audit work block,
|
|
|
2142
2293
|
violations: pathARefusals,
|
|
2143
2294
|
});
|
|
2144
2295
|
}
|
|
2296
|
+
// ONE payload read for the whole promotion boundary, shared by the integrity
|
|
2297
|
+
// gate and the contract-obligation gates below. Both consume the SAME
|
|
2298
|
+
// post-archive payloads, and nothing between these two consumers writes an
|
|
2299
|
+
// artifact — so a second read bought no freshness and re-paid the whole
|
|
2300
|
+
// read-and-parse of every contract-pipeline artifact (plus the repair-state
|
|
2301
|
+
// and finding-enumeration reads it carries), on the path every plan promotion
|
|
2302
|
+
// walks. The freshness RULE is unchanged and still enforced: the read below is
|
|
2303
|
+
// `readCrossGatePayloads`, which refuses before this invocation's ingestion +
|
|
2304
|
+
// staleness-archive pass, so neither consumer can be handed a pre-archive
|
|
2305
|
+
// snapshot.
|
|
2306
|
+
const crossGatePayloads = await readCrossGatePayloads(ctx);
|
|
2145
2307
|
// DAG referential integrity + bidirectional coverage (ARC-86b18f1b-2), run
|
|
2146
2308
|
// before the traceability check so specific referential violations are
|
|
2147
2309
|
// reported first (traceability is a superset check).
|
|
2148
|
-
const outcomes = await evaluateContractPipelineCrossGateOutcomes(
|
|
2310
|
+
const outcomes = await evaluateContractPipelineCrossGateOutcomes(crossGatePayloads);
|
|
2149
2311
|
const integrity = gateOutcomeOf(outcomes, "implementation_dag_integrity");
|
|
2150
2312
|
if (!integrity?.evaluated) {
|
|
2151
2313
|
return await dagRegenerationPlan(ctx, {
|
|
@@ -2183,7 +2345,7 @@ The previous implementation_dag was rejected and archived. Every node must trace
|
|
|
2183
2345
|
// must pass before a plan is promoted. These are the invariants that keep the
|
|
2184
2346
|
// workflow correct regardless of host strength, so they are enforced here,
|
|
2185
2347
|
// never left to host discretion.
|
|
2186
|
-
const obligationGate = await evaluateContractObligationsPromotionGate(ctx.artifactsDir, ctx.root,
|
|
2348
|
+
const obligationGate = await evaluateContractObligationsPromotionGate(ctx.artifactsDir, ctx.root, crossGatePayloads);
|
|
2187
2349
|
if (!obligationGate.ok) {
|
|
2188
2350
|
return await dagRegenerationPlan(ctx, {
|
|
2189
2351
|
heading: "Contract-Obligation Gates Failed",
|
|
@@ -2400,13 +2562,13 @@ Two files, both required — the record alone is not a break:
|
|
|
2400
2562
|
"cycles": [
|
|
2401
2563
|
{
|
|
2402
2564
|
"members": ["<obligation-id>", "..."],
|
|
2403
|
-
"break_strategy": "
|
|
2565
|
+
"break_strategy": "${sketchValues(CYCLIC_SEAM_BREAK_STRATEGIES)}",
|
|
2404
2566
|
"designated_obligation_id": "<the mediating obligation, or the single authority — must exist in the rewritten ledger>",
|
|
2405
2567
|
"resolution_description": "<what was changed and why>",
|
|
2406
2568
|
"exception_registration": "<if single_authority: the named scoped exception; otherwise null>"
|
|
2407
2569
|
}
|
|
2408
2570
|
],
|
|
2409
|
-
"status": "
|
|
2571
|
+
"status": "${sketchValues(CYCLIC_SEAM_RESOLUTION_STATUSES)}"
|
|
2410
2572
|
}
|
|
2411
2573
|
\`\`\`
|
|
2412
2574
|
|
|
@@ -2451,10 +2613,14 @@ const cyclicSeamRecheckGate = async (ctx) => {
|
|
|
2451
2613
|
continue;
|
|
2452
2614
|
const members = cycleRecord.members.filter((member) => typeof member === "string");
|
|
2453
2615
|
const strategy = cycleRecord.break_strategy;
|
|
2454
|
-
|
|
2616
|
+
// The vocabulary is the shared declaration the prompt sketch also renders
|
|
2617
|
+
// (`contractPipeline/sketchSource.ts`). It was two inline literals here and
|
|
2618
|
+
// a hand-written alternation in the prompt — three statements of one rule,
|
|
2619
|
+
// in two modules, none of which the contract validator checked at all.
|
|
2620
|
+
if (!isCyclicSeamBreakStrategy(strategy)) {
|
|
2455
2621
|
rejection =
|
|
2456
2622
|
`Cycle [${members.join(", ")}] declares break_strategy ` +
|
|
2457
|
-
`${JSON.stringify(strategy ?? null)}, which is
|
|
2623
|
+
`${JSON.stringify(strategy ?? null)}, which is not one of: ${CYCLIC_SEAM_BREAK_STRATEGIES.join(", ")}.`;
|
|
2458
2624
|
break;
|
|
2459
2625
|
}
|
|
2460
2626
|
const authored = {
|
|
@@ -2859,6 +3025,7 @@ async function buildReReviewSection(phase, artifactsDir) {
|
|
|
2859
3025
|
}
|
|
2860
3026
|
// ── DAG → extracted plan conversion ──────────────────────────────────────────
|
|
2861
3027
|
// ── Obligation-kind → lens/severity mappings ──────────────────────────────────
|
|
3028
|
+
// <!-- comment-symbol-exempt: names deliberately-retired symbols; this block records that history -->
|
|
2862
3029
|
/**
|
|
2863
3030
|
* The obligation-kind vocabulary, in priority order (higher index = higher
|
|
2864
3031
|
* priority; `invariant` is highest).
|
|
@@ -3044,12 +3211,19 @@ export async function checkWriteScopePathsAgainstTrackedTree(root, paths, label)
|
|
|
3044
3211
|
return writeScopeCorpusViolations(corpus, paths, label);
|
|
3045
3212
|
}
|
|
3046
3213
|
export function normalizeBlockTargetedCommands(commands, blockId) {
|
|
3214
|
+
// The ONE mechanical repair: a bare `&&` chain already MEANS "these
|
|
3215
|
+
// invocations, in order", which is what two entries mean, so it is split here
|
|
3216
|
+
// rather than spending a whole DAG regeneration on it (open-bugs: one dispatch
|
|
3217
|
+
// emitted `npm run build && npm run check` on 23 nodes and the DAG was
|
|
3218
|
+
// regenerated twice for a defect with a mechanical answer). Everything the
|
|
3219
|
+
// split cannot faithfully restate — a pipe, a redirect, `;`, substitution, an
|
|
3220
|
+
// inadmissible half — still takes the bounded re-emit below.
|
|
3047
3221
|
const partitioned = partitionCommandsByDeclaredShape(commands, (kind, raw) => kind === "empty"
|
|
3048
3222
|
? `Block "${blockId}" declares an empty targeted_commands entry.`
|
|
3049
3223
|
: `Block "${blockId}" declares the targeted_commands entry ${JSON.stringify(raw)}, ` +
|
|
3050
3224
|
`which carries shell chaining, substitution or redirection. A targeted command is ` +
|
|
3051
3225
|
`executed verbatim through a shell, so it must be one invocation — split it into ` +
|
|
3052
|
-
`separate entries
|
|
3226
|
+
`separate entries.`, splitSequentialCommandChain);
|
|
3053
3227
|
return { targeted_commands: partitioned.commands, refusals: partitioned.refusals };
|
|
3054
3228
|
}
|
|
3055
3229
|
/**
|
|
@@ -3074,32 +3248,49 @@ export async function collectDagWriteScopeRefusals(artifactsDir, root) {
|
|
|
3074
3248
|
return refusals;
|
|
3075
3249
|
}
|
|
3076
3250
|
/**
|
|
3077
|
-
* Path-A canonical-
|
|
3078
|
-
* (OBL-seam-prep-remediate-core-inv-2 / COR-114e4941). These are exactly the
|
|
3079
|
-
* checks the promoter itself performs while building its node→canonical-group
|
|
3080
|
-
* map — but there they THROW out of `promoteImplementationDagToExtractedPlan`,
|
|
3081
|
-
* an unclassified stack that wedged every subsequent next-step. Hoisted here so
|
|
3082
|
-
* an invalid `source_finding_ids` declaration takes the same bounded re-emit as
|
|
3083
|
-
* every other promotion rejection, with no gate having executed past it.
|
|
3251
|
+
* The ONE Path-A canonical-group membership evaluator, in ONE body.
|
|
3084
3252
|
*
|
|
3085
|
-
*
|
|
3086
|
-
*
|
|
3253
|
+
* The promoter and the pre-promotion gate ask the byte-identical question — is
|
|
3254
|
+
* each DAG node's `source_finding_ids` declaration a canonical audit work block,
|
|
3255
|
+
* exactly once each? — and they used to answer it with two hand-mirrored copies
|
|
3256
|
+
* of the same forty lines: one returning refusal lines, one throwing. Two copies
|
|
3257
|
+
* of an identity rule drift, and a drift between THESE two is the worst kind:
|
|
3258
|
+
* the gate would certify a DAG promotable and the promoter would then throw on
|
|
3259
|
+
* it, or (worse) the gate would refuse a DAG the promoter would have accepted,
|
|
3260
|
+
* wedging a run behind a rule nothing in the emitter can satisfy.
|
|
3261
|
+
*
|
|
3262
|
+
* So the body is `ok`/`refusals`, plus the node→canonical-group map the promoter
|
|
3263
|
+
* needs for its projection, and each caller renders what it needs from the SAME
|
|
3264
|
+
* result. `refusals` is empty exactly when the DAG is promotable on this axis;
|
|
3265
|
+
* `byNodeId` is populated exactly on that path.
|
|
3266
|
+
*
|
|
3267
|
+
* The caller supplies `nodes` and `approvedSource` because they read them for
|
|
3268
|
+
* their own purposes too (the gate must not read the DAG twice; the promoter
|
|
3269
|
+
* filters the canonical group map through its own sort).
|
|
3087
3270
|
*/
|
|
3088
|
-
|
|
3089
|
-
const
|
|
3090
|
-
const
|
|
3271
|
+
function evaluatePathACanonicalGroups(params) {
|
|
3272
|
+
const { nodes, approvedSource, seedPresent } = params;
|
|
3273
|
+
const byNodeId = new Map();
|
|
3091
3274
|
if (nodes.length === 0)
|
|
3092
|
-
return [];
|
|
3093
|
-
if (!nodes.some((node) => Array.isArray(node.source_finding_ids)))
|
|
3094
|
-
return [];
|
|
3095
|
-
|
|
3096
|
-
const approvedSource = pathASeed
|
|
3097
|
-
? projectApprovedFindings(await readOptionalJsonFile(pathASeed.audit_findings_path))
|
|
3098
|
-
: undefined;
|
|
3275
|
+
return { refusals: [], byNodeId };
|
|
3276
|
+
if (!nodes.some((node) => Array.isArray(node.source_finding_ids))) {
|
|
3277
|
+
return { refusals: [], byNodeId };
|
|
3278
|
+
}
|
|
3099
3279
|
if (!approvedSource) {
|
|
3100
|
-
return
|
|
3101
|
-
|
|
3102
|
-
|
|
3280
|
+
return {
|
|
3281
|
+
refusals: [
|
|
3282
|
+
"implementation_dag declares source_finding_ids but no Path-A seed is present, so the ids cannot be joined to a canonical audit work block.",
|
|
3283
|
+
],
|
|
3284
|
+
byNodeId,
|
|
3285
|
+
};
|
|
3286
|
+
}
|
|
3287
|
+
if (!seedPresent) {
|
|
3288
|
+
return {
|
|
3289
|
+
refusals: [
|
|
3290
|
+
"implementation_dag declares source_finding_ids but no Path-A seed is present, so the ids cannot be joined to a canonical audit work block.",
|
|
3291
|
+
],
|
|
3292
|
+
byNodeId,
|
|
3293
|
+
};
|
|
3103
3294
|
}
|
|
3104
3295
|
const signature = (ids) => JSON.stringify([...ids].sort((left, right) => compareCodeUnits(left, right)));
|
|
3105
3296
|
const canonicalGroups = new Map(approvedSource.workBlocks.map((block) => [
|
|
@@ -3129,12 +3320,45 @@ export async function collectPathARefusals(artifactsDir) {
|
|
|
3129
3320
|
refusals.push(`implementation_dag node "${nodeId}" duplicates a canonical audit work block.`);
|
|
3130
3321
|
}
|
|
3131
3322
|
usedGroups.add(groupSignature);
|
|
3323
|
+
byNodeId.set(nodeId, canonicalGroup);
|
|
3132
3324
|
}
|
|
3133
|
-
if (refusals.length === 0 &&
|
|
3134
|
-
usedGroups.size !== canonicalGroups.size) {
|
|
3325
|
+
if (refusals.length === 0 && usedGroups.size !== canonicalGroups.size) {
|
|
3135
3326
|
refusals.push("implementation_dag source_finding_ids do not cover every canonical audit work block exactly once.");
|
|
3136
3327
|
}
|
|
3137
|
-
return refusals;
|
|
3328
|
+
return { refusals, byNodeId };
|
|
3329
|
+
}
|
|
3330
|
+
/**
|
|
3331
|
+
* Path-A canonical-block membership validation, run BEFORE anything is promoted
|
|
3332
|
+
* (OBL-seam-prep-remediate-core-inv-2 / COR-114e4941). These are exactly the
|
|
3333
|
+
* checks the promoter itself performs while building its node→canonical-group
|
|
3334
|
+
* map — but there they THROW out of `promoteImplementationDagToExtractedPlan`,
|
|
3335
|
+
* an unclassified stack that wedged every subsequent next-step. Hoisted here so
|
|
3336
|
+
* an invalid `source_finding_ids` declaration takes the same bounded re-emit as
|
|
3337
|
+
* every other promotion rejection, with no gate having executed past it.
|
|
3338
|
+
*
|
|
3339
|
+
* The checks themselves are {@link evaluatePathACanonicalGroups} — the ONE body
|
|
3340
|
+
* both this gate and the promoter call, so the gate can never certify a DAG the
|
|
3341
|
+
* promoter then refuses.
|
|
3342
|
+
*
|
|
3343
|
+
* Returns one line per violation; empty means the DAG is promotable on this
|
|
3344
|
+
* axis (or Path A is not in play at all).
|
|
3345
|
+
*/
|
|
3346
|
+
export async function collectPathARefusals(artifactsDir) {
|
|
3347
|
+
const dag = envelopePayload(await readContractArtifact(artifactsDir, "implementation_dag"));
|
|
3348
|
+
const nodes = Array.isArray(dag?.nodes) ? dag.nodes : [];
|
|
3349
|
+
if (nodes.length === 0)
|
|
3350
|
+
return [];
|
|
3351
|
+
if (!nodes.some((node) => Array.isArray(node.source_finding_ids)))
|
|
3352
|
+
return [];
|
|
3353
|
+
const pathASeed = await readOptionalJsonFile(pathASeedFilePath(artifactsDir));
|
|
3354
|
+
const approvedSource = pathASeed
|
|
3355
|
+
? projectApprovedFindings(await readOptionalJsonFile(pathASeed.audit_findings_path))
|
|
3356
|
+
: undefined;
|
|
3357
|
+
return evaluatePathACanonicalGroups({
|
|
3358
|
+
nodes,
|
|
3359
|
+
approvedSource,
|
|
3360
|
+
seedPresent: pathASeed !== undefined,
|
|
3361
|
+
}).refusals;
|
|
3138
3362
|
}
|
|
3139
3363
|
/**
|
|
3140
3364
|
* Convert a completed ImplementationDAG into the extracted-plan.json format
|
|
@@ -3194,14 +3418,14 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3194
3418
|
contractSlugToName.set(moduleSlug(mod.name), mod.name);
|
|
3195
3419
|
}
|
|
3196
3420
|
}
|
|
3197
|
-
const
|
|
3421
|
+
const contractSlugs = new Set(contractSlugToName.keys());
|
|
3198
3422
|
const moduleContractsForNode = (node) => {
|
|
3199
3423
|
const names = new Set();
|
|
3200
3424
|
for (const obligationId of [
|
|
3201
3425
|
...(node.satisfies_obligations ?? []),
|
|
3202
3426
|
...(node.verification_obligation_ids ?? []),
|
|
3203
3427
|
]) {
|
|
3204
|
-
const slug = moduleSlugForObligationId(obligationId,
|
|
3428
|
+
const slug = moduleSlugForObligationId(obligationId, contractSlugs);
|
|
3205
3429
|
const name = slug === null ? undefined : contractSlugToName.get(slug);
|
|
3206
3430
|
if (name !== undefined)
|
|
3207
3431
|
names.add(name);
|
|
@@ -3232,35 +3456,21 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3232
3456
|
const canonicalItemsByNodeId = new Map();
|
|
3233
3457
|
if (approvedSource &&
|
|
3234
3458
|
nodes.some((node) => Array.isArray(node.source_finding_ids))) {
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
const
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
const uniqueIds = [...new Set(sourceIds)];
|
|
3248
|
-
if (uniqueIds.length !== sourceIds.length) {
|
|
3249
|
-
throw new Error(`implementation_dag node "${nodeId}" repeats a source_finding_ids member.`);
|
|
3250
|
-
}
|
|
3251
|
-
const groupSignature = signature(uniqueIds);
|
|
3252
|
-
const canonicalGroup = canonicalGroups.get(groupSignature);
|
|
3253
|
-
if (!canonicalGroup) {
|
|
3254
|
-
throw new Error(`implementation_dag node "${nodeId}" source_finding_ids do not match a canonical audit work block.`);
|
|
3255
|
-
}
|
|
3256
|
-
if (usedGroups.has(groupSignature)) {
|
|
3257
|
-
throw new Error(`implementation_dag node "${nodeId}" duplicates a canonical audit work block.`);
|
|
3258
|
-
}
|
|
3259
|
-
usedGroups.add(groupSignature);
|
|
3260
|
-
canonicalItemsByNodeId.set(nodeId, canonicalGroup);
|
|
3459
|
+
// The SAME evaluator `collectPathARefusals` runs as the pre-promotion gate.
|
|
3460
|
+
// The projection this loop used to build inline was a second copy of that
|
|
3461
|
+
// gate's rule, and the two could disagree about which declarations are
|
|
3462
|
+
// canonical — the gate certifying a DAG this throws on, or the reverse.
|
|
3463
|
+
// This side renders refusals as the THROW the promoter's contract promises.
|
|
3464
|
+
const evaluation = evaluatePathACanonicalGroups({
|
|
3465
|
+
nodes,
|
|
3466
|
+
approvedSource,
|
|
3467
|
+
seedPresent: true,
|
|
3468
|
+
});
|
|
3469
|
+
if (evaluation.refusals.length > 0) {
|
|
3470
|
+
throw new Error(evaluation.refusals.join("\n"));
|
|
3261
3471
|
}
|
|
3262
|
-
|
|
3263
|
-
|
|
3472
|
+
for (const [nodeId, canonicalGroup] of evaluation.byNodeId) {
|
|
3473
|
+
canonicalItemsByNodeId.set(nodeId, [...canonicalGroup]);
|
|
3264
3474
|
}
|
|
3265
3475
|
}
|
|
3266
3476
|
let findings = nodes.map((node, index) => {
|
|
@@ -3299,14 +3509,24 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3299
3509
|
evidence: obligationEvidence.length > 0
|
|
3300
3510
|
? obligationEvidence
|
|
3301
3511
|
: [node.description ?? node.title ?? `Contract-pipeline task ${id}`],
|
|
3302
|
-
concrete_change
|
|
3512
|
+
// NO `concrete_change`. It was `node.description` a second time — `summary`
|
|
3513
|
+
// above already carries exactly that — and no consumer ever read it:
|
|
3514
|
+
// `FindingSchema` never declared it, so the dispatch boundary's
|
|
3515
|
+
// `FindingSchema.parse` stripped it, and no reader recovered it from the
|
|
3516
|
+
// plan in between. A field the pipeline computes onto a finding that
|
|
3517
|
+
// reaches no consumer is not computed.
|
|
3303
3518
|
contract_goal_id: dag?.goal_id,
|
|
3304
3519
|
contract_obligation_ids: contractObligations,
|
|
3305
3520
|
verification_obligation_ids: verificationObligations,
|
|
3306
|
-
addresses_counterexamples: addressedCounterexamples,
|
|
3307
3521
|
targeted_commands: node.targeted_commands ?? [],
|
|
3308
|
-
|
|
3309
|
-
|
|
3522
|
+
// NO `addresses_counterexamples`, `preconditions`, or `expected_changes`.
|
|
3523
|
+
// Each is a DAG-node fact whose only readers are the node-side gates
|
|
3524
|
+
// (`validateImplementationDAGIntegrity` and `validateCounterexampleThreading`
|
|
3525
|
+
// in `src/remediate/validation/contractPipelineGates.ts`) — they read it
|
|
3526
|
+
// off the NODE, never off a finding. Copied onto the finding they were
|
|
3527
|
+
// declared on no schema, read by no consumer, and dropped by the dispatch
|
|
3528
|
+
// boundary's `FindingSchema.parse`. The counterexample ids still reach the
|
|
3529
|
+
// finding where they ARE consumed: folded into `evidence` above.
|
|
3310
3530
|
};
|
|
3311
3531
|
});
|
|
3312
3532
|
if (approvedSource && canonicalItemsByNodeId.size > 0) {
|
|
@@ -3331,12 +3551,9 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir, root
|
|
|
3331
3551
|
contract_goal_id: dag?.goal_id,
|
|
3332
3552
|
contract_obligation_ids: contractObligations,
|
|
3333
3553
|
verification_obligation_ids: verificationObligations,
|
|
3334
|
-
addresses_counterexamples: [
|
|
3335
|
-
...new Set(node.addresses_counterexamples ?? []),
|
|
3336
|
-
],
|
|
3337
3554
|
targeted_commands: [...(node.targeted_commands ?? [])],
|
|
3338
|
-
|
|
3339
|
-
|
|
3555
|
+
// The node-only fields are deliberately NOT copied here — see the
|
|
3556
|
+
// sibling block above for why.
|
|
3340
3557
|
};
|
|
3341
3558
|
});
|
|
3342
3559
|
}
|