audit-tools 0.50.21 → 0.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/audit/cli/auditStep.d.ts +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +14 -1
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/cleanup.d.ts +0 -1
- package/dist/audit/cli/cleanup.d.ts.map +1 -1
- package/dist/audit/cli/cleanup.js +32 -20
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +30 -5
- package/dist/audit/cli/conceptualDispatch.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 +48 -20
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +7 -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/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +2 -14
- 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 +3 -13
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +42 -57
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +116 -82
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +132 -99
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +39 -46
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.js +5 -2
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +3 -2
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +21 -0
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -0
- package/dist/audit/cli/stepScaffold.js +50 -0
- package/dist/audit/cli/stepScaffold.js.map +1 -0
- package/dist/audit/cli/steps.d.ts +6 -6
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +2 -14
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +8 -8
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +12 -6
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +7 -7
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +9 -1
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/merge.js +2 -7
- package/dist/audit/extractors/analyzers/merge.js.map +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts +28 -0
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +151 -22
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +2 -6
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/cargo.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/cargo.js +4 -4
- package/dist/audit/extractors/graphManifestEdges/cargo.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pnpm.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pnpm.js +3 -3
- package/dist/audit/extractors/graphManifestEdges/pnpm.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pyproject.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pyproject.js +3 -2
- package/dist/audit/extractors/graphManifestEdges/pyproject.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts +0 -6
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/toml.js +0 -13
- package/dist/audit/extractors/graphManifestEdges/toml.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts +9 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/workspace.js +16 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts +0 -2
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/yaml.js +0 -9
- package/dist/audit/extractors/graphManifestEdges/yaml.js.map +1 -1
- package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
- package/dist/audit/extractors/graphSignals.js +16 -2
- package/dist/audit/extractors/graphSignals.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +19 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +44 -2
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +0 -22
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +1 -43
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.js +14 -0
- package/dist/audit/orchestrator/charterDeltaExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +16 -6
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +127 -9
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.d.ts +51 -0
- package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterPacketArchive.js +173 -0
- package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -0
- package/dist/audit/orchestrator/charterPackets.d.ts +31 -13
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +299 -96
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +20 -4
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +89 -12
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.js +4 -9
- package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +17 -1
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js +8 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +11 -2
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/lineCounts.d.ts +44 -0
- package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -0
- package/dist/audit/orchestrator/lineCounts.js +61 -0
- package/dist/audit/orchestrator/lineCounts.js.map +1 -0
- package/dist/audit/orchestrator/obligationDerive.d.ts +35 -0
- package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -0
- package/dist/audit/orchestrator/obligationDerive.js +50 -0
- package/dist/audit/orchestrator/obligationDerive.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.js +3 -2
- package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
- package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.js +0 -4
- package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js +3 -2
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +4 -3
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +2 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +0 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +0 -27
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +10 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +21 -14
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts +8 -0
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +10 -0
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +42 -2
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +264 -12
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +14 -6
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +14 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/types/analyzerCapability.d.ts +35 -11
- package/dist/audit/types/analyzerCapability.d.ts.map +1 -1
- package/dist/audit/types/analyzerCapability.js +83 -5
- package/dist/audit/types/analyzerCapability.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +8 -8
- package/dist/audit/types/charterRegister.d.ts +33 -3
- package/dist/audit/types/charterRegister.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.js +11 -1
- package/dist/audit/types/charterRegister.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +395 -16
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +109 -5
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types/designAssessment.d.ts +1 -1
- package/dist/audit/types/designAssessment.d.ts.map +1 -1
- package/dist/audit/types.d.ts +9 -4
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/remediate/droppedFindingsRecord.d.ts +13 -0
- package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -0
- package/dist/remediate/droppedFindingsRecord.js +113 -0
- package/dist/remediate/droppedFindingsRecord.js.map +1 -0
- package/dist/remediate/intake.d.ts +17 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +23 -0
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
- package/dist/remediate/intent/intentOrdering.js +29 -1
- package/dist/remediate/intent/intentOrdering.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +1 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +68 -6
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/grounding.d.ts +12 -4
- package/dist/remediate/phases/grounding.d.ts.map +1 -1
- package/dist/remediate/phases/grounding.js +23 -60
- package/dist/remediate/phases/grounding.js.map +1 -1
- package/dist/remediate/state/types.d.ts +17 -6
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +3 -1
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +10 -4
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +10 -2
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +56 -12
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +277 -146
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +253 -75
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +14 -0
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +52 -4
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +0 -34
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +181 -143
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/agentReflections.d.ts +44 -3
- package/dist/shared/agentReflections.d.ts.map +1 -1
- package/dist/shared/agentReflections.js +63 -4
- package/dist/shared/agentReflections.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +20 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +17 -3
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +13 -4
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +17 -6
- package/dist/shared/analyzers/types.d.ts.map +1 -1
- package/dist/shared/analyzers/types.js +6 -15
- package/dist/shared/analyzers/types.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +116 -9
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +32 -1
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +23 -6
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +38 -3
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts +10 -0
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +15 -0
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +5 -1
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +6 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +8 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/graph/edgeConfidence.d.ts +12 -0
- package/dist/shared/graph/edgeConfidence.d.ts.map +1 -0
- package/dist/shared/graph/edgeConfidence.js +15 -0
- package/dist/shared/graph/edgeConfidence.js.map +1 -0
- package/dist/shared/index.d.ts +26 -9
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +20 -8
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +4 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/measurement/measuredOutcome.d.ts +61 -0
- package/dist/shared/measurement/measuredOutcome.d.ts.map +1 -0
- package/dist/shared/measurement/measuredOutcome.js +109 -0
- package/dist/shared/measurement/measuredOutcome.js.map +1 -0
- package/dist/shared/reporting/findingDisplay.d.ts +14 -2
- package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
- package/dist/shared/reporting/findingDisplay.js +29 -2
- package/dist/shared/reporting/findingDisplay.js.map +1 -1
- package/dist/shared/reporting/lensCoverage.d.ts +70 -0
- package/dist/shared/reporting/lensCoverage.d.ts.map +1 -0
- package/dist/shared/reporting/lensCoverage.js +108 -0
- package/dist/shared/reporting/lensCoverage.js.map +1 -0
- package/dist/shared/submission/hostResultOutcomes.d.ts +42 -0
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -0
- package/dist/shared/submission/hostResultOutcomes.js +129 -0
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -0
- package/dist/shared/submission/ingestionChecks.d.ts +146 -0
- package/dist/shared/submission/ingestionChecks.d.ts.map +1 -0
- package/dist/shared/submission/ingestionChecks.js +157 -0
- package/dist/shared/submission/ingestionChecks.js.map +1 -0
- package/dist/shared/submission/submissionClassifier.d.ts +8 -0
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +24 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +61 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts +2 -0
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +4 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/projectFacts.d.ts +71 -0
- package/dist/shared/tooling/projectFacts.d.ts.map +1 -0
- package/dist/shared/tooling/projectFacts.js +153 -0
- package/dist/shared/tooling/projectFacts.js.map +1 -0
- package/dist/shared/tooling/projectTestAdmission.d.ts +5 -15
- package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.js +14 -5
- package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
- package/dist/shared/types/charterPacket.d.ts +156 -0
- package/dist/shared/types/charterPacket.d.ts.map +1 -0
- package/dist/shared/types/charterPacket.js +9 -0
- package/dist/shared/types/charterPacket.js.map +1 -0
- package/dist/shared/types/closingActions.d.ts +16 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -0
- package/dist/shared/types/closingActions.js +25 -0
- package/dist/shared/types/closingActions.js.map +1 -0
- package/dist/shared/types/finding.d.ts +275 -40
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +87 -0
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +50 -0
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +31 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/validation/citationGrounding.d.ts +115 -0
- package/dist/shared/validation/citationGrounding.d.ts.map +1 -0
- package/dist/shared/validation/citationGrounding.js +347 -0
- package/dist/shared/validation/citationGrounding.js.map +1 -0
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +62 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +34 -12
- package/docs/audit-pkg/operator-guide.md +10 -7
- package/package.json +3 -2
- package/schemas/audit-code-v1alpha1.schema.json +2 -1
- package/skills/audit-code/audit-code.prompt.md +5 -3
- package/dist/remediate/state/closingActions.d.ts +0 -3
- package/dist/remediate/state/closingActions.d.ts.map +0 -1
- package/dist/remediate/state/closingActions.js +0 -10
- package/dist/remediate/state/closingActions.js.map +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE derivation of `lens_coverage` — what each lens the operator selected
|
|
3
|
+
* actually delivered.
|
|
4
|
+
*
|
|
5
|
+
* Single-sourced because FOUR places need the same answer and a hand copy in any
|
|
6
|
+
* of them would be a map that contradicts the findings beside it: the synthesis
|
|
7
|
+
* boundary that mints it, the re-normalizer that carries it through a
|
|
8
|
+
* re-synthesis, the approved-subset projection that must re-derive it over the
|
|
9
|
+
* surviving findings, and the validator that refuses a map its own inputs do not
|
|
10
|
+
* derive. The validator is a CONSUMER of this function, so "what the report
|
|
11
|
+
* claims" and "what the gate checks" cannot drift.
|
|
12
|
+
*/
|
|
13
|
+
import type { Finding } from "../types/finding.js";
|
|
14
|
+
import type { LensCoverageEntry } from "../types/finding.js";
|
|
15
|
+
import type { MeasuredOutcome } from "../measurement/measuredOutcome.js";
|
|
16
|
+
/**
|
|
17
|
+
* What one lens's count means, given whether ANY lens-open channel was ingested.
|
|
18
|
+
*
|
|
19
|
+
* `clean` is the load-bearing distinction: it may be read as "asked, and there
|
|
20
|
+
* was nothing there", so it is reachable only when a channel that carried the
|
|
21
|
+
* operator's selection actually came back. With no such channel, zero findings
|
|
22
|
+
* means the lens was never exercised — `not_run` — which is true, and is the
|
|
23
|
+
* whole point of the field.
|
|
24
|
+
*/
|
|
25
|
+
export declare function lensOutcome(findingsCount: number, lensOpenChannelIngested: boolean): MeasuredOutcome;
|
|
26
|
+
/**
|
|
27
|
+
* Whether ONE entry's outcome contradicts its own count — the check a consumer
|
|
28
|
+
* holding the map but not the run that produced it can actually establish.
|
|
29
|
+
*
|
|
30
|
+
* It deliberately does NOT re-decide `clean` versus `not_run`. Which of the two
|
|
31
|
+
* a zero-count lens deserves depends on whether a lens-open channel was
|
|
32
|
+
* ingested, and that is not in the report — so a validator that picked one would
|
|
33
|
+
* refuse legitimate output rather than catch a defect. Abstaining there is the
|
|
34
|
+
* verdict; what it refuses is the contradiction: a lens with findings that is
|
|
35
|
+
* not `findings`, or a lens with none that is.
|
|
36
|
+
*/
|
|
37
|
+
export declare function lensCoverageEntryContradictsCount(entry: Pick<LensCoverageEntry, "findings_count" | "outcome">): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Derive the coverage map for a resolved selection.
|
|
40
|
+
*
|
|
41
|
+
* Order is `selectedLenses`' own — `resolveIntentLensSelection` emits canonical
|
|
42
|
+
* registry order then the operator's custom lenses in input order, which is
|
|
43
|
+
* content-derived and stable. A lens that produced findings while NOT being
|
|
44
|
+
* selected is appended after them, sorted, so the map never silently omits a
|
|
45
|
+
* lens the report counts.
|
|
46
|
+
*/
|
|
47
|
+
export declare function deriveLensCoverage(params: {
|
|
48
|
+
readonly selectedLenses: readonly string[];
|
|
49
|
+
readonly findings: readonly Finding[];
|
|
50
|
+
readonly lensOpenChannelIngested: boolean;
|
|
51
|
+
}): LensCoverageEntry[];
|
|
52
|
+
/**
|
|
53
|
+
* Re-derive an EXISTING map's counts and outcomes over a (possibly narrowed)
|
|
54
|
+
* finding set, preserving each entry's membership and `selected` flag.
|
|
55
|
+
*
|
|
56
|
+
* Used wherever the findings change but the SELECTION cannot be recovered: a
|
|
57
|
+
* re-synthesis of a promoted report, and the approved-subset projection. Copying
|
|
58
|
+
* the map through unchanged there would leave it contradicting a re-derived
|
|
59
|
+
* `lens_breakdown`, and the projection validates itself at the write boundary —
|
|
60
|
+
* so a subset that drops every finding of one lens would throw at the remediate
|
|
61
|
+
* intake that requests it.
|
|
62
|
+
*
|
|
63
|
+
* Whether a lens was EXERCISED is read PER ENTRY, from the outcome the parent
|
|
64
|
+
* map already recorded — an entry that was `findings` or `clean` was exercised,
|
|
65
|
+
* and filtering findings out of a subset cannot un-exercise it. Re-deciding it
|
|
66
|
+
* globally would turn a lens whose only finding the subset dropped into
|
|
67
|
+
* `not_run`, which claims the run never looked.
|
|
68
|
+
*/
|
|
69
|
+
export declare function reprojectLensCoverage(coverage: readonly LensCoverageEntry[], findings: readonly Finding[]): LensCoverageEntry[];
|
|
70
|
+
//# sourceMappingURL=lensCoverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lensCoverage.d.ts","sourceRoot":"","sources":["../../../src/shared/reporting/lensCoverage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAezE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,aAAa,EAAE,MAAM,EACrB,uBAAuB,EAAE,OAAO,GAC/B,eAAe,CAGjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,SAAS,CAAC,GAC3D,OAAO,CAIT;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IACzC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;CAC3C,GAAG,iBAAiB,EAAE,CA2BtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,iBAAiB,EAAE,CAUrB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { compareCodeUnits } from "../compareCodeUnits.js";
|
|
2
|
+
/**
|
|
3
|
+
* Count findings per lens. The same `countBy` shape `lens_breakdown` uses, kept
|
|
4
|
+
* here so the coverage map and the breakdown can never be counted differently.
|
|
5
|
+
*/
|
|
6
|
+
function countByLens(findings) {
|
|
7
|
+
const counts = new Map();
|
|
8
|
+
for (const finding of findings) {
|
|
9
|
+
counts.set(finding.lens, (counts.get(finding.lens) ?? 0) + 1);
|
|
10
|
+
}
|
|
11
|
+
return counts;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* What one lens's count means, given whether ANY lens-open channel was ingested.
|
|
15
|
+
*
|
|
16
|
+
* `clean` is the load-bearing distinction: it may be read as "asked, and there
|
|
17
|
+
* was nothing there", so it is reachable only when a channel that carried the
|
|
18
|
+
* operator's selection actually came back. With no such channel, zero findings
|
|
19
|
+
* means the lens was never exercised — `not_run` — which is true, and is the
|
|
20
|
+
* whole point of the field.
|
|
21
|
+
*/
|
|
22
|
+
export function lensOutcome(findingsCount, lensOpenChannelIngested) {
|
|
23
|
+
if (findingsCount > 0)
|
|
24
|
+
return "findings";
|
|
25
|
+
return lensOpenChannelIngested ? "clean" : "not_run";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Whether ONE entry's outcome contradicts its own count — the check a consumer
|
|
29
|
+
* holding the map but not the run that produced it can actually establish.
|
|
30
|
+
*
|
|
31
|
+
* It deliberately does NOT re-decide `clean` versus `not_run`. Which of the two
|
|
32
|
+
* a zero-count lens deserves depends on whether a lens-open channel was
|
|
33
|
+
* ingested, and that is not in the report — so a validator that picked one would
|
|
34
|
+
* refuse legitimate output rather than catch a defect. Abstaining there is the
|
|
35
|
+
* verdict; what it refuses is the contradiction: a lens with findings that is
|
|
36
|
+
* not `findings`, or a lens with none that is.
|
|
37
|
+
*/
|
|
38
|
+
export function lensCoverageEntryContradictsCount(entry) {
|
|
39
|
+
return entry.findings_count > 0
|
|
40
|
+
? entry.outcome !== "findings"
|
|
41
|
+
: entry.outcome === "findings";
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Derive the coverage map for a resolved selection.
|
|
45
|
+
*
|
|
46
|
+
* Order is `selectedLenses`' own — `resolveIntentLensSelection` emits canonical
|
|
47
|
+
* registry order then the operator's custom lenses in input order, which is
|
|
48
|
+
* content-derived and stable. A lens that produced findings while NOT being
|
|
49
|
+
* selected is appended after them, sorted, so the map never silently omits a
|
|
50
|
+
* lens the report counts.
|
|
51
|
+
*/
|
|
52
|
+
export function deriveLensCoverage(params) {
|
|
53
|
+
const counts = countByLens(params.findings);
|
|
54
|
+
const selected = new Set(params.selectedLenses);
|
|
55
|
+
const entries = params.selectedLenses.map((lens) => {
|
|
56
|
+
const findingsCount = counts.get(lens) ?? 0;
|
|
57
|
+
return {
|
|
58
|
+
lens,
|
|
59
|
+
selected: true,
|
|
60
|
+
findings_count: findingsCount,
|
|
61
|
+
outcome: lensOutcome(findingsCount, params.lensOpenChannelIngested),
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
const unselected = [...counts.keys()]
|
|
65
|
+
.filter((lens) => !selected.has(lens))
|
|
66
|
+
.sort(compareCodeUnits);
|
|
67
|
+
for (const lens of unselected) {
|
|
68
|
+
const findingsCount = counts.get(lens);
|
|
69
|
+
entries.push({
|
|
70
|
+
lens,
|
|
71
|
+
selected: false,
|
|
72
|
+
findings_count: findingsCount,
|
|
73
|
+
// A lens nobody selected that nonetheless produced findings is
|
|
74
|
+
// `findings`; it cannot be `clean`, because nothing asked for it.
|
|
75
|
+
outcome: findingsCount > 0 ? "findings" : "not_run",
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return entries;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Re-derive an EXISTING map's counts and outcomes over a (possibly narrowed)
|
|
82
|
+
* finding set, preserving each entry's membership and `selected` flag.
|
|
83
|
+
*
|
|
84
|
+
* Used wherever the findings change but the SELECTION cannot be recovered: a
|
|
85
|
+
* re-synthesis of a promoted report, and the approved-subset projection. Copying
|
|
86
|
+
* the map through unchanged there would leave it contradicting a re-derived
|
|
87
|
+
* `lens_breakdown`, and the projection validates itself at the write boundary —
|
|
88
|
+
* so a subset that drops every finding of one lens would throw at the remediate
|
|
89
|
+
* intake that requests it.
|
|
90
|
+
*
|
|
91
|
+
* Whether a lens was EXERCISED is read PER ENTRY, from the outcome the parent
|
|
92
|
+
* map already recorded — an entry that was `findings` or `clean` was exercised,
|
|
93
|
+
* and filtering findings out of a subset cannot un-exercise it. Re-deciding it
|
|
94
|
+
* globally would turn a lens whose only finding the subset dropped into
|
|
95
|
+
* `not_run`, which claims the run never looked.
|
|
96
|
+
*/
|
|
97
|
+
export function reprojectLensCoverage(coverage, findings) {
|
|
98
|
+
const counts = countByLens(findings);
|
|
99
|
+
return coverage.map((entry) => {
|
|
100
|
+
const findingsCount = counts.get(entry.lens) ?? 0;
|
|
101
|
+
return {
|
|
102
|
+
...entry,
|
|
103
|
+
findings_count: findingsCount,
|
|
104
|
+
outcome: lensOutcome(findingsCount, entry.outcome !== "not_run"),
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=lensCoverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lensCoverage.js","sourceRoot":"","sources":["../../../src/shared/reporting/lensCoverage.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;GAGG;AACH,SAAS,WAAW,CAAC,QAA4B;IAC/C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CACzB,aAAqB,EACrB,uBAAgC;IAEhC,IAAI,aAAa,GAAG,CAAC;QAAE,OAAO,UAAU,CAAC;IACzC,OAAO,uBAAuB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iCAAiC,CAC/C,KAA4D;IAE5D,OAAO,KAAK,CAA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,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAsC,EACtC,QAA4B;IAE5B,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,OAAO;YACL,GAAG,KAAK;YACR,cAAc,EAAE,aAAa;YAC7B,OAAO,EAAE,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;SACjE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared recording and trailing-state diagnostics for host-result ingestion.
|
|
3
|
+
*
|
|
4
|
+
* The audit and remediation draws classify different domain failures, but the
|
|
5
|
+
* host boundary has one durable story: a submission was refused, or a prior
|
|
6
|
+
* refusal was subsequently accepted. This module owns that story and keeps
|
|
7
|
+
* the ledger reader separate from each draw's message renderer.
|
|
8
|
+
*/
|
|
9
|
+
import { type SubmissionLedgerEvent } from "./submissionLedger.js";
|
|
10
|
+
import type { SubmissionIssue } from "./submissionClassifier.js";
|
|
11
|
+
/** The accepted/rejected pair supplied by either host-result boundary. */
|
|
12
|
+
export interface HostResultOutcomes<TIssueCode extends string = string> {
|
|
13
|
+
readonly issues: readonly SubmissionIssue<TIssueCode>[];
|
|
14
|
+
readonly acceptedIds: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
/** A refusal whose ingest state has not subsequently been cleared. */
|
|
17
|
+
export type TrailingSubmissionRefusal = SubmissionLedgerEvent<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Read trailing refusals once for a batch. Non-ingest rows (`expected`,
|
|
20
|
+
* `dispatched`, and `lane_outcome`) do not alter the answer; an acceptance,
|
|
21
|
+
* recovery, or operator withdrawal clears a prior rejection.
|
|
22
|
+
*/
|
|
23
|
+
export declare function readTrailingSubmissionRefusals(artifactsDir: string, submissionIds?: readonly string[], options?: {
|
|
24
|
+
readonly runId?: string;
|
|
25
|
+
}): Promise<ReadonlyMap<string, TrailingSubmissionRefusal>>;
|
|
26
|
+
/**
|
|
27
|
+
* Add the prior substantive refusal to a currently missing issue.
|
|
28
|
+
*
|
|
29
|
+
* Historic codes stay in the message as evidence. The caller supplies the
|
|
30
|
+
* current draw's shared `submission_rejected` replacement code, so an
|
|
31
|
+
* untrusted ledger value is never asserted into a draw-specific enum.
|
|
32
|
+
*/
|
|
33
|
+
export declare function enrichMissingSubmissionIssues<TIssueCode extends string>(issues: readonly SubmissionIssue<TIssueCode>[], refusals: ReadonlyMap<string, TrailingSubmissionRefusal>, replacementCode: TIssueCode): SubmissionIssue<TIssueCode>[];
|
|
34
|
+
/**
|
|
35
|
+
* Record raw host-ingest outcomes. The caller must pass the un-enriched issue
|
|
36
|
+
* list so a missing poll that carries an old diagnostic cannot recursively
|
|
37
|
+
* rewrite that diagnostic into the ledger. History is read once per batch.
|
|
38
|
+
*/
|
|
39
|
+
export declare function recordHostResultOutcomes<TIssueCode extends string = string>(artifactsDir: string, runId: string, outcomes: HostResultOutcomes<TIssueCode>, options?: {
|
|
40
|
+
readonly scopeToRunId?: string;
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
//# sourceMappingURL=hostResultOutcomes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostResultOutcomes.d.ts","sourceRoot":"","sources":["../../../src/shared/submission/hostResultOutcomes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAML,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,0EAA0E;AAC1E,MAAM,WAAW,kBAAkB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM;IACpE,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,sEAAsE;AACtE,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAEtE;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,EACjC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAkBzD;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,SAAS,MAAM,EACrE,MAAM,EAAE,SAAS,eAAe,CAAC,UAAU,CAAC,EAAE,EAC9C,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,yBAAyB,CAAC,EACxD,eAAe,EAAE,UAAU,GAC1B,eAAe,CAAC,UAAU,CAAC,EAAE,CAgB/B;AAUD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,EAC/E,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,EACxC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3C,OAAO,CAAC,IAAI,CAAC,CAiEf"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared recording and trailing-state diagnostics for host-result ingestion.
|
|
3
|
+
*
|
|
4
|
+
* The audit and remediation draws classify different domain failures, but the
|
|
5
|
+
* host boundary has one durable story: a submission was refused, or a prior
|
|
6
|
+
* refusal was subsequently accepted. This module owns that story and keeps
|
|
7
|
+
* the ledger reader separate from each draw's message renderer.
|
|
8
|
+
*/
|
|
9
|
+
import { appendSubmissionEvent, isIngestEvent, readSubmissionLedger, SUBMISSION_LEDGER_EVENT_CONTRACT_VERSION, } from "./submissionLedger.js";
|
|
10
|
+
/**
|
|
11
|
+
* Read trailing refusals once for a batch. Non-ingest rows (`expected`,
|
|
12
|
+
* `dispatched`, and `lane_outcome`) do not alter the answer; an acceptance,
|
|
13
|
+
* recovery, or operator withdrawal clears a prior rejection.
|
|
14
|
+
*/
|
|
15
|
+
export async function readTrailingSubmissionRefusals(artifactsDir, submissionIds, options) {
|
|
16
|
+
const wanted = submissionIds === undefined ? undefined : new Set(submissionIds);
|
|
17
|
+
const last = new Map();
|
|
18
|
+
for (const event of await readSubmissionLedger(artifactsDir)) {
|
|
19
|
+
if (wanted !== undefined && !wanted.has(event.submission_id))
|
|
20
|
+
continue;
|
|
21
|
+
if (options?.runId !== undefined && event.run_id !== options.runId)
|
|
22
|
+
continue;
|
|
23
|
+
if (!isIngestEvent(event.kind))
|
|
24
|
+
continue;
|
|
25
|
+
if (event.kind === "rejected") {
|
|
26
|
+
// A repeated missing observation is not substantive history and must
|
|
27
|
+
// never erase a prior malformed/contract/domain refusal.
|
|
28
|
+
if (event.issue_code !== "submission_missing") {
|
|
29
|
+
last.set(event.submission_id, event);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
last.delete(event.submission_id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return last;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Add the prior substantive refusal to a currently missing issue.
|
|
40
|
+
*
|
|
41
|
+
* Historic codes stay in the message as evidence. The caller supplies the
|
|
42
|
+
* current draw's shared `submission_rejected` replacement code, so an
|
|
43
|
+
* untrusted ledger value is never asserted into a draw-specific enum.
|
|
44
|
+
*/
|
|
45
|
+
export function enrichMissingSubmissionIssues(issues, refusals, replacementCode) {
|
|
46
|
+
return issues.map((issue) => {
|
|
47
|
+
if (issue.code !== "submission_missing")
|
|
48
|
+
return issue;
|
|
49
|
+
const submissionId = issue.work_item_id ?? issue.submission_id;
|
|
50
|
+
if (submissionId === undefined)
|
|
51
|
+
return issue;
|
|
52
|
+
const refusal = refusals.get(submissionId);
|
|
53
|
+
if (refusal === undefined)
|
|
54
|
+
return issue;
|
|
55
|
+
return {
|
|
56
|
+
...issue,
|
|
57
|
+
message: `${issue.message}; the previous submission was refused` +
|
|
58
|
+
` (${refusal.issue_code ?? "unknown"})` +
|
|
59
|
+
`${refusal.message ? `: ${refusal.message}` : ""}`,
|
|
60
|
+
code: replacementCode,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function eventSignature(kind, issueCode, message) {
|
|
65
|
+
return [kind, issueCode ?? "", message ?? ""].join("|");
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Record raw host-ingest outcomes. The caller must pass the un-enriched issue
|
|
69
|
+
* list so a missing poll that carries an old diagnostic cannot recursively
|
|
70
|
+
* rewrite that diagnostic into the ledger. History is read once per batch.
|
|
71
|
+
*/
|
|
72
|
+
export async function recordHostResultOutcomes(artifactsDir, runId, outcomes, options) {
|
|
73
|
+
if (outcomes.issues.length === 0 && outcomes.acceptedIds.length === 0)
|
|
74
|
+
return;
|
|
75
|
+
const last = new Map();
|
|
76
|
+
for (const event of await readSubmissionLedger(artifactsDir)) {
|
|
77
|
+
if (options?.scopeToRunId !== undefined &&
|
|
78
|
+
event.run_id !== options.scopeToRunId) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (isIngestEvent(event.kind))
|
|
82
|
+
last.set(event.submission_id, event);
|
|
83
|
+
}
|
|
84
|
+
const append = async (submissionId, event) => {
|
|
85
|
+
const previous = last.get(submissionId);
|
|
86
|
+
if (previous !== undefined &&
|
|
87
|
+
eventSignature(previous.kind, previous.issue_code, previous.message) ===
|
|
88
|
+
eventSignature(event.kind, event.issue_code, event.message)) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const recorded = {
|
|
92
|
+
contract_version: SUBMISSION_LEDGER_EVENT_CONTRACT_VERSION,
|
|
93
|
+
run_id: runId,
|
|
94
|
+
submission_id: submissionId,
|
|
95
|
+
lane: submissionId,
|
|
96
|
+
...event,
|
|
97
|
+
recorded_at: new Date().toISOString(),
|
|
98
|
+
};
|
|
99
|
+
await appendSubmissionEvent(artifactsDir, recorded);
|
|
100
|
+
last.set(submissionId, recorded);
|
|
101
|
+
};
|
|
102
|
+
for (const submissionId of outcomes.acceptedIds) {
|
|
103
|
+
// A first-try acceptance has no drift to record. Rejection and withdrawal
|
|
104
|
+
// need a new acceptance; an existing recovery must never be relabelled clean.
|
|
105
|
+
const priorKind = last.get(submissionId)?.kind;
|
|
106
|
+
if (priorKind !== "rejected" && priorKind !== "removed_by_operator")
|
|
107
|
+
continue;
|
|
108
|
+
await append(submissionId, { kind: "accepted" });
|
|
109
|
+
}
|
|
110
|
+
for (const issue of outcomes.issues) {
|
|
111
|
+
const submissionId = issue.work_item_id ?? issue.submission_id;
|
|
112
|
+
if (submissionId === undefined)
|
|
113
|
+
continue;
|
|
114
|
+
const prior = last.get(submissionId);
|
|
115
|
+
// Missing is an observation, not a new substantive refusal. Preserve the
|
|
116
|
+
// prior reason while the host has not yet rewritten the bound file.
|
|
117
|
+
if (issue.code === "submission_missing" &&
|
|
118
|
+
prior?.kind === "rejected" &&
|
|
119
|
+
prior.issue_code !== "submission_missing") {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
await append(submissionId, {
|
|
123
|
+
kind: "rejected",
|
|
124
|
+
issue_code: issue.code,
|
|
125
|
+
message: issue.message,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=hostResultOutcomes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h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AC9E,MAAM,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,aAAa,CAAC;QAC/D,IAAI,YAAY,KAAK,SAAS;YAAE,SAAS;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACrC,yEAAyE;QACzE,oEAAoE;QACpE,IACE,KAAK,CAAC,IAAI,KAAK,oBAAoB;YACnC,KAAK,EAAE,IAAI,KAAK,UAAU;YAC1B,KAAK,CAAC,UAAU,KAAK,oBAAoB,EACzC,CAAC;YACD,SAAS;QACX,CAAC;QACD,MAAM,MAAM,CAAC,YAAY,EAAE;YACzB,IAAI,EAAE,UAAU;YAChB,UAAU,EAAE,KAAK,CAAC,IAAI;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE declared list of checks result ingestion performs before it accepts a
|
|
3
|
+
* host result — the source `docs/audit-pkg/contracts.md`'s check block is
|
|
4
|
+
* RENDERED from (`scripts/shared/generate-ingestion-checks.mjs`).
|
|
5
|
+
*
|
|
6
|
+
* WHY THIS EXISTS. The check set used to be written out by hand in three docs
|
|
7
|
+
* (the contracts page, the operator guide, the concurrent-runs design), and the
|
|
8
|
+
* three lists disagreed: only one named the result path, only one the strict
|
|
9
|
+
* result schema, only one the workload version. Nothing reconciled them, so
|
|
10
|
+
* whoever added a check added it to whichever doc they had open. Owner decision
|
|
11
|
+
* 2026-09-05 (nightly item l1-4): derive the list from the validator itself.
|
|
12
|
+
*
|
|
13
|
+
* The registry is LOAD-BEARING, not a fourth prose copy: every refusal a draw's
|
|
14
|
+
* ingestion emits cites one of these ids (`refuse(check, detail)`,
|
|
15
|
+
* `invalidResult(check, reason)`, a `check:` on an issue), the id type below
|
|
16
|
+
* refuses an unregistered citation at compile time, and
|
|
17
|
+
* `tests/shared/ingestion-checks-drift.test.ts` extracts the citations
|
|
18
|
+
* structurally and pins them against the declared `draws` in both directions —
|
|
19
|
+
* a row nothing cites is dead, and a citation nothing declares is an
|
|
20
|
+
* undocumented check.
|
|
21
|
+
*
|
|
22
|
+
* `cited_by` says WHERE the citation lives. The shared submission scan
|
|
23
|
+
* (`submissionScan.ts`) owns the path, read and duplicate checks for both
|
|
24
|
+
* draws; everything else is cited from the draw's own host-handoff module. Row
|
|
25
|
+
* order is the render order: envelope and binding first, then per-draw content
|
|
26
|
+
* checks, then corroboration, then the ledger.
|
|
27
|
+
*
|
|
28
|
+
* Keep every field a plain literal: the generator reads this file as TEXT
|
|
29
|
+
* through the TypeScript compiler API (no build, no import), and refuses a
|
|
30
|
+
* value it cannot read rather than rendering without it.
|
|
31
|
+
*/
|
|
32
|
+
export declare const INGESTION_DRAWS: readonly [{
|
|
33
|
+
readonly id: "audit";
|
|
34
|
+
readonly source: "src/audit/cli/dispatch/hostHandoff.ts";
|
|
35
|
+
}, {
|
|
36
|
+
readonly id: "remediate";
|
|
37
|
+
readonly source: "src/remediate/steps/dispatch/hostHandoff.ts";
|
|
38
|
+
}];
|
|
39
|
+
export type IngestionDraw = (typeof INGESTION_DRAWS)[number]["id"];
|
|
40
|
+
/** Where the shared-cited checks live. */
|
|
41
|
+
export declare const INGESTION_SHARED_SOURCE = "src/shared/submission/submissionScan.ts";
|
|
42
|
+
export interface IngestionCheck {
|
|
43
|
+
readonly id: string;
|
|
44
|
+
/** One sentence, host-facing: what must hold for the result to be accepted. */
|
|
45
|
+
readonly verifies: string;
|
|
46
|
+
readonly draws: readonly IngestionDraw[];
|
|
47
|
+
/** `shared`: cited from the shared scan; `draw`: cited from each listed draw's module. */
|
|
48
|
+
readonly cited_by: "shared" | "draw";
|
|
49
|
+
}
|
|
50
|
+
export declare const INGESTION_CHECKS: readonly [{
|
|
51
|
+
readonly id: "result_path";
|
|
52
|
+
readonly verifies: "The submission is read only from the tool-derived bound path (`<run dir>/<sha256(work item id)>.json`) inside the run's artifacts directory; a result written anywhere else is never consulted.";
|
|
53
|
+
readonly draws: readonly ["audit", "remediate"];
|
|
54
|
+
readonly cited_by: "shared";
|
|
55
|
+
}, {
|
|
56
|
+
readonly id: "result_json";
|
|
57
|
+
readonly verifies: "The bytes at the bound path parse as JSON.";
|
|
58
|
+
readonly draws: readonly ["audit", "remediate"];
|
|
59
|
+
readonly cited_by: "shared";
|
|
60
|
+
}, {
|
|
61
|
+
readonly id: "result_envelope";
|
|
62
|
+
readonly verifies: "The top-level key set is exactly the draw's result contract and `contract_version` is the version the workload was issued under.";
|
|
63
|
+
readonly draws: readonly ["audit", "remediate"];
|
|
64
|
+
readonly cited_by: "draw";
|
|
65
|
+
}, {
|
|
66
|
+
readonly id: "identity_binding";
|
|
67
|
+
readonly verifies: "`run_id` is the run that emitted the workload, `work_item_id` is the work item the result was read for, and `prompt_sha256` is the digest of the prompt that work item was issued with — an answer to another run, item or a stale prompt is refused.";
|
|
68
|
+
readonly draws: readonly ["audit", "remediate"];
|
|
69
|
+
readonly cited_by: "draw";
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: "workload_binding";
|
|
72
|
+
readonly verifies: "The persisted workload, result map and task bindings still derive from this run (versions, bound paths, prompt digests, scopes); a result cannot be accepted against a binding the tool cannot re-derive.";
|
|
73
|
+
readonly draws: readonly ["audit", "remediate"];
|
|
74
|
+
readonly cited_by: "draw";
|
|
75
|
+
}, {
|
|
76
|
+
readonly id: "file_coverage";
|
|
77
|
+
readonly verifies: "`file_coverage` names exactly the assigned files, each fully reviewed, with `total_lines` equal to the line count bound at dispatch.";
|
|
78
|
+
readonly draws: readonly ["audit"];
|
|
79
|
+
readonly cited_by: "draw";
|
|
80
|
+
}, {
|
|
81
|
+
readonly id: "findings_contract";
|
|
82
|
+
readonly verifies: "Every finding satisfies the audit finding contract (lens, ids, evidence shape).";
|
|
83
|
+
readonly draws: readonly ["audit"];
|
|
84
|
+
readonly cited_by: "draw";
|
|
85
|
+
}, {
|
|
86
|
+
readonly id: "result_schema";
|
|
87
|
+
readonly verifies: "The bound result converts to the persisted `AuditResult` schema (`schemas/audit_result.schema.json`).";
|
|
88
|
+
readonly draws: readonly ["audit"];
|
|
89
|
+
readonly cited_by: "draw";
|
|
90
|
+
}, {
|
|
91
|
+
readonly id: "result_validation";
|
|
92
|
+
readonly verifies: "The per-result content rules hold before acceptance (evidence present, line spans inside the file, line counts matching disk); warnings ride an advisory channel and never refuse.";
|
|
93
|
+
readonly draws: readonly ["audit"];
|
|
94
|
+
readonly cited_by: "draw";
|
|
95
|
+
}, {
|
|
96
|
+
readonly id: "outcome_shape";
|
|
97
|
+
readonly verifies: "A decision result's `outcome` carries exactly the fields its status requires (`resolved_no_change` evidence, `blocked` failure reason, `needs_clarification` question).";
|
|
98
|
+
readonly draws: readonly ["remediate"];
|
|
99
|
+
readonly cited_by: "draw";
|
|
100
|
+
}, {
|
|
101
|
+
readonly id: "write_scope";
|
|
102
|
+
readonly verifies: "`changed_files` is non-empty, sorted, unique and normalized, lies within the prompt-bound `allowed_files`, and equals the files the landed commit actually changed.";
|
|
103
|
+
readonly draws: readonly ["remediate"];
|
|
104
|
+
readonly cited_by: "draw";
|
|
105
|
+
}, {
|
|
106
|
+
readonly id: "commit_evidence";
|
|
107
|
+
readonly verifies: "`commit_evidence` binds the workload baseline to a distinct landed commit; both exist, the baseline is an ancestor of the landed commit (waived only under a genuinely orphaned baseline in recovery), and the landed commit is reachable from HEAD.";
|
|
108
|
+
readonly draws: readonly ["remediate"];
|
|
109
|
+
readonly cited_by: "draw";
|
|
110
|
+
}, {
|
|
111
|
+
readonly id: "test_evidence";
|
|
112
|
+
readonly verifies: "`test_evidence` carries exactly one passed entry per required test echoing the bound command, and the tool's own mechanical rerun of those tests passes.";
|
|
113
|
+
readonly draws: readonly ["remediate"];
|
|
114
|
+
readonly cited_by: "draw";
|
|
115
|
+
}, {
|
|
116
|
+
readonly id: "obligation_evidence";
|
|
117
|
+
readonly verifies: "`obligation_evidence` cites non-empty evidence for every prompt-bound obligation, none twice, and none the work item does not bind.";
|
|
118
|
+
readonly draws: readonly ["remediate"];
|
|
119
|
+
readonly cited_by: "draw";
|
|
120
|
+
}, {
|
|
121
|
+
readonly id: "worktree_evidence";
|
|
122
|
+
readonly verifies: "`worktree_evidence` binds the workload baseline and the same changed-file list, and no landed file overlaps dirt that pre-dated the run.";
|
|
123
|
+
readonly draws: readonly ["remediate"];
|
|
124
|
+
readonly cited_by: "draw";
|
|
125
|
+
}, {
|
|
126
|
+
readonly id: "landing_attestation";
|
|
127
|
+
readonly verifies: "`acceptance` and `merge` both attest a completed landing.";
|
|
128
|
+
readonly draws: readonly ["remediate"];
|
|
129
|
+
readonly cited_by: "draw";
|
|
130
|
+
}, {
|
|
131
|
+
readonly id: "no_change_corroboration";
|
|
132
|
+
readonly verifies: "A `resolved_no_change` claim is corroborated against git and the persisted write-scope binding; attestation-only acceptance is refused.";
|
|
133
|
+
readonly draws: readonly ["remediate"];
|
|
134
|
+
readonly cited_by: "draw";
|
|
135
|
+
}, {
|
|
136
|
+
readonly id: "duplicate_result";
|
|
137
|
+
readonly verifies: "`result_id` has not already been accepted this run: a byte-identical replay is a no-op, a different body under an accepted id is refused.";
|
|
138
|
+
readonly draws: readonly ["audit", "remediate"];
|
|
139
|
+
readonly cited_by: "shared";
|
|
140
|
+
}];
|
|
141
|
+
export type IngestionCheckId = (typeof INGESTION_CHECKS)[number]["id"];
|
|
142
|
+
/** The ids a draw declares, in registry order — draw-cited and shared-cited alike. */
|
|
143
|
+
export declare function ingestionCheckIdsFor(draw: IngestionDraw): readonly IngestionCheckId[];
|
|
144
|
+
/** The ids whose citation lives in the given place, in registry order. */
|
|
145
|
+
export declare function ingestionCheckIdsCitedBy(citedBy: IngestionCheck["cited_by"], draw?: IngestionDraw): readonly IngestionCheckId[];
|
|
146
|
+
//# sourceMappingURL=ingestionChecks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingestionChecks.d.ts","sourceRoot":"","sources":["../../../src/shared/submission/ingestionChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,eAAe;;;;;;EAGlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAEnE,0CAA0C;AAC1C,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AAEjF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAAC;CACtC;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4HiB,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAEvE,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,gBAAgB,EAAE,CAIrF;AAED,0EAA0E;AAC1E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,EACnC,IAAI,CAAC,EAAE,aAAa,GACnB,SAAS,gBAAgB,EAAE,CAM7B"}
|