audit-tools 0.55.20 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +6 -8
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts +2 -4
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +15 -0
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/cleanup.js +2 -2
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/cleanupCommand.d.ts.map +1 -1
- package/dist/audit/cli/cleanupCommand.js +11 -10
- package/dist/audit/cli/cleanupCommand.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +26 -20
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +3 -5
- 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 +46 -68
- 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 -2
- package/dist/audit/cli/explainTaskCommand.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +7 -6
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +0 -13
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +28 -19
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts +7 -1
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +15 -10
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/lineIndex.d.ts.map +1 -1
- package/dist/audit/cli/lineIndex.js +4 -3
- package/dist/audit/cli/lineIndex.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +6 -7
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +29 -17
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +75 -130
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.js +5 -4
- package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.js +3 -1
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +0 -6
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +11 -18
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/reviewSubmission.d.ts.map +1 -1
- package/dist/audit/cli/reviewSubmission.js +16 -8
- package/dist/audit/cli/reviewSubmission.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +5 -5
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +5 -0
- 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 +3 -2
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +11 -11
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +11 -11
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/submitCommand.d.ts.map +1 -1
- package/dist/audit/cli/submitCommand.js +9 -4
- package/dist/audit/cli/submitCommand.js.map +1 -1
- package/dist/audit/cli/submitGateResult.d.ts.map +1 -1
- package/dist/audit/cli/submitGateResult.js +2 -1
- package/dist/audit/cli/submitGateResult.js.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.d.ts +3 -2
- package/dist/audit/cli/unacceptResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.js +8 -6
- package/dist/audit/cli/unacceptResultsCommand.js.map +1 -1
- package/dist/audit/cli/validateResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/validateResultsCommand.js +5 -4
- package/dist/audit/cli/validateResultsCommand.js.map +1 -1
- package/dist/audit/cli.d.ts +0 -2
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +2 -2
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/decompose/buildStructureDecomposition.d.ts.map +1 -1
- package/dist/audit/decompose/buildStructureDecomposition.js +5 -5
- package/dist/audit/decompose/buildStructureDecomposition.js.map +1 -1
- package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/merge.js +4 -11
- package/dist/audit/extractors/analyzers/merge.js.map +1 -1
- package/dist/audit/extractors/analyzers/typescript.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/typescript.js +3 -14
- package/dist/audit/extractors/analyzers/typescript.js.map +1 -1
- package/dist/audit/extractors/browserExtension.d.ts.map +1 -1
- package/dist/audit/extractors/browserExtension.js +3 -2
- package/dist/audit/extractors/browserExtension.js.map +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +16 -33
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/dataStateCoupling.d.ts +4 -0
- package/dist/audit/extractors/dataStateCoupling.d.ts.map +1 -1
- package/dist/audit/extractors/dataStateCoupling.js +26 -12
- package/dist/audit/extractors/dataStateCoupling.js.map +1 -1
- package/dist/audit/extractors/designAssessment.js +1 -1
- 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 +24 -40
- package/dist/audit/extractors/disposition.js.map +1 -1
- package/dist/audit/extractors/docsDigest.js +1 -1
- package/dist/audit/extractors/docsDigest.js.map +1 -1
- package/dist/audit/extractors/flows.d.ts.map +1 -1
- package/dist/audit/extractors/flows.js +23 -19
- package/dist/audit/extractors/flows.js.map +1 -1
- package/dist/audit/extractors/fsIntake.d.ts.map +1 -1
- package/dist/audit/extractors/fsIntake.js +8 -5
- package/dist/audit/extractors/fsIntake.js.map +1 -1
- package/dist/audit/extractors/gitHistory.d.ts +6 -6
- package/dist/audit/extractors/gitHistory.d.ts.map +1 -1
- package/dist/audit/extractors/gitHistory.js +6 -6
- package/dist/audit/extractors/gitHistory.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +3 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +15 -17
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/packageJson.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/packageJson.js +23 -40
- package/dist/audit/extractors/graphManifestEdges/packageJson.js.map +1 -1
- package/dist/audit/extractors/graphPathUtils.d.ts +9 -0
- package/dist/audit/extractors/graphPathUtils.d.ts.map +1 -1
- package/dist/audit/extractors/graphPathUtils.js +35 -16
- package/dist/audit/extractors/graphPathUtils.js.map +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +3 -7
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
- package/dist/audit/extractors/graphSignals.js +40 -29
- package/dist/audit/extractors/graphSignals.js.map +1 -1
- package/dist/audit/extractors/graphSuites.d.ts.map +1 -1
- package/dist/audit/extractors/graphSuites.js +4 -7
- package/dist/audit/extractors/graphSuites.js.map +1 -1
- package/dist/audit/extractors/graphTestSources.d.ts.map +1 -1
- package/dist/audit/extractors/graphTestSources.js +3 -10
- package/dist/audit/extractors/graphTestSources.js.map +1 -1
- package/dist/audit/extractors/pathPatterns.d.ts +4 -2
- package/dist/audit/extractors/pathPatterns.d.ts.map +1 -1
- package/dist/audit/extractors/pathPatterns.js +13 -21
- package/dist/audit/extractors/pathPatterns.js.map +1 -1
- package/dist/audit/extractors/risk.d.ts.map +1 -1
- package/dist/audit/extractors/risk.js +7 -7
- package/dist/audit/extractors/risk.js.map +1 -1
- package/dist/audit/extractors/surfaces.d.ts.map +1 -1
- package/dist/audit/extractors/surfaces.js +3 -9
- package/dist/audit/extractors/surfaces.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +1 -3
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +9 -9
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/rollover.d.ts.map +1 -1
- package/dist/audit/io/rollover.js +0 -1
- package/dist/audit/io/rollover.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +30 -2
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +23 -23
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/runSnapshot.js +2 -2
- package/dist/audit/io/runSnapshot.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +7 -9
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +6 -0
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +70 -95
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.d.ts +6 -2
- package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.js +19 -14
- package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +12 -15
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.d.ts +13 -0
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.js +10 -3
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +2 -8
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +4 -2
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +12 -20
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.js +5 -9
- package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +5 -0
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +10 -5
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.js +1 -2
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.js +11 -7
- package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +30 -69
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts +0 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +0 -7
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts +20 -0
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +20 -20
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts +1 -3
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +8 -2
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +2 -11
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +10 -25
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +1 -2
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/designReviewTask.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewTask.js +2 -2
- package/dist/audit/orchestrator/designReviewTask.js.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.js +1 -3
- package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
- package/dist/audit/orchestrator/executorResult.d.ts +3 -32
- package/dist/audit/orchestrator/executorResult.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +33 -43
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts +34 -0
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +19 -4
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/fileIntegrity.d.ts.map +1 -1
- package/dist/audit/orchestrator/fileIntegrity.js +4 -3
- package/dist/audit/orchestrator/fileIntegrity.js.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.js +2 -2
- package/dist/audit/orchestrator/flowPlanning.js.map +1 -1
- package/dist/audit/orchestrator/flowRequeue.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowRequeue.js +2 -3
- package/dist/audit/orchestrator/flowRequeue.js.map +1 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js +5 -18
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +4 -20
- package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +4 -3
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +5 -17
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +1 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +42 -53
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- 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 +12 -8
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js +13 -22
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
- package/dist/audit/orchestrator/lineCounts.d.ts +2 -0
- package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -1
- package/dist/audit/orchestrator/lineCounts.js +4 -0
- package/dist/audit/orchestrator/lineCounts.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +46 -48
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.js +4 -3
- package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +5 -1
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/requeue.d.ts.map +1 -1
- package/dist/audit/orchestrator/requeue.js +2 -2
- package/dist/audit/orchestrator/requeue.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.js +13 -21
- package/dist/audit/orchestrator/requeueCommand.js.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.js +3 -4
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphContext.js +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphContext.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts +2 -8
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js +6 -38
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.js +7 -68
- package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
- package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts +1 -3
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketSizing.js +3 -13
- package/dist/audit/orchestrator/reviewPacketSizing.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts +7 -8
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js +17 -32
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/orchestrator/runtimeValidation.js +2 -2
- package/dist/audit/orchestrator/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/scope.d.ts.map +1 -1
- package/dist/audit/orchestrator/scope.js +3 -2
- package/dist/audit/orchestrator/scope.js.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.js +1 -2
- package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +2 -2
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts +3 -5
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +8 -6
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +15 -11
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/index.d.ts +3 -3
- package/dist/audit/orchestrator/selectiveDeepening/index.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/index.js +50 -77
- package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +27 -18
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts +1 -2
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +6 -3
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +12 -9
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +15 -35
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +9 -16
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +40 -36
- 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 +16 -17
- 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 +5 -4
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.js +19 -15
- package/dist/audit/orchestrator/taskAffinityGraph.js.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.js +2 -3
- package/dist/audit/orchestrator/taskBuilder.js.map +1 -1
- package/dist/audit/orchestrator/trivialAudit.d.ts.map +1 -1
- package/dist/audit/orchestrator/trivialAudit.js +2 -1
- package/dist/audit/orchestrator/trivialAudit.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +6 -4
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +5 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/workBlocks.d.ts +0 -1
- package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
- package/dist/audit/reporting/workBlocks.js +8 -15
- package/dist/audit/reporting/workBlocks.js.map +1 -1
- package/dist/audit/systemic/reviewFileMap.js +2 -2
- package/dist/audit/systemic/reviewFileMap.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +2 -2
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +3 -3
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +10 -8
- package/dist/audit/types/reviewPlanning.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.js +3 -1
- package/dist/audit/types/reviewPlanning.js.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.d.ts +3 -0
- package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.js +27 -22
- package/dist/remediate/contractPipeline/executionPlan.js.map +1 -1
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +1 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js +4 -3
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.d.ts +0 -2
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.js +1 -4
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
- package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -1
- package/dist/remediate/droppedFindingsRecord.js +3 -1
- package/dist/remediate/droppedFindingsRecord.js.map +1 -1
- package/dist/remediate/index.d.ts +2 -3
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +51 -27
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +9 -8
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +9 -5
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/intakeSelection.js +3 -3
- package/dist/remediate/intakeSelection.js.map +1 -1
- package/dist/remediate/intent/intentOrdering.d.ts +10 -9
- package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
- package/dist/remediate/intent/intentOrdering.js +10 -9
- package/dist/remediate/intent/intentOrdering.js.map +1 -1
- package/dist/remediate/intent/intentPersistence.d.ts +1 -0
- package/dist/remediate/intent/intentPersistence.d.ts.map +1 -1
- package/dist/remediate/intent/intentPersistence.js +18 -10
- package/dist/remediate/intent/intentPersistence.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +16 -15
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +172 -163
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +11 -11
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
- package/dist/remediate/phases/closeVerifyLandingGates.d.ts +6 -0
- package/dist/remediate/phases/closeVerifyLandingGates.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyLandingGates.js +10 -6
- package/dist/remediate/phases/closeVerifyLandingGates.js.map +1 -1
- package/dist/remediate/phases/grounding.d.ts +1 -1
- package/dist/remediate/phases/grounding.d.ts.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +19 -25
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/phases/triageConformance.d.ts.map +1 -1
- package/dist/remediate/phases/triageConformance.js +11 -15
- package/dist/remediate/phases/triageConformance.js.map +1 -1
- package/dist/remediate/review/autonomousGate.d.ts +5 -5
- package/dist/remediate/review/autonomousGate.d.ts.map +1 -1
- package/dist/remediate/review/autonomousGate.js +5 -0
- package/dist/remediate/review/autonomousGate.js.map +1 -1
- package/dist/remediate/review/reviewGate.d.ts.map +1 -1
- package/dist/remediate/review/reviewGate.js +12 -11
- package/dist/remediate/review/reviewGate.js.map +1 -1
- package/dist/remediate/riskSignal.d.ts +0 -1
- package/dist/remediate/riskSignal.d.ts.map +1 -1
- package/dist/remediate/riskSignal.js.map +1 -1
- package/dist/remediate/state/decisionConsumption.d.ts +2 -0
- package/dist/remediate/state/decisionConsumption.d.ts.map +1 -1
- package/dist/remediate/state/decisionConsumption.js +12 -10
- package/dist/remediate/state/decisionConsumption.js.map +1 -1
- package/dist/remediate/state/itemStatus.d.ts +3 -3
- package/dist/remediate/state/itemStatus.js +5 -5
- package/dist/remediate/state/store.d.ts +4 -3
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +11 -24
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +2 -2
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +12 -14
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/clarificationResolution.d.ts.map +1 -1
- package/dist/remediate/steps/clarificationResolution.js +4 -2
- package/dist/remediate/steps/clarificationResolution.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +26 -23
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +3 -2
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +8 -3
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +15 -12
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.d.ts +2 -0
- package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.js +6 -3
- package/dist/remediate/steps/dispatch/hostContracts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts +11 -12
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostCorroboration.js +13 -6
- package/dist/remediate/steps/dispatch/hostCorroboration.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +5 -7
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +162 -265
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.d.ts +18 -0
- package/dist/remediate/steps/dispatch/requiredTests.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.js +9 -11
- package/dist/remediate/steps/dispatch/requiredTests.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +1 -1
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +12 -12
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
- package/dist/remediate/steps/frictionCloseout.js +0 -1
- package/dist/remediate/steps/frictionCloseout.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +5 -10
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +8 -12
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +5 -7
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +30 -33
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +134 -158
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +4 -30
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +5 -114
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/recoverIngest.d.ts +5 -13
- package/dist/remediate/steps/recoverIngest.d.ts.map +1 -1
- package/dist/remediate/steps/recoverIngest.js +20 -26
- package/dist/remediate/steps/recoverIngest.js.map +1 -1
- 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 +8 -5
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/submitGateResult.d.ts +0 -5
- package/dist/remediate/steps/submitGateResult.d.ts.map +1 -1
- package/dist/remediate/steps/submitGateResult.js +8 -8
- package/dist/remediate/steps/submitGateResult.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +0 -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 +11 -9
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts +0 -2
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +9 -46
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/accessMemory.d.ts +3 -9
- package/dist/shared/accessMemory.d.ts.map +1 -1
- package/dist/shared/accessMemory.js +2 -4
- package/dist/shared/accessMemory.js.map +1 -1
- package/dist/shared/affinityArtifacts.d.ts.map +1 -1
- package/dist/shared/affinityArtifacts.js +5 -7
- package/dist/shared/affinityArtifacts.js.map +1 -1
- package/dist/shared/agentReflections.d.ts.map +1 -1
- package/dist/shared/agentReflections.js +11 -14
- package/dist/shared/agentReflections.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +2 -1
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.js +1 -1
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/clippy.d.ts +2 -25
- package/dist/shared/analyzers/clippy.d.ts.map +1 -1
- package/dist/shared/analyzers/clippy.js +1 -17
- package/dist/shared/analyzers/clippy.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts +0 -15
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +2 -1
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +1 -19
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +0 -23
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +4 -6
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/chunkByBudget.d.ts +1 -24
- package/dist/shared/chunkByBudget.d.ts.map +1 -1
- package/dist/shared/chunkByBudget.js +2 -13
- package/dist/shared/chunkByBudget.js.map +1 -1
- package/dist/shared/compareCodeUnits.d.ts +2 -0
- package/dist/shared/compareCodeUnits.d.ts.map +1 -1
- package/dist/shared/compareCodeUnits.js +5 -0
- package/dist/shared/compareCodeUnits.js.map +1 -1
- package/dist/shared/contentKey.d.ts.map +1 -1
- package/dist/shared/contentKey.js +3 -1
- package/dist/shared/contentKey.js.map +1 -1
- package/dist/shared/countBy.d.ts.map +1 -1
- package/dist/shared/countBy.js +4 -3
- package/dist/shared/countBy.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +11 -20
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/consensus.d.ts.map +1 -1
- package/dist/shared/decompose/consensus.js +4 -12
- package/dist/shared/decompose/consensus.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +12 -15
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +7 -19
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +8 -0
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +8 -8
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/findingIdentitySignature.d.ts +6 -1
- package/dist/shared/findingIdentitySignature.d.ts.map +1 -1
- package/dist/shared/findingIdentitySignature.js +8 -6
- package/dist/shared/findingIdentitySignature.js.map +1 -1
- package/dist/shared/findingSimilarity.d.ts.map +1 -1
- package/dist/shared/findingSimilarity.js +9 -14
- package/dist/shared/findingSimilarity.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +1 -10
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/captureFrictionEvent.d.ts +1 -1
- package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +3 -2
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts +1 -2
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +4 -3
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +2 -10
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +6 -17
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/graph/graphPaths.d.ts +2 -5
- package/dist/shared/graph/graphPaths.d.ts.map +1 -1
- package/dist/shared/graph/graphPaths.js +5 -6
- package/dist/shared/graph/graphPaths.js.map +1 -1
- package/dist/shared/index.d.ts +41 -61
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +25 -7
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/pathScope.d.ts +5 -0
- package/dist/shared/intent/pathScope.d.ts.map +1 -1
- package/dist/shared/intent/pathScope.js +17 -8
- package/dist/shared/intent/pathScope.js.map +1 -1
- package/dist/shared/io/auditToolsPaths.d.ts +9 -16
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +9 -18
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +3 -2
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +10 -8
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/mcp/submitServer.d.ts.map +1 -1
- package/dist/shared/mcp/submitServer.js +21 -29
- package/dist/shared/mcp/submitServer.js.map +1 -1
- package/dist/shared/observability/rootLogObservations.d.ts.map +1 -1
- package/dist/shared/observability/rootLogObservations.js +3 -2
- package/dist/shared/observability/rootLogObservations.js.map +1 -1
- package/dist/shared/parsing/toml.d.ts.map +1 -1
- package/dist/shared/parsing/toml.js +3 -4
- package/dist/shared/parsing/toml.js.map +1 -1
- package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
- package/dist/shared/reporting/auditDeliverable.js +6 -15
- package/dist/shared/reporting/auditDeliverable.js.map +1 -1
- package/dist/shared/reporting/lensCoverage.d.ts.map +1 -1
- package/dist/shared/reporting/lensCoverage.js +4 -5
- package/dist/shared/reporting/lensCoverage.js.map +1 -1
- package/dist/shared/reporting/markdown.d.ts +3 -0
- package/dist/shared/reporting/markdown.d.ts.map +1 -0
- package/dist/shared/reporting/markdown.js +6 -0
- package/dist/shared/reporting/markdown.js.map +1 -0
- package/dist/shared/sessionConfig.d.ts.map +1 -1
- package/dist/shared/sessionConfig.js +3 -7
- package/dist/shared/sessionConfig.js.map +1 -1
- package/dist/shared/submission/handRecovery.d.ts.map +1 -1
- package/dist/shared/submission/handRecovery.js +3 -2
- package/dist/shared/submission/handRecovery.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +2 -2
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js +4 -3
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/submissionIdentity.d.ts.map +1 -1
- package/dist/shared/submission/submissionIdentity.js +3 -1
- package/dist/shared/submission/submissionIdentity.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +1 -0
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +9 -5
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/allowlistedExec.d.ts.map +1 -1
- package/dist/shared/tooling/allowlistedExec.js +35 -67
- package/dist/shared/tooling/allowlistedExec.js.map +1 -1
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
- package/dist/shared/tooling/analyzerDeps.js +2 -1
- package/dist/shared/tooling/analyzerDeps.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +1 -1
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +3 -2
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/tooling/landingGates.d.ts +3 -3
- package/dist/shared/tooling/landingGates.js +3 -3
- package/dist/shared/tooling/ownedProcessLifecycle.d.ts +0 -1
- package/dist/shared/tooling/ownedProcessLifecycle.d.ts.map +1 -1
- package/dist/shared/tooling/ownedProcessLifecycle.js +1 -1
- package/dist/shared/tooling/ownedProcessLifecycle.js.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.d.ts +7 -12
- package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
- package/dist/shared/tooling/testCommand.d.ts +0 -14
- package/dist/shared/tooling/testCommand.d.ts.map +1 -1
- package/dist/shared/tooling/testCommand.js +2 -3
- package/dist/shared/tooling/testCommand.js.map +1 -1
- package/dist/shared/tooling/windowsOwnedJob.d.ts +2 -1
- package/dist/shared/tooling/windowsOwnedJob.d.ts.map +1 -1
- package/dist/shared/types/accessMemory.d.ts +3 -19
- package/dist/shared/types/accessMemory.d.ts.map +1 -1
- package/dist/shared/types/accessMemory.js +3 -19
- package/dist/shared/types/accessMemory.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +2 -1
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/lens.d.ts +5 -0
- package/dist/shared/types/lens.d.ts.map +1 -1
- package/dist/shared/types/lens.js +13 -0
- package/dist/shared/types/lens.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +10 -0
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +3 -0
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -1
- package/dist/shared/validation/contractConstructionSites.js +2 -1
- package/dist/shared/validation/contractConstructionSites.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts +2 -1
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +9 -5
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts +6 -0
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +29 -19
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +73 -6
- package/docs/audit-pkg/operator-guide.md +10 -2
- package/docs/audit-pkg/product.md +1 -1
- package/package.json +1 -3
- package/remediate-code.mjs +13 -5
- package/scripts/audit/postinstall.mjs +6 -21
- package/scripts/remediate/postinstall.mjs +2 -17
- package/scripts/shared/install-host-assets.mjs +11 -3
- package/scripts/shared/primitives.mjs +14 -3
- package/wrapper/audit-code-wrapper-build.mjs +21 -18
- package/wrapper/audit-code-wrapper-install-hosts.mjs +6 -120
- package/wrapper/audit-code-wrapper-lib.mjs +28 -42
- package/wrapper/audit-code-wrapper-opencode.mjs +11 -24
- package/wrapper/installer-verb-help.mjs +21 -8
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +15 -130
- package/wrapper/remediate-code-wrapper-opencode.mjs +11 -24
- package/wrapper/repo-root.mjs +2 -2
- package/wrapper/shared-install-hosts.mjs +119 -0
- package/wrapper/shared-project-opencode.mjs +22 -0
- package/dist/audit/io/runArtifactTypes.d.ts +0 -8
- package/dist/audit/io/runArtifactTypes.d.ts.map +0 -1
- package/dist/audit/io/runArtifactTypes.js +0 -2
- package/dist/audit/io/runArtifactTypes.js.map +0 -1
- package/dist/audit/orchestrator/accessMemory.d.ts +0 -35
- package/dist/audit/orchestrator/accessMemory.d.ts.map +0 -1
- package/dist/audit/orchestrator/accessMemory.js +0 -54
- package/dist/audit/orchestrator/accessMemory.js.map +0 -1
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts +0 -4
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts.map +0 -1
- package/dist/audit/orchestrator/reviewPacketGraph.js +0 -7
- package/dist/audit/orchestrator/reviewPacketGraph.js.map +0 -1
- package/dist/shared/continuityScore.d.ts +0 -13
- package/dist/shared/continuityScore.d.ts.map +0 -1
- package/dist/shared/continuityScore.js +0 -164
- package/dist/shared/continuityScore.js.map +0 -1
- package/dist/shared/graph/directedCycles.d.ts +0 -61
- package/dist/shared/graph/directedCycles.d.ts.map +0 -1
- package/dist/shared/graph/directedCycles.js +0 -190
- package/dist/shared/graph/directedCycles.js.map +0 -1
- package/dist/shared/io/pathIdentity.d.ts +0 -26
- package/dist/shared/io/pathIdentity.d.ts.map +0 -1
- package/dist/shared/io/pathIdentity.js +0 -50
- package/dist/shared/io/pathIdentity.js.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { intakePaths } from "../../intake.js";
|
|
1
2
|
import { admitRemediationDirtyBaseline } from "../../state/dirtyBaseline.js";
|
|
2
3
|
import { DecisionApplicationReceiptSchema } from "../../state/decisionConsumption.js";
|
|
3
4
|
import { recordHostRootLogBoundary } from "../../../shared/observability/rootLogObservations.js";
|
|
@@ -5,7 +6,7 @@ import { AcceptedConformanceReviewSchema } from "../../../shared/types/reviewInd
|
|
|
5
6
|
import { corroborateHostResult, corroborateNoChangeClaim } from "./hostCorroboration.js";
|
|
6
7
|
import { runRequiredTest, rerunRequiredTests, requiredTestIssue, requiredTestVerdictKey } from "./requiredTests.js";
|
|
7
8
|
import { readIntentCheckpoint } from "../../../shared/types/intentCheckpoint.js";
|
|
8
|
-
import { checkContractConformance, conformanceReviewPaths } from "./contractConformanceReview.js";
|
|
9
|
+
import { checkContractConformance, conformanceIssue, conformanceReviewPaths } from "./contractConformanceReview.js";
|
|
9
10
|
import { executionPlanReferenceIssues } from "../../../shared/types/executionPlan.js";
|
|
10
11
|
import { executionPlanContextIssues } from "../../contractPipeline/executionPlan.js";
|
|
11
12
|
import { assertApprovedRuntimePlan as assertCurrentPlanAuthority, RemediationPlanAuthorityError } from "../../contractPipeline/runtimePlanAuthority.js";
|
|
@@ -14,17 +15,13 @@ import { assertApprovedRuntimePlan as assertCurrentPlanAuthority, RemediationPla
|
|
|
14
15
|
// host-handoff: the "landing gates" block fails when the close-owns-the-gates prompt line
|
|
15
16
|
// or the id-glossary write scope is reverted.
|
|
16
17
|
import { mkdir } from "node:fs/promises";
|
|
17
|
-
import { isAbsolute
|
|
18
|
+
import { isAbsolute } from "node:path";
|
|
18
19
|
import { headCommit, commandLeavesDeclaredShape, SUBMISSION_ISSUE_REMEDY, WORKLOAD_ISSUE_REMEDY, bindWorkerPrompt, deriveResultId, SUBMISSION_LEDGER_EVENT_CONTRACT_VERSION, appendSubmissionEvent, enrichMissingSubmissionIssues, isMissingObservation, compareCodeUnits, contentSha256, deriveLaneDemand, estimateTokensFromBytes, discoverLandingGates, hasExactKeys, identityFailureDiagnostic, hostHandoffResultPath, workerPromptPath, idsAreStrictlyAscending, isCommit, isGitRepo, isRecord, isSha256, LaneDemandSchema, normalizeRepoPath, parseAllWorkloadItems, parseWorkloadEnvelope, readSubmissionDocument, readJsonFile, readSubmissionLedger, readTrailingSubmissionRefusals, recoveryMarkMatches, recordHostResultOutcomes, repoRelativePath, resolveContainedPath, resolveHostHandoffPaths, sameStrings, scanBoundSubmission, SEVERITIES, severityRank, stringArray, stableStringify, writeJsonFile, writeTextFile, } from "audit-tools/shared";
|
|
20
|
+
import { errorMessage } from "../../../shared/io/json.js";
|
|
19
21
|
import { REMEDIATION_STATE_CONTRACT_VERSION, } from "../../state/store.js";
|
|
20
22
|
import { REMEDIATION_HOST_HANDOFF_RECORD_V1ALPHA2, REMEDIATION_HOST_SCOPE_SEMANTICS, RemediationHostHandoffRecordSchema, ConformanceReviewBindingSchema, RemediationPlanSchema, isClarificationCategory, } from "../../state/types.js";
|
|
21
23
|
import { ITEM_STATUSES, isTerminalStatus, isVerifiedCompleteStatus, } from "../../state/itemStatus.js";
|
|
22
24
|
import { REMEDIATION_HOST_DECISION_CONTRACT_VERSION as DECISION_CONTRACT_VERSION, REMEDIATION_HOST_RESULT_CONTRACT_VERSION as RESULT_CONTRACT_VERSION, REMEDIATION_HOST_WORKLOAD_CONTRACT_VERSION as WORKLOAD_CONTRACT_VERSION, } from "../types.js";
|
|
23
|
-
// The state contract version is the STORE's declaration, not a second literal
|
|
24
|
-
// here. It used to be private to this module — and the module then supplied it
|
|
25
|
-
// to its own parser at the call site below, so the check it performed was
|
|
26
|
-
// "does the constant equal itself".
|
|
27
|
-
const STATE_CONTRACT_VERSION = REMEDIATION_STATE_CONTRACT_VERSION;
|
|
28
25
|
/** A recognized preparation defect, emitted as a bounded repair step by next-step. */
|
|
29
26
|
export class RemediationHostPreparationError extends Error {
|
|
30
27
|
code;
|
|
@@ -127,7 +124,7 @@ function hasOnlyKnownKeys(value, known) {
|
|
|
127
124
|
function parseCurrentState(value) {
|
|
128
125
|
if (!isRecord(value) ||
|
|
129
126
|
!hasOnlyKnownKeys(value, CURRENT_STATE_KEYS) ||
|
|
130
|
-
value.contract_version !==
|
|
127
|
+
value.contract_version !== REMEDIATION_STATE_CONTRACT_VERSION ||
|
|
131
128
|
value.status !== "implementing") {
|
|
132
129
|
return null;
|
|
133
130
|
}
|
|
@@ -146,11 +143,8 @@ function parseCurrentState(value) {
|
|
|
146
143
|
if (parsedHandoff.data.conformance_policy_sha256 !== undefined &&
|
|
147
144
|
(value.conformance_review === undefined || contentSha256(value.conformance_review) !== parsedHandoff.data.conformance_policy_sha256))
|
|
148
145
|
return null;
|
|
149
|
-
|
|
150
|
-
if (new Set(ids).size !== ids.length ||
|
|
151
|
-
ids.some((id, index) => index > 0 && compareCodeUnits(ids[index - 1], id) >= 0)) {
|
|
146
|
+
if (!idsAreStrictlyAscending(parsedHandoff.data.work_item_ids))
|
|
152
147
|
return null;
|
|
153
|
-
}
|
|
154
148
|
}
|
|
155
149
|
const unitIds = new Set(parsedPlan.data.units.map(unit => unit.id));
|
|
156
150
|
if (unitIds.size !== parsedPlan.data.units.length)
|
|
@@ -178,13 +172,6 @@ async function assertApprovedRuntimePlan(artifactsDir, state) {
|
|
|
178
172
|
throw new RemediationHostPreparationError(error.code, error.message);
|
|
179
173
|
}
|
|
180
174
|
}
|
|
181
|
-
function normalizeDeclaredPath(root, candidate, label) {
|
|
182
|
-
if (candidate.length === 0 || isAbsolute(candidate)) {
|
|
183
|
-
throw new Error(`${label} must be a non-empty repository-relative path`);
|
|
184
|
-
}
|
|
185
|
-
const normalized = repoRelativePath(root, candidate, label);
|
|
186
|
-
return candidate.endsWith("/") ? `${normalized}/` : normalized;
|
|
187
|
-
}
|
|
188
175
|
/**
|
|
189
176
|
* A block that arrived outside the shape this boundary CONSUMES.
|
|
190
177
|
*
|
|
@@ -223,34 +210,35 @@ class BlockContractError extends Error {
|
|
|
223
210
|
function assertBlockContract(root, block) {
|
|
224
211
|
for (const raw of block.allowed_files) {
|
|
225
212
|
if (typeof raw !== "string" || raw.trim().length === 0) {
|
|
226
|
-
throw new BlockContractError(block.id, "
|
|
213
|
+
throw new BlockContractError(block.id, "allowed_files carries an empty entry");
|
|
227
214
|
}
|
|
228
215
|
if (isAbsolute(raw)) {
|
|
229
|
-
throw new BlockContractError(block.id, `
|
|
216
|
+
throw new BlockContractError(block.id, `allowed_files entry ${JSON.stringify(raw)} is absolute, not repository-relative`);
|
|
230
217
|
}
|
|
231
218
|
let normalized;
|
|
232
219
|
try {
|
|
233
|
-
|
|
220
|
+
const relative = repoRelativePath(root, raw, `${block.id}.allowed_files[]`);
|
|
221
|
+
normalized = raw.endsWith("/") ? `${relative}/` : relative;
|
|
234
222
|
}
|
|
235
223
|
catch {
|
|
236
|
-
throw new BlockContractError(block.id, `
|
|
224
|
+
throw new BlockContractError(block.id, `allowed_files entry ${JSON.stringify(raw)} does not resolve beneath the repository root`);
|
|
237
225
|
}
|
|
238
226
|
if (normalized !== raw) {
|
|
239
|
-
throw new BlockContractError(block.id, `
|
|
227
|
+
throw new BlockContractError(block.id, `allowed_files entry ${JSON.stringify(raw)} is not in normalized repo-relative form ` +
|
|
240
228
|
`(${JSON.stringify(normalized)})`);
|
|
241
229
|
}
|
|
242
230
|
}
|
|
243
231
|
for (const command of block.required_tests ?? []) {
|
|
244
232
|
if (typeof command !== "string" || command.trim().length === 0) {
|
|
245
|
-
throw new BlockContractError(block.id, "
|
|
233
|
+
throw new BlockContractError(block.id, "required_tests carries an empty command");
|
|
246
234
|
}
|
|
247
235
|
// THE declared-command-shape rule (`audit-tools/shared`), not a local copy:
|
|
248
236
|
// the producer that promotes these commands and the triage path that also
|
|
249
237
|
// spawns them ask the same predicate, so a command cannot clear one boundary
|
|
250
238
|
// and dead-end at another.
|
|
251
239
|
if (commandLeavesDeclaredShape(command)) {
|
|
252
|
-
throw new BlockContractError(block.id, `
|
|
253
|
-
"redirects or substitutes, and
|
|
240
|
+
throw new BlockContractError(block.id, `required_tests entry ${JSON.stringify(command)} leaves the declared shape — it chains, ` +
|
|
241
|
+
"redirects or substitutes, and required tests must be executable as a single argv without a shell");
|
|
254
242
|
}
|
|
255
243
|
}
|
|
256
244
|
}
|
|
@@ -313,25 +301,6 @@ function planBlockIssues(root, state) {
|
|
|
313
301
|
}
|
|
314
302
|
return issues;
|
|
315
303
|
}
|
|
316
|
-
/**
|
|
317
|
-
* The classified "cannot prepare" message for a producer defect that reached the
|
|
318
|
-
* build path as a throw. Aggregates the whole plan scan so an operator sees
|
|
319
|
-
* EVERY malformed block, not just the first one the builder tripped on.
|
|
320
|
-
*
|
|
321
|
-
* The THROWER is attributed by name, not by whether the scan happened to find
|
|
322
|
-
* anything. Falling back only on an EMPTY scan silently dropped the raised error
|
|
323
|
-
* whenever the scan named some OTHER block — a plan with one ghost dependency
|
|
324
|
-
* elsewhere was enough to make the message describe a block that did not throw
|
|
325
|
-
* and omit the one that did.
|
|
326
|
-
*/
|
|
327
|
-
function cannotPrepareMessage(root, state, raised) {
|
|
328
|
-
const scanned = planBlockIssues(root, state);
|
|
329
|
-
const messages = scanned.map((issue) => issue.message);
|
|
330
|
-
if (!scanned.some((issue) => issue.work_item_id === raised.blockId)) {
|
|
331
|
-
messages.push(raised.message);
|
|
332
|
-
}
|
|
333
|
-
return `Cannot prepare a remediation host workload: ${messages.join("; ")}`;
|
|
334
|
-
}
|
|
335
304
|
function resolveBoundaryPaths(params) {
|
|
336
305
|
// The remediate draw's run dir carries the `implement` lane segment — its
|
|
337
306
|
// runs directory also holds triage/closing lanes — which the core takes as a
|
|
@@ -527,9 +496,8 @@ function renderResultTemplate(item) {
|
|
|
527
496
|
* The score is the WORST severity in the block, with the count of same-or-worse
|
|
528
497
|
* findings nudging it up — a block of many high-severity findings is above a
|
|
529
498
|
* block with one. Deterministic (no clock, no sampling) and bounded by
|
|
530
|
-
* construction. A block
|
|
531
|
-
*
|
|
532
|
-
* guessed at.
|
|
499
|
+
* construction. A block with no source findings contributes nothing, so it
|
|
500
|
+
* ranks `low` rather than being guessed at.
|
|
533
501
|
*/
|
|
534
502
|
export function severityRiskWeight(severity) {
|
|
535
503
|
// DERIVED from the shared tuple, never a second copy of it. This used to be a
|
|
@@ -560,10 +528,8 @@ export function severityRiskWeight(severity) {
|
|
|
560
528
|
? 1
|
|
561
529
|
: (severityRank(severity) - 1) / ladder;
|
|
562
530
|
}
|
|
563
|
-
function blockRiskScore(
|
|
564
|
-
const scores =
|
|
565
|
-
.map((findingId) => state.plan.findings.find((entry) => entry.id === findingId)?.severity)
|
|
566
|
-
.flatMap((severity) => severity === undefined ? [] : [severityRiskWeight(severity)]);
|
|
531
|
+
function blockRiskScore(findings) {
|
|
532
|
+
const scores = findings.flatMap(({ severity }) => severity === undefined ? [] : [severityRiskWeight(severity)]);
|
|
567
533
|
if (scores.length === 0)
|
|
568
534
|
return 0;
|
|
569
535
|
const worst = Math.max(...scores);
|
|
@@ -606,7 +572,7 @@ function buildWorkItem(paths, runId, unit, baselineCommit, state) {
|
|
|
606
572
|
allowed_files: [...unit.allowed_files], baseline_commit: baselineCommit,
|
|
607
573
|
obligation_ids: obligationIds, prompt: { text: prompt.text, sha256: prompt.sha256 },
|
|
608
574
|
required_tests: [...unit.required_tests], result_path: resultPath,
|
|
609
|
-
demand: deriveLaneDemand({ tokenEstimate, fileCount: unit.allowed_files.length, riskScore: blockRiskScore(
|
|
575
|
+
demand: deriveLaneDemand({ tokenEstimate, fileCount: unit.allowed_files.length, riskScore: blockRiskScore(sourceFindings) }),
|
|
610
576
|
token_estimate: tokenEstimate,
|
|
611
577
|
};
|
|
612
578
|
}
|
|
@@ -646,14 +612,10 @@ function parseWorkItem(value, paths, runId, state, expectedBaselineCommit) {
|
|
|
646
612
|
typeof value.id !== "string" ||
|
|
647
613
|
!LaneDemandSchema.safeParse(value.demand).success ||
|
|
648
614
|
!isCommit(value.baseline_commit) ||
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
!Array.isArray(value.allowed_files) ||
|
|
654
|
-
!value.allowed_files.every((entry) => typeof entry === "string") ||
|
|
655
|
-
!Array.isArray(value.required_tests) ||
|
|
656
|
-
!value.required_tests.every((entry) => typeof entry === "string") ||
|
|
615
|
+
stringArray(value.source_finding_ids) === null ||
|
|
616
|
+
stringArray(value.obligation_ids) === null ||
|
|
617
|
+
stringArray(value.allowed_files) === null ||
|
|
618
|
+
stringArray(value.required_tests) === null ||
|
|
657
619
|
typeof value.result_path !== "string" ||
|
|
658
620
|
!Number.isInteger(value.token_estimate) ||
|
|
659
621
|
Number(value.token_estimate) < 0 ||
|
|
@@ -769,10 +731,7 @@ export async function submitRemediationHostResult(params) {
|
|
|
769
731
|
workItemId: workItem.id,
|
|
770
732
|
resultPath: workItem.result_path,
|
|
771
733
|
source: params.source,
|
|
772
|
-
parse: (
|
|
773
|
-
const result = parseResult(value, params.runId, workItem);
|
|
774
|
-
return result.ok ? { ok: true, parsed: result } : { ok: false, check: result.check, detail: result.reason };
|
|
775
|
-
},
|
|
734
|
+
parse: scanParser(params.runId, workItem),
|
|
776
735
|
resultId: (result) => result.result.result_id,
|
|
777
736
|
seen: () => false,
|
|
778
737
|
messages: remediationScanMessages,
|
|
@@ -800,6 +759,13 @@ const remediationScanMessages = {
|
|
|
800
759
|
contractInvalid: (detail) => detail,
|
|
801
760
|
duplicate: (resultId) => `result_id ${resultId} is duplicated in this workload`,
|
|
802
761
|
};
|
|
762
|
+
/** {@link parseResult} in the shape {@link scanBoundSubmission} takes. */
|
|
763
|
+
function scanParser(runId, workItem) {
|
|
764
|
+
return (value) => {
|
|
765
|
+
const result = parseResult(value, runId, workItem);
|
|
766
|
+
return result.ok ? { ok: true, parsed: result } : { ok: false, check: result.check, detail: result.reason };
|
|
767
|
+
};
|
|
768
|
+
}
|
|
803
769
|
function parseResult(value, runId, workItem) {
|
|
804
770
|
if (isRecord(value) && value.contract_version === DECISION_CONTRACT_VERSION) {
|
|
805
771
|
// Envelope first, identity second: one message (the host repairs the same
|
|
@@ -940,27 +906,6 @@ function parseResult(value, runId, workItem) {
|
|
|
940
906
|
result: value,
|
|
941
907
|
};
|
|
942
908
|
}
|
|
943
|
-
/**
|
|
944
|
-
* Pre-computed required-test verdicts, keyed by `root` + command: `null` =
|
|
945
|
-
* green, a string = the failure detail.
|
|
946
|
-
*
|
|
947
|
-
* This is the recovery path's ANSWER TABLE, not a lazy cache. A required-test
|
|
948
|
-
* rerun is a `spawnSync`, which blocks the event loop for its whole duration —
|
|
949
|
-
* so running one inside the state lock would starve the lock's own heartbeat
|
|
950
|
-
* timer and let a second acquirer reclaim the lock as stale mid-hold. The
|
|
951
|
-
* recovery verb therefore runs every distinct command ONCE, up front and
|
|
952
|
-
* unlocked ({@link precomputeRecoveryTestVerdicts}), and hands the finished
|
|
953
|
-
* table to the locked phase, which only ever READS it.
|
|
954
|
-
*
|
|
955
|
-
* Two consequences are deliberate. A command absent from the table is treated
|
|
956
|
-
* as FAILED, never spawned — fail-closed is the only answer that keeps the
|
|
957
|
-
* no-spawn-under-the-lock property mechanical rather than remembered. And the
|
|
958
|
-
* table is recovery-only: a `targeted_command` is host-authored and need not be
|
|
959
|
-
* idempotent (one that appends to a log, bumps a counter, or is flaky produces
|
|
960
|
-
* a genuinely different second run), so collapsing spawns is a behavior change.
|
|
961
|
-
* The normal lane passes `null` and stays byte-identical to the pre-recovery
|
|
962
|
-
* behavior — every command spawns once per work item, exactly as before.
|
|
963
|
-
*/
|
|
964
909
|
/**
|
|
965
910
|
* The MINTED verdict table: a Map subclass that exists only inside this module.
|
|
966
911
|
*
|
|
@@ -988,7 +933,7 @@ function isMintedVerdictTable(value) {
|
|
|
988
933
|
* by HEAD alone. HEAD says the TREE has not moved; it says nothing about whether
|
|
989
934
|
* the RUN's own state changed underneath those unlocked spawns — and a
|
|
990
935
|
* concurrent state writer can settle items without touching a single commit.
|
|
991
|
-
* The verdict table phase 1 computed is keyed on which
|
|
936
|
+
* The verdict table phase 1 computed is keyed on which work items were PENDING
|
|
992
937
|
* (`precomputeRecoveryTestVerdicts` filters on exactly that), so once the
|
|
993
938
|
* frontier moves, a command the table no longer covers reads as
|
|
994
939
|
* `required_test_failed` — a bookkeeping race reported as the host's work being
|
|
@@ -1000,7 +945,7 @@ function isMintedVerdictTable(value) {
|
|
|
1000
945
|
* - the binding record's own parts (run, baseline, workload digest, item ids),
|
|
1001
946
|
* which the ordinary workload-integrity check would also catch — kept here so
|
|
1002
947
|
* this guard is the one place that says "the frontier moved";
|
|
1003
|
-
* - the sorted set of work items
|
|
948
|
+
* - the sorted set of work items still PENDING, which
|
|
1004
949
|
* is what the verdict table is actually keyed on. This is the residual's real
|
|
1005
950
|
* shape, and no digest in the state tracks it.
|
|
1006
951
|
*
|
|
@@ -1022,11 +967,11 @@ export function workloadBindingIdentity(state) {
|
|
|
1022
967
|
]);
|
|
1023
968
|
}
|
|
1024
969
|
/**
|
|
1025
|
-
* The bound work item ids
|
|
970
|
+
* The bound work item ids whose item is still `pending`, sorted.
|
|
1026
971
|
*
|
|
1027
972
|
* Derived from the STATE alone — the workload document is not read, because the
|
|
1028
973
|
* caller may be comparing a snapshot whose workload file is no longer on disk
|
|
1029
|
-
* (which is one of the situations this guard exists to refuse). A
|
|
974
|
+
* (which is one of the situations this guard exists to refuse). A work item with
|
|
1030
975
|
* no item record is NOT counted: the state is corrupt in that case, and the
|
|
1031
976
|
* ingest's own parse refuses it with a better message than this guard could.
|
|
1032
977
|
*/
|
|
@@ -1044,8 +989,7 @@ function unresolvedFrontierWorkItemIds(state, record) {
|
|
|
1044
989
|
* return the finished verdict table. Call this OUTSIDE the state lock — that is
|
|
1045
990
|
* the entire point (see {@link RemediationRequiredTestVerdicts}).
|
|
1046
991
|
*
|
|
1047
|
-
* Candidates are the work items
|
|
1048
|
-
* result file is present and parses as JSON; an item with no result file is
|
|
992
|
+
* Candidates are the still-pending work items whose result file is present and parses as JSON; an item with no result file is
|
|
1049
993
|
* refused before its tests would ever run, so spawning for it is pure cost. The
|
|
1050
994
|
* filter is deliberately generous otherwise — over-inclusion costs one spawn,
|
|
1051
995
|
* while under-inclusion becomes a fail-closed refusal of a good result.
|
|
@@ -1143,39 +1087,21 @@ export async function prepareRemediationHostHandoff(params) {
|
|
|
1143
1087
|
const planIssues = planBlockIssues(paths.root, state);
|
|
1144
1088
|
if (planIssues.length)
|
|
1145
1089
|
throw new RemediationHostPreparationError("plan_repair_required", planIssues.map(issue => issue.message).join("; "));
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
// A malformed block ON the frontier reaches this as a raw BlockContractError
|
|
1160
|
-
// — an uncaught throw whose stack says nothing about which producer wrote the
|
|
1161
|
-
// bad block, and which every retry reproduces. Re-raised in the SAME
|
|
1162
|
-
// classified aggregate form the empty-workload branch below uses, so both
|
|
1163
|
-
// producer-defect exits read alike.
|
|
1164
|
-
if (!(error instanceof BlockContractError))
|
|
1165
|
-
throw error;
|
|
1166
|
-
throw new RemediationHostPreparationError("plan_repair_required", cannotPrepareMessage(paths.root, state, error));
|
|
1167
|
-
}
|
|
1090
|
+
// The scan above covers every block the build below can reach (the bound ids,
|
|
1091
|
+
// or the pending level-0 frontier), so a malformed block or a missing
|
|
1092
|
+
// prerequisite has already been refused by name: the build cannot raise a
|
|
1093
|
+
// BlockContractError, and an empty workload is genuinely empty.
|
|
1094
|
+
const workload = buildCanonicalWorkload({
|
|
1095
|
+
paths,
|
|
1096
|
+
state,
|
|
1097
|
+
runId: params.runId,
|
|
1098
|
+
baselineCommit,
|
|
1099
|
+
...(existingRecord
|
|
1100
|
+
? { workItemIds: existingRecord.work_item_ids }
|
|
1101
|
+
: {}),
|
|
1102
|
+
});
|
|
1168
1103
|
if (workload.work_items.length === 0) {
|
|
1169
|
-
|
|
1170
|
-
// really "every candidate block declares a prerequisite that does not
|
|
1171
|
-
// exist" used to surface as a bare "empty workload", sending the operator
|
|
1172
|
-
// to look at scheduling rather than at the plan.
|
|
1173
|
-
const blocked = planBlockIssues(paths.root, state);
|
|
1174
|
-
throw new RemediationHostPreparationError("plan_repair_required", blocked.length === 0
|
|
1175
|
-
? "Cannot prepare an empty remediation host workload"
|
|
1176
|
-
: `Cannot prepare a remediation host workload: ${blocked
|
|
1177
|
-
.map((issue) => issue.message)
|
|
1178
|
-
.join("; ")}`);
|
|
1104
|
+
throw new RemediationHostPreparationError("plan_repair_required", "Cannot prepare an empty remediation host workload");
|
|
1179
1105
|
}
|
|
1180
1106
|
const workloadDigest = contentSha256(workload);
|
|
1181
1107
|
// A binding whose workload file an earlier contract version wrote is
|
|
@@ -1201,7 +1127,7 @@ export async function prepareRemediationHostHandoff(params) {
|
|
|
1201
1127
|
throw new Error("The conformance review has begun but the trusted run policy is missing. Restore the run state before continuing; review cannot be silently disabled.");
|
|
1202
1128
|
}
|
|
1203
1129
|
}
|
|
1204
|
-
const checkpoint = await readIntentCheckpoint(
|
|
1130
|
+
const checkpoint = await readIntentCheckpoint(intakePaths(paths.artifactsDir).intentCheckpoint);
|
|
1205
1131
|
conformanceReview = { run_id: params.runId, enabled: checkpoint?.conformance_review === true,
|
|
1206
1132
|
...(checkpoint ? { checkpoint_sha256: contentSha256(checkpoint) } : {}) };
|
|
1207
1133
|
}
|
|
@@ -1321,7 +1247,6 @@ export async function ingestRemediationHostResults(params) {
|
|
|
1321
1247
|
workItemOutcomes: new Map(),
|
|
1322
1248
|
resultIds: new Set(),
|
|
1323
1249
|
landedFiles: new Set(nextState.applied_edit_surface ?? []),
|
|
1324
|
-
settledFindingIds: new Set(),
|
|
1325
1250
|
recordedRecoveryMarks: null,
|
|
1326
1251
|
};
|
|
1327
1252
|
const verdicts = await executeHostVerificationReruns(validated.ctx, acc);
|
|
@@ -1350,16 +1275,30 @@ async function recordAndEnrichHostIssues(artifactsDir, runId, issues, acceptedId
|
|
|
1350
1275
|
/**
|
|
1351
1276
|
* Phase 1 — the whole-bundle gates, up to the schedulable frontier.
|
|
1352
1277
|
*
|
|
1353
|
-
* Returns either a populated context or ONE OF
|
|
1354
|
-
*
|
|
1355
|
-
* canonical parse failure return the binding's own item ids,
|
|
1356
|
-
* refusal returns the empty list — so
|
|
1357
|
-
*
|
|
1358
|
-
* just the code.
|
|
1278
|
+
* Returns either a populated context or ONE OF FOUR finished summaries. The
|
|
1279
|
+
* four do not agree on `pending_work_item_ids` — the read failure, the stale
|
|
1280
|
+
* workload and the canonical parse failure return the binding's own item ids,
|
|
1281
|
+
* the trusted-binding refusal returns the empty list — so each exit passes its
|
|
1282
|
+
* own list and folding the lists together is a silent behavior change. Each is
|
|
1283
|
+
* pinned by a test that asserts the pending list, not just the code.
|
|
1359
1284
|
*/
|
|
1360
1285
|
async function validateHostResultBundle(input) {
|
|
1361
1286
|
const { state, nextState, paths } = input;
|
|
1362
1287
|
const issues = [];
|
|
1288
|
+
// The finished summary of an exit that accepted nothing. The pending list is
|
|
1289
|
+
// the caller's, because the exits do not agree on it (see above).
|
|
1290
|
+
const noAcceptance = (pendingWorkItemIds) => ({
|
|
1291
|
+
kind: "summary",
|
|
1292
|
+
summary: {
|
|
1293
|
+
accepted_count: 0,
|
|
1294
|
+
completed_work_item_ids: [],
|
|
1295
|
+
pending_work_item_ids: pendingWorkItemIds,
|
|
1296
|
+
issues,
|
|
1297
|
+
work_item_outcomes: new Map(),
|
|
1298
|
+
state_changed: false,
|
|
1299
|
+
state: nextState,
|
|
1300
|
+
},
|
|
1301
|
+
});
|
|
1363
1302
|
const workloadRead = await readSubmissionDocument(paths.workloadPath);
|
|
1364
1303
|
if (workloadRead.kind !== "value") {
|
|
1365
1304
|
if (state.host_handoff) {
|
|
@@ -1373,18 +1312,7 @@ async function validateHostResultBundle(input) {
|
|
|
1373
1312
|
: `the workload file is not valid JSON: ${workloadRead.detail}`,
|
|
1374
1313
|
});
|
|
1375
1314
|
}
|
|
1376
|
-
return
|
|
1377
|
-
kind: "summary",
|
|
1378
|
-
summary: {
|
|
1379
|
-
accepted_count: 0,
|
|
1380
|
-
completed_work_item_ids: [],
|
|
1381
|
-
pending_work_item_ids: state.host_handoff?.work_item_ids ?? [],
|
|
1382
|
-
issues,
|
|
1383
|
-
work_item_outcomes: new Map(),
|
|
1384
|
-
state_changed: false,
|
|
1385
|
-
state: nextState,
|
|
1386
|
-
},
|
|
1387
|
-
};
|
|
1315
|
+
return noAcceptance(state.host_handoff?.work_item_ids ?? []);
|
|
1388
1316
|
}
|
|
1389
1317
|
// Producer-side plan defects are reported BEFORE the workload is parsed: a
|
|
1390
1318
|
// block with an unresolvable dependency or an unnormalized write scope makes
|
|
@@ -1406,18 +1334,7 @@ async function validateHostResultBundle(input) {
|
|
|
1406
1334
|
check: "workload_binding",
|
|
1407
1335
|
message: "a git-backed remediation workload requires the tool-owned host_handoff state binding",
|
|
1408
1336
|
});
|
|
1409
|
-
return
|
|
1410
|
-
kind: "summary",
|
|
1411
|
-
summary: {
|
|
1412
|
-
accepted_count: 0,
|
|
1413
|
-
completed_work_item_ids: [],
|
|
1414
|
-
pending_work_item_ids: [],
|
|
1415
|
-
issues,
|
|
1416
|
-
work_item_outcomes: new Map(),
|
|
1417
|
-
state_changed: false,
|
|
1418
|
-
state: nextState,
|
|
1419
|
-
},
|
|
1420
|
-
};
|
|
1337
|
+
return noAcceptance([]);
|
|
1421
1338
|
}
|
|
1422
1339
|
// A workload an EARLIER contract version wrote is not a defect in it: the
|
|
1423
1340
|
// tool changed underneath a live binding. It is reported as stale — no host
|
|
@@ -1429,18 +1346,7 @@ async function validateHostResultBundle(input) {
|
|
|
1429
1346
|
check: "workload_binding",
|
|
1430
1347
|
message: "the workload file was written under an earlier contract version; the tool writes it again",
|
|
1431
1348
|
});
|
|
1432
|
-
return
|
|
1433
|
-
kind: "summary",
|
|
1434
|
-
summary: {
|
|
1435
|
-
accepted_count: 0,
|
|
1436
|
-
completed_work_item_ids: [],
|
|
1437
|
-
pending_work_item_ids: state.host_handoff.work_item_ids,
|
|
1438
|
-
issues,
|
|
1439
|
-
work_item_outcomes: new Map(),
|
|
1440
|
-
state_changed: false,
|
|
1441
|
-
state: nextState,
|
|
1442
|
-
},
|
|
1443
|
-
};
|
|
1349
|
+
return noAcceptance(state.host_handoff.work_item_ids);
|
|
1444
1350
|
}
|
|
1445
1351
|
const workload = parseWorkload(workloadRead.value, paths, input.runId, state);
|
|
1446
1352
|
if (!workload) {
|
|
@@ -1452,18 +1358,7 @@ async function validateHostResultBundle(input) {
|
|
|
1452
1358
|
check: "workload_binding",
|
|
1453
1359
|
message: "the workload does not match its canonical state shape and persisted digest binding",
|
|
1454
1360
|
});
|
|
1455
|
-
return
|
|
1456
|
-
kind: "summary",
|
|
1457
|
-
summary: {
|
|
1458
|
-
accepted_count: 0,
|
|
1459
|
-
completed_work_item_ids: [],
|
|
1460
|
-
pending_work_item_ids: state.host_handoff?.work_item_ids ?? [],
|
|
1461
|
-
issues,
|
|
1462
|
-
work_item_outcomes: new Map(),
|
|
1463
|
-
state_changed: false,
|
|
1464
|
-
state: nextState,
|
|
1465
|
-
},
|
|
1466
|
-
};
|
|
1361
|
+
return noAcceptance(state.host_handoff?.work_item_ids ?? []);
|
|
1467
1362
|
}
|
|
1468
1363
|
return {
|
|
1469
1364
|
kind: "context",
|
|
@@ -1489,14 +1384,6 @@ async function validateHostResultBundle(input) {
|
|
|
1489
1384
|
},
|
|
1490
1385
|
};
|
|
1491
1386
|
}
|
|
1492
|
-
/**
|
|
1493
|
-
* Phase 2 — per-item verification. Writes NOTHING to `ctx.nextState`.
|
|
1494
|
-
*
|
|
1495
|
-
* Iterates the effective workload in order and emits one verdict per ACCEPTED
|
|
1496
|
-
* item; a refusal pushes its classified issue and continues. The ledger mark
|
|
1497
|
-
* for a recovery acceptance still goes down before that item's verdict is
|
|
1498
|
-
* emitted, so no acceptance can outrun its record.
|
|
1499
|
-
*/
|
|
1500
1387
|
/**
|
|
1501
1388
|
* Did a corroborated commit already land for this work item, even though no
|
|
1502
1389
|
* result file is at its bound path?
|
|
@@ -1504,12 +1391,9 @@ async function validateHostResultBundle(input) {
|
|
|
1504
1391
|
* Ground truth, not a claim: `host_landed_commit` is written only after
|
|
1505
1392
|
* `corroborateHostResult` verified the commit resolves, is reachable from HEAD,
|
|
1506
1393
|
* and that its mechanically derived diff lies within the item's write scope.
|
|
1507
|
-
* Anything less is not a landing.
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
* and a work item is a bundle of them: a commit for one of its findings is work
|
|
1511
|
-
* this item did, which is exactly what the host needs to know before rewriting
|
|
1512
|
-
* the result from scratch.
|
|
1394
|
+
* Anything less is not a landing. A landed commit is work this item did, which
|
|
1395
|
+
* is exactly what the host needs to know before rewriting the result from
|
|
1396
|
+
* scratch.
|
|
1513
1397
|
*/
|
|
1514
1398
|
function hasLandedCommitFor(state, workItem) {
|
|
1515
1399
|
return typeof state.items[workItem.id]?.host_landed_commit === "string";
|
|
@@ -1517,22 +1401,29 @@ function hasLandedCommitFor(state, workItem) {
|
|
|
1517
1401
|
async function requiredConformanceReview(ctx, workItem, result) {
|
|
1518
1402
|
if (!ctx.state.conformance_review?.enabled)
|
|
1519
1403
|
return { ok: true };
|
|
1404
|
+
const unit = ctx.state.plan.units.find(candidate => candidate.id === workItem.id);
|
|
1520
1405
|
return checkContractConformance({
|
|
1521
1406
|
root: ctx.paths.root, artifactsDir: ctx.paths.artifactsDir, runId: ctx.runId,
|
|
1522
1407
|
item: workItem, result,
|
|
1523
1408
|
requirements: ctx.state.plan.requirements.filter(requirement => workItem.obligation_ids.includes(requirement.id)),
|
|
1524
|
-
unit
|
|
1409
|
+
unit,
|
|
1525
1410
|
revision: ctx.state.plan.review_revision_sha256,
|
|
1526
|
-
counterexamples: (ctx.state.plan.review_counterexamples ?? []).filter(example =>
|
|
1411
|
+
counterexamples: (ctx.state.plan.review_counterexamples ?? []).filter(example => unit.addresses_counterexample_ids.includes(example.id)),
|
|
1527
1412
|
});
|
|
1528
1413
|
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Phase 2 — per-item verification. Writes NOTHING to `ctx.nextState`.
|
|
1416
|
+
*
|
|
1417
|
+
* Iterates the effective workload in order and emits one verdict per ACCEPTED
|
|
1418
|
+
* item; a refusal pushes its classified issue and continues. The ledger mark
|
|
1419
|
+
* for a recovery acceptance still goes down before that item's verdict is
|
|
1420
|
+
* emitted, so no acceptance can outrun its record.
|
|
1421
|
+
*/
|
|
1529
1422
|
async function executeHostVerificationReruns(ctx, acc) {
|
|
1530
1423
|
const { paths, nextState, state } = ctx;
|
|
1531
1424
|
const verdicts = [];
|
|
1532
1425
|
for (const workItem of ctx.effectiveWorkload.work_items) {
|
|
1533
|
-
|
|
1534
|
-
!acc.settledFindingIds.has(findingId));
|
|
1535
|
-
if (pendingItems.length === 0)
|
|
1426
|
+
if (nextState.items[workItem.id]?.status !== "pending")
|
|
1536
1427
|
continue;
|
|
1537
1428
|
if (!ctx.eligibleIds.has(workItem.id)) {
|
|
1538
1429
|
acc.issues.push({
|
|
@@ -1548,12 +1439,7 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1548
1439
|
artifactsDir: paths.artifactsDir,
|
|
1549
1440
|
workItemId: workItem.id,
|
|
1550
1441
|
resultPath: workItem.result_path,
|
|
1551
|
-
parse: (
|
|
1552
|
-
const result = parseResult(value, ctx.runId, workItem);
|
|
1553
|
-
return result.ok
|
|
1554
|
-
? { ok: true, parsed: result }
|
|
1555
|
-
: { ok: false, check: result.check, detail: result.reason };
|
|
1556
|
-
},
|
|
1442
|
+
parse: scanParser(ctx.runId, workItem),
|
|
1557
1443
|
resultId: (result) => result.result.result_id,
|
|
1558
1444
|
seen: (resultId) => acc.resultIds.has(resultId),
|
|
1559
1445
|
messages: remediationScanMessages,
|
|
@@ -1581,6 +1467,16 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1581
1467
|
}
|
|
1582
1468
|
const parsed = scan.parsed;
|
|
1583
1469
|
const resultId = parsed.result.result_id;
|
|
1470
|
+
const reviewFirst = state.conformance_review?.enabled === true && !ctx.recovery;
|
|
1471
|
+
const reviewHead = reviewFirst ? await headCommit(paths.root) : null;
|
|
1472
|
+
const checkReview = async () => {
|
|
1473
|
+
// Both the structural preflight and execution must target the checkout
|
|
1474
|
+
// for which we ask the reviewer to inspect the bound result.
|
|
1475
|
+
if (reviewFirst && await headCommit(paths.root) !== reviewHead) {
|
|
1476
|
+
return conformanceIssue(conformanceReviewPaths(paths.artifactsDir, ctx.runId, workItem.id), workItem.id, "conformance_review_required", "Repository HEAD changed during result verification. Re-run next-step on the reviewed checkout.");
|
|
1477
|
+
}
|
|
1478
|
+
return requiredConformanceReview(ctx, workItem, parsed.result);
|
|
1479
|
+
};
|
|
1584
1480
|
acc.resultIds.add(resultId);
|
|
1585
1481
|
if (parsed.kind === "decision") {
|
|
1586
1482
|
const result = parsed.result;
|
|
@@ -1617,6 +1513,13 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1617
1513
|
});
|
|
1618
1514
|
continue;
|
|
1619
1515
|
}
|
|
1516
|
+
if (reviewFirst) {
|
|
1517
|
+
const review = await checkReview();
|
|
1518
|
+
if (!review.ok) {
|
|
1519
|
+
acc.issues.push(review.issue);
|
|
1520
|
+
continue;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1620
1523
|
const failedTests = await rerunRequiredTests(paths.root, workItem.required_tests, ctx.requiredTestVerdicts);
|
|
1621
1524
|
if (failedTests.length > 0) {
|
|
1622
1525
|
acc.issues.push(requiredTestIssue(workItem, failedTests));
|
|
@@ -1624,17 +1527,14 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1624
1527
|
}
|
|
1625
1528
|
}
|
|
1626
1529
|
const review = outcome.status === "resolved_no_change"
|
|
1627
|
-
? await
|
|
1530
|
+
? await checkReview() : { ok: true };
|
|
1628
1531
|
if (!review.ok) {
|
|
1629
1532
|
acc.issues.push(review.issue);
|
|
1630
1533
|
continue;
|
|
1631
1534
|
}
|
|
1632
|
-
for (const findingId of pendingItems)
|
|
1633
|
-
acc.settledFindingIds.add(findingId);
|
|
1634
1535
|
verdicts.push({
|
|
1635
1536
|
kind: "decision",
|
|
1636
1537
|
workItem,
|
|
1637
|
-
pendingItems,
|
|
1638
1538
|
at: new Date().toISOString(),
|
|
1639
1539
|
outcome,
|
|
1640
1540
|
conformance_review: review.receipt,
|
|
@@ -1660,8 +1560,13 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1660
1560
|
result,
|
|
1661
1561
|
verdicts: ctx.requiredTestVerdicts,
|
|
1662
1562
|
recovery: ctx.recovery,
|
|
1563
|
+
...(reviewFirst ? { beforeRequiredTests: checkReview } : {}),
|
|
1663
1564
|
});
|
|
1664
1565
|
if (!corroborated.ok) {
|
|
1566
|
+
if (corroborated.reviewIssue) {
|
|
1567
|
+
acc.issues.push(corroborated.reviewIssue);
|
|
1568
|
+
continue;
|
|
1569
|
+
}
|
|
1665
1570
|
acc.issues.push({
|
|
1666
1571
|
code: corroborated.code,
|
|
1667
1572
|
check: corroborated.check,
|
|
@@ -1671,7 +1576,7 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1671
1576
|
});
|
|
1672
1577
|
continue;
|
|
1673
1578
|
}
|
|
1674
|
-
const review = await
|
|
1579
|
+
const review = await checkReview();
|
|
1675
1580
|
if (!review.ok) {
|
|
1676
1581
|
acc.issues.push(review.issue);
|
|
1677
1582
|
continue;
|
|
@@ -1723,18 +1628,15 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1723
1628
|
work_item_id: workItem.id,
|
|
1724
1629
|
result_path: workItem.result_path,
|
|
1725
1630
|
message: "the recovery acceptance could not be recorded on the submission ledger, so it " +
|
|
1726
|
-
`was refused: ${
|
|
1631
|
+
`was refused: ${errorMessage(error)}`,
|
|
1727
1632
|
});
|
|
1728
1633
|
continue;
|
|
1729
1634
|
}
|
|
1730
1635
|
}
|
|
1731
|
-
for (const findingId of pendingItems)
|
|
1732
|
-
acc.settledFindingIds.add(findingId);
|
|
1733
1636
|
verdicts.push({
|
|
1734
1637
|
kind: "landed",
|
|
1735
1638
|
conformance_review: review.receipt,
|
|
1736
1639
|
workItem,
|
|
1737
|
-
pendingItems,
|
|
1738
1640
|
at: new Date().toISOString(),
|
|
1739
1641
|
landedCommit: result.landed_commit,
|
|
1740
1642
|
changedFiles: corroborated.changedFiles,
|
|
@@ -1751,73 +1653,68 @@ async function executeHostVerificationReruns(ctx, acc) {
|
|
|
1751
1653
|
*
|
|
1752
1654
|
* Infallible given the verdicts: every refusal was already classified in
|
|
1753
1655
|
* phase 2, so nothing here can reject. Verdicts apply in workload order, which
|
|
1754
|
-
* is the order they were emitted,
|
|
1755
|
-
*
|
|
1656
|
+
* is the order they were emitted, and each writes only its own work item's
|
|
1657
|
+
* state (the workload's ids are unique).
|
|
1756
1658
|
*/
|
|
1757
1659
|
function commitRemediationStateUpdates(ctx, acc, verdicts, issues) {
|
|
1758
1660
|
const { nextState } = ctx;
|
|
1759
1661
|
for (const verdict of verdicts) {
|
|
1662
|
+
const item = nextState.items[verdict.workItem.id];
|
|
1760
1663
|
if (verdict.kind === "decision") {
|
|
1761
1664
|
const outcome = verdict.outcome;
|
|
1762
|
-
for (const findingId of verdict.pendingItems) {
|
|
1763
|
-
const item = nextState.items[findingId];
|
|
1764
|
-
if (verdict.conformance_review)
|
|
1765
|
-
item.conformance_review = verdict.conformance_review;
|
|
1766
|
-
else
|
|
1767
|
-
delete item.conformance_review;
|
|
1768
|
-
item.started_at ??= verdict.at;
|
|
1769
|
-
if (outcome.status === "resolved_no_change") {
|
|
1770
|
-
item.status = "resolved_no_change";
|
|
1771
|
-
item.completed_at = verdict.at;
|
|
1772
|
-
item.host_result_evidence = [...outcome.evidence];
|
|
1773
|
-
delete item.failure_reason;
|
|
1774
|
-
}
|
|
1775
|
-
else if (outcome.status === "blocked") {
|
|
1776
|
-
item.status = "blocked";
|
|
1777
|
-
item.completed_at = verdict.at;
|
|
1778
|
-
item.failure_reason = outcome.failure_reason;
|
|
1779
|
-
}
|
|
1780
|
-
else {
|
|
1781
|
-
item.status = "needs_clarification";
|
|
1782
|
-
delete item.completed_at;
|
|
1783
|
-
item.failure_reason = outcome.question;
|
|
1784
|
-
// The question lives on the item (its one home): the clarification
|
|
1785
|
-
// round lists every paused item, so no answer can erase another's.
|
|
1786
|
-
item.clarification_question = {
|
|
1787
|
-
category: isClarificationCategory(outcome.category)
|
|
1788
|
-
? outcome.category
|
|
1789
|
-
: "scope_of_fix",
|
|
1790
|
-
description: outcome.question,
|
|
1791
|
-
};
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
continue;
|
|
1795
|
-
}
|
|
1796
|
-
for (const findingId of verdict.pendingItems) {
|
|
1797
|
-
const item = nextState.items[findingId];
|
|
1798
1665
|
if (verdict.conformance_review)
|
|
1799
1666
|
item.conformance_review = verdict.conformance_review;
|
|
1800
1667
|
else
|
|
1801
1668
|
delete item.conformance_review;
|
|
1802
|
-
item.status = "resolved";
|
|
1803
1669
|
item.started_at ??= verdict.at;
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1670
|
+
if (outcome.status === "resolved_no_change") {
|
|
1671
|
+
item.status = "resolved_no_change";
|
|
1672
|
+
item.completed_at = verdict.at;
|
|
1673
|
+
item.host_result_evidence = [...outcome.evidence];
|
|
1674
|
+
delete item.failure_reason;
|
|
1675
|
+
}
|
|
1676
|
+
else if (outcome.status === "blocked") {
|
|
1677
|
+
item.status = "blocked";
|
|
1678
|
+
item.completed_at = verdict.at;
|
|
1679
|
+
item.failure_reason = outcome.failure_reason;
|
|
1680
|
+
}
|
|
1681
|
+
else {
|
|
1682
|
+
item.status = "needs_clarification";
|
|
1683
|
+
delete item.completed_at;
|
|
1684
|
+
item.failure_reason = outcome.question;
|
|
1685
|
+
// The question lives on the item (its one home): the clarification
|
|
1686
|
+
// round lists every paused item, so no answer can erase another's.
|
|
1687
|
+
item.clarification_question = {
|
|
1688
|
+
category: isClarificationCategory(outcome.category)
|
|
1689
|
+
? outcome.category
|
|
1690
|
+
: "scope_of_fix",
|
|
1691
|
+
description: outcome.question,
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
continue;
|
|
1814
1695
|
}
|
|
1696
|
+
if (verdict.conformance_review)
|
|
1697
|
+
item.conformance_review = verdict.conformance_review;
|
|
1698
|
+
else
|
|
1699
|
+
delete item.conformance_review;
|
|
1700
|
+
item.status = "resolved";
|
|
1701
|
+
item.started_at ??= verdict.at;
|
|
1702
|
+
item.completed_at = verdict.at;
|
|
1703
|
+
// The corroborated outcome is PERSISTED per item, not just folded into the
|
|
1704
|
+
// run-wide `applied_edit_surface`, so the attribution survives the process
|
|
1705
|
+
// that observed it — and read back by `hasLandedCommitFor` on the next
|
|
1706
|
+
// ingest, which is how an item whose edits landed but whose result file
|
|
1707
|
+
// never arrived is told apart from one that was never attempted.
|
|
1708
|
+
item.host_landed_commit = verdict.landedCommit;
|
|
1709
|
+
item.host_landed_files = [...verdict.changedFiles];
|
|
1710
|
+
delete item.failure_reason;
|
|
1711
|
+
delete item.host_result_evidence;
|
|
1815
1712
|
}
|
|
1816
1713
|
if (acc.completed.length > 0) {
|
|
1817
1714
|
nextState.applied_edit_surface = [...acc.landedFiles].sort(compareCodeUnits);
|
|
1818
1715
|
}
|
|
1819
1716
|
const pendingWorkItemIds = ctx.effectiveWorkload.work_items
|
|
1820
|
-
.filter((workItem) => [workItem.id]
|
|
1717
|
+
.filter((workItem) => nextState.items[workItem.id]?.status === "pending")
|
|
1821
1718
|
.map((workItem) => workItem.id);
|
|
1822
1719
|
let stateChanged = acc.completed.length > 0;
|
|
1823
1720
|
if (nextState.host_handoff && pendingWorkItemIds.length === 0) {
|