audit-tools 0.52.5 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/cli/auditStep.d.ts +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +2 -2
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +6 -5
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +3 -16
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +22 -1
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.js +1 -1
- package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
- package/dist/audit/cli/functionalPreflight.d.ts.map +1 -1
- package/dist/audit/cli/functionalPreflight.js +6 -3
- package/dist/audit/cli/functionalPreflight.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +57 -34
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +3 -3
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +52 -77
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +1 -2
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +2 -12
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +2 -2
- package/dist/audit/cli/semanticReviewStep.d.ts +11 -2
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +14 -10
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +14 -14
- package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +1 -3
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +2 -3
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +21 -1
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.d.ts +25 -0
- package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -0
- package/dist/audit/orchestrator/architectureDiscovery.js +193 -0
- package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts +20 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +47 -0
- 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 +37 -3
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts +2 -6
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +2 -6
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +2 -2
- package/dist/audit/orchestrator/designReviewPrompt.js +2 -2
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts +2 -3
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +2 -3
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +1 -22
- 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 +0 -12
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +38 -37
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +2 -28
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +4 -37
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/obligationDerive.d.ts +2 -3
- package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationDerive.js +2 -3
- package/dist/audit/orchestrator/obligationDerive.js.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.d.ts +2 -0
- package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.js +5 -1
- package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +9 -0
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
- package/dist/audit/orchestrator/resultBaseline.d.ts +5 -5
- package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultBaseline.js +24 -47
- package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +2 -0
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +14 -10
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.js +1 -1
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +3 -0
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/flowCoverage.d.ts +6 -6
- package/dist/audit/types.d.ts +24 -13
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +92 -11
- package/dist/audit/types.js.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.d.ts +1908 -0
- package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/executionPlan.js +467 -0
- package/dist/remediate/contractPipeline/executionPlan.js.map +1 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +12 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js +41 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -0
- package/dist/remediate/dedup/crossLensDedup.d.ts +3 -16
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.js +2 -32
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
- package/dist/remediate/index.d.ts +2 -19
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +22 -138
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +10 -10
- package/dist/remediate/intent/intentOrdering.d.ts +6 -8
- package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
- package/dist/remediate/intent/intentOrdering.js +24 -47
- package/dist/remediate/intent/intentOrdering.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +25 -17
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +278 -218
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeAcceptance.d.ts +42 -0
- package/dist/remediate/phases/closeAcceptance.d.ts.map +1 -0
- package/dist/remediate/phases/closeAcceptance.js +66 -0
- package/dist/remediate/phases/closeAcceptance.js.map +1 -0
- package/dist/remediate/phases/closeReviewProvenance.d.ts +1 -1
- package/dist/remediate/phases/closeReviewProvenance.d.ts.map +1 -1
- package/dist/remediate/phases/closeReviewProvenance.js +9 -8
- package/dist/remediate/phases/closeReviewProvenance.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +11 -9
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +21 -86
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +30 -19
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
- package/dist/remediate/phases/plan.d.ts +3 -60
- package/dist/remediate/phases/plan.d.ts.map +1 -1
- package/dist/remediate/phases/plan.js +3 -227
- package/dist/remediate/phases/plan.js.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +19 -30
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/riskSignal.d.ts +9 -43
- package/dist/remediate/riskSignal.d.ts.map +1 -1
- package/dist/remediate/riskSignal.js +7 -28
- package/dist/remediate/riskSignal.js.map +1 -1
- package/dist/remediate/state/disposition.d.ts +2 -1
- package/dist/remediate/state/disposition.d.ts.map +1 -1
- package/dist/remediate/state/disposition.js +37 -1
- package/dist/remediate/state/disposition.js.map +1 -1
- package/dist/remediate/state/runIdentity.d.ts +2 -13
- package/dist/remediate/state/runIdentity.d.ts.map +1 -1
- package/dist/remediate/state/runIdentity.js +3 -13
- package/dist/remediate/state/runIdentity.js.map +1 -1
- package/dist/remediate/state/store.d.ts +12 -36
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +58 -150
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +406 -504
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +24 -104
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +7 -661
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +264 -3851
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +20 -142
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +48 -581
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +4 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +6 -3
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.d.ts +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +4 -21
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +161 -383
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +34 -0
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +44 -4
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/frictionCloseout.d.ts +1 -30
- package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
- package/dist/remediate/steps/frictionCloseout.js +6 -99
- package/dist/remediate/steps/frictionCloseout.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +2 -15
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +254 -1042
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.js +16 -16
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/stepUtils.d.ts +1 -1
- package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +9 -0
- package/dist/remediate/types/options.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +10 -56
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts +2 -2
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +17 -77
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/remediate/validation/verificationReport.d.ts +3 -0
- package/dist/remediate/validation/verificationReport.d.ts.map +1 -0
- package/dist/remediate/validation/verificationReport.js +28 -0
- package/dist/remediate/validation/verificationReport.js.map +1 -0
- package/dist/shared/analyzers/types.d.ts +10 -10
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/friction/triage.d.ts +7 -28
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +7 -28
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/graph/orderedReachability.js +1 -1
- package/dist/shared/graph/orderedReachability.js.map +1 -1
- package/dist/shared/index.d.ts +5 -6
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +3 -4
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +37 -5
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/prompts.d.ts +24 -10
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +27 -13
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
- package/dist/shared/reReview/projectionDiff.js +6 -14
- package/dist/shared/reReview/projectionDiff.js.map +1 -1
- package/dist/shared/types/executionPlan.d.ts +416 -0
- package/dist/shared/types/executionPlan.d.ts.map +1 -0
- package/dist/shared/types/executionPlan.js +132 -0
- package/dist/shared/types/executionPlan.js.map +1 -0
- package/dist/shared/types/remediationOutcome.d.ts +1378 -12
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +29 -1
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/{contractPipeline/verification.d.ts → verificationReport.d.ts} +9 -37
- package/dist/shared/types/verificationReport.d.ts.map +1 -0
- package/dist/shared/types/verificationReport.js +4 -0
- package/dist/shared/types/verificationReport.js.map +1 -0
- package/dist/shared/validation/findingGrounding.d.ts +3 -5
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +4 -7
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/package.json +2 -1
- package/scripts/shared/primitives.mjs +20 -0
- package/skills/audit-code/SKILL.md +5 -12
- package/skills/audit-code/audit-code.prompt.md +5 -8
- package/skills/audit-code/opencode-command-template.txt +2 -2
- package/skills/remediate-code/SKILL.md +5 -7
- package/skills/remediate-code/remediate-code.prompt.md +5 -5
- package/dispatch/lens-definitions.json +0 -46
- package/dist/remediate/contractPipeline/artifactNames.d.ts +0 -8
- package/dist/remediate/contractPipeline/artifactNames.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/artifactNames.js +0 -28
- package/dist/remediate/contractPipeline/artifactNames.js.map +0 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +0 -219
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/artifactStore.js +0 -436
- package/dist/remediate/contractPipeline/artifactStore.js.map +0 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts +0 -130
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/changeClassification.js +0 -446
- package/dist/remediate/contractPipeline/changeClassification.js.map +0 -1
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts +0 -28
- package/dist/remediate/contractPipeline/contractReviewBinding.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/contractReviewBinding.js +0 -75
- package/dist/remediate/contractPipeline/contractReviewBinding.js.map +0 -1
- package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts +0 -27
- package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/counterexampleFingerprint.js +0 -37
- package/dist/remediate/contractPipeline/counterexampleFingerprint.js.map +0 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +0 -131
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +0 -257
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +0 -1
- package/dist/remediate/contractPipeline/derive.d.ts +0 -173
- package/dist/remediate/contractPipeline/derive.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/derive.js +0 -477
- package/dist/remediate/contractPipeline/derive.js.map +0 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +0 -50
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.js +0 -77
- package/dist/remediate/contractPipeline/finalizedContractFields.js.map +0 -1
- package/dist/remediate/contractPipeline/idRegistry.d.ts +0 -144
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/idRegistry.js +0 -214
- package/dist/remediate/contractPipeline/idRegistry.js.map +0 -1
- package/dist/remediate/contractPipeline/obligationKinds.d.ts +0 -27
- package/dist/remediate/contractPipeline/obligationKinds.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/obligationKinds.js +0 -18
- package/dist/remediate/contractPipeline/obligationKinds.js.map +0 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +0 -125
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/phaseCut.js +0 -339
- package/dist/remediate/contractPipeline/phaseCut.js.map +0 -1
- package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts +0 -31
- package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/phaseCutArtifact.js +0 -48
- package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +0 -1
- package/dist/remediate/contractPipeline/repairState.d.ts +0 -110
- package/dist/remediate/contractPipeline/repairState.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/repairState.js +0 -185
- package/dist/remediate/contractPipeline/repairState.js.map +0 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +0 -79
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.js +0 -140
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +0 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +0 -64
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +0 -136
- package/dist/remediate/contractPipeline/semanticProjection.js.map +0 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +0 -194
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/sketchSource.js +0 -262
- package/dist/remediate/contractPipeline/sketchSource.js.map +0 -1
- package/dist/remediate/contractPipeline/testPlanCarry.d.ts +0 -17
- package/dist/remediate/contractPipeline/testPlanCarry.d.ts.map +0 -1
- package/dist/remediate/contractPipeline/testPlanCarry.js +0 -72
- package/dist/remediate/contractPipeline/testPlanCarry.js.map +0 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts +0 -7
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/marshal.js +0 -11
- package/dist/remediate/steps/dispatch/marshal.js.map +0 -1
- package/dist/remediate/validation/contractPipeline.d.ts +0 -35
- package/dist/remediate/validation/contractPipeline.d.ts.map +0 -1
- package/dist/remediate/validation/contractPipeline.js +0 -613
- package/dist/remediate/validation/contractPipeline.js.map +0 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +0 -272
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +0 -1
- package/dist/remediate/validation/contractPipelineGates.js +0 -1397
- package/dist/remediate/validation/contractPipelineGates.js.map +0 -1
- package/dist/shared/types/contractPipeline/design.d.ts +0 -79
- package/dist/shared/types/contractPipeline/design.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/design.js +0 -16
- package/dist/shared/types/contractPipeline/design.js.map +0 -1
- package/dist/shared/types/contractPipeline/goal.d.ts +0 -41
- package/dist/shared/types/contractPipeline/goal.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/goal.js +0 -10
- package/dist/shared/types/contractPipeline/goal.js.map +0 -1
- package/dist/shared/types/contractPipeline/implementation.d.ts +0 -118
- package/dist/shared/types/contractPipeline/implementation.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/implementation.js +0 -13
- package/dist/shared/types/contractPipeline/implementation.js.map +0 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +0 -283
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/obligations.js +0 -84
- package/dist/shared/types/contractPipeline/obligations.js.map +0 -1
- package/dist/shared/types/contractPipeline/verification.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline/verification.js +0 -10
- package/dist/shared/types/contractPipeline/verification.js.map +0 -1
- package/dist/shared/types/contractPipeline.d.ts +0 -48
- package/dist/shared/types/contractPipeline.d.ts.map +0 -1
- package/dist/shared/types/contractPipeline.js +0 -32
- package/dist/shared/types/contractPipeline.js.map +0 -1
- package/dist/shared/types/obligationLedger.d.ts +0 -39
- package/dist/shared/types/obligationLedger.d.ts.map +0 -1
- package/dist/shared/types/obligationLedger.js +0 -49
- package/dist/shared/types/obligationLedger.js.map +0 -1
|
@@ -1,89 +1,23 @@
|
|
|
1
1
|
import type { Evidence } from "../../shared/types/remediationOutcome.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PerFindingDisposition, RemediationItemState, RemediationPlan, SourceVerification, FindingDisposition } from "../state/types.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* (`buildRemediationOutcomesReport` in `close.ts`) refuses that override unless
|
|
9
|
-
* the item also carries a complete `evidence` triple and the module stamp that
|
|
10
|
-
* recorded it. Nothing wrote those three fields, so both dispositions were
|
|
11
|
-
* dead letters: the only route from a determination to run state was a human
|
|
12
|
-
* transcribing a markdown document no code reads.
|
|
4
|
+
* Source-specific read-at-HEAD verification. A source is eligible when every
|
|
5
|
+
* linked execution unit claims verified no-change, or the accepted plan
|
|
6
|
+
* explicitly proposes already-fixed/refuted. One shared unit never shares a
|
|
7
|
+
* verdict across its original findings.
|
|
13
8
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
9
|
+
* Two reads are required: B is the audit's recorded commit, never remediation's
|
|
10
|
+
* start or an internal graph baseline. Present at B and absent at HEAD supports
|
|
11
|
+
* verified_already_fixed; absent at B supports refuted; present at both withholds
|
|
12
|
+
* judgment. Missing B, dirty-at-audit files, missing/ambiguous quotes and unreadable
|
|
13
|
+
* sources withhold rather than guessing. The existing exact matching/provenance
|
|
14
|
+
* mechanisms below enforce those distinctions.
|
|
20
15
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* read). A read at HEAD ALONE cannot support either verdict:
|
|
27
|
-
*
|
|
28
|
-
* span at B | span at HEAD | result
|
|
29
|
-
* ----------|--------------|------------------------------------------
|
|
30
|
-
* present | absent | `verified_already_fixed` — the code the audit
|
|
31
|
-
* | | read is gone; the fix landed.
|
|
32
|
-
* absent | (any) | `refuted` — the audit read a location that
|
|
33
|
-
* | | never showed the span it quoted.
|
|
34
|
-
* present | present | WITHHELD — the cited code still stands, so
|
|
35
|
-
* | | this leg makes no determination at all.
|
|
36
|
-
* B unknown/unreadable | WITHHELD, with the reason.
|
|
37
|
-
*
|
|
38
|
-
* The single-read form this leg used to carry was WRONG in both directions, and
|
|
39
|
-
* the two errors were mirror images. It called "span still present at HEAD"
|
|
40
|
-
* `refuted` on the stated ground that "the cited location never showed the
|
|
41
|
-
* defect" — an inference no read at HEAD can make. A span still standing proves
|
|
42
|
-
* only that the code the finding quoted is still there; if the defect was real
|
|
43
|
-
* when the audit read it, it is still real. Symmetrically it called "span absent
|
|
44
|
-
* at HEAD" `verified_already_fixed`, when an absent span has TWO causes: the
|
|
45
|
-
* code changed after the audit read it (the fix landed), or the span was never
|
|
46
|
-
* in the file (a misquote — the `refuted` case). B is what tells them apart, so
|
|
47
|
-
* without B neither verdict is reachable and every candidate is withheld.
|
|
48
|
-
*
|
|
49
|
-
* ── WHERE B COMES FROM ──────────────────────────────────────────────────────
|
|
50
|
-
* B must be a commit the AUDIT itself recorded. A remediation-side commit is
|
|
51
|
-
* NOT B: code can change between the audit and the remediation run, so a span
|
|
52
|
-
* absent at the remediation's own start could be a fix made in between rather
|
|
53
|
-
* than a misquote — the very confusion this leg exists to avoid. The obvious
|
|
54
|
-
* candidate, the host-handoff `baseline_commit`, is exactly that remediation-
|
|
55
|
-
* side value and is therefore refused here BY NAME. So is
|
|
56
|
-
* `artifact_metadata.git_history_baseline.head`: it is HEAD at the audit's last
|
|
57
|
-
* git-history re-mine, an internal staleness cache, not what synthesis read.
|
|
58
|
-
*
|
|
59
|
-
* B is `state.plan.audit_read` — the findings contract's `audit_read`
|
|
60
|
-
* (`AuditReadSchema`), which audit synthesis records and the TOOL stamps onto
|
|
61
|
-
* the plan at plan application from the validated source report (never from the
|
|
62
|
-
* host-writable extracted plan). It is state, not an override: there is no seam
|
|
63
|
-
* through which a caller can hand this leg a different commit.
|
|
64
|
-
*
|
|
65
|
-
* `audit_read` is more than a commit because the audit reads the WORKING TREE.
|
|
66
|
-
* For a path in `audit_read.dirty_paths` the blob at B is NOT what the audit
|
|
67
|
-
* read, so a span "absent at B" there could simply have been uncommitted —
|
|
68
|
-
* reading it would manufacture a `refuted`. Such a candidate is WITHHELD.
|
|
69
|
-
*
|
|
70
|
-
* `null`/absent means no commit is known (a report from a non-git tree, a plan
|
|
71
|
-
* with no audit-side source, a state persisted before the field existed): every
|
|
72
|
-
* candidate is withheld. A B that does not resolve to a real commit in this repo
|
|
73
|
-
* is refused as unknown rather than read.
|
|
74
|
-
*
|
|
75
|
-
* PROVENANCE IS STRUCTURAL. Only `resolved_no_change` items are considered: the
|
|
76
|
-
* host has already asserted "I changed nothing because nothing needed
|
|
77
|
-
* changing", so this leg CONFIRMS or leaves that assertion standing — it can
|
|
78
|
-
* never manufacture a disposition for an item nobody resolved. The outcome is
|
|
79
|
-
* then still subject to the writer's own backstop, which refuses a triple whose
|
|
80
|
-
* mechanism contradicts the disposition (`mechanismContradictsOutcome`) or that
|
|
81
|
-
* arrives incomplete; a mechanism/disposition pair is reachable here only
|
|
82
|
-
* because the branch above chose both together.
|
|
83
|
-
*
|
|
84
|
-
* It is a close-gate VERIFY leg, never a `CLOSING_ACTIONS` entry: it runs
|
|
85
|
-
* beside `verifyAnalyzerLeads`, dispatches no host work, and a run with no
|
|
86
|
-
* qualifying item is a no-op.
|
|
16
|
+
* Every eligible source is rechecked; old determinations are cleared before the
|
|
17
|
+
* read. New evidence records bind the source content and reviewed plan revision
|
|
18
|
+
* and name the actual HEAD. Reporting independently refuses incomplete,
|
|
19
|
+
* contradictory, or stale source evidence. Captured analyzer verdicts remain
|
|
20
|
+
* independent of the source's read-at-HEAD determination.
|
|
87
21
|
*/
|
|
88
22
|
export interface HeadEvidenceOverrides {
|
|
89
23
|
/**
|
|
@@ -117,7 +51,7 @@ export interface HeadEvidenceOutcome {
|
|
|
117
51
|
head: string | null;
|
|
118
52
|
/** The audit-read commit `B`, when one was supplied AND resolved; null otherwise. */
|
|
119
53
|
base: string | null;
|
|
120
|
-
/** Per finding_id, the triple + disposition this leg
|
|
54
|
+
/** Per finding_id, the triple + disposition this leg recorded in source_verifications. */
|
|
121
55
|
recorded: Record<string, HeadEvidenceRecord>;
|
|
122
56
|
/** Candidate items the leg declined to determine, with the reason. */
|
|
123
57
|
withheld: HeadEvidenceRecord[];
|
|
@@ -126,10 +60,11 @@ export interface HeadEvidenceOutcome {
|
|
|
126
60
|
export declare const HEAD_EVIDENCE_MODULE = "closeVerifyHeadEvidence";
|
|
127
61
|
export declare function verifyHeadEvidenceAgainstFindings(params: {
|
|
128
62
|
state: {
|
|
129
|
-
plan?: {
|
|
130
|
-
findings?: Finding[];
|
|
63
|
+
plan?: Pick<RemediationPlan, "findings" | "units" | "source_dispositions" | "review_revision_sha256"> & {
|
|
131
64
|
audit_read?: unknown;
|
|
132
|
-
}
|
|
65
|
+
};
|
|
66
|
+
source_verifications?: Record<string, SourceVerification>;
|
|
67
|
+
finding_dispositions?: Record<string, FindingDisposition>;
|
|
133
68
|
items?: Record<string, RemediationItemState> | undefined;
|
|
134
69
|
};
|
|
135
70
|
root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeVerifyHeadEvidence.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/closeVerifyHeadEvidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"closeVerifyHeadEvidence.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/closeVerifyHeadEvidence.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,KAAK,EAAW,qBAAqB,EAAE,oBAAoB,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvJ;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACtF;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,qBAAqB,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC;IAClB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,GAAG,EAAE,OAAO,CAAC;IACb,0FAA0F;IAC1F,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,qFAAqF;IACrF,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,0FAA0F;IAC1F,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC7C,sEAAsE;IACtE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAUD,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAuM9D,wBAAsB,iCAAiC,CAAC,MAAM,EAAE;IAC9D,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,OAAO,GAAG,qBAAqB,GAAG,wBAAwB,CAAC,GAAG;YAAE,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QACjI,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;QAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;QAC1D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAAG,SAAS,CAAC;KAC1D,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA6G/B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { contentSha256 } from "../../shared/submission/hostHandoffCore.js";
|
|
1
2
|
// sites-pinned: tests/remediate/close-verify-head-evidence.test.ts
|
|
2
3
|
import { auditReadOf, enumerateTrackedFilePaths, fileContentAtRef, gitRefExists, headCommit, isBareBasename, normalizeForMatch, normalizeRepoPath, quoteMatches, resolveBasenameToTrackedPath, stripEmittedLinePrefix, toPosixPath, } from "audit-tools/shared";
|
|
3
4
|
const NO_OP = {
|
|
@@ -178,21 +179,26 @@ async function determine(params) {
|
|
|
178
179
|
}
|
|
179
180
|
export async function verifyHeadEvidenceAgainstFindings(params) {
|
|
180
181
|
const { state, root, overrides } = params;
|
|
181
|
-
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
182
|
+
// Verification is source-scoped: one unit can serve several sources and
|
|
183
|
+
// one source can require several units. Never copy one source's verdict to
|
|
184
|
+
// its siblings merely because they share an implementation assignment.
|
|
185
|
+
const candidates = (state.plan?.findings ?? []).filter(finding => {
|
|
186
|
+
if (state.finding_dispositions?.[finding.id])
|
|
187
|
+
return false;
|
|
188
|
+
const disposition = state.plan?.source_dispositions.find(entry => entry.finding_id === finding.id);
|
|
189
|
+
if (disposition?.status === "already_fixed" || disposition?.status === "refuted")
|
|
190
|
+
return true;
|
|
191
|
+
const units = (state.plan?.units ?? []).filter(unit => unit.source_finding_ids.includes(finding.id));
|
|
192
|
+
return units.length > 0 && units.every(unit => state.items?.[unit.id]?.status === "resolved_no_change");
|
|
193
|
+
}).map(finding => ({ finding }));
|
|
194
|
+
for (const { finding } of candidates) {
|
|
195
|
+
const old = state.source_verifications?.[finding.id];
|
|
196
|
+
if (old) {
|
|
197
|
+
// A previous read is not authority for this HEAD. Retain the independent
|
|
198
|
+
// analyzer leg, but remove any stale source determination before rereading.
|
|
199
|
+
state.source_verifications[finding.id] = old.mechanical_verification
|
|
200
|
+
? { mechanical_verification: old.mechanical_verification } : {};
|
|
201
|
+
}
|
|
196
202
|
}
|
|
197
203
|
if (candidates.length === 0)
|
|
198
204
|
return NO_OP;
|
|
@@ -235,7 +241,7 @@ export async function verifyHeadEvidenceAgainstFindings(params) {
|
|
|
235
241
|
((readRoot, ref, file) => fileContentAtRef(readRoot, ref, file));
|
|
236
242
|
const recorded = {};
|
|
237
243
|
const withheld = [];
|
|
238
|
-
for (const {
|
|
244
|
+
for (const { finding } of candidates) {
|
|
239
245
|
const verdict = await determine({
|
|
240
246
|
root,
|
|
241
247
|
head,
|
|
@@ -253,9 +259,14 @@ export async function verifyHeadEvidenceAgainstFindings(params) {
|
|
|
253
259
|
});
|
|
254
260
|
continue;
|
|
255
261
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
state.source_verifications ??= {};
|
|
263
|
+
state.source_verifications[finding.id] = {
|
|
264
|
+
...state.source_verifications[finding.id],
|
|
265
|
+
disposition_override: verdict.disposition, evidence: verdict.evidence,
|
|
266
|
+
recorded_by_module: HEAD_EVIDENCE_MODULE,
|
|
267
|
+
review_revision_sha256: state.plan.review_revision_sha256,
|
|
268
|
+
source_sha256: contentSha256(finding), head_commit: head,
|
|
269
|
+
};
|
|
259
270
|
recorded[finding.id] = {
|
|
260
271
|
finding_id: finding.id,
|
|
261
272
|
determined: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeVerifyHeadEvidence.js","sourceRoot":"","sources":["../../../src/remediate/phases/closeVerifyHeadEvidence.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EACL,WAAW,EACX,yBAAyB,EACzB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,sBAAsB,EACtB,WAAW,GACZ,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"closeVerifyHeadEvidence.js","sourceRoot":"","sources":["../../../src/remediate/phases/closeVerifyHeadEvidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,mEAAmE;AACnE,OAAO,EACL,WAAW,EACX,yBAAyB,EACzB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,sBAAsB,EACtB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAkE5B,MAAM,KAAK,GAAwB;IACjC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF,uFAAuF;AACvF,MAAM,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CAAC,QAAQ;YACrE,kBAAkB,EAAE,oBAAoB;YACxC,sBAAsB,EAAE,KAAK,CAAC,IAAK,CAAC,sBAAsB;YAC1D,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,IAAI;SACzD,CAAC;QACF,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG;YACrB,UAAU,EAAE,OAAO,CAAC,EAAE;YACtB,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type
|
|
3
|
-
/**
|
|
4
|
-
* Whether a parsed JSON value claims the audit-findings contract — the ROUTING
|
|
5
|
-
* predicate for structured vs markdown/freeform input.
|
|
6
|
-
*
|
|
7
|
-
* INV-remediate-state-07: contract_version presence and expected value are
|
|
8
|
-
* enforced here — an absent or mismatched contract_version never routes
|
|
9
|
-
* structured. Deliberately NOT the full strict validator: a report that claims
|
|
10
|
-
* the contract but is internally invalid must enter the structured path and be
|
|
11
|
-
* refused there with its real issues, not silently fall through to the
|
|
12
|
-
* markdown parser.
|
|
13
|
-
*/
|
|
1
|
+
import type { Finding, ExecutionUnit, CoverageLedger } from "../state/types.js";
|
|
2
|
+
import { type AuditFindingsReport } from "audit-tools/shared";
|
|
14
3
|
export declare function isAuditFindingsReport(value: unknown): value is AuditFindingsReport;
|
|
15
|
-
export { ESTIMATED_PROMPT_OVERHEAD_TOKENS as ESTIMATED_BLOCK_BASE_TOKENS, ESTIMATED_ITEM_OVERHEAD_TOKENS as ESTIMATED_FINDING_OVERHEAD_TOKENS, } from "audit-tools/shared";
|
|
16
|
-
export declare function estimateGroupTokens(findingIds: string[], findings: Finding[], fileByteCounts: Map<string, number>, root?: string): number;
|
|
17
|
-
/**
|
|
18
|
-
* Account for every finding the plan received: each is marked `planned` (kept and
|
|
19
|
-
* mapped to a block), `folded_into` (merged into a survivor by cross-lens dedup),
|
|
20
|
-
* `dropped_no_evidence` (excluded for carrying no evidence), `dropped_by_checkpoint`,
|
|
21
|
-
* or `dropped_phantom_paths` (every cited path was phantom, post-repair). The
|
|
22
|
-
* dispositions are mutually exclusive and cover the whole source set, so nothing
|
|
23
|
-
* is lost silently. Kept extracted findings additionally carry their grounding
|
|
24
|
-
* annotations (stripped phantom paths, evidence-grounded flag).
|
|
25
|
-
*/
|
|
26
4
|
export declare function buildCoverageLedger(params: {
|
|
27
5
|
planId: string;
|
|
28
6
|
sourceFindings: Finding[];
|
|
@@ -44,41 +22,6 @@ export declare function buildCoverageLedger(params: {
|
|
|
44
22
|
reason: string;
|
|
45
23
|
}>;
|
|
46
24
|
mergeMap: Map<string, string>;
|
|
47
|
-
|
|
25
|
+
units: ExecutionUnit[];
|
|
48
26
|
}): CoverageLedger;
|
|
49
|
-
/**
|
|
50
|
-
* Reconcile blocks whose findings touch a shared file.
|
|
51
|
-
*
|
|
52
|
-
* A3 decomposition seam: two blocks that share a canonical physical file but come
|
|
53
|
-
* from INDEPENDENT findings (distinct finding ids, no dependency edge ordering
|
|
54
|
-
* them) are NO LONGER unioned into one serial block. They are kept SEPARATE and
|
|
55
|
-
* each is flagged `cofile_parallel_safe=true` — a mechanical decision that the
|
|
56
|
-
* findings are independent, NOT a proof of edit-region disjointness; correctness
|
|
57
|
-
* is enforced later at merge by git (a real overlap surfaces as a conflict). Only
|
|
58
|
-
* a genuine ordering dependency (an existing dependency edge between the two
|
|
59
|
-
* blocks) keeps them serialized — and ordered blocks were never unioned anyway,
|
|
60
|
-
* they simply run in dependency order. A single finding whose fix spans multiple
|
|
61
|
-
* regions of one file is one block already and is never split.
|
|
62
|
-
*
|
|
63
|
-
* File identity uses `canonicalizeFilePath` (the one M1-BOUNDARY scheme) so
|
|
64
|
-
* `src/A.ts`, `./src/A.ts`, `src\A.ts` and case variants collide on one key.
|
|
65
|
-
* Pure; preserves the auditor's structure otherwise.
|
|
66
|
-
*/
|
|
67
|
-
export declare function mergeBlocksSharingFiles(blocks: RemediationBlock[], findings: Finding[], root?: string): RemediationBlock[];
|
|
68
|
-
/**
|
|
69
|
-
* Applies the backend-independent post-dedup steps that every plan must go through
|
|
70
|
-
* before being handed off to the implement phase:
|
|
71
|
-
*
|
|
72
|
-
* 1. mergeBlocksSharingFiles — preserves content-coherent membership while
|
|
73
|
-
* annotating independent co-file work
|
|
74
|
-
* 2. addAdvisoryTokenEstimates — reports deterministic local size metadata
|
|
75
|
-
* 3. snapshotAffectedFileHashes — records trusted baseline hashes
|
|
76
|
-
*
|
|
77
|
-
* Sole caller is handlePendingExtractedPlan (LLM-extracted plans join site);
|
|
78
|
-
* kept as its own function so the post-dedup logic has one home.
|
|
79
|
-
*/
|
|
80
|
-
export declare function applyPlanPipeline(plan: RemediationPlan, options: {
|
|
81
|
-
root: string;
|
|
82
|
-
artifactsDir?: string;
|
|
83
|
-
}): Promise<RemediationPlan>;
|
|
84
27
|
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/plan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACrG,OAAO,EAAiD,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE7G,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB,GAAG,cAAc,CA0FjB"}
|
|
@@ -1,132 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { canonicalizeFilePath, claimsAuditFindingsContract, compareCodeUnits } from "audit-tools/shared";
|
|
3
|
-
import { readdirSync, statSync } from "node:fs";
|
|
4
|
-
import { snapshotAffectedFileHashes } from "../utils/fileIntegrity.js";
|
|
5
|
-
import { estimateTokensFromBytes, ESTIMATED_PROMPT_OVERHEAD_TOKENS, ESTIMATED_ITEM_OVERHEAD_TOKENS, } from "audit-tools/shared";
|
|
6
|
-
/**
|
|
7
|
-
* Whether a parsed JSON value claims the audit-findings contract — the ROUTING
|
|
8
|
-
* predicate for structured vs markdown/freeform input.
|
|
9
|
-
*
|
|
10
|
-
* INV-remediate-state-07: contract_version presence and expected value are
|
|
11
|
-
* enforced here — an absent or mismatched contract_version never routes
|
|
12
|
-
* structured. Deliberately NOT the full strict validator: a report that claims
|
|
13
|
-
* the contract but is internally invalid must enter the structured path and be
|
|
14
|
-
* refused there with its real issues, not silently fall through to the
|
|
15
|
-
* markdown parser.
|
|
16
|
-
*/
|
|
1
|
+
import { claimsAuditFindingsContract, compareCodeUnits } from "audit-tools/shared";
|
|
17
2
|
export function isAuditFindingsReport(value) {
|
|
18
3
|
return claimsAuditFindingsContract(value);
|
|
19
4
|
}
|
|
20
|
-
// Block-sizing constants: now single-sourced from audit-tools/shared.
|
|
21
|
-
// Re-exported under their legacy names so any callers outside this package
|
|
22
|
-
// (and dispatch.ts) can migrate to the shared constants at their own pace.
|
|
23
|
-
export { ESTIMATED_PROMPT_OVERHEAD_TOKENS as ESTIMATED_BLOCK_BASE_TOKENS, ESTIMATED_ITEM_OVERHEAD_TOKENS as ESTIMATED_FINDING_OVERHEAD_TOKENS, } from "audit-tools/shared";
|
|
24
|
-
const PLAN_WALK_SKIP_DIRS = new Set([
|
|
25
|
-
"node_modules", ".git", "dist", "build", "coverage", "out", ".audit-tools",
|
|
26
|
-
]);
|
|
27
|
-
function walkDirBytes(dir, maxFiles = 200) {
|
|
28
|
-
let total = 0;
|
|
29
|
-
let count = 0;
|
|
30
|
-
const stack = [dir];
|
|
31
|
-
while (stack.length > 0 && count < maxFiles) {
|
|
32
|
-
const cur = stack.pop();
|
|
33
|
-
try {
|
|
34
|
-
for (const entry of readdirSync(cur, { withFileTypes: true })) {
|
|
35
|
-
if (PLAN_WALK_SKIP_DIRS.has(entry.name))
|
|
36
|
-
continue;
|
|
37
|
-
const full = join(cur, entry.name);
|
|
38
|
-
if (entry.isDirectory()) {
|
|
39
|
-
stack.push(full);
|
|
40
|
-
}
|
|
41
|
-
else if (entry.isFile()) {
|
|
42
|
-
count++;
|
|
43
|
-
try {
|
|
44
|
-
total += statSync(full).size;
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
// ignore unreadable files
|
|
48
|
-
}
|
|
49
|
-
if (count >= maxFiles)
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return total;
|
|
59
|
-
}
|
|
60
|
-
function isDirectoryPath(filePath, root) {
|
|
61
|
-
const fullPath = isAbsolute(filePath) ? filePath : join(root, filePath);
|
|
62
|
-
try {
|
|
63
|
-
return statSync(fullPath).isDirectory();
|
|
64
|
-
}
|
|
65
|
-
catch {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// Phase 2: size by bytes from a stat (no full-file reads) rather than counting
|
|
70
|
-
// lines, and convert to tokens via the shared estimator.
|
|
71
|
-
function fileSizeBytes(filePath, root) {
|
|
72
|
-
const fullPath = isAbsolute(filePath) ? filePath : join(root, filePath);
|
|
73
|
-
try {
|
|
74
|
-
const st = statSync(fullPath);
|
|
75
|
-
return st.isDirectory() ? walkDirBytes(fullPath) : st.size;
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
return 0;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export function estimateGroupTokens(findingIds, findings, fileByteCounts,
|
|
82
|
-
// CE-008: when `root` is supplied, file keys are resolved to the M1-BOUNDARY
|
|
83
|
-
// canonical physical-file identity so a file cited under two spellings is
|
|
84
|
-
// de-duplicated to ONE entry and resolves to the byte-count map keyed the same
|
|
85
|
-
// way. When omitted, raw spellings are used as keys (callers that pre-key the
|
|
86
|
-
// byte-count map by raw path keep working unchanged).
|
|
87
|
-
root) {
|
|
88
|
-
const fileKey = (p) => root === undefined ? p : canonicalizeFilePath(p, { root });
|
|
89
|
-
const uniqueFiles = new Set();
|
|
90
|
-
const findingMap = new Map(findings.map((f) => [f.id, f]));
|
|
91
|
-
for (const id of findingIds) {
|
|
92
|
-
for (const af of findingMap.get(id)?.affected_files ?? [])
|
|
93
|
-
uniqueFiles.add(fileKey(af.path));
|
|
94
|
-
}
|
|
95
|
-
const totalBytes = [...uniqueFiles].reduce((sum, p) => sum + (fileByteCounts.get(p) ?? 0), 0);
|
|
96
|
-
return (ESTIMATED_PROMPT_OVERHEAD_TOKENS +
|
|
97
|
-
estimateTokensFromBytes(totalBytes) +
|
|
98
|
-
findingIds.length * ESTIMATED_ITEM_OVERHEAD_TOKENS);
|
|
99
|
-
}
|
|
100
|
-
function addAdvisoryTokenEstimates(blocks, findings, root) {
|
|
101
|
-
const findingMap = new Map(findings.map((finding) => [finding.id, finding]));
|
|
102
|
-
const files = new Map();
|
|
103
|
-
for (const block of blocks) {
|
|
104
|
-
for (const findingId of block.items) {
|
|
105
|
-
for (const affectedFile of findingMap.get(findingId)?.affected_files ?? []) {
|
|
106
|
-
const key = canonicalizeFilePath(affectedFile.path, { root });
|
|
107
|
-
if (!files.has(key))
|
|
108
|
-
files.set(key, affectedFile.path);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
const byteCounts = new Map();
|
|
113
|
-
for (const [key, path] of files) {
|
|
114
|
-
byteCounts.set(key, fileSizeBytes(path, root));
|
|
115
|
-
}
|
|
116
|
-
return blocks.map((block) => ({
|
|
117
|
-
...block,
|
|
118
|
-
token_estimate: estimateGroupTokens(block.items, findings, byteCounts, root),
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Account for every finding the plan received: each is marked `planned` (kept and
|
|
123
|
-
* mapped to a block), `folded_into` (merged into a survivor by cross-lens dedup),
|
|
124
|
-
* `dropped_no_evidence` (excluded for carrying no evidence), `dropped_by_checkpoint`,
|
|
125
|
-
* or `dropped_phantom_paths` (every cited path was phantom, post-repair). The
|
|
126
|
-
* dispositions are mutually exclusive and cover the whole source set, so nothing
|
|
127
|
-
* is lost silently. Kept extracted findings additionally carry their grounding
|
|
128
|
-
* annotations (stripped phantom paths, evidence-grounded flag).
|
|
129
|
-
*/
|
|
130
5
|
export function buildCoverageLedger(params) {
|
|
131
6
|
const dropped = new Set(params.droppedNoEvidence);
|
|
132
7
|
const byCheckpoint = new Set(params.droppedByCheckpoint);
|
|
@@ -194,10 +69,10 @@ export function buildCoverageLedger(params) {
|
|
|
194
69
|
finding_id: f.id,
|
|
195
70
|
title: f.title,
|
|
196
71
|
disposition: "planned",
|
|
197
|
-
|
|
72
|
+
unit_ids: params.units.filter(unit => unit.source_finding_ids.includes(f.id)).map(unit => unit.id),
|
|
198
73
|
...groundingAnnotations(f),
|
|
199
74
|
};
|
|
200
|
-
});
|
|
75
|
+
}).map(entry => ({ ...entry, finding: params.sourceFindings.find(finding => finding.id === entry.finding_id) }));
|
|
201
76
|
const count = (d) => entries.filter((e) => e.disposition === d).length;
|
|
202
77
|
return {
|
|
203
78
|
contract_version: "remediate-code-coverage/v1alpha1",
|
|
@@ -212,103 +87,4 @@ export function buildCoverageLedger(params) {
|
|
|
212
87
|
entries,
|
|
213
88
|
};
|
|
214
89
|
}
|
|
215
|
-
/**
|
|
216
|
-
* Reconcile blocks whose findings touch a shared file.
|
|
217
|
-
*
|
|
218
|
-
* A3 decomposition seam: two blocks that share a canonical physical file but come
|
|
219
|
-
* from INDEPENDENT findings (distinct finding ids, no dependency edge ordering
|
|
220
|
-
* them) are NO LONGER unioned into one serial block. They are kept SEPARATE and
|
|
221
|
-
* each is flagged `cofile_parallel_safe=true` — a mechanical decision that the
|
|
222
|
-
* findings are independent, NOT a proof of edit-region disjointness; correctness
|
|
223
|
-
* is enforced later at merge by git (a real overlap surfaces as a conflict). Only
|
|
224
|
-
* a genuine ordering dependency (an existing dependency edge between the two
|
|
225
|
-
* blocks) keeps them serialized — and ordered blocks were never unioned anyway,
|
|
226
|
-
* they simply run in dependency order. A single finding whose fix spans multiple
|
|
227
|
-
* regions of one file is one block already and is never split.
|
|
228
|
-
*
|
|
229
|
-
* File identity uses `canonicalizeFilePath` (the one M1-BOUNDARY scheme) so
|
|
230
|
-
* `src/A.ts`, `./src/A.ts`, `src\A.ts` and case variants collide on one key.
|
|
231
|
-
* Pure; preserves the auditor's structure otherwise.
|
|
232
|
-
*/
|
|
233
|
-
export function mergeBlocksSharingFiles(blocks, findings, root = ".") {
|
|
234
|
-
if (blocks.length < 2)
|
|
235
|
-
return blocks;
|
|
236
|
-
const findingMap = new Map(findings.map((f) => [f.id, f]));
|
|
237
|
-
const byId = new Map(blocks.map((b) => [b.block_id, b]));
|
|
238
|
-
// CE-008: a block's file set is keyed by the M1-BOUNDARY canonical physical-file
|
|
239
|
-
// identity, so two blocks that cite the same file under different spellings
|
|
240
|
-
// (rel/abs, `./`-prefixed, mixed separators, case on a case-insensitive FS) are
|
|
241
|
-
// detected as sharing it.
|
|
242
|
-
const fileSet = (b) => {
|
|
243
|
-
const files = new Set();
|
|
244
|
-
for (const id of b.items) {
|
|
245
|
-
for (const af of findingMap.get(id)?.affected_files ?? []) {
|
|
246
|
-
if (!isDirectoryPath(af.path, root)) {
|
|
247
|
-
files.add(canonicalizeFilePath(af.path, { root }));
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return files;
|
|
252
|
-
};
|
|
253
|
-
const reaches = (from, to) => {
|
|
254
|
-
const seen = new Set();
|
|
255
|
-
const stack = [...(byId.get(from)?.dependencies ?? [])];
|
|
256
|
-
while (stack.length > 0) {
|
|
257
|
-
const cur = stack.pop();
|
|
258
|
-
if (cur === to)
|
|
259
|
-
return true;
|
|
260
|
-
if (seen.has(cur))
|
|
261
|
-
continue;
|
|
262
|
-
seen.add(cur);
|
|
263
|
-
stack.push(...(byId.get(cur)?.dependencies ?? []));
|
|
264
|
-
}
|
|
265
|
-
return false;
|
|
266
|
-
};
|
|
267
|
-
const ordered = (a, b) => reaches(a, b) || reaches(b, a);
|
|
268
|
-
// Detect which blocks share a canonical file with another block WITHOUT a
|
|
269
|
-
// dependency edge ordering them: these are the independent co-file blocks that
|
|
270
|
-
// stay separate and get flagged parallel-safe. Ordered co-file pairs already
|
|
271
|
-
// serialize via their dependency edge and need no flag.
|
|
272
|
-
const fileSets = blocks.map(fileSet);
|
|
273
|
-
const cofileIndependent = new Array(blocks.length).fill(false);
|
|
274
|
-
for (let i = 0; i < blocks.length; i++) {
|
|
275
|
-
for (let j = i + 1; j < blocks.length; j++) {
|
|
276
|
-
const shareFile = [...fileSets[i]].some((p) => fileSets[j].has(p));
|
|
277
|
-
if (!shareFile)
|
|
278
|
-
continue;
|
|
279
|
-
if (ordered(blocks[i].block_id, blocks[j].block_id))
|
|
280
|
-
continue;
|
|
281
|
-
cofileIndependent[i] = true;
|
|
282
|
-
cofileIndependent[j] = true;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
if (!cofileIndependent.some(Boolean))
|
|
286
|
-
return blocks; // nothing to flag
|
|
287
|
-
// Keep every block SEPARATE (no union). Flag the independent co-file blocks as
|
|
288
|
-
// parallel-safe; leave others untouched.
|
|
289
|
-
return blocks.map((b, i) => cofileIndependent[i] ? { ...b, cofile_parallel_safe: true } : b);
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Applies the backend-independent post-dedup steps that every plan must go through
|
|
293
|
-
* before being handed off to the implement phase:
|
|
294
|
-
*
|
|
295
|
-
* 1. mergeBlocksSharingFiles — preserves content-coherent membership while
|
|
296
|
-
* annotating independent co-file work
|
|
297
|
-
* 2. addAdvisoryTokenEstimates — reports deterministic local size metadata
|
|
298
|
-
* 3. snapshotAffectedFileHashes — records trusted baseline hashes
|
|
299
|
-
*
|
|
300
|
-
* Sole caller is handlePendingExtractedPlan (LLM-extracted plans join site);
|
|
301
|
-
* kept as its own function so the post-dedup logic has one home.
|
|
302
|
-
*/
|
|
303
|
-
export async function applyPlanPipeline(plan, options) {
|
|
304
|
-
let { findings, blocks } = plan;
|
|
305
|
-
// Merge blocks whose findings touch a shared file.
|
|
306
|
-
blocks = mergeBlocksSharingFiles(blocks, findings, options.root);
|
|
307
|
-
// Membership is a content-coherence contract. Planning reports size to the
|
|
308
|
-
// host but never reshapes work around a backend's context window.
|
|
309
|
-
blocks = addAdvisoryTokenEstimates(blocks, findings, options.root);
|
|
310
|
-
// Record baseline file hashes for the integrity check that runs before dispatch.
|
|
311
|
-
snapshotAffectedFileHashes(options.root, findings);
|
|
312
|
-
return { ...plan, findings, blocks };
|
|
313
|
-
}
|
|
314
90
|
//# sourceMappingURL=plan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/remediate/phases/plan.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAc;IAEd,OAAO,2BAA2B,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED,sEAAsE;AACtE,2EAA2E;AAC3E,2EAA2E;AAC3E,OAAO,EACL,gCAAgC,IAAI,2BAA2B,EAC/D,8BAA8B,IAAI,iCAAiC,GACpE,MAAM,oBAAoB,CAAC;AAE5B,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc;CAC3E,CAAC,CAAC;AAEH,SAAS,YAAY,CAAC,GAAW,EAAE,QAAQ,GAAG,GAAG;IAC/C,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;QAC5C,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QACzB,IAAI,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AK,CAAC,uBAAuB,CAAC;QACrD,qBAAqB,EAAE,KAAK,CAAC,oBAAoB,CAAC;QAClD,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triage.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/triage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"triage.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/triage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAsO1D,wBAAsB,cAAc,CAClC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAmN3B"}
|