audit-tools 0.52.3 → 0.52.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -1
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +6 -2
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/argumentContract.d.ts +11 -0
- package/dist/audit/cli/argumentContract.d.ts.map +1 -0
- package/dist/audit/cli/argumentContract.js +45 -0
- package/dist/audit/cli/argumentContract.js.map +1 -0
- package/dist/audit/cli/auditReviewBindings.d.ts +49 -0
- package/dist/audit/cli/auditReviewBindings.d.ts.map +1 -0
- package/dist/audit/cli/auditReviewBindings.js +61 -0
- package/dist/audit/cli/auditReviewBindings.js.map +1 -0
- package/dist/audit/cli/auditStep.d.ts +1 -27
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +7 -32
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +2 -0
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.js +9 -0
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +17 -3
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +15 -2
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +10 -17
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +231 -229
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/explainTaskCommand.d.ts.map +1 -1
- package/dist/audit/cli/explainTaskCommand.js +3 -1
- package/dist/audit/cli/explainTaskCommand.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +10 -14
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +50 -16
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/functionalPreflight.d.ts +96 -0
- package/dist/audit/cli/functionalPreflight.d.ts.map +1 -0
- package/dist/audit/cli/functionalPreflight.js +103 -0
- package/dist/audit/cli/functionalPreflight.js.map +1 -0
- package/dist/audit/cli/laneSubmissions.d.ts +5 -1
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +45 -34
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +1 -9
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +101 -38
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +10 -25
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +57 -67
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +9 -4
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.js +8 -1
- package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
- package/dist/audit/cli/reviewRun.js +1 -1
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/reviewSubmission.d.ts +24 -0
- package/dist/audit/cli/reviewSubmission.d.ts.map +1 -0
- package/dist/audit/cli/reviewSubmission.js +97 -0
- package/dist/audit/cli/reviewSubmission.js.map +1 -0
- package/dist/audit/cli/sampleRunCommand.d.ts +3 -3
- package/dist/audit/cli/steps.d.ts +18 -18
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +1 -0
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.js +2 -1
- package/dist/audit/cli/unacceptResultsCommand.js.map +1 -1
- package/dist/audit/cli.d.ts +2 -1
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +27 -19
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +10 -10
- package/dist/audit/contracts/wrapperResponse.d.ts +34 -34
- package/dist/audit/extractors/commentDecomposition.d.ts +14 -0
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +2 -1
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +12 -7
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphPythonImports.d.ts +3 -0
- package/dist/audit/extractors/graphPythonImports.d.ts.map +1 -1
- package/dist/audit/extractors/graphPythonImports.js +24 -5
- package/dist/audit/extractors/graphPythonImports.js.map +1 -1
- package/dist/audit/extractors/graphRouteSources.d.ts +7 -0
- package/dist/audit/extractors/graphRouteSources.d.ts.map +1 -0
- package/dist/audit/extractors/graphRouteSources.js +208 -0
- package/dist/audit/extractors/graphRouteSources.js.map +1 -0
- package/dist/audit/extractors/graphRoutes.d.ts +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +65 -68
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +1 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +29 -10
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +1 -1
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +3 -0
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +11 -32
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts +2 -3
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +1 -2
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +2 -2
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts +2 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.js +6 -1
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts +2 -0
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +6 -0
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts +5 -8
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +7 -1
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +3 -47
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +28 -135
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts +24 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +8 -2
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/designReviewTask.d.ts +46 -0
- package/dist/audit/orchestrator/designReviewTask.d.ts.map +1 -0
- package/dist/audit/orchestrator/designReviewTask.js +44 -0
- package/dist/audit/orchestrator/designReviewTask.js.map +1 -0
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +4 -2
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +3 -0
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js +2 -0
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -9
- package/dist/audit/orchestrator/intentInterpreter.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +6 -11
- package/dist/audit/orchestrator/intentInterpreter.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +2 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +32 -40
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +8 -14
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +19 -0
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +15 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.d.ts +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.d.ts.map +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.js +4 -2
- package/dist/audit/reporting/criticalFlowFallbackPrompt.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +43 -2
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/types/auditScope.d.ts +2 -2
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/conceptualAdjudication.d.ts +19 -19
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +3 -3
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types.d.ts +17 -19
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +19 -20
- package/dist/audit/types.js.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +3 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +26 -31
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.js +20 -8
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts +28 -0
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/contractReviewBinding.js +75 -0
- package/dist/remediate/contractPipeline/contractReviewBinding.js.map +1 -0
- package/dist/remediate/contractPipeline/repairState.d.ts +3 -1
- package/dist/remediate/contractPipeline/repairState.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/repairState.js +1 -0
- package/dist/remediate/contractPipeline/repairState.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +1 -0
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.js +1 -0
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.d.ts +1 -2
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.js +1 -0
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +92 -52
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +54 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +15 -1
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/intakeSelection.d.ts +27 -0
- package/dist/remediate/intakeSelection.d.ts.map +1 -0
- package/dist/remediate/intakeSelection.js +37 -0
- package/dist/remediate/intakeSelection.js.map +1 -0
- package/dist/remediate/intent/intentPersistence.d.ts +41 -0
- package/dist/remediate/intent/intentPersistence.d.ts.map +1 -0
- package/dist/remediate/intent/intentPersistence.js +129 -0
- package/dist/remediate/intent/intentPersistence.js.map +1 -0
- package/dist/remediate/phases/close.d.ts +2 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +19 -2
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeReviewProvenance.d.ts +4 -0
- package/dist/remediate/phases/closeReviewProvenance.d.ts.map +1 -0
- package/dist/remediate/phases/closeReviewProvenance.js +16 -0
- package/dist/remediate/phases/closeReviewProvenance.js.map +1 -0
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +3 -1
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/review/filterDispositions.d.ts +13 -0
- package/dist/remediate/review/filterDispositions.d.ts.map +1 -0
- package/dist/remediate/review/filterDispositions.js +32 -0
- package/dist/remediate/review/filterDispositions.js.map +1 -0
- package/dist/remediate/state/runIdentity.d.ts +27 -0
- package/dist/remediate/state/runIdentity.d.ts.map +1 -0
- package/dist/remediate/state/runIdentity.js +38 -0
- package/dist/remediate/state/runIdentity.js.map +1 -0
- package/dist/remediate/state/store.d.ts +80 -1
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +82 -1
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +215 -42
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +11 -3
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +61 -3
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +121 -47
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +27 -4
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +34 -32
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +31 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +98 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -0
- package/dist/remediate/steps/dispatch/hostContracts.d.ts +133 -0
- package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/hostContracts.js +104 -0
- package/dist/remediate/steps/dispatch/hostContracts.js.map +1 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts +70 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.js +350 -0
- package/dist/remediate/steps/dispatch/hostCorroboration.js.map +1 -0
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +8 -162
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +137 -690
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.d.ts +83 -0
- package/dist/remediate/steps/dispatch/requiredTests.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/requiredTests.js +262 -0
- package/dist/remediate/steps/dispatch/requiredTests.js.map +1 -0
- package/dist/remediate/steps/finalGate.d.ts +8 -7
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +14 -11
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/frictionCloseout.d.ts +34 -0
- package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -0
- package/dist/remediate/steps/frictionCloseout.js +113 -0
- package/dist/remediate/steps/frictionCloseout.js.map +1 -0
- package/dist/remediate/steps/gateCommands.d.ts +7 -9
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +37 -11
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +2 -0
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +36 -11
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +23 -110
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +232 -508
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +1 -1
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +7 -2
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/recoverIngest.d.ts +57 -0
- package/dist/remediate/steps/recoverIngest.d.ts.map +1 -0
- package/dist/remediate/steps/recoverIngest.js +171 -0
- package/dist/remediate/steps/recoverIngest.js.map +1 -0
- package/dist/remediate/steps/stepWriter.d.ts +5 -4
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +2 -1
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +2 -3
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +5 -12
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +10 -7
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +13 -67
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +65 -139
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +9 -3
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/agentReflections.d.ts +2 -2
- package/dist/shared/analyzerPolicy.d.ts +2 -16
- package/dist/shared/analyzerPolicy.d.ts.map +1 -1
- package/dist/shared/analyzerPolicy.js +22 -24
- package/dist/shared/analyzerPolicy.js.map +1 -1
- package/dist/shared/analyzerRunConsent.d.ts +33 -0
- package/dist/shared/analyzerRunConsent.d.ts.map +1 -0
- package/dist/shared/analyzerRunConsent.js +42 -0
- package/dist/shared/analyzerRunConsent.js.map +1 -0
- package/dist/shared/analyzers/acquisitionEngine.d.ts +3 -8
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +1 -0
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +8 -8
- package/dist/shared/decompose/systemicChallenge.d.ts +12 -12
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +16 -0
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/graph/orderedReachability.d.ts +9 -0
- package/dist/shared/graph/orderedReachability.d.ts.map +1 -0
- package/dist/shared/graph/orderedReachability.js +21 -0
- package/dist/shared/graph/orderedReachability.js.map +1 -0
- package/dist/shared/index.d.ts +9 -3
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +6 -3
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intake/guidanceBootstrap.d.ts +2 -0
- package/dist/shared/intake/guidanceBootstrap.d.ts.map +1 -1
- package/dist/shared/intake/guidanceBootstrap.js +10 -1
- package/dist/shared/intake/guidanceBootstrap.js.map +1 -1
- package/dist/shared/intent/constraintClauses.d.ts +3 -0
- package/dist/shared/intent/constraintClauses.d.ts.map +1 -1
- package/dist/shared/intent/constraintClauses.js +9 -0
- package/dist/shared/intent/constraintClauses.js.map +1 -1
- package/dist/shared/io/artifactTreeHold.d.ts +5 -0
- package/dist/shared/io/artifactTreeHold.d.ts.map +1 -0
- package/dist/shared/io/artifactTreeHold.js +13 -0
- package/dist/shared/io/artifactTreeHold.js.map +1 -0
- package/dist/shared/io/auditToolsPaths.d.ts +3 -1
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +6 -1
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/collectFilesSorted.d.ts +10 -0
- package/dist/shared/io/collectFilesSorted.d.ts.map +1 -0
- package/dist/shared/io/collectFilesSorted.js +38 -0
- package/dist/shared/io/collectFilesSorted.js.map +1 -0
- package/dist/shared/io/json.d.ts.map +1 -1
- package/dist/shared/io/json.js +11 -4
- package/dist/shared/io/json.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +8 -0
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +9 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/observability/rootLogObservations.d.ts +10 -0
- package/dist/shared/observability/rootLogObservations.d.ts.map +1 -0
- package/dist/shared/observability/rootLogObservations.js +147 -0
- package/dist/shared/observability/rootLogObservations.js.map +1 -0
- package/dist/shared/prompts.d.ts +7 -7
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +11 -11
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +7 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +8 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/testCommand.d.ts +1 -0
- package/dist/shared/tooling/testCommand.d.ts.map +1 -1
- package/dist/shared/tooling/testCommand.js +4 -0
- package/dist/shared/tooling/testCommand.js.map +1 -1
- package/dist/shared/types/charter.d.ts +8 -8
- package/dist/shared/types/conceptualPerspective.d.ts +66 -0
- package/dist/shared/types/conceptualPerspective.d.ts.map +1 -0
- package/dist/shared/types/conceptualPerspective.js +135 -0
- package/dist/shared/types/conceptualPerspective.js.map +1 -0
- package/dist/shared/types/contractPipeline/design.d.ts +5 -0
- package/dist/shared/types/contractPipeline/design.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/design.js +6 -0
- package/dist/shared/types/contractPipeline/design.js.map +1 -1
- package/dist/shared/types/contractPipeline/implementation.d.ts +54 -0
- package/dist/shared/types/contractPipeline/implementation.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/implementation.js +10 -5
- package/dist/shared/types/contractPipeline/implementation.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +21 -10
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +13 -1
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/disposition.d.ts +6 -6
- package/dist/shared/types/finding.d.ts +50 -50
- package/dist/shared/types/intentCheckpoint.d.ts +66 -11
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +10 -2
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +252 -24
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +4 -0
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/reviewIndependence.d.ts +225 -0
- package/dist/shared/types/reviewIndependence.d.ts.map +1 -0
- package/dist/shared/types/reviewIndependence.js +67 -0
- package/dist/shared/types/reviewIndependence.js.map +1 -0
- package/dist/shared/types/stepContract.d.ts +8 -2
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +4 -1
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +13 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +38 -2
- package/docs/audit-pkg/operator-guide.md +59 -4
- package/package.json +5 -5
- package/skills/audit-code/audit-code.prompt.md +1 -31
- package/skills/remediate-code/remediate-code.prompt.md +12 -6
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
// sites-pinned: tests/remediate/host-handoff-corroboration.test.ts, tests/remediate/phase-triage.test.ts
|
|
2
|
+
import { remediationRequiredTestLogsDir } from "../../../shared/io/auditToolsPaths.js";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { parseCommandString, runTrackedAsync, writeJsonFile } from "audit-tools/shared";
|
|
6
|
+
/**
|
|
7
|
+
* Per-command deadline. A required test is host-authored and may legitimately be
|
|
8
|
+
* a full suite, so the bound is generous; what changed is that hitting it is now
|
|
9
|
+
* a NAMED outcome instead of an unlabelled failure string.
|
|
10
|
+
*/
|
|
11
|
+
const REQUIRED_TEST_TIMEOUT_MS = 10 * 60 * 1_000;
|
|
12
|
+
/**
|
|
13
|
+
* Captured output is bounded and TAIL-biased: a failing suite's verdict is at
|
|
14
|
+
* the end, and an unbounded capture would put a whole test log into state and
|
|
15
|
+
* into every rendered issue.
|
|
16
|
+
*/
|
|
17
|
+
const CAPTURED_OUTPUT_LIMIT = 1_200;
|
|
18
|
+
/**
|
|
19
|
+
* The bound on the MESSAGE a required-test failure produces.
|
|
20
|
+
*
|
|
21
|
+
* `CAPTURED_OUTPUT_LIMIT` bounds one STREAM; the message is a different thing —
|
|
22
|
+
* `requiredTestIssue` joins every failing command, and a work item may bind any
|
|
23
|
+
* number of them, so the rendered message grew with the number of failures. A
|
|
24
|
+
* message is a HOST-FACING delivery (it is rendered into the step prompt an
|
|
25
|
+
* operator reads), so its size cannot be a function of how many commands
|
|
26
|
+
* happened to fail.
|
|
27
|
+
*
|
|
28
|
+
* The bound TRUNCATES the excerpt and says so; it never drops the verdict. What
|
|
29
|
+
* survives at the front is the part that identifies the failure — the command
|
|
30
|
+
* and its outcome — and the marker tells the operator the rest was elided and
|
|
31
|
+
* where to look instead.
|
|
32
|
+
*/
|
|
33
|
+
export const REQUIRED_TEST_MESSAGE_LIMIT = 8_000;
|
|
34
|
+
/** The marker that names an elided excerpt, so truncation is never silent. */
|
|
35
|
+
const REQUIRED_TEST_TRUNCATION_MARKER = "… [excerpt truncated — captured logs are in .audit-tools/remediation/required-test-logs]";
|
|
36
|
+
/**
|
|
37
|
+
* The spawn's raw capture buffer. Exceeding it does not truncate — node KILLS
|
|
38
|
+
* the child — so the cap is a named constant the `output_overflow` message can
|
|
39
|
+
* quote, rather than a literal buried in the spawn options.
|
|
40
|
+
*/
|
|
41
|
+
const REQUIRED_TEST_MAX_BUFFER_BYTES = 8 * 1_024 * 1_024;
|
|
42
|
+
function tail(value) {
|
|
43
|
+
const text = value ?? "";
|
|
44
|
+
return text.length <= CAPTURED_OUTPUT_LIMIT
|
|
45
|
+
? text
|
|
46
|
+
: `…${text.slice(text.length - CAPTURED_OUTPUT_LIMIT)}`;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Render one classified failure for a host-facing issue message.
|
|
50
|
+
*
|
|
51
|
+
* `output_overflow` says the verdict is UNKNOWN, not that the tests were fine: a
|
|
52
|
+
* child killed at the buffer cap may have been heading for exit 0 or exit 3, and
|
|
53
|
+
* the runner cannot tell which. Either way the item is refused — the honest
|
|
54
|
+
* report is "we could not find out", and it fails closed.
|
|
55
|
+
*
|
|
56
|
+
* A signal-killed child renders the SIGNAL, not `exit null`: `exit_code` is null
|
|
57
|
+
* for every non-exit outcome, so printing it there described nothing.
|
|
58
|
+
*/
|
|
59
|
+
function describeRequiredTestFailure(failure) {
|
|
60
|
+
const head = failure.outcome === "timed_out"
|
|
61
|
+
? `${failure.command} (timed out)`
|
|
62
|
+
: failure.outcome === "output_overflow"
|
|
63
|
+
? `${failure.command} (killed after exceeding the ${String(REQUIRED_TEST_MAX_BUFFER_BYTES)}-byte ` +
|
|
64
|
+
"output buffer — the run ended at the capture cap, so whether the tests pass is UNKNOWN)"
|
|
65
|
+
: failure.outcome === "spawn_error"
|
|
66
|
+
? `${failure.command} (could not be started)`
|
|
67
|
+
: failure.exit_code === null
|
|
68
|
+
? `${failure.command} (terminated by ${failure.signal ?? "an unreported signal"})`
|
|
69
|
+
: `${failure.command} (exit ${String(failure.exit_code)})`;
|
|
70
|
+
const captured = [failure.stdout, failure.stderr]
|
|
71
|
+
.filter((stream) => stream.trim().length > 0)
|
|
72
|
+
.join("\n");
|
|
73
|
+
const excerpt = captured.length > 0 ? `${head}: ${captured}` : head;
|
|
74
|
+
const truncated = failure.stdout.startsWith("…") || failure.stderr.startsWith("…");
|
|
75
|
+
return failure.output_log
|
|
76
|
+
? `${excerpt} [${truncated ? "excerpt truncated; " : ""}captured output: ${failure.output_log}]`
|
|
77
|
+
: excerpt;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Length-prefixed so the root/command boundary is unambiguous for any path, and
|
|
81
|
+
* printable so the source stays text (a raw separator byte would make the file
|
|
82
|
+
* binary to git and invisible to grep). The root is part of the key because a
|
|
83
|
+
* verdict is a fact about one command in one working tree, and nothing
|
|
84
|
+
* guarantees a single process only ever ingests for one root.
|
|
85
|
+
*/
|
|
86
|
+
export function requiredTestVerdictKey(root, command) {
|
|
87
|
+
return `${String(root.length)}:${root}:${command}`;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The ONE place a required-test command is spawned.
|
|
91
|
+
*
|
|
92
|
+
* `timeoutMs` is a parameter so the deadline is exercisable: a hang is a
|
|
93
|
+
* first-class outcome of this function, and an outcome that can only be reached
|
|
94
|
+
* by waiting ten real minutes is an outcome nothing ever tests.
|
|
95
|
+
*/
|
|
96
|
+
export async function runRequiredTest(root, command, timeoutMs = REQUIRED_TEST_TIMEOUT_MS) {
|
|
97
|
+
// AWAITED, never `spawnSync`: ingestion runs with the remediation state lock
|
|
98
|
+
// held, and a synchronous child blocks the event loop for the whole suite —
|
|
99
|
+
// starving the lock's mtime heartbeat until a LIVE lock is classified stale
|
|
100
|
+
// and stolen mid-ingest.
|
|
101
|
+
//
|
|
102
|
+
// argv + `shell: false`, never a shell string. A required test is a workload
|
|
103
|
+
// command that already cleared the declared-shape gate at the producer, so
|
|
104
|
+
// splitting it is unambiguous, and dropping the shell removes the last place
|
|
105
|
+
// an ingest hands a declared string to `sh`/`cmd.exe`. `resolveExecArgv`
|
|
106
|
+
// inside the runner is what keeps the npm/npx shims resolvable on win32.
|
|
107
|
+
const result = await runTrackedAsync(parseCommandString(command), {
|
|
108
|
+
cwd: root,
|
|
109
|
+
// Captured, not discarded: without it a red ingest reports that something
|
|
110
|
+
// failed and nothing about why.
|
|
111
|
+
encoding: "utf8",
|
|
112
|
+
maxBuffer: REQUIRED_TEST_MAX_BUFFER_BYTES,
|
|
113
|
+
timeout: timeoutMs,
|
|
114
|
+
windowsHide: true,
|
|
115
|
+
});
|
|
116
|
+
if (!result.error && result.status === 0 && result.signal == null)
|
|
117
|
+
return null;
|
|
118
|
+
const output_log = join(remediationRequiredTestLogsDir(root), `${randomUUID()}.json`);
|
|
119
|
+
// Persist everything the bounded runner captured BEFORE deriving prompt excerpts.
|
|
120
|
+
await writeJsonFile(output_log, {
|
|
121
|
+
command, stdout: result.stdout ?? "", stderr: result.stderr ?? "",
|
|
122
|
+
status: result.status, signal: result.signal ?? null,
|
|
123
|
+
overflow_limit_bytes: REQUIRED_TEST_MAX_BUFFER_BYTES, error: result.error?.message ?? null,
|
|
124
|
+
});
|
|
125
|
+
const stdout = tail(result.stdout);
|
|
126
|
+
const stderr = tail(result.stderr);
|
|
127
|
+
// The ERROR CODE discriminates, never `signal`. node kills an over-deadline
|
|
128
|
+
// child AND an over-`maxBuffer` child, and an external `kill` sets `signal`
|
|
129
|
+
// too — so `signal !== null` was true for three unrelated facts and reported
|
|
130
|
+
// all of them as a hang, including a command killed purely for printing more
|
|
131
|
+
// than the buffer holds.
|
|
132
|
+
//
|
|
133
|
+
// ASSUMPTION, stated: a deadline miss reports `ETIMEDOUT`. Verified on win32;
|
|
134
|
+
// it is node's documented contract, not a platform quirk this code confirmed
|
|
135
|
+
// everywhere. On a platform that killed a child at the deadline WITHOUT that
|
|
136
|
+
// code, the case degrades to `spawn_error` — a less specific refusal, still a
|
|
137
|
+
// refusal, so the fail direction holds and only the label is lost.
|
|
138
|
+
const code = result.error?.code;
|
|
139
|
+
if (code === "ETIMEDOUT") {
|
|
140
|
+
return { command, output_log, outcome: "timed_out", exit_code: null, stdout, stderr };
|
|
141
|
+
}
|
|
142
|
+
if (code === "ENOBUFS") {
|
|
143
|
+
return {
|
|
144
|
+
command,
|
|
145
|
+
output_log,
|
|
146
|
+
outcome: "output_overflow",
|
|
147
|
+
exit_code: null,
|
|
148
|
+
stdout,
|
|
149
|
+
stderr,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
if (result.error) {
|
|
153
|
+
return {
|
|
154
|
+
command,
|
|
155
|
+
output_log,
|
|
156
|
+
outcome: "spawn_error",
|
|
157
|
+
exit_code: null,
|
|
158
|
+
stdout,
|
|
159
|
+
stderr: stderr.length > 0 ? stderr : result.error.message,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
// Killed by something outside this runner (an operator `kill`, an OOM reaper).
|
|
163
|
+
// Reported as FAILED with the signal named: the command did not complete, and
|
|
164
|
+
// calling it a deadline miss would attribute it to a bound this runner set.
|
|
165
|
+
//
|
|
166
|
+
// POSIX-ONLY IN PRACTICE, and UNTESTED for that reason: Windows has no signal
|
|
167
|
+
// delivery to report here — a killed child surfaces as an ordinary non-zero
|
|
168
|
+
// `status` with `signal` null — so this branch is unreachable on the platform
|
|
169
|
+
// this repo runs its suites on, and no test exercises it. It is kept because
|
|
170
|
+
// the runner is OS-agnostic by contract, not because it has been observed.
|
|
171
|
+
if (result.signal !== null && result.signal !== undefined) {
|
|
172
|
+
return {
|
|
173
|
+
command,
|
|
174
|
+
output_log,
|
|
175
|
+
outcome: "failed",
|
|
176
|
+
exit_code: null,
|
|
177
|
+
stdout,
|
|
178
|
+
stderr,
|
|
179
|
+
signal: result.signal,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
if (result.status !== 0) {
|
|
183
|
+
return {
|
|
184
|
+
command,
|
|
185
|
+
output_log,
|
|
186
|
+
outcome: "failed",
|
|
187
|
+
exit_code: result.status,
|
|
188
|
+
stdout,
|
|
189
|
+
stderr,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
export async function rerunRequiredTests(root, commands,
|
|
195
|
+
/** `null` on the normal lane — see {@link RemediationRequiredTestVerdicts}. */
|
|
196
|
+
verdicts) {
|
|
197
|
+
const failures = [];
|
|
198
|
+
for (const command of commands) {
|
|
199
|
+
if (verdicts) {
|
|
200
|
+
const verdict = verdicts.get(requiredTestVerdictKey(root, command));
|
|
201
|
+
if (verdict === undefined) {
|
|
202
|
+
failures.push({
|
|
203
|
+
command,
|
|
204
|
+
outcome: "spawn_error",
|
|
205
|
+
exit_code: null,
|
|
206
|
+
stdout: "",
|
|
207
|
+
stderr: "no pre-computed verdict — refusing to spawn a test while the state lock is held",
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
else if (verdict !== null) {
|
|
211
|
+
failures.push(verdict);
|
|
212
|
+
}
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
const failure = await runRequiredTest(root, command);
|
|
216
|
+
if (failure !== null)
|
|
217
|
+
failures.push(failure);
|
|
218
|
+
}
|
|
219
|
+
return failures;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The classified issue for a set of required-test failures. An ENVIRONMENT fact
|
|
223
|
+
* anywhere in the set wins over a red sibling, timeout first: a hung or
|
|
224
|
+
* buffer-killed suite is the fact that explains the ingest, and burying it under
|
|
225
|
+
* a sibling's exit code is exactly the conflation the code split exists to end.
|
|
226
|
+
* Only a set where every failure is a genuine non-zero exit reads as
|
|
227
|
+
* `required_test_failed`.
|
|
228
|
+
*/
|
|
229
|
+
export function requiredTestIssue(workItem, failures) {
|
|
230
|
+
// Bounded at the point the message is BUILT, not left to the caller: the
|
|
231
|
+
// failure count is a property of the work item's bound commands, so bounding
|
|
232
|
+
// anywhere downstream would still have carried an unbounded string through
|
|
233
|
+
// state and into the ledger. See REQUIRED_TEST_MESSAGE_LIMIT.
|
|
234
|
+
const body = `mechanical required-test rerun failed: ${failures
|
|
235
|
+
.map(describeRequiredTestFailure)
|
|
236
|
+
.join("; ")}`;
|
|
237
|
+
return {
|
|
238
|
+
code: failures.some((failure) => failure.outcome === "timed_out")
|
|
239
|
+
? "required_test_timed_out"
|
|
240
|
+
: failures.some((failure) => failure.outcome === "output_overflow")
|
|
241
|
+
? "required_test_output_overflow"
|
|
242
|
+
: "required_test_failed",
|
|
243
|
+
check: "required_tests",
|
|
244
|
+
work_item_id: workItem.id,
|
|
245
|
+
result_path: workItem.result_path,
|
|
246
|
+
message: boundRequiredTestMessage(body),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Truncate a required-test failure message to {@link REQUIRED_TEST_MESSAGE_LIMIT},
|
|
251
|
+
* marking the elision. The head is kept because it is what identifies the
|
|
252
|
+
* failure — the command and its classified outcome — and the marker replaces
|
|
253
|
+
* the tail rather than being appended past the cap, so the result is bounded by
|
|
254
|
+
* construction.
|
|
255
|
+
*/
|
|
256
|
+
function boundRequiredTestMessage(message) {
|
|
257
|
+
if (message.length <= REQUIRED_TEST_MESSAGE_LIMIT)
|
|
258
|
+
return message;
|
|
259
|
+
const room = REQUIRED_TEST_MESSAGE_LIMIT - REQUIRED_TEST_TRUNCATION_MARKER.length;
|
|
260
|
+
return `${message.slice(0, room)}${REQUIRED_TEST_TRUNCATION_MARKER}`;
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=requiredTests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requiredTests.js","sourceRoot":"","sources":["../../../../src/remediate/steps/dispatch/requiredTests.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAwCxF;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;AAEjD;;;;GAIG;AACH,MAAM,qBAAqB,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,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,OAAO,EAAE,wBAAwB,CAAC,IAAI,CAAC;KACxC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,wBAAwB,CAAC,OAAe;IAC/C,IAAI,OAAO,CAAC,MAAM,IAAI,2BAA2B;QAAE,OAAO,OAAO,CAAC;IAClE,MAAM,IAAI,GAAG,2BAA2B,GAAG,+BAA+B,CAAC,MAAM,CAAC;IAClF,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,+BAA+B,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -60,10 +60,8 @@ export interface ToolOwnedFinalGateResult {
|
|
|
60
60
|
*/
|
|
61
61
|
outcome: Exclude<FinalGateOutcomeKind, "disabled">;
|
|
62
62
|
/**
|
|
63
|
-
* True when
|
|
64
|
-
*
|
|
65
|
-
* not a vacuous pass. Kept alongside {@link outcome} as the boolean draw of
|
|
66
|
-
* the same fact for the branches that only need "did anything run".
|
|
63
|
+
* True when no command could be derived. This is a blocking non-verdict;
|
|
64
|
+
* the operator must supply a command or leave the run paused.
|
|
67
65
|
*/
|
|
68
66
|
scoped_out: boolean;
|
|
69
67
|
/**
|
|
@@ -112,11 +110,12 @@ export declare const RUNTIME_RESIDUAL_DECLARATION: ToolOwnedFinalGateResult["run
|
|
|
112
110
|
* header; the host's session variables reach the child unchanged).
|
|
113
111
|
* The first failing command short-circuits the floor (a broken build makes the
|
|
114
112
|
* later layers meaningless). A `runner` may be injected for tests. When the
|
|
115
|
-
*
|
|
116
|
-
*
|
|
113
|
+
* target declares no executable gates, it returns a non-verdict that blocks
|
|
114
|
+
* for an explicit operator command rather than vacuously passing.
|
|
117
115
|
*/
|
|
118
116
|
export declare function runToolOwnedFinalGate(root: string, opts?: {
|
|
119
117
|
runner?: GateRunner;
|
|
118
|
+
testCommand?: string[];
|
|
120
119
|
}): Promise<ToolOwnedFinalGateResult>;
|
|
121
120
|
/**
|
|
122
121
|
* Where the failing gate run is recorded, relative to the artifacts dir. The
|
|
@@ -166,6 +165,7 @@ export interface FinalGateVerdictRecord {
|
|
|
166
165
|
outcome: Exclude<FinalGateOutcomeKind, "disabled">;
|
|
167
166
|
/** The per-command results the red record is rebuilt from. */
|
|
168
167
|
results: FinalGateCommandResult[];
|
|
168
|
+
binding?: string;
|
|
169
169
|
recorded_at: string;
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
@@ -183,7 +183,7 @@ export declare function finalGateVerdictPath(artifactsDir: string): string;
|
|
|
183
183
|
* a cache miss costs a gate run, a false hit certifies a tree nobody checked.
|
|
184
184
|
* Never throws.
|
|
185
185
|
*/
|
|
186
|
-
export declare function readFinalGateVerdict(artifactsDir: string, scope: string, tree: string | null): Promise<FinalGateVerdictRecord | undefined>;
|
|
186
|
+
export declare function readFinalGateVerdict(artifactsDir: string, scope: string, tree: string | null, binding?: string): Promise<FinalGateVerdictRecord | undefined>;
|
|
187
187
|
/**
|
|
188
188
|
* Record a gate verdict against the tree it was reached on. Overwrites.
|
|
189
189
|
*
|
|
@@ -198,6 +198,7 @@ export declare function writeFinalGateVerdict(artifactsDir: string, verdict: {
|
|
|
198
198
|
scoped_out: boolean;
|
|
199
199
|
outcome: Exclude<FinalGateOutcomeKind, "disabled">;
|
|
200
200
|
results: FinalGateCommandResult[];
|
|
201
|
+
binding?: string;
|
|
201
202
|
}): Promise<string>;
|
|
202
203
|
/**
|
|
203
204
|
* The ONE gate-outcome record. Every gate family that runs this floor writes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finalGate.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/finalGate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"finalGate.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/finalGate.ts"],"names":[],"mappings":"AAsDA,OAAO,EAEL,KAAK,oBAAoB,IAAI,0BAA0B,EACxD,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL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CAAC;IACrD,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,sBAAsB,GAAG,SAAS,EAC1C,gBAAgB,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,oBAAoB,CAAA;CAAE,GAC/D,OAAO,CAAC,MAAM,CAAC,CA+BjB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// sites-pinned: tests/remediate/arbitrary-repository-gates.test.ts, tests/remediate/final-gate-red-pause.test.ts, tests/remediate/final-gate-extraction-equivalence.test.ts
|
|
1
2
|
// ---------------------------------------------------------------------------
|
|
2
3
|
// Tool-owned final completion gate (INV-RS-10)
|
|
3
4
|
// ---------------------------------------------------------------------------
|
|
@@ -88,20 +89,19 @@ export const RUNTIME_RESIDUAL_DECLARATION = {
|
|
|
88
89
|
* header; the host's session variables reach the child unchanged).
|
|
89
90
|
* The first failing command short-circuits the floor (a broken build makes the
|
|
90
91
|
* later layers meaningless). A `runner` may be injected for tests. When the
|
|
91
|
-
*
|
|
92
|
-
*
|
|
92
|
+
* target declares no executable gates, it returns a non-verdict that blocks
|
|
93
|
+
* for an explicit operator command rather than vacuously passing.
|
|
93
94
|
*/
|
|
94
95
|
export async function runToolOwnedFinalGate(root, opts = {}) {
|
|
95
|
-
const runtime_residual =
|
|
96
|
-
|
|
96
|
+
const runtime_residual = isAuditToolsMonorepo(root)
|
|
97
|
+
? RUNTIME_RESIDUAL_DECLARATION
|
|
98
|
+
: { surface: "verification roles not declared by the target repository", commands: [] };
|
|
99
|
+
const commands = toolOwnedFinalGateCommands(root, opts.testCommand);
|
|
97
100
|
if (commands.length === 0) {
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
// `passed: true` keeps it NON-BLOCKING, which is the declared design; the
|
|
101
|
-
// `outcome` beside it is what stops that non-blocking value from being
|
|
102
|
-
// recorded as if a floor had run green.
|
|
101
|
+
// No declared command is not a verdict. The consumer emits an operator
|
|
102
|
+
// decision and preserves the run, rather than treating zero checks as green.
|
|
103
103
|
return {
|
|
104
|
-
passed:
|
|
104
|
+
passed: false,
|
|
105
105
|
results: [],
|
|
106
106
|
outcome: "scoped_out",
|
|
107
107
|
scoped_out: true,
|
|
@@ -211,7 +211,7 @@ export function finalGateVerdictPath(artifactsDir) {
|
|
|
211
211
|
* a cache miss costs a gate run, a false hit certifies a tree nobody checked.
|
|
212
212
|
* Never throws.
|
|
213
213
|
*/
|
|
214
|
-
export async function readFinalGateVerdict(artifactsDir, scope, tree) {
|
|
214
|
+
export async function readFinalGateVerdict(artifactsDir, scope, tree, binding) {
|
|
215
215
|
if (tree === null)
|
|
216
216
|
return undefined;
|
|
217
217
|
const raw = await readOptionalJsonFile(finalGateVerdictPath(artifactsDir)).catch(() => undefined);
|
|
@@ -220,6 +220,8 @@ export async function readFinalGateVerdict(artifactsDir, scope, tree) {
|
|
|
220
220
|
return undefined;
|
|
221
221
|
if (record.scope !== scope)
|
|
222
222
|
return undefined;
|
|
223
|
+
if (binding !== undefined && (record.binding !== binding || record.scoped_out))
|
|
224
|
+
return undefined;
|
|
223
225
|
if (record.tree === null || record.tree !== tree)
|
|
224
226
|
return undefined;
|
|
225
227
|
if (!Array.isArray(record.results))
|
|
@@ -243,6 +245,7 @@ export async function writeFinalGateVerdict(artifactsDir, verdict) {
|
|
|
243
245
|
scoped_out: verdict.scoped_out,
|
|
244
246
|
outcome: verdict.outcome,
|
|
245
247
|
results: verdict.results,
|
|
248
|
+
binding: verdict.binding,
|
|
246
249
|
recorded_at: new Date().toISOString(),
|
|
247
250
|
};
|
|
248
251
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finalGate.js","sourceRoot":"","sources":["../../../src/remediate/steps/finalGate.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAC9E,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,wEAAwE;AACxE,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,gDAAgD;AAChD,EAAE;AACF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,iEAAiE;AACjE,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,2CAA2C;AAC3C,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,mEAAmE;AACnE,iFAAiF;AACjF,+BAA+B;AAC/B,sGAAsG;AACtG,0CAA0C;AAC1C,EAAE;AACF,oEAAoE;AACpE,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,4EAA4E;AAC5E,gDAAgD;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,aAAa,EACb,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,iFAAiF;AACjF,gFAAgF;AAChF,wEAAwE;AACxE,OAAO,EACL,kBAAkB,GAEnB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,GAI3B,MAAM,mBAAmB,CAAC;AAE3B,mFAAmF;AACnF,gFAAgF;AAChF,8EAA8E;AAC9E,oFAAoF;AACpF,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"finalGate.js","sourceRoot":"","sources":["../../../src/remediate/steps/finalGate.ts"],"names":[],"mappings":"AAAA,4KAA4K;AAC5K,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAC9E,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,wEAAwE;AACxE,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,gDAAgD;AAChD,EAAE;AACF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,iEAAiE;AACjE,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,2CAA2C;AAC3C,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,mEAAmE;AACnE,iFAAiF;AACjF,+BAA+B;AAC/B,sGAAsG;AACtG,0CAA0C;AAC1C,EAAE;AACF,oEAAoE;AACpE,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,4EAA4E;AAC5E,gDAAgD;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,aAAa,EACb,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,iFAAiF;AACjF,gFAAgF;AAChF,wEAAwE;AACxE,OAAO,EACL,kBAAkB,GAEnB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,GAI3B,MAAM,mBAAmB,CAAC;AAE3B,mFAAmF;AACnF,gFAAgF;AAChF,8EAA8E;AAC9E,oFAAoF;AACpF,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,CAAC;AA+F5D;;;;;GA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AS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;KACtD,CAAC;IACF,MAAM,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type FrictionTriageDecision } from "audit-tools/shared";
|
|
2
|
+
import type { RemediationState } from "../state/store.js";
|
|
3
|
+
import type { RemediationStep } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* The BLOCKING friction close-out step for a run whose walk is still owed.
|
|
6
|
+
*
|
|
7
|
+
* Emitted from `handleClosing` BEFORE the close touches disk, so the record the
|
|
8
|
+
* host is told to write (`triage.recordPath`) is the plan-keyed one this very
|
|
9
|
+
* decision just materialized — and so the run's identity in that path is the
|
|
10
|
+
* plan id, not a fallback. The step is a `closing`-phase gate: `next-step`
|
|
11
|
+
* re-decides the same walk on the next call, and only a disposed walk lets the
|
|
12
|
+
* close proceed.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildFrictionWalkStep(root: string, artifactsDir: string, state: RemediationState, triage: FrictionTriageDecision): Promise<RemediationStep>;
|
|
15
|
+
export declare function presentReportStep(root: string, artifactsDir: string, state: RemediationState | null): Promise<RemediationStep>;
|
|
16
|
+
/**
|
|
17
|
+
* The terminal friction-TRIAGE close-out for the remediate half. Thin delegation to
|
|
18
|
+
* the single-sourced `decideFrictionTriage` (`audit-tools/shared`) — the exact analog
|
|
19
|
+
* of audit-code's `decideAuditFrictionCloseout`, so the triage shape, disposition
|
|
20
|
+
* vocabulary, blocking semantics, and close-out logic cannot drift between the two
|
|
21
|
+
* halves. Drops the former false-green (an empty up-front record no longer satisfies):
|
|
22
|
+
* the blocking triage stays unsatisfied ("dispose") until every captured mechanical
|
|
23
|
+
* event AND every surfaced agent-feedback reflection carries a disposition; an empty
|
|
24
|
+
* set (zero events AND zero reflections) is trivially "disposed". Keyed only off
|
|
25
|
+
* `(artifactsDir, runId)`; never coupled to any repo's backlog doc.
|
|
26
|
+
*
|
|
27
|
+
* A state with NO plan id can name no run, and since the decision MATERIALIZES
|
|
28
|
+
* the record it keys, guessing a key there would mint one. It returns `null`
|
|
29
|
+
* instead — "there is no run here to close out", which is the truthful answer
|
|
30
|
+
* for a state whose plan is gone. Callers that hold the run's plan get a
|
|
31
|
+
* decision; callers past the run boundary get nothing to render.
|
|
32
|
+
*/
|
|
33
|
+
export declare function decideRemediateFrictionCloseout(artifactsDir: string, state: RemediationState | null): Promise<FrictionTriageDecision | null>;
|
|
34
|
+
//# sourceMappingURL=frictionCloseout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frictionCloseout.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/frictionCloseout.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkD,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAa1B;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAC7B,OAAO,CAAC,eAAe,CAAC,CA4D1B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,+BAA+B,CACnD,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAC7B,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAIxC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// sites-pinned: tests/remediate/friction-capture-closeout.test.ts
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { decideFrictionTriage, buildFrictionTriageBlock } from "audit-tools/shared";
|
|
4
|
+
import { stateRunId, requireStateRunId } from "../state/runIdentity.js";
|
|
5
|
+
import { writeCurrentStep } from "./stepWriter.js";
|
|
6
|
+
/**
|
|
7
|
+
* The BLOCKING friction close-out step for a run whose walk is still owed.
|
|
8
|
+
*
|
|
9
|
+
* Emitted from `handleClosing` BEFORE the close touches disk, so the record the
|
|
10
|
+
* host is told to write (`triage.recordPath`) is the plan-keyed one this very
|
|
11
|
+
* decision just materialized — and so the run's identity in that path is the
|
|
12
|
+
* plan id, not a fallback. The step is a `closing`-phase gate: `next-step`
|
|
13
|
+
* re-decides the same walk on the next call, and only a disposed walk lets the
|
|
14
|
+
* close proceed.
|
|
15
|
+
*/
|
|
16
|
+
export async function buildFrictionWalkStep(root, artifactsDir, state, triage) {
|
|
17
|
+
return writeCurrentStep({
|
|
18
|
+
stepKind: "close_run",
|
|
19
|
+
status: "ready",
|
|
20
|
+
runId: requireStateRunId(state),
|
|
21
|
+
repoRoot: root,
|
|
22
|
+
artifactsDir,
|
|
23
|
+
prompt: `# Remediation Run Friction Triage\n\nComplete the friction close-out walk before the run may close.\n${buildFrictionTriageBlock(triage)}`,
|
|
24
|
+
allowedCommands: [],
|
|
25
|
+
stopCondition: "Complete friction triage (write dispositions and open_observations), then call next-step again.",
|
|
26
|
+
artifactPaths: { friction_record: triage.recordPath },
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export async function presentReportStep(root, artifactsDir, state) {
|
|
30
|
+
const reportPath = join(dirname(artifactsDir), "remediation-report.md");
|
|
31
|
+
// Terminal friction-TRIAGE close-out, folded into present_report (single-sourced in
|
|
32
|
+
// `audit-tools/shared`). MANDATORY + BLOCKING: stays "dispose" until every mechanical
|
|
33
|
+
// event + reflection is disposed AND ≥1 open observation written. Never trivially
|
|
34
|
+
// satisfied by an empty event set — the host must actively confirm the friction state.
|
|
35
|
+
//
|
|
36
|
+
// NO FRICTION RECORD IS EVER MINTED HERE. The decision was made — and the
|
|
37
|
+
// record, under the run's plan-keyed path, was walked — before the close
|
|
38
|
+
// archived it: `handleClosing` consults `decideRemediateFrictionCloseout`
|
|
39
|
+
// against the LIVE state and short-circuits the close until the walk is
|
|
40
|
+
// disposed. So ON THE GREEN PATH — the close ran to `complete`, archived the
|
|
41
|
+
// run and removed the artifacts dir — the walk was already completed when the
|
|
42
|
+
// close started, the plan-keyed record left with the other deliverables, and
|
|
43
|
+
// all that is left is to RENDER the already-recorded walk for the host.
|
|
44
|
+
//
|
|
45
|
+
// NOT-GREEN IS THE OTHER HALF, and it is not "mint nothing": a close that
|
|
46
|
+
// returned a non-`complete` state PRESERVES the artifacts dir, so the record
|
|
47
|
+
// this step decides remains where the run wrote it — the caller reaches here
|
|
48
|
+
// with the saved state still carrying its plan id, `decideFrictionTriage`
|
|
49
|
+
// materializes (or re-reads) that same plan-keyed file, and the walk is
|
|
50
|
+
// rendered from the record that is still in place.
|
|
51
|
+
//
|
|
52
|
+
// It is decided — and so materialized — ONLY when the state names a run. The
|
|
53
|
+
// guard is the plan id, not the artifacts dir: the dir is not evidence of
|
|
54
|
+
// anything here, since `decideNextStepLoop` mkdirs it unconditionally on entry,
|
|
55
|
+
// `RunLogger.event` mkdirs it again for `run.log.jsonl`, and `writeJsonFile`
|
|
56
|
+
// mkdirs any parent it is handed. So a dir-existence test is true on every
|
|
57
|
+
// path, including a run whose state the close deleted. Guarding on the dir was
|
|
58
|
+
// the 2026-08-24 defect: the decider ran with a null state, took a fallback
|
|
59
|
+
// key, and because `decideFrictionTriage` MATERIALIZES the record it is given,
|
|
60
|
+
// minted a fresh EMPTY record inside the directory the close had just deleted —
|
|
61
|
+
// re-blocking the run on the record it had created. `stateRunId` now answers
|
|
62
|
+
// `null` for a planless state and this call therefore decides nothing.
|
|
63
|
+
//
|
|
64
|
+
// A `complete` state reaching here is a run that never ran the close walk (a
|
|
65
|
+
// re-delivery of an already-complete run, whose plan the state still carries),
|
|
66
|
+
// so the walk is genuinely still owed and deciding it here is correct — it
|
|
67
|
+
// renders as the blocking step. Only a planless state renders nothing.
|
|
68
|
+
const triage = await decideRemediateFrictionCloseout(artifactsDir, state);
|
|
69
|
+
const frictionBlock = triage ? buildFrictionTriageBlock(triage) : "";
|
|
70
|
+
const isBlocked = triage?.action === "dispose";
|
|
71
|
+
return writeCurrentStep({
|
|
72
|
+
stepKind: "present_report",
|
|
73
|
+
status: isBlocked ? "ready" : "complete",
|
|
74
|
+
runId: stateRunId(state),
|
|
75
|
+
repoRoot: root,
|
|
76
|
+
artifactsDir,
|
|
77
|
+
prompt: isBlocked
|
|
78
|
+
? `# Remediation Run Friction Triage\n\nComplete friction triage before presenting the report.\n${frictionBlock}`
|
|
79
|
+
: `# Present Remediation Report\n\nRead \`${reportPath}\` and summarize the remediation outcome.\nMention resolved, ignored, and deemed-inappropriate counts plus the closing action.\n${frictionBlock}`,
|
|
80
|
+
allowedCommands: [],
|
|
81
|
+
stopCondition: isBlocked
|
|
82
|
+
? "Complete friction triage (write dispositions and open_observations), then call next-step again."
|
|
83
|
+
: "Present the remediation report summary and stop.",
|
|
84
|
+
artifactPaths: {
|
|
85
|
+
final_report: reportPath,
|
|
86
|
+
...(triage ? { friction_record: triage.recordPath } : {}),
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The terminal friction-TRIAGE close-out for the remediate half. Thin delegation to
|
|
92
|
+
* the single-sourced `decideFrictionTriage` (`audit-tools/shared`) — the exact analog
|
|
93
|
+
* of audit-code's `decideAuditFrictionCloseout`, so the triage shape, disposition
|
|
94
|
+
* vocabulary, blocking semantics, and close-out logic cannot drift between the two
|
|
95
|
+
* halves. Drops the former false-green (an empty up-front record no longer satisfies):
|
|
96
|
+
* the blocking triage stays unsatisfied ("dispose") until every captured mechanical
|
|
97
|
+
* event AND every surfaced agent-feedback reflection carries a disposition; an empty
|
|
98
|
+
* set (zero events AND zero reflections) is trivially "disposed". Keyed only off
|
|
99
|
+
* `(artifactsDir, runId)`; never coupled to any repo's backlog doc.
|
|
100
|
+
*
|
|
101
|
+
* A state with NO plan id can name no run, and since the decision MATERIALIZES
|
|
102
|
+
* the record it keys, guessing a key there would mint one. It returns `null`
|
|
103
|
+
* instead — "there is no run here to close out", which is the truthful answer
|
|
104
|
+
* for a state whose plan is gone. Callers that hold the run's plan get a
|
|
105
|
+
* decision; callers past the run boundary get nothing to render.
|
|
106
|
+
*/
|
|
107
|
+
export async function decideRemediateFrictionCloseout(artifactsDir, state) {
|
|
108
|
+
const runId = stateRunId(state);
|
|
109
|
+
if (!runId)
|
|
110
|
+
return null;
|
|
111
|
+
return decideFrictionTriage(artifactsDir, runId, "remediate-code");
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=frictionCloseout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frictionCloseout.js","sourceRoot":"","sources":["../../../src/remediate/steps/frictionCloseout.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAA+B,MAAM,oBAAoB,CAAC;AAEjH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAAY,EACZ,YAAoB,EACpB,KAAuB,EACvB,MAA8B;IAE9B,OAAO,gBAAgB,CAAC;QACtB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC;QAC/B,QAAQ,EAAE,IAAI;QACd,YAAY;QACZ,MAAM,E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OAAO,CAAC,CAAC,CAAC,UAAU;QACxC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;QACxB,QAAQ,EAAE,IAAI;QACd,YAAY;QACZ,MAAM,EAAE,SAAS;YACf,CAAC,CAAC,gGAAgG,aAAa,EAAE;YACjH,CAAC,CAAC,0CAA0C,UAAU,mIAAmI,aAAa,EAAE;QAC1M,eAAe,EAAE,EAAE;QACnB,aAAa,EAAE,SAAS;YACtB,CAAC,CAAC,iGAAiG;YACnG,CAAC,CAAC,kDAAkD;QACtD,aAAa,EAAE;YACb,YAAY,EAAE,UAAU;YACxB,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1D;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,YAAoB,EACpB,KAA8B;IAE9B,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,oBAAoB,CAAC,YAAY,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -6,7 +6,7 @@ export interface FinalGateCommandSpec {
|
|
|
6
6
|
/** The package this command's unit suite targets (single-flight key), if any. */
|
|
7
7
|
package_dir?: string;
|
|
8
8
|
/** Which layer of the floor this belongs to. */
|
|
9
|
-
layer: "build" | "check" | "unit";
|
|
9
|
+
layer: "build" | "check" | "lint" | "unit";
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Whether `root` is the audit-tools monorepo — the repo the tool-owned final
|
|
@@ -192,13 +192,11 @@ export declare function carriesEnvironmentVerdict(attribution: GateRedAttributio
|
|
|
192
192
|
*/
|
|
193
193
|
export declare function renderGateAttribution(attribution: GateRedAttribution | undefined): string;
|
|
194
194
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* never references `plan.test_command`, every UNIT command is build-free, and no
|
|
199
|
-
* package's unit suite appears twice (single-flight — CE-001). Returns `[]` when
|
|
200
|
-
* `root` is not the audit-tools monorepo (the audit-tools-specific suite is
|
|
201
|
-
* inapplicable there — see `runToolOwnedFinalGate`).
|
|
195
|
+
* Repository-declared verification in build/typecheck/lint/test order. The
|
|
196
|
+
* audit-tools profile retains its build-free unit floor. An explicit test
|
|
197
|
+
* command replaces only the generic test role, never the other checks.
|
|
202
198
|
*/
|
|
203
|
-
export declare function toolOwnedFinalGateCommands(root: string): FinalGateCommandSpec[];
|
|
199
|
+
export declare function toolOwnedFinalGateCommands(root: string, testCommand?: string[]): FinalGateCommandSpec[];
|
|
200
|
+
/** Cache identity includes declarations even when the worktree probe cannot see ignored files. */
|
|
201
|
+
export declare function finalGateBinding(root: string, testCommand?: string[]): string;
|
|
204
202
|
//# sourceMappingURL=gateCommands.d.ts.map
|