audit-tools 0.51.6 → 0.51.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/clarification/blastRadius.d.ts +17 -16
- package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
- package/dist/audit/clarification/blastRadius.js +48 -44
- package/dist/audit/clarification/blastRadius.js.map +1 -1
- package/dist/audit/clarification/dials.d.ts +4 -4
- package/dist/audit/clarification/dials.d.ts.map +1 -1
- package/dist/audit/clarification/dials.js +1 -0
- package/dist/audit/clarification/dials.js.map +1 -1
- package/dist/audit/clarification/partition.d.ts +12 -21
- package/dist/audit/clarification/partition.d.ts.map +1 -1
- package/dist/audit/clarification/partition.js +52 -59
- package/dist/audit/clarification/partition.js.map +1 -1
- package/dist/audit/clarification/riskGate.d.ts +2 -2
- package/dist/audit/clarification/riskGate.d.ts.map +1 -1
- package/dist/audit/clarification/riskGate.js +1 -0
- package/dist/audit/clarification/riskGate.js.map +1 -1
- package/dist/audit/clarification/voiQueue.d.ts +3 -3
- package/dist/audit/clarification/voiQueue.d.ts.map +1 -1
- package/dist/audit/clarification/voiQueue.js +1 -0
- package/dist/audit/clarification/voiQueue.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +15 -3
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +13 -5
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.d.ts +6 -9
- package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.js +35 -47
- package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +14 -0
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterComparisonPrompt.js +111 -0
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -0
- package/dist/audit/cli/charterExtractionPrompt.d.ts +14 -17
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +81 -104
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/charterFidelityPrompt.d.ts +14 -0
- package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterFidelityPrompt.js +58 -0
- package/dist/audit/cli/charterFidelityPrompt.js.map +1 -0
- package/dist/audit/cli/conceptualDispatch.d.ts +39 -6
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +59 -12
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +46 -2
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +18 -6
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +525 -67
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +24 -0
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +9 -1
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
- package/dist/audit/cli/foldTransaction.js +14 -3
- package/dist/audit/cli/foldTransaction.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +4 -1
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
- package/dist/audit/cli/intakeCommand.js +1 -0
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +29 -15
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +53 -7
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +18 -16
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +7 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +216 -38
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +92 -28
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +371 -133
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +10 -0
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +3 -1
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +12 -0
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +242 -29
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +12 -4
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +9 -0
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +71 -30
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +29 -66
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +43 -2
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -1
- package/dist/audit/cli/stepScaffold.js +24 -10
- package/dist/audit/cli/stepScaffold.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +52 -29
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +44 -14
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +4 -1
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +65 -16
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +89 -8
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +14 -21
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +0 -1
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/decompose/findings.d.ts.map +1 -1
- package/dist/audit/decompose/findings.js +10 -2
- package/dist/audit/decompose/findings.js.map +1 -1
- package/dist/audit/extractors/designAssessment.d.ts.map +1 -1
- package/dist/audit/extractors/designAssessment.js +13 -4
- package/dist/audit/extractors/designAssessment.js.map +1 -1
- package/dist/audit/extractors/disposition.d.ts.map +1 -1
- package/dist/audit/extractors/disposition.js +17 -5
- package/dist/audit/extractors/disposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +224 -17
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/extractors/leadLineage.d.ts +10 -0
- package/dist/audit/extractors/leadLineage.d.ts.map +1 -0
- package/dist/audit/extractors/leadLineage.js +44 -0
- package/dist/audit/extractors/leadLineage.js.map +1 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +25 -8
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +76 -1
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +113 -20
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts +15 -0
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +158 -11
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +30 -4
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +30 -7
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +39 -1
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.js +4 -1
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +11 -17
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +61 -93
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts +24 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js +110 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +34 -20
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +80 -106
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts +20 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js +76 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts +7 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js +68 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +9 -8
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +7 -6
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +7 -0
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +58 -19
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +6 -2
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +22 -8
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +1 -0
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +40 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +32 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +5 -3
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +34 -5
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -1
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts +2 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +23 -10
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +1 -0
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.js +3 -1
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts +72 -0
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +177 -20
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts +56 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js +114 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts +70 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +171 -21
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +49 -25
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +7 -5
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +1 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +13 -2
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +167 -13
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +6 -5
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +117 -0
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +277 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +0 -2
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +0 -3
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/systemic/coveredThemes.d.ts +28 -0
- package/dist/audit/systemic/coveredThemes.d.ts.map +1 -0
- package/dist/audit/systemic/coveredThemes.js +52 -0
- package/dist/audit/systemic/coveredThemes.js.map +1 -0
- package/dist/audit/systemic/reviewFileMap.d.ts +81 -0
- package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -0
- package/dist/audit/systemic/reviewFileMap.js +169 -0
- package/dist/audit/systemic/reviewFileMap.js.map +1 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +149 -26
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.d.ts +44 -4
- package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +114 -10
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/charterClarification.d.ts +9 -4
- package/dist/audit/types/charterClarification.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.d.ts +48 -93
- package/dist/audit/types/charterRegister.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.js +15 -26
- package/dist/audit/types/charterRegister.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +88 -18
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +77 -16
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types/designAssessment.d.ts +8 -6
- package/dist/audit/types/designAssessment.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +2 -2
- package/dist/audit/types/systemicChallenge.d.ts +47 -9
- package/dist/audit/types/systemicChallenge.d.ts.map +1 -1
- package/dist/audit/types.d.ts +71 -10
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +23 -2
- package/dist/audit/types.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +30 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +50 -8
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.js +14 -0
- package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +97 -2
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +163 -9
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.js +93 -3
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +31 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
- package/dist/remediate/contractPipeline/derive.d.ts +0 -14
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +52 -24
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +50 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js +77 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js.map +1 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts +85 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/idRegistry.js +147 -0
- package/dist/remediate/contractPipeline/idRegistry.js.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +13 -16
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.js +15 -30
- package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +20 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.js +23 -7
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +17 -0
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +6 -9
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +183 -0
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/sketchSource.js +255 -0
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -0
- package/dist/remediate/findingFilter.d.ts.map +1 -1
- package/dist/remediate/findingFilter.js +1 -0
- package/dist/remediate/findingFilter.js.map +1 -1
- package/dist/remediate/index.d.ts +81 -0
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +162 -53
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +43 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +82 -13
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +33 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +227 -13
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +154 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +242 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -0
- package/dist/remediate/state/runStatus.d.ts +35 -0
- package/dist/remediate/state/runStatus.d.ts.map +1 -0
- package/dist/remediate/state/runStatus.js +46 -0
- package/dist/remediate/state/runStatus.js.map +1 -0
- package/dist/remediate/state/store.d.ts +52 -2
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +124 -21
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +83 -13
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +65 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +302 -85
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +58 -21
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +87 -2
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +344 -44
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +109 -5
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +135 -27
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +167 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +428 -1
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +2 -13
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +22 -4
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +44 -40
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +501 -106
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/stepWriter.d.ts +1 -1
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +1 -0
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +32 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +1 -0
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +8 -0
- package/dist/remediate/types/options.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.d.ts +8 -0
- package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.js +12 -1
- package/dist/remediate/utils/fileIntegrity.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +19 -2
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +26 -39
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +18 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +33 -5
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +83 -5
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +46 -14
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +35 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +5 -5
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +1 -0
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/clippy.d.ts +9 -1
- package/dist/shared/analyzers/clippy.d.ts.map +1 -1
- package/dist/shared/analyzers/clippy.js +10 -2
- package/dist/shared/analyzers/clippy.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +1 -0
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +7 -1
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +8 -2
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +24 -24
- package/dist/shared/analyzers/types.d.ts.map +1 -1
- package/dist/shared/analyzers/types.js +15 -0
- package/dist/shared/analyzers/types.js.map +1 -1
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +42 -7
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/chunkByBudget.d.ts.map +1 -1
- package/dist/shared/chunkByBudget.js.map +1 -1
- package/dist/shared/continuityScore.d.ts.map +1 -1
- package/dist/shared/continuityScore.js +12 -4
- package/dist/shared/continuityScore.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +49 -45
- package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
- package/dist/shared/decompose/charterClarification.js +50 -57
- package/dist/shared/decompose/charterClarification.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +616 -342
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +590 -488
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts +36 -2
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +45 -5
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts +98 -1
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +89 -8
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +111 -0
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +28 -0
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +8 -2
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findingSimilarity.d.ts +8 -0
- package/dist/shared/findingSimilarity.d.ts.map +1 -1
- package/dist/shared/findingSimilarity.js +10 -3
- package/dist/shared/findingSimilarity.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts +15 -0
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +137 -1
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +14 -1
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +4 -0
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +41 -29
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +14 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +22 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +42 -38
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +35 -23
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/clauseBoundaries.d.ts +75 -0
- package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -0
- package/dist/shared/intent/clauseBoundaries.js +134 -0
- package/dist/shared/intent/clauseBoundaries.js.map +1 -0
- package/dist/shared/intent/clauseInterpreter.d.ts +11 -5
- package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/clauseInterpreter.js +16 -41
- package/dist/shared/intent/clauseInterpreter.js.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts +11 -0
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.js +31 -17
- package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +18 -6
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +25 -5
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +30 -9
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/schemaVersion.d.ts +4 -3
- package/dist/shared/io/schemaVersion.d.ts.map +1 -1
- package/dist/shared/io/schemaVersion.js +27 -4
- package/dist/shared/io/schemaVersion.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +38 -4
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +59 -1
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +8 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/opencodePermissions.d.ts +27 -3
- package/dist/shared/opencodePermissions.d.ts.map +1 -1
- package/dist/shared/opencodePermissions.js +77 -26
- package/dist/shared/opencodePermissions.js.map +1 -1
- package/dist/shared/prompts.d.ts +12 -1
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +11 -1
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reReview/projectionDiff.d.ts +13 -0
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
- package/dist/shared/reReview/projectionDiff.js +1 -1
- package/dist/shared/reReview/projectionDiff.js.map +1 -1
- package/dist/shared/reporting/findingDisplay.d.ts +7 -0
- package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
- package/dist/shared/reporting/findingDisplay.js +8 -1
- package/dist/shared/reporting/findingDisplay.js.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.d.ts +15 -3
- package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.js +8 -6
- package/dist/shared/steps/stepEmissionScaffold.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +37 -12
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
- package/dist/shared/submission/hostHandoffCore.js +81 -18
- package/dist/shared/submission/hostHandoffCore.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +70 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +66 -1
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +86 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +108 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +1 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/analyzerDeps.d.ts +14 -0
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
- package/dist/shared/tooling/analyzerDeps.js +23 -0
- package/dist/shared/tooling/analyzerDeps.js.map +1 -1
- package/dist/shared/tooling/commandShape.d.ts +35 -1
- package/dist/shared/tooling/commandShape.d.ts.map +1 -1
- package/dist/shared/tooling/commandShape.js +66 -4
- package/dist/shared/tooling/commandShape.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +62 -4
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +127 -8
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +674 -156
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +172 -118
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/closingActions.d.ts +25 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -1
- package/dist/shared/types/closingActions.js +26 -0
- package/dist/shared/types/closingActions.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +63 -2
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +51 -0
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/contractPipeline.d.ts +1 -0
- package/dist/shared/types/contractPipeline.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline.js +1 -0
- package/dist/shared/types/contractPipeline.js.map +1 -1
- package/dist/shared/types/contractPropertyShapes.d.ts +34 -0
- package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -0
- package/dist/shared/types/contractPropertyShapes.js +255 -0
- package/dist/shared/types/contractPropertyShapes.js.map +1 -0
- package/dist/shared/types/finding.d.ts +376 -18
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +111 -0
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +214 -2
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +273 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/intentInterpretation.d.ts +1 -1
- package/dist/shared/types/intentInterpretation.js +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +294 -30
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +96 -7
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/stepContract.d.ts +47 -0
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +113 -0
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/charterGate.d.ts +13 -28
- package/dist/shared/validation/charterGate.d.ts.map +1 -1
- package/dist/shared/validation/charterGate.js +13 -35
- package/dist/shared/validation/charterGate.js.map +1 -1
- package/dist/shared/validation/contractConstructionSites.d.ts +116 -0
- package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -0
- package/dist/shared/validation/contractConstructionSites.js +277 -0
- package/dist/shared/validation/contractConstructionSites.js.map +1 -0
- package/dist/shared/validation/designFindingGrounding.d.ts +33 -4
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +40 -6
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +11 -1
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +5 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +8 -2
- package/opencode.json +29 -29
- package/package.json +16 -3
- package/schemas/audit-code-v1alpha1.schema.json +0 -4
- package/scripts/audit/postinstall.mjs +81 -96
- package/scripts/remediate/postinstall.mjs +43 -83
- package/scripts/shared/host-asset-plan.mjs +176 -0
- package/scripts/shared/install-host-assets.mjs +44 -1
- package/scripts/shared/primitives.mjs +89 -0
- package/skills/audit-code/SKILL.md +4 -4
- package/skills/audit-code/audit-code.prompt.md +14 -10
- package/skills/remediate-code/SKILL.md +9 -5
- package/skills/remediate-code/remediate-code.prompt.md +11 -4
- package/wrapper/audit-code-wrapper-build.mjs +6 -3
- package/dist/audit/cli/charterDeltaPrompt.d.ts +0 -18
- package/dist/audit/cli/charterDeltaPrompt.d.ts.map +0 -1
- package/dist/audit/cli/charterDeltaPrompt.js +0 -150
- package/dist/audit/cli/charterDeltaPrompt.js.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts +0 -24
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.js +0 -128
- package/dist/audit/orchestrator/charterDeltaExecutor.js.map +0 -1
- package/dist/audit/supervisor/runLedger.d.ts +0 -3
- package/dist/audit/supervisor/runLedger.d.ts.map +0 -1
- package/dist/audit/supervisor/runLedger.js +0 -69
- package/dist/audit/supervisor/runLedger.js.map +0 -1
- package/dist/shared/types/executionRecord.d.ts +0 -58
- package/dist/shared/types/executionRecord.d.ts.map +0 -1
- package/dist/shared/types/executionRecord.js +0 -26
- package/dist/shared/types/executionRecord.js.map +0 -1
- package/dist/shared/types/runLedger.d.ts +0 -17
- package/dist/shared/types/runLedger.d.ts.map +0 -1
- package/dist/shared/types/runLedger.js +0 -7
- package/dist/shared/types/runLedger.js.map +0 -1
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
// INV-RS-10: the final completion gate is a TOOL-OWNED, NON-VACUOUS suite that
|
|
20
20
|
// is INDEPENDENT of any `plan.test_command`. A run can only land green when this
|
|
21
21
|
// suite passes; a vacuous/unset `plan.test_command` can never substitute for it.
|
|
22
|
-
// The suite is executed through the env-scrubbing `runTracked
|
|
23
|
-
//
|
|
24
|
-
//
|
|
22
|
+
// The suite is executed through the env-scrubbing `runTracked` (the async twin),
|
|
23
|
+
// whose `stripAuditToolsControlEnv` drops exactly ONE variable —
|
|
24
|
+
// `AUDIT_TOOLS_CALLER_CWD`, the wrapper's one-hop caller-cwd stamp. It does NOT
|
|
25
|
+
// strip CLAUDECODE / CLAUDE_CODE_*, so the gate's environment is the host's; what
|
|
26
|
+
// the scrub guarantees is that a child cannot read the parent's location as its
|
|
27
|
+
// own, not that the child is session-free.
|
|
25
28
|
//
|
|
26
29
|
// Hard floor (always run, in order — single package, single-flight build — CE-001):
|
|
27
30
|
// 1. npm run build (one tsc build for the whole package)
|
|
@@ -38,8 +41,12 @@
|
|
|
38
41
|
// gate must converge deterministically, so they are surfaced for a separate
|
|
39
42
|
// pass instead of being able to strand the run.
|
|
40
43
|
import { join } from "node:path";
|
|
41
|
-
import { writeJsonFile,
|
|
42
|
-
import
|
|
44
|
+
import { discardOnSchemaVersionMismatch, readOptionalJsonFile, writeJsonFile, runTrackedAsync, } from "audit-tools/shared";
|
|
45
|
+
// Deep import: the CDC-25-era exports of the shared outcome contract are not yet
|
|
46
|
+
// re-exported through the `audit-tools/shared` barrel (outside this work item's
|
|
47
|
+
// allowed_files) — the same note `close.ts` and `state/types.ts` carry.
|
|
48
|
+
import { carriesGateVerdict, } from "../../shared/types/remediationOutcome.js";
|
|
49
|
+
import { attributeGateRed, isAuditToolsMonorepo, toolOwnedFinalGateCommands, } from "./gateCommands.js";
|
|
43
50
|
// `FinalGateCommandSpec`, `isAuditToolsMonorepo`, and `toolOwnedFinalGateCommands`
|
|
44
51
|
// are single-sourced in the leaf module `gateCommands.ts` (so `dispatch.ts` can
|
|
45
52
|
// derive the same pinned merged-base check without an import cycle). Imported
|
|
@@ -60,22 +67,32 @@ function outputTail(value) {
|
|
|
60
67
|
? text
|
|
61
68
|
: `…${text.slice(text.length - GATE_OUTPUT_TAIL_LIMIT)}`;
|
|
62
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* The runtime/packaging surface the hard floor does NOT gate (CE-002), declared
|
|
72
|
+
* as a residual for a separate pass. A CONSTANT rather than a literal built per
|
|
73
|
+
* run, because a verdict served from the cache has to carry the same declaration
|
|
74
|
+
* a fresh run would — the residual is a property of the floor, not of the
|
|
75
|
+
* evaluation that happened to observe it.
|
|
76
|
+
*/
|
|
77
|
+
export const RUNTIME_RESIDUAL_DECLARATION = {
|
|
78
|
+
surface: "runtime/packaged-bin smokes (verify:release)",
|
|
79
|
+
commands: [
|
|
80
|
+
"npm run smoke:packaged-audit-code",
|
|
81
|
+
"npm run smoke:packaged-remediate-code",
|
|
82
|
+
],
|
|
83
|
+
};
|
|
63
84
|
/**
|
|
64
85
|
* Run the tool-owned final gate (INV-RS-10). Each command runs through the
|
|
65
|
-
* shared `
|
|
86
|
+
* shared async `runTrackedAsync`, which scrubs the wrapper's
|
|
87
|
+
* `AUDIT_TOOLS_CALLER_CWD` stamp (and nothing else — see `finalGate.ts`'s file
|
|
88
|
+
* header; the host's session variables reach the child unchanged).
|
|
66
89
|
* The first failing command short-circuits the floor (a broken build makes the
|
|
67
90
|
* later layers meaningless). A `runner` may be injected for tests. When the
|
|
68
91
|
* audit-tools suite does not apply (non-monorepo target), the gate is
|
|
69
92
|
* `scoped_out` (does not block) rather than vacuously passing.
|
|
70
93
|
*/
|
|
71
94
|
export async function runToolOwnedFinalGate(root, opts = {}) {
|
|
72
|
-
const runtime_residual =
|
|
73
|
-
surface: "runtime/packaged-bin smokes (verify:release)",
|
|
74
|
-
commands: [
|
|
75
|
-
"npm run smoke:packaged-audit-code",
|
|
76
|
-
"npm run smoke:packaged-remediate-code",
|
|
77
|
-
],
|
|
78
|
-
};
|
|
95
|
+
const runtime_residual = RUNTIME_RESIDUAL_DECLARATION;
|
|
79
96
|
const commands = toolOwnedFinalGateCommands(root);
|
|
80
97
|
if (commands.length === 0) {
|
|
81
98
|
// Audit-tools-specific suite does not apply here — declared scope, not a
|
|
@@ -92,24 +109,32 @@ export async function runToolOwnedFinalGate(root, opts = {}) {
|
|
|
92
109
|
};
|
|
93
110
|
}
|
|
94
111
|
const runner = opts.runner ??
|
|
95
|
-
((argv, cwd, packageDir) => {
|
|
112
|
+
(async (argv, cwd, packageDir) => {
|
|
96
113
|
const [command, ...args] = argv;
|
|
97
114
|
// Package-scoped unit suites run with cwd at the package (no `npm -w`); the
|
|
98
115
|
// monorepo-root build/check commands run at the repo root.
|
|
99
116
|
const effectiveCwd = packageDir ? join(root, packageDir) : cwd;
|
|
100
|
-
//
|
|
101
|
-
|
|
117
|
+
// runTrackedAsync strips AUDIT_TOOLS_CALLER_CWD, the wrapper's one-hop
|
|
118
|
+
// caller-cwd stamp (INV-RS-10) — it does not clear the host session's
|
|
119
|
+
// own variables, and this comment used to claim it did.
|
|
120
|
+
//
|
|
121
|
+
// ASYNC, and this one is a liveness requirement rather than a style
|
|
122
|
+
// choice. The phase-boundary gate runs INLINE inside `advanceUnderPhaseLock`,
|
|
123
|
+
// with `<artifactsDir>/phase.lock` HELD, and the floor's unit leg is a whole
|
|
124
|
+
// vitest run — minutes. A synchronous child blocks the event loop for its
|
|
125
|
+
// entire duration, so the lock's `setInterval` mtime heartbeat cannot fire
|
|
126
|
+
// and a LIVE lock reads as stale to the next acquirer, which steals it out
|
|
127
|
+
// from under the run mid-gate (the CP-NODE-5 lock-hazard class; the same
|
|
128
|
+
// reason every closing spawn is awaited). Awaiting keeps the loop turning
|
|
129
|
+
// for the whole suite.
|
|
130
|
+
const result = await runTrackedAsync([command, ...args], {
|
|
102
131
|
cwd: effectiveCwd,
|
|
103
|
-
|
|
104
|
-
//
|
|
105
|
-
// run minutes; one hour is a bound, not a budget. This runner executes
|
|
106
|
-
// outside any held file lock, so the bound guards only against a child
|
|
107
|
-
// that never exits.
|
|
132
|
+
// Declared bound: full suites legitimately run minutes; one hour is a
|
|
133
|
+
// bound, not a budget — it guards only against a child that never exits.
|
|
108
134
|
timeout: 3_600_000,
|
|
109
135
|
});
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
// nothing an operator could read.
|
|
136
|
+
// The captured streams are returned, not just the status: a red gate that
|
|
137
|
+
// persisted nothing an operator could read was the defect this carries.
|
|
113
138
|
return {
|
|
114
139
|
status: result.status,
|
|
115
140
|
stdout: result.stdout,
|
|
@@ -119,7 +144,9 @@ export async function runToolOwnedFinalGate(root, opts = {}) {
|
|
|
119
144
|
const results = [];
|
|
120
145
|
let passed = true;
|
|
121
146
|
for (const spec of commands) {
|
|
122
|
-
|
|
147
|
+
// `await` is correct for an injected synchronous runner too — awaiting a
|
|
148
|
+
// non-promise yields the value unchanged — so a stub needs no migration.
|
|
149
|
+
const { status, stdout, stderr } = await runner(spec.argv, root, spec.package_dir);
|
|
123
150
|
const cmdPassed = status === 0;
|
|
124
151
|
const stdoutTail = cmdPassed ? undefined : outputTail(stdout);
|
|
125
152
|
const stderrTail = cmdPassed ? undefined : outputTail(stderr);
|
|
@@ -147,6 +174,8 @@ export async function runToolOwnedFinalGate(root, opts = {}) {
|
|
|
147
174
|
}
|
|
148
175
|
const FINAL_GATE_STATE_FILENAME = "final-gate.json";
|
|
149
176
|
const FINAL_GATE_OUTCOME_FILENAME = "final-gate-outcome.json";
|
|
177
|
+
const FINAL_GATE_VERDICT_FILENAME = "final-gate-verdict.json";
|
|
178
|
+
const FINAL_GATE_VERDICT_VERSION = "remediate-code-final-gate-verdict/v1alpha1";
|
|
150
179
|
/**
|
|
151
180
|
* Where the failing gate run is recorded, relative to the artifacts dir. The
|
|
152
181
|
* step prompt carries this PATH and the failing command line — never the tail
|
|
@@ -165,6 +194,66 @@ export function finalGateRecordPath(artifactsDir) {
|
|
|
165
194
|
export function finalGateOutcomePath(artifactsDir) {
|
|
166
195
|
return join(artifactsDir, FINAL_GATE_OUTCOME_FILENAME);
|
|
167
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Where the {@link FinalGateVerdictRecord} lives. ONE file, overwritten: it
|
|
199
|
+
* describes the LAST evaluation, and a run has one boundary at a time. Never a
|
|
200
|
+
* history — an accumulating cache would grow a log nothing reads.
|
|
201
|
+
*/
|
|
202
|
+
export function finalGateVerdictPath(artifactsDir) {
|
|
203
|
+
return join(artifactsDir, FINAL_GATE_VERDICT_FILENAME);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Read the cached verdict for `scope`, or `undefined` when there is none to
|
|
207
|
+
* serve: absent, unreadable, unparseable, written by a different record version,
|
|
208
|
+
* for a different scope, or about a different (or unknown) tree.
|
|
209
|
+
*
|
|
210
|
+
* Every one of those degrades to "run the floor", which is the safe direction —
|
|
211
|
+
* a cache miss costs a gate run, a false hit certifies a tree nobody checked.
|
|
212
|
+
* Never throws.
|
|
213
|
+
*/
|
|
214
|
+
export async function readFinalGateVerdict(artifactsDir, scope, tree) {
|
|
215
|
+
if (tree === null)
|
|
216
|
+
return undefined;
|
|
217
|
+
const raw = await readOptionalJsonFile(finalGateVerdictPath(artifactsDir)).catch(() => undefined);
|
|
218
|
+
const record = discardOnSchemaVersionMismatch(raw, FINAL_GATE_VERDICT_VERSION);
|
|
219
|
+
if (record === undefined || record === null)
|
|
220
|
+
return undefined;
|
|
221
|
+
if (record.scope !== scope)
|
|
222
|
+
return undefined;
|
|
223
|
+
if (record.tree === null || record.tree !== tree)
|
|
224
|
+
return undefined;
|
|
225
|
+
if (!Array.isArray(record.results))
|
|
226
|
+
return undefined;
|
|
227
|
+
return record;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Record a gate verdict against the tree it was reached on. Overwrites.
|
|
231
|
+
*
|
|
232
|
+
* TWO ARTIFACTS, ONE ANSWER: the caller writes {@link writeFinalGateOutcomeRecord}
|
|
233
|
+
* from the same values, so the outcome artifact and this cache can never disagree
|
|
234
|
+
* about whether a floor ran and what it said.
|
|
235
|
+
*/
|
|
236
|
+
export async function writeFinalGateVerdict(artifactsDir, verdict) {
|
|
237
|
+
const path = finalGateVerdictPath(artifactsDir);
|
|
238
|
+
const record = {
|
|
239
|
+
schema_version: FINAL_GATE_VERDICT_VERSION,
|
|
240
|
+
scope: verdict.scope,
|
|
241
|
+
tree: verdict.tree,
|
|
242
|
+
passed: verdict.passed,
|
|
243
|
+
scoped_out: verdict.scoped_out,
|
|
244
|
+
outcome: verdict.outcome,
|
|
245
|
+
results: verdict.results,
|
|
246
|
+
recorded_at: new Date().toISOString(),
|
|
247
|
+
};
|
|
248
|
+
try {
|
|
249
|
+
await writeJsonFile(path, record);
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
// Best-effort in the same direction the read is safe: a verdict that cannot
|
|
253
|
+
// be persisted costs the NEXT call a re-run, and never corrupts this one.
|
|
254
|
+
}
|
|
255
|
+
return path;
|
|
256
|
+
}
|
|
168
257
|
/**
|
|
169
258
|
* Record what a gate evaluation was. Overwrites: the file describes the CURRENT
|
|
170
259
|
* gate state of the run, the same way {@link writeFinalGateRedRecord} does for a
|
|
@@ -176,7 +265,7 @@ export function finalGateOutcomePath(artifactsDir) {
|
|
|
176
265
|
*/
|
|
177
266
|
export async function writeFinalGateOutcomeRecord(artifactsDir, outcome) {
|
|
178
267
|
const path = finalGateOutcomePath(artifactsDir);
|
|
179
|
-
const ran = outcome.outcome
|
|
268
|
+
const ran = carriesGateVerdict(outcome.outcome);
|
|
180
269
|
const record = {
|
|
181
270
|
schema_version: "remediate-code-final-gate-outcome/v1alpha1",
|
|
182
271
|
scope: outcome.scope,
|
|
@@ -193,9 +282,27 @@ export async function writeFinalGateOutcomeRecord(artifactsDir, outcome) {
|
|
|
193
282
|
* Record the failing command of a red gate run. Overwrites: the file describes
|
|
194
283
|
* the CURRENT reason the run is paused, and a repeat next-step that still finds
|
|
195
284
|
* the suite red rewrites it rather than accumulating a history nothing reads.
|
|
285
|
+
*
|
|
286
|
+
* `root` and `state` are what attribution reads; both are optional so a caller
|
|
287
|
+
* that has no state (or a test asserting the record's shape alone) still gets a
|
|
288
|
+
* valid record, degraded to no attribution rather than a refusal. The tail that
|
|
289
|
+
* is SCANNED is the same tail that is PERSISTED — never the whole suite log,
|
|
290
|
+
* which the record deliberately does not carry.
|
|
196
291
|
*/
|
|
197
|
-
export async function writeFinalGateRedRecord(artifactsDir, scope, failed) {
|
|
292
|
+
export async function writeFinalGateRedRecord(artifactsDir, scope, failed, attributionInput) {
|
|
198
293
|
const path = finalGateRecordPath(artifactsDir);
|
|
294
|
+
let attribution;
|
|
295
|
+
if (attributionInput && failed) {
|
|
296
|
+
// Never let the diagnostic take down the gate: attribution is derived from
|
|
297
|
+
// git and the filesystem, and a red gate on a broken tree is exactly when
|
|
298
|
+
// those can misbehave. A failure to attribute is "no verdict", not a throw
|
|
299
|
+
// that replaces the red record with a crash.
|
|
300
|
+
attribution = await attributeGateRed({
|
|
301
|
+
root: attributionInput.root,
|
|
302
|
+
state: attributionInput.state,
|
|
303
|
+
output: `${failed.stdout_tail ?? ""}\n${failed.stderr_tail ?? ""}`,
|
|
304
|
+
}).catch(() => undefined);
|
|
305
|
+
}
|
|
199
306
|
const record = {
|
|
200
307
|
schema_version: "remediate-code-final-gate/v1alpha1",
|
|
201
308
|
scope,
|
|
@@ -209,6 +316,7 @@ export async function writeFinalGateRedRecord(artifactsDir, scope, failed) {
|
|
|
209
316
|
...(failed?.stderr_tail === undefined
|
|
210
317
|
? {}
|
|
211
318
|
: { stderr_tail: failed.stderr_tail }),
|
|
319
|
+
...(attribution === undefined ? {} : { attribution }),
|
|
212
320
|
};
|
|
213
321
|
await writeJsonFile(path, record);
|
|
214
322
|
return path;
|
|
@@ -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,
|
|
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,E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,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;QACxC,GAAG,CAAC,WAAW,KAAK,SAAS,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"}
|
|
@@ -24,6 +24,173 @@ export interface FinalGateCommandSpec {
|
|
|
24
24
|
* one). A tree that cannot run the suite is OUT of scope, not failing it.
|
|
25
25
|
*/
|
|
26
26
|
export declare function isAuditToolsMonorepo(root: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The slice of remediation state red attribution reads. Declared structurally
|
|
29
|
+
* rather than imported so this leaf module keeps its position outside the state
|
|
30
|
+
* module's import graph — `dispatch.ts` and `nextStep.ts` both import it, and
|
|
31
|
+
* `nextStep.ts` owns the state type (the same reason the command spec lives
|
|
32
|
+
* here at all).
|
|
33
|
+
*
|
|
34
|
+
* `run_baseline_diff` is the one member that is NOT a persisted field: the gate
|
|
35
|
+
* derives it from `root` beside the state and hands it over on the same object,
|
|
36
|
+
* so there is exactly one shape flowing into {@link attributeGateRed} rather than
|
|
37
|
+
* a state argument and a loose path array that can drift apart.
|
|
38
|
+
*/
|
|
39
|
+
export interface RemediationGateState {
|
|
40
|
+
/** The union of every landed host result's corroborated changed-file set. */
|
|
41
|
+
applied_edit_surface?: readonly string[];
|
|
42
|
+
/** Paths dirty at run start — pre-existing dirt the run cannot own. */
|
|
43
|
+
run_start_dirty?: readonly string[];
|
|
44
|
+
/** Paths dirty relative to the run-start baseline (derived at the gate). */
|
|
45
|
+
run_baseline_diff?: readonly string[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* How many failing paths a red record names. Bounded like the output tails
|
|
49
|
+
* beside it: this lands in a durable artifact a prompt POINTS AT, and a red on a
|
|
50
|
+
* badly broken tree can implicate hundreds of files. The COUNT is always
|
|
51
|
+
* recorded; only the sample is capped.
|
|
52
|
+
*/
|
|
53
|
+
export declare const GATE_ATTRIBUTION_SAMPLE_LIMIT = 20;
|
|
54
|
+
/** The attribution verdict carried on a red gate record. */
|
|
55
|
+
export interface GateRedAttribution {
|
|
56
|
+
/**
|
|
57
|
+
* `run` — at least one failing path is one the run itself touched.
|
|
58
|
+
* `environment` — a non-empty failing set of NON-TEST paths, none of which the
|
|
59
|
+
* run touched: the dirt is not this run's doing. FAIL-CLOSED
|
|
60
|
+
* on the test-file case — see {@link isTestFilePath}: a red
|
|
61
|
+
* located in a test file names a path a run edits source and
|
|
62
|
+
* never touches, so it can never be the evidence that excuses
|
|
63
|
+
* the run.
|
|
64
|
+
* `unattributable` — no failing path could be harvested (the command failed
|
|
65
|
+
* before naming files), the run touched nothing, or every
|
|
66
|
+
* failing path is a test file with no overlap. Stated as its
|
|
67
|
+
* own value rather than folded into either side: "no evidence"
|
|
68
|
+
* is not "evidence of innocence", and the predecessor's whole
|
|
69
|
+
* failure was GUESSING which of the two an unattributable red
|
|
70
|
+
* was.
|
|
71
|
+
*/
|
|
72
|
+
verdict: "run" | "environment" | "unattributable";
|
|
73
|
+
/** The run-touched paths the gate could derive, normalized and sorted. */
|
|
74
|
+
run_paths_considered: string[];
|
|
75
|
+
/** Failing paths that ARE in the run's touched set (capped, sorted). */
|
|
76
|
+
run_paths: string[];
|
|
77
|
+
/** Failing paths that are NOT (capped, sorted) — present when the verdict is `environment`. */
|
|
78
|
+
foreign_paths: string[];
|
|
79
|
+
/** How many failing paths were harvested in total, before the sample cap. */
|
|
80
|
+
failing_paths_count: number;
|
|
81
|
+
/** How the paths were read — the honest label for the derivation below. */
|
|
82
|
+
source: "diff-against-run-start-baseline" | "none";
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Whether `path` is a TEST file — a file a suite RUNS rather than one the run
|
|
86
|
+
* was asked to WRITE.
|
|
87
|
+
*
|
|
88
|
+
* This is not a heuristic about importance; it is the boundary of the edit
|
|
89
|
+
* surface. A remediation run edits source, and a test file it did not edit
|
|
90
|
+
* cannot have been broken by it — but a suite that fails PRINTS the failing
|
|
91
|
+
* test file, so every red whose failure is located in a test names a path the
|
|
92
|
+
* run never touched. {@link attributeGateRed} intersects the printed paths with
|
|
93
|
+
* the run's touched set, so without this the intersection is empty and the
|
|
94
|
+
* verdict is `environment` — the fail-OPEN answer that tells the host to skip
|
|
95
|
+
* work it owes. A test red is therefore never `environment`.
|
|
96
|
+
*
|
|
97
|
+
* Language-neutral by construction: `*.test.*` / `*.spec.*` (JS/TS/Ruby/Python
|
|
98
|
+
* variants) and the `test` / `tests` / `__tests__` segment conventions. A
|
|
99
|
+
* language this misses degrades to the safe direction — an unrecognised test
|
|
100
|
+
* file is treated as source, so the red attributes to the RUN.
|
|
101
|
+
*/
|
|
102
|
+
export declare function isTestFilePath(path: string): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The CONTENT identity of the working tree — what a gate verdict is valid for.
|
|
105
|
+
*
|
|
106
|
+
* The property it serves: a verdict is about a TREE, so re-running a 2–5 minute
|
|
107
|
+
* whole-repo floor against a tree that has not changed since the last verdict is
|
|
108
|
+
* pure waste (the backlog entry: "the phase-boundary repository gate re-runs on
|
|
109
|
+
* EVERY next-step at the boundary … it runs once per boundary and its verdict is
|
|
110
|
+
* cached against the tree hash"). Two runs over identical content against an
|
|
111
|
+
* identical environment cannot disagree, so the second one is redundant.
|
|
112
|
+
*
|
|
113
|
+
* DERIVED BY GIT, from the bytes, through a TEMPORARY index: `GIT_INDEX_FILE`
|
|
114
|
+
* points into the run's scratch, `git read-tree HEAD` seeds it, `git add -A`
|
|
115
|
+
* writes the working tree into it, and `git write-tree` returns ONE tree id.
|
|
116
|
+
* (Same plumbing as `scripts/shared/worktree-tree.mjs`, the repo's prior art for
|
|
117
|
+
* this identity — reproduced here rather than imported, because that module is a
|
|
118
|
+
* build-time script and this is shipped code.)
|
|
119
|
+
*
|
|
120
|
+
* WHY NOT A HAND-ROLLED DIGEST. The predecessor read each dirty path itself
|
|
121
|
+
* through `normalizeRepoPath` — a lower-casing COMPARISON key — so on a
|
|
122
|
+
* case-sensitive checkout two different contents of `src/auditStep.ts` hashed to
|
|
123
|
+
* the same id, and a git-quoted non-ASCII path was dropped outright on win32.
|
|
124
|
+
* Both are silent: the id still looks like an id, and a collision serves a
|
|
125
|
+
* verdict for a tree nobody judged. `git write-tree` cannot have either failure,
|
|
126
|
+
* because git never re-derives the path from a comparison key — it hashes the
|
|
127
|
+
* bytes it hashed before.
|
|
128
|
+
*
|
|
129
|
+
* TWO CARVE-OUTS, both because the gate would otherwise invalidate its own
|
|
130
|
+
* verdict the instant it was written:
|
|
131
|
+
* • IGNORED FILES stay out, by construction — `git add -A` honors .gitignore
|
|
132
|
+
* exactly as a commit would. `dist/` is a build OUTPUT the gate's own build
|
|
133
|
+
* leg rewrites, and `.audit-tools/` is this repo's ignored scratch, so
|
|
134
|
+
* keying on either makes every verdict one-shot.
|
|
135
|
+
* • {@link RUN_SCRATCH_PREFIX} is subtracted explicitly, for the case where
|
|
136
|
+
* the run's artifacts dir is NOT ignored in the target repository (an
|
|
137
|
+
* artifacts dir outside a repo whose .gitignore knows about it). Same reason
|
|
138
|
+
* red attribution exempts it: the step contract, the run log and state.json
|
|
139
|
+
* are rewritten by the very call that reaches the gate, so an un-exempted
|
|
140
|
+
* scratch would move the tree on every call and the cache could never hit.
|
|
141
|
+
*
|
|
142
|
+
* The residual that follows, stated where the cache is read as well: an
|
|
143
|
+
* out-of-tree change (a dependency install, an environment change) under
|
|
144
|
+
* unchanged content is NOT detected, and neither is a change confined to ignored
|
|
145
|
+
* files or to the run's own scratch.
|
|
146
|
+
*
|
|
147
|
+
* `null` is "cannot tell" — not a repository, no HEAD yet, or any step of the
|
|
148
|
+
* plumbing failing for any reason. A PARTIAL id is never returned: half an
|
|
149
|
+
* identity is worse than none, because it would still be a key. Callers must
|
|
150
|
+
* treat `null` as NO IDENTITY: never as a cache key, and never as a match.
|
|
151
|
+
* Never throws; a gate must not fail on the diagnostic it was deriving.
|
|
152
|
+
*/
|
|
153
|
+
export declare function worktreeContentId(root: string): Promise<string | null>;
|
|
154
|
+
/**
|
|
155
|
+
* Attribute a red gate to the run or to the environment (the backlog entry:
|
|
156
|
+
* "a gate red is attributed to run-touched paths where possible, so foreign
|
|
157
|
+
* live-tree dirt reports as environment rather than as the run's failure").
|
|
158
|
+
*
|
|
159
|
+
* The gate itself stays whole-repo and non-mutating — this ADDS a verdict to the
|
|
160
|
+
* record and never changes what the run does with it. Nothing is re-opened, no
|
|
161
|
+
* item moves, and the pause is exactly as resumable as before.
|
|
162
|
+
*
|
|
163
|
+
* `run_start_dirty` is excluded from the run's own set on purpose: dirt that
|
|
164
|
+
* predates the run cannot be the run's edit. Same rule, same reason, as
|
|
165
|
+
* `resolveEditSurfaceManifest`. It is folded in here only to produce
|
|
166
|
+
* `run_paths_considered` when the edit surface is empty.
|
|
167
|
+
*/
|
|
168
|
+
export declare function attributeGateRed(params: {
|
|
169
|
+
root: string;
|
|
170
|
+
state: RemediationGateState;
|
|
171
|
+
output: string;
|
|
172
|
+
}): Promise<GateRedAttribution>;
|
|
173
|
+
/**
|
|
174
|
+
* Whether a red may carry the "not this run's doing" directive.
|
|
175
|
+
*
|
|
176
|
+
* The ONE draw of that question, shared by the renderer and by anything asking
|
|
177
|
+
* the same thing, so the directive and the verdict that licenses it cannot be
|
|
178
|
+
* two separate hand-written lists. `environment` is the only verdict whose every
|
|
179
|
+
* failing path is a non-test file outside the run's surface; anything else —
|
|
180
|
+
* including `unattributable`, which is what a test red degrades to — carries no
|
|
181
|
+
* such claim.
|
|
182
|
+
*/
|
|
183
|
+
export declare function carriesEnvironmentVerdict(attribution: GateRedAttribution | undefined): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Render the attribution verdict for the paused step's prompt.
|
|
186
|
+
*
|
|
187
|
+
* ALWAYS returns a block, including for `unattributable` — the three verdicts
|
|
188
|
+
* are three DIFFERENT things for the host to do (fix the run's work / confirm
|
|
189
|
+
* unrelated dirt / investigate with no path evidence at all), and a missing
|
|
190
|
+
* block would collapse the third into silence. Never the raw path lists in full:
|
|
191
|
+
* the record holds them, and the prompt names the record.
|
|
192
|
+
*/
|
|
193
|
+
export declare function renderGateAttribution(attribution: GateRedAttribution | undefined): string;
|
|
27
194
|
/**
|
|
28
195
|
* The tool-owned final-gate command list (INV-RS-10) for the audit-tools
|
|
29
196
|
* monorepo. Pure and deterministic so tests can assert: it is non-vacuous
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateCommands.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/gateCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gateCommands.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/gateCommands.ts"],"names":[],"mappings":"AAoBA,gDAAgD;AAChD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mFAAmF;IACnF,UAAU,EAAE,OAAO,CAAC;IACpB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC;AASD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAW1D;AA0BD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,uEAAuE;IACvE,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,4DAA4D;AAC5D,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;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