audit-tools 0.56.2 → 0.57.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/README.md +8 -22
- package/dist/audit/cli/args.d.ts +0 -1
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +0 -14
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +0 -59
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +2 -136
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/cleanup.d.ts.map +1 -1
- package/dist/audit/cli/cleanup.js +4 -1
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +16 -31
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +414 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +223 -1
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts +254 -0
- package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/questionReviewAcceptance.js +181 -0
- package/dist/audit/cli/dispatch/questionReviewAcceptance.js.map +1 -0
- package/dist/audit/cli/functionalPreflight.d.ts +4 -4
- package/dist/audit/cli/laneSubmissions.d.ts +4 -4
- package/dist/audit/cli/nextStepCommand.d.ts +3 -20
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +39 -133
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +10 -72
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +95 -363
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +0 -2
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +3 -14
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/questionReviewCycle.d.ts +239 -0
- package/dist/audit/cli/questionReviewCycle.d.ts.map +1 -0
- package/dist/audit/cli/questionReviewCycle.js +55 -0
- package/dist/audit/cli/questionReviewCycle.js.map +1 -0
- package/dist/audit/cli/questionReviewSession.d.ts +7 -0
- package/dist/audit/cli/questionReviewSession.d.ts.map +1 -0
- package/dist/audit/cli/questionReviewSession.js +46 -0
- package/dist/audit/cli/questionReviewSession.js.map +1 -0
- package/dist/audit/cli/questionWorkloadBindings.d.ts +7 -0
- package/dist/audit/cli/questionWorkloadBindings.d.ts.map +1 -0
- package/dist/audit/cli/questionWorkloadBindings.js +66 -0
- package/dist/audit/cli/questionWorkloadBindings.js.map +1 -0
- package/dist/audit/cli/resynthesizeCommand.d.ts +1 -0
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.js +52 -51
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +565 -160
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/sampleRunCommand.js +66 -152
- package/dist/audit/cli/sampleRunCommand.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +20 -14
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +10 -10
- package/dist/audit/cli/submitCommand.d.ts +11 -6
- package/dist/audit/cli/submitCommand.d.ts.map +1 -1
- package/dist/audit/cli/submitCommand.js +91 -24
- package/dist/audit/cli/submitCommand.js.map +1 -1
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +6 -17
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.d.ts +4 -4
- package/dist/audit/contracts/workerSchemas.d.ts +69 -68
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +8 -1
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +13 -13
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +0 -1
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/extractors/designAssessment.js +2 -2
- package/dist/audit/extractors/designAssessment.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +31 -9
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +197 -31
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/rollover.d.ts.map +1 -1
- package/dist/audit/io/rollover.js +7 -16
- package/dist/audit/io/rollover.js.map +1 -1
- package/dist/audit/io/runSnapshot.d.ts +1 -1
- package/dist/audit/io/runSnapshot.js +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.d.ts +9 -10
- package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.js +95 -13
- package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.d.ts +3 -0
- package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.js +31 -2
- package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts +2 -8
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +10 -105
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts +2 -3
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +2 -35
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +24 -14
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +14 -21
- 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 +1 -131
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.d.ts +1 -1
- package/dist/audit/orchestrator/flowPlanning.js +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +19 -12
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +37 -36
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/lensSelection.d.ts +6 -37
- package/dist/audit/orchestrator/lensSelection.d.ts.map +1 -1
- package/dist/audit/orchestrator/lensSelection.js +42 -68
- package/dist/audit/orchestrator/lensSelection.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +1 -4
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/questionEvidence.d.ts +67 -0
- package/dist/audit/orchestrator/questionEvidence.d.ts.map +1 -0
- package/dist/audit/orchestrator/questionEvidence.js +177 -0
- package/dist/audit/orchestrator/questionEvidence.js.map +1 -0
- package/dist/audit/orchestrator/questionPlanExecutor.d.ts +10 -0
- package/dist/audit/orchestrator/questionPlanExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/questionPlanExecutor.js +23 -0
- package/dist/audit/orchestrator/questionPlanExecutor.js.map +1 -0
- package/dist/audit/orchestrator/questionPlanning.d.ts +48 -0
- package/dist/audit/orchestrator/questionPlanning.d.ts.map +1 -0
- package/dist/audit/orchestrator/questionPlanning.js +326 -0
- package/dist/audit/orchestrator/questionPlanning.js.map +1 -0
- package/dist/audit/orchestrator/reviewLensPlaybooks.d.ts +11 -0
- package/dist/audit/orchestrator/reviewLensPlaybooks.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewLensPlaybooks.js +11 -0
- package/dist/audit/orchestrator/reviewLensPlaybooks.js.map +1 -0
- package/dist/audit/orchestrator/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeValidation.js +14 -0
- package/dist/audit/orchestrator/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts +1 -1
- package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeValidationUpdate.js +13 -4
- package/dist/audit/orchestrator/runtimeValidationUpdate.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/index.js +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +8 -60
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts +15 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +76 -25
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +11 -6
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts +4 -4
- package/dist/audit/reporting/questionReport.d.ts +27 -0
- package/dist/audit/reporting/questionReport.d.ts.map +1 -0
- package/dist/audit/reporting/questionReport.js +183 -0
- package/dist/audit/reporting/questionReport.js.map +1 -0
- package/dist/audit/reporting/synthesis.d.ts +10 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +161 -24
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.d.ts +4 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.d.ts.map +1 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.js +5 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +2 -3
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +3 -18
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/systemic/aggregateMetricsDigest.d.ts.map +1 -1
- package/dist/audit/systemic/aggregateMetricsDigest.js +0 -2
- package/dist/audit/systemic/aggregateMetricsDigest.js.map +1 -1
- package/dist/audit/types/artifactMetadata.d.ts +1 -2
- package/dist/audit/types/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/conceptualAdjudication.d.ts +708 -50
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +2 -0
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types/runtimeValidation.d.ts +58 -6
- package/dist/audit/types/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/types/runtimeValidation.js +8 -0
- package/dist/audit/types/runtimeValidation.js.map +1 -1
- package/dist/audit/types.d.ts +539 -22
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +1 -1
- package/dist/audit/validation/auditResults.js +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.js +0 -1
- package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.d.ts +679 -52
- package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.js +23 -0
- package/dist/remediate/contractPipeline/executionPlan.js.map +1 -1
- package/dist/remediate/findingFilter.d.ts.map +1 -1
- package/dist/remediate/findingFilter.js +6 -2
- package/dist/remediate/findingFilter.js.map +1 -1
- package/dist/remediate/intake.d.ts +4 -4
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +15 -5
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts +5 -0
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +37 -8
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/state/types.d.ts +619 -26
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +2 -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 +2 -0
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +2 -0
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +3 -3
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +31 -6
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +31 -40
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +3 -0
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +18 -18
- package/dist/shared/contentKey.d.ts +1 -1
- package/dist/shared/contentKey.js +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +4 -4
- package/dist/shared/decompose/charterExtraction.d.ts +30 -30
- package/dist/shared/decompose/contentCoherence.d.ts +1 -1
- package/dist/shared/decompose/contentCoherence.js +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +629 -18
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +2 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/stepContractWriter.js +1 -1
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +5 -2
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/mcp/submitServer.d.ts +1 -0
- package/dist/shared/mcp/submitServer.d.ts.map +1 -1
- package/dist/shared/mcp/submitServer.js +1 -1
- package/dist/shared/mcp/submitServer.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +1 -1
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/tooling/exec.js +1 -1
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +38 -38
- package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -1
- package/dist/shared/types/contractPropertyShapes.js +7 -0
- package/dist/shared/types/contractPropertyShapes.js.map +1 -1
- package/dist/shared/types/executionPlan.d.ts +88 -12
- package/dist/shared/types/executionPlan.d.ts.map +1 -1
- package/dist/shared/types/executionPlan.js +1 -0
- package/dist/shared/types/executionPlan.js.map +1 -1
- package/dist/shared/types/finding.d.ts +1721 -56
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +7 -10
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/findingVocabulary.d.ts +8 -0
- package/dist/shared/types/findingVocabulary.d.ts.map +1 -0
- package/dist/shared/types/findingVocabulary.js +13 -0
- package/dist/shared/types/findingVocabulary.js.map +1 -0
- package/dist/shared/types/intentCheckpoint.d.ts +8 -3
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +4 -3
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/questionReviewReport.d.ts +9912 -0
- package/dist/shared/types/questionReviewReport.d.ts.map +1 -0
- package/dist/shared/types/questionReviewReport.js +185 -0
- package/dist/shared/types/questionReviewReport.js.map +1 -0
- package/dist/shared/types/remediationOutcome.d.ts +1379 -148
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +5 -0
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/reviewIndependence.d.ts +24 -24
- package/dist/shared/types/reviewQuestion.d.ts +4359 -0
- package/dist/shared/types/reviewQuestion.d.ts.map +1 -0
- package/dist/shared/types/reviewQuestion.js +182 -0
- package/dist/shared/types/reviewQuestion.js.map +1 -0
- package/dist/shared/types/stepContract.js +1 -1
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +1 -1
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +19 -4
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +27 -56
- package/docs/audit-pkg/operator-guide.md +31 -17
- package/docs/audit-pkg/product.md +17 -23
- package/package.json +1 -1
- package/schemas/audit-code-v1alpha1.schema.json +0 -1
- package/schemas/review_submission.schema.json +514 -0
- package/skills/audit-code/audit-code.prompt.md +7 -5
- package/wrapper/audit-code-wrapper-lib.mjs +1 -5
- package/wrapper/installer-verb-help.mjs +1 -1
- package/dist/audit/cli/explainTaskCommand.d.ts +0 -4
- package/dist/audit/cli/explainTaskCommand.d.ts.map +0 -1
- package/dist/audit/cli/explainTaskCommand.js +0 -45
- package/dist/audit/cli/explainTaskCommand.js.map +0 -1
- package/dist/audit/cli/ingestResultsCommand.d.ts +0 -2
- package/dist/audit/cli/ingestResultsCommand.d.ts.map +0 -1
- package/dist/audit/cli/ingestResultsCommand.js +0 -42
- package/dist/audit/cli/ingestResultsCommand.js.map +0 -1
- package/dist/audit/cli/requeueCommand.d.ts +0 -2
- package/dist/audit/cli/requeueCommand.d.ts.map +0 -1
- package/dist/audit/cli/requeueCommand.js +0 -12
- package/dist/audit/cli/requeueCommand.js.map +0 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +0 -41
- package/dist/audit/cli/semanticReviewStep.d.ts.map +0 -1
- package/dist/audit/cli/semanticReviewStep.js +0 -185
- package/dist/audit/cli/semanticReviewStep.js.map +0 -1
- package/dist/audit/cli/unacceptResultsCommand.d.ts +0 -19
- package/dist/audit/cli/unacceptResultsCommand.d.ts.map +0 -1
- package/dist/audit/cli/unacceptResultsCommand.js +0 -52
- package/dist/audit/cli/unacceptResultsCommand.js.map +0 -1
- package/dist/audit/cli/updateRuntimeValidationCommand.d.ts +0 -2
- package/dist/audit/cli/updateRuntimeValidationCommand.d.ts.map +0 -1
- package/dist/audit/cli/updateRuntimeValidationCommand.js +0 -18
- package/dist/audit/cli/updateRuntimeValidationCommand.js.map +0 -1
- package/dist/audit/cli/validateResultsCommand.d.ts +0 -13
- package/dist/audit/cli/validateResultsCommand.d.ts.map +0 -1
- package/dist/audit/cli/validateResultsCommand.js +0 -87
- package/dist/audit/cli/validateResultsCommand.js.map +0 -1
- package/dist/audit/cli/workerResult.d.ts +0 -2
- package/dist/audit/cli/workerResult.d.ts.map +0 -1
- package/dist/audit/cli/workerResult.js +0 -6
- package/dist/audit/cli/workerResult.js.map +0 -1
- package/dist/audit/orchestrator/coverageElementBaseline.d.ts +0 -54
- package/dist/audit/orchestrator/coverageElementBaseline.d.ts.map +0 -1
- package/dist/audit/orchestrator/coverageElementBaseline.js +0 -136
- package/dist/audit/orchestrator/coverageElementBaseline.js.map +0 -1
- package/dist/audit/orchestrator/planning.d.ts +0 -5
- package/dist/audit/orchestrator/planning.d.ts.map +0 -1
- package/dist/audit/orchestrator/planning.js +0 -79
- package/dist/audit/orchestrator/planning.js.map +0 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts +0 -21
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +0 -1
- package/dist/audit/orchestrator/planningExecutors.js +0 -273
- package/dist/audit/orchestrator/planningExecutors.js.map +0 -1
- package/dist/audit/orchestrator/taskBuilder.d.ts +0 -62
- package/dist/audit/orchestrator/taskBuilder.d.ts.map +0 -1
- package/dist/audit/orchestrator/taskBuilder.js +0 -412
- package/dist/audit/orchestrator/taskBuilder.js.map +0 -1
- package/dist/audit/orchestrator/trivialAudit.d.ts +0 -21
- package/dist/audit/orchestrator/trivialAudit.d.ts.map +0 -1
- package/dist/audit/orchestrator/trivialAudit.js +0 -80
- package/dist/audit/orchestrator/trivialAudit.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// sites-pinned: tests/audit/next-step-question-workload.test.ts
|
|
2
|
+
import { isFileMissingError } from "audit-tools/shared";
|
|
3
|
+
import { collectQuestionEvidence } from "../orchestrator/questionEvidence.js";
|
|
4
|
+
import { reviewSourceScope } from "../orchestrator/questionPlanning.js";
|
|
5
|
+
import { ingestAuditQuestionResults, readAuditQuestionLedger } from "./dispatch/hostHandoff.js";
|
|
6
|
+
import { projectQuestionReview } from "./dispatch/questionReviewAcceptance.js";
|
|
7
|
+
import { ensureQuestionReviewRunIdUnlocked } from "./questionReviewSession.js";
|
|
8
|
+
import { questionWorkloadBindings } from "./questionWorkloadBindings.js";
|
|
9
|
+
/** The same source/evidence binding for dispatch, report and direct submit. */
|
|
10
|
+
export async function deriveCurrentQuestionBindings(bundle, sourceRoot, verifiedSourceFiles) {
|
|
11
|
+
const plan = bundle.review_plan;
|
|
12
|
+
if (!plan)
|
|
13
|
+
throw new Error("Question review requires the active plan");
|
|
14
|
+
const scope = reviewSourceScope(bundle, bundle.scope);
|
|
15
|
+
const sourceFiles = new Map([...scope.allowedSourcePaths, ...scope.allowedContractPaths].flatMap(path => {
|
|
16
|
+
const fingerprint = scope.files.get(path)?.hash;
|
|
17
|
+
return fingerprint ? [[path, fingerprint]] : [];
|
|
18
|
+
}));
|
|
19
|
+
const evidence = await collectQuestionEvidence({
|
|
20
|
+
snapshot_id: plan.snapshot_id, sourceRoot, sourceFiles, analyzerResults: bundle.external_analyzer_results ?? [],
|
|
21
|
+
});
|
|
22
|
+
const bindings = await questionWorkloadBindings(bundle, sourceRoot, evidence, verifiedSourceFiles);
|
|
23
|
+
return { bindings, evidence, sourceFiles };
|
|
24
|
+
}
|
|
25
|
+
/** One projection for host dispatch and report synthesis. The existing host
|
|
26
|
+
* run ledger is the only accepted-answer store. Call inside the artifact hold. */
|
|
27
|
+
export async function deriveQuestionCycleUnlocked(options) {
|
|
28
|
+
const { bundle, root, sourceRoot, artifactsDir } = options;
|
|
29
|
+
const plan = bundle.review_plan;
|
|
30
|
+
if (!plan)
|
|
31
|
+
throw new Error("Question review requires the active plan");
|
|
32
|
+
const runId = options.readOnlyRunId ?? await ensureQuestionReviewRunIdUnlocked(artifactsDir);
|
|
33
|
+
const boundary = { root, artifactsDir, runId };
|
|
34
|
+
const { bindings, evidence, sourceFiles } = await deriveCurrentQuestionBindings(bundle, sourceRoot);
|
|
35
|
+
const currentAssignmentIds = new Set(bindings.map(({ assignment }) => assignment.assignment_id));
|
|
36
|
+
const ingestion = options.readOnlyRunId !== undefined
|
|
37
|
+
? { ...await readAuditQuestionLedger(boundary), accepted_count: 0, issues: [] }
|
|
38
|
+
: await ingestAuditQuestionResults(boundary, currentAssignmentIds).catch(error => {
|
|
39
|
+
if (isFileMissingError(error))
|
|
40
|
+
return { accepted_count: 0, answers: [], adjudications: [], consolidations: [], issues: [] };
|
|
41
|
+
throw error;
|
|
42
|
+
});
|
|
43
|
+
const currentInputs = [...sourceFiles].map(([key, fingerprint]) => ({ kind: "source", key, fingerprint }));
|
|
44
|
+
const dependenciesByQuestion = new Map(bindings.map(binding => [binding.question.question_id, [
|
|
45
|
+
...binding.dependencies, ...currentInputs, ...binding.evidence.flatMap(item => item.dependencies),
|
|
46
|
+
]]));
|
|
47
|
+
const pending = bindings.filter(binding => {
|
|
48
|
+
const active = projectQuestionReview(binding.question, ingestion.answers, dependenciesByQuestion.get(binding.question.question_id), ingestion.adjudications);
|
|
49
|
+
// An accepted inconclusive answer is not a clean result or a reason for
|
|
50
|
+
// infinite redispatch. Reporting keeps its unanswered parts visible.
|
|
51
|
+
return active.current.length === 0;
|
|
52
|
+
});
|
|
53
|
+
return { runId, bindings, pending, evidence, dependenciesByQuestion, ...ingestion };
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=questionReviewCycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionReviewCycle.js","sourceRoot":"","sources":["../../../src/audit/cli/questionReviewCycle.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAChG,OAAO,EAAE,qBAAqB,EAA6B,MAAM,wCAAwC,CAAC;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,CAAC,EAAE,IAAI,EAAE,QAAiB,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;IACpH,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE;YAC5F,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;SAClG,CAAU,CAAC,CAAC,CAAC;IACd,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QACxC,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,OAAO,EACtE,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QACrF,wEAAwE;QACxE,qEAAqE;QACrE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAAE,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function readQuestionReviewRunId(artifactsDir: string, options?: {
|
|
2
|
+
includeEnded?: boolean;
|
|
3
|
+
}): Promise<string | undefined>;
|
|
4
|
+
/** The next-step fold already holds the artifact-tree lock. Reuse this run
|
|
5
|
+
* across plan revisions; ordinary finished-run rollover removes the pointer. */
|
|
6
|
+
export declare function ensureQuestionReviewRunIdUnlocked(artifactsDir: string): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=questionReviewSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionReviewSession.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/questionReviewSession.ts"],"names":[],"mappings":"AAeA,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7D,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAiB7B;AAED;gFACgF;AAChF,wBAAsB,iCAAiC,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7F"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// sites-pinned: tests/audit/result-submit.test.ts, tests/audit/rollover-legacy-archive.test.ts, tests/audit/next-step-question-workload.test.ts
|
|
2
|
+
// sites-pinned: tests/audit/result-submit.test.ts, tests/audit/next-step-question-workload.test.ts
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { access } from "node:fs/promises";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { assertSubmissionRunId, isFileMissingError, readJsonFile, writeJsonFile } from "audit-tools/shared";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
const schemaVersion = "audit-tools/question-review-session/v1";
|
|
9
|
+
const Session = z.strictObject({
|
|
10
|
+
schema_version: z.literal(schemaVersion),
|
|
11
|
+
run_id: z.string().startsWith("question-review-"),
|
|
12
|
+
});
|
|
13
|
+
const sessionPath = (artifactsDir) => join(artifactsDir, "review_session.json");
|
|
14
|
+
export async function readQuestionReviewRunId(artifactsDir, options = {}) {
|
|
15
|
+
if (!options.includeEnded) {
|
|
16
|
+
try {
|
|
17
|
+
await access(join(artifactsDir, "run-ended.json"));
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (!isFileMissingError(error))
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const record = Session.parse(await readJsonFile(sessionPath(artifactsDir)));
|
|
27
|
+
assertSubmissionRunId(record.run_id);
|
|
28
|
+
return record.run_id;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (isFileMissingError(error))
|
|
32
|
+
return undefined;
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** The next-step fold already holds the artifact-tree lock. Reuse this run
|
|
37
|
+
* across plan revisions; ordinary finished-run rollover removes the pointer. */
|
|
38
|
+
export async function ensureQuestionReviewRunIdUnlocked(artifactsDir) {
|
|
39
|
+
const existing = await readQuestionReviewRunId(artifactsDir);
|
|
40
|
+
if (existing)
|
|
41
|
+
return existing;
|
|
42
|
+
const run_id = `question-review-${randomUUID()}`;
|
|
43
|
+
await writeJsonFile(sessionPath(artifactsDir), { schema_version: schemaVersion, run_id });
|
|
44
|
+
return run_id;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=questionReviewSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionReviewSession.js","sourceRoot":"","sources":["../../../src/audit/cli/questionReviewSession.ts"],"names":[],"mappings":"AAAA,gJAAgJ;AAChJ,mGAAmG;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC5G,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,aAAa,GAAG,wCAAwC,CAAC;AAC/D,MAAM,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC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AChB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
|
+
import { type ReviewEvidence } from "../../shared/types/reviewQuestion.js";
|
|
3
|
+
import type { AuditQuestionBinding } from "./dispatch/questionReviewAcceptance.js";
|
|
4
|
+
/** Use one manifest-backed authority for binding and the planner; suggestions
|
|
5
|
+
* only guide attention. Freeze the allowed index, not the file packet. */
|
|
6
|
+
export declare function questionWorkloadBindings(bundle: ArtifactBundle, sourceRoot: string, evidence: readonly ReviewEvidence[], verifiedSourceFiles?: AuditQuestionBinding["sourceFiles"]): Promise<AuditQuestionBinding[]>;
|
|
7
|
+
//# sourceMappingURL=questionWorkloadBindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionWorkloadBindings.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/questionWorkloadBindings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAA2D,KAAK,cAAc,EAAwB,MAAM,sCAAsC,CAAC;AAC1J,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAGnF;0EAC0E;AAC1E,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,mBAAmB,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,GACxD,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAwDjC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// sites-pinned: tests/audit/next-step-question-workload.test.ts, tests/audit/result-submit.test.ts
|
|
2
|
+
import { compareCodeUnits, hashContent, stableStringify, toPosixPath } from "audit-tools/shared";
|
|
3
|
+
import { reviewSourceScope } from "../orchestrator/questionPlanning.js";
|
|
4
|
+
import { REVIEW_QUESTION_CONTRACT_VERSION } from "../../shared/types/reviewQuestion.js";
|
|
5
|
+
import { buildLineIndexForPaths } from "./lineIndex.js";
|
|
6
|
+
/** Use one manifest-backed authority for binding and the planner; suggestions
|
|
7
|
+
* only guide attention. Freeze the allowed index, not the file packet. */
|
|
8
|
+
export async function questionWorkloadBindings(bundle, sourceRoot, evidence, verifiedSourceFiles) {
|
|
9
|
+
const plan = bundle.review_plan;
|
|
10
|
+
if (!plan)
|
|
11
|
+
throw new Error("Plan review questions before publishing an assignment");
|
|
12
|
+
const scope = reviewSourceScope(bundle, bundle.scope);
|
|
13
|
+
const allowed = [...new Set([...scope.allowedSourcePaths, ...scope.allowedContractPaths])].sort(compareCodeUnits);
|
|
14
|
+
// Only direct submission supplies this index, after checking that its entire
|
|
15
|
+
// footprint still hashes to the same frozen bytes. The stored line counts
|
|
16
|
+
// then remain authoritative; don't repeat the file read just to count them.
|
|
17
|
+
const verifiedByPath = verifiedSourceFiles && new Map(verifiedSourceFiles.map(file => [file.path, file]));
|
|
18
|
+
if (verifiedByPath && (verifiedByPath.size !== verifiedSourceFiles.length || allowed.length !== verifiedByPath.size ||
|
|
19
|
+
allowed.some(path => verifiedByPath.get(path)?.fingerprint !== scope.files.get(path)?.hash))) {
|
|
20
|
+
throw new Error("The issued source index is no longer current; run next-step before submitting.");
|
|
21
|
+
}
|
|
22
|
+
const lineIndex = verifiedByPath
|
|
23
|
+
? Object.fromEntries([...verifiedByPath].map(([path, file]) => [path, file.line_count]))
|
|
24
|
+
: await buildLineIndexForPaths(sourceRoot, allowed);
|
|
25
|
+
const sourceFiles = allowed.flatMap(path => {
|
|
26
|
+
const fingerprint = scope.files.get(path)?.hash;
|
|
27
|
+
const line_count = lineIndex[path];
|
|
28
|
+
return fingerprint && Number.isInteger(line_count) && line_count >= 0
|
|
29
|
+
? [{ path, line_count: line_count, fingerprint }] : [];
|
|
30
|
+
});
|
|
31
|
+
const measured = new Set(sourceFiles.map(({ path }) => path));
|
|
32
|
+
const includes = [...new Set(sourceFiles.map(({ path }) => path.split("/")[0]))].sort(compareCodeUnits);
|
|
33
|
+
const byInventory = new Map(plan.inventory.map(item => [item.inventory_item_id, item]));
|
|
34
|
+
const sourcesFor = (inventory) => {
|
|
35
|
+
const refs = inventory.flatMap(id => {
|
|
36
|
+
const item = byInventory.get(id);
|
|
37
|
+
return item ? [...item.source_refs, ...item.contract_refs] : [];
|
|
38
|
+
}).filter(ref => measured.has(ref.path) && (ref.end_line ?? ref.start_line ?? 0) <= (lineIndex[ref.path] ?? 0));
|
|
39
|
+
return [...new Map(refs.map(ref => [stableStringify(ref), ref])).values()];
|
|
40
|
+
};
|
|
41
|
+
const authorized_scope = { include: includes, exclude: [] };
|
|
42
|
+
// The publisher freezes this entire shared source binding, not just the
|
|
43
|
+
// files named by one question. Hash it once rather than once per assignment.
|
|
44
|
+
const sourceBinding = hashContent(stableStringify({ sourceRoot: toPosixPath(sourceRoot), sourceFiles }));
|
|
45
|
+
return plan.questions.filter(q => q.plan_status === "pending" || q.plan_status === "active").map(question => {
|
|
46
|
+
const suggested_sources = sourcesFor(question.inventory_item_ids);
|
|
47
|
+
const scopedEvidence = evidence.filter(record => record.snapshot_id === plan.snapshot_id &&
|
|
48
|
+
record.source_refs.every(ref => measured.has(ref.path)) &&
|
|
49
|
+
(record.source_refs.some(ref => suggested_sources.some(suggestion => ref.path === suggestion.path)) ||
|
|
50
|
+
question.evidence_dependencies.some(dep => record.dependencies.some(bound => stableStringify(dep) === stableStringify(bound)))))
|
|
51
|
+
.sort((a, b) => compareCodeUnits(a.evidence_id, b.evidence_id));
|
|
52
|
+
const dependencies = [...question.source_dependencies, ...question.evidence_dependencies];
|
|
53
|
+
const issued = {
|
|
54
|
+
schema_version: REVIEW_QUESTION_CONTRACT_VERSION,
|
|
55
|
+
question_id: question.question_id, revision_id: question.revision_id, snapshot_id: question.snapshot_id,
|
|
56
|
+
authorized_scope, suggested_sources, available_evidence_ids: scopedEvidence.map(record => record.evidence_id),
|
|
57
|
+
};
|
|
58
|
+
// Question revision controls accepted-answer reuse. The assignment additionally
|
|
59
|
+
// binds what the reviewer was actually offered, including optional leads.
|
|
60
|
+
const assignment_id = `review-${hashContent(stableStringify({
|
|
61
|
+
sourceBinding, question, issued, dependencies, evidence: scopedEvidence,
|
|
62
|
+
}))}`;
|
|
63
|
+
return { question, sourceFiles, evidence: scopedEvidence, dependencies, assignment: { ...issued, assignment_id } };
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=questionWorkloadBindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionWorkloadBindings.js","sourceRoot":"","sources":["../../../src/audit/cli/questionWorkloadBindings.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAoE,MAAM,sCAAsC,CAAC;AAE1J,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD;0EAC0E;AAC1E,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAAsB,EACtB,UAAkB,EAClB,QAAmC,EACnC,mBAAyD;IAEzD,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;IAChC,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IACpF,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAClH,6EAA6E;IAC7E,0EAA0E;IAC1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,CAAC,CAAC,CAAC;aAChI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAClE,MAAM,YAAY,GAAG,CAAC,GAAG,QAAQ,CAAC,mBAAmB,EAAE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;QAC1F,MAAM,MAAM,GAAG;YACb,cAAc,EAAE,gCAAgC;YAChD,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW;YACvG,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC;SAC5D,CAAC;QACpD,gFAAgF;QAChF,0EAA0E;QAC1E,MAAM,aAAa,GAAG,UAAU,WAAW,CAAC,eAAe,CAAC;YAC1D,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc;SACxE,CAAC,CAAC,EAAE,CAAC;QACN,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC;IACrH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resynthesizeCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/resynthesizeCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resynthesizeCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/resynthesizeCommand.ts"],"names":[],"mappings":"AAeA,mGAAmG;AACnG,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CnE"}
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
// sites-pinned: tests/audit/resynthesize-command.test.ts
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
4
|
-
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
5
3
|
import { getFlag, getRootDir } from "./args.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { readQuestionReportCharterOptions, readQuestionReportReflections } from "../io/artifacts.js";
|
|
5
|
+
import { renderAuditReportMarkdown } from "../reporting/synthesis.js";
|
|
6
|
+
import { AUDIT_FINDINGS_FILENAME, auditArtifactsDir, promotedAuditFindingsPath, promotedAuditReportPath, readOptionalTextFile, stableStringify, writeTextFile, } from "audit-tools/shared";
|
|
7
|
+
import { withArtifactTreeHold } from "../../shared/io/artifactTreeHold.js";
|
|
10
8
|
import { errorMessage } from "../../shared/io/json.js";
|
|
9
|
+
import { ReviewPlanSchema } from "../../shared/types/reviewQuestion.js";
|
|
10
|
+
import { QuestionAuditFindingsReportSchema } from "../../shared/types/questionReviewReport.js";
|
|
11
|
+
import { outputJson } from "./cliHelpers.js";
|
|
12
|
+
/** Render only from the current promoted machine report. Never restamp or import another audit. */
|
|
11
13
|
export async function cmdResynthesize(argv) {
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const defaultInput = promotedAuditFindingsPath(artifactsDir);
|
|
16
|
-
// Use the shared flag parser, which rejects a flag-shaped next token so an
|
|
17
|
-
// invocation like `--input --root foo` falls back to the default instead of
|
|
18
|
-
// mis-resolving the input path to "--root" (COR-bc35a171).
|
|
19
|
-
const inputPath = getFlag(argv, "--input") ?? defaultInput;
|
|
20
|
-
if (!existsSync(inputPath)) {
|
|
21
|
-
console.error(`resynthesize: ${AUDIT_FINDINGS_FILENAME} not found at ${inputPath}. ` +
|
|
22
|
-
`Run the full audit first, or supply --input <path>.`);
|
|
23
|
-
process.exitCode = 1;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const raw = await readFile(inputPath, "utf8");
|
|
27
|
-
let report;
|
|
14
|
+
const artifactsDir = auditArtifactsDir(getRootDir(argv));
|
|
15
|
+
const findingsPath = promotedAuditFindingsPath(artifactsDir);
|
|
16
|
+
const inputPath = getFlag(argv, "--input") ?? findingsPath;
|
|
28
17
|
try {
|
|
29
|
-
|
|
18
|
+
const raw = await readOptionalTextFile(findingsPath);
|
|
19
|
+
if (raw === undefined)
|
|
20
|
+
throw new Error(`Current ${AUDIT_FINDINGS_FILENAME} not found at ${findingsPath}.`);
|
|
21
|
+
const parsed = QuestionAuditFindingsReportSchema.safeParse(JSON.parse(raw));
|
|
22
|
+
if (!parsed.success)
|
|
23
|
+
throw new Error("Only the current question-based v2 report can be regenerated. Archived reports are left unchanged.");
|
|
24
|
+
if (inputPath !== findingsPath && await readOptionalTextFile(inputPath) !== raw) {
|
|
25
|
+
throw new Error("Explicit input is not the current promoted machine report; no report was overwritten.");
|
|
26
|
+
}
|
|
27
|
+
await withArtifactTreeHold(artifactsDir, undefined, async (assertOwnership) => {
|
|
28
|
+
if (await readOptionalTextFile(findingsPath) !== raw) {
|
|
29
|
+
throw new Error("The current promoted report changed before regeneration.");
|
|
30
|
+
}
|
|
31
|
+
const planRaw = await readOptionalTextFile(join(artifactsDir, "review_plan.json"));
|
|
32
|
+
if (planRaw === undefined) {
|
|
33
|
+
throw new Error("No current review_plan.json owns the promoted report. Its original charter and reflection inputs cannot be reconstructed; the promoted files were left unchanged.");
|
|
34
|
+
}
|
|
35
|
+
const plan = ReviewPlanSchema.parse(JSON.parse(planRaw));
|
|
36
|
+
const working = await readOptionalTextFile(join(artifactsDir, AUDIT_FINDINGS_FILENAME));
|
|
37
|
+
if (plan.snapshot_id !== parsed.data.question_review.snapshot_id ||
|
|
38
|
+
working === undefined || stableStringify(JSON.parse(working)) !== stableStringify(JSON.parse(raw))) {
|
|
39
|
+
throw new Error("The active audit does not own the promoted report; no report was overwritten.");
|
|
40
|
+
}
|
|
41
|
+
const report = parsed.data;
|
|
42
|
+
const reportPath = promotedAuditReportPath(artifactsDir);
|
|
43
|
+
const markdown = renderAuditReportMarkdown(report, {
|
|
44
|
+
reflections: await readQuestionReportReflections(artifactsDir),
|
|
45
|
+
...await readQuestionReportCharterOptions(artifactsDir),
|
|
46
|
+
});
|
|
47
|
+
assertOwnership();
|
|
48
|
+
await writeTextFile(reportPath, markdown);
|
|
49
|
+
outputJson({
|
|
50
|
+
source: inputPath,
|
|
51
|
+
findings_output: findingsPath,
|
|
52
|
+
report_output: reportPath,
|
|
53
|
+
finding_count: report.summary.finding_count,
|
|
54
|
+
work_block_count: report.summary.work_block_count,
|
|
55
|
+
contract_version: report.contract_version,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
30
58
|
}
|
|
31
59
|
catch (error) {
|
|
32
|
-
|
|
33
|
-
console.error(`resynthesize: could not parse ${inputPath}: ${msg}`);
|
|
60
|
+
console.error(`resynthesize: ${errorMessage(error)}`);
|
|
34
61
|
process.exitCode = 1;
|
|
35
|
-
return;
|
|
36
62
|
}
|
|
37
|
-
const normalized = normalizeExistingFindingsReport(report);
|
|
38
|
-
// Best-effort: if the working artifacts dir (and its worker-appended
|
|
39
|
-
// feedback) still exists — e.g. an interrupted run being compiled by hand —
|
|
40
|
-
// carry the Process Feedback section into the re-rendered report.
|
|
41
|
-
const feedbackText = await readOptionalTextFile(join(artifactsDir, AGENT_FEEDBACK_FILENAME));
|
|
42
|
-
const feedback = feedbackText ? parseReflectionsNdjson(feedbackText) : undefined;
|
|
43
|
-
if (feedback)
|
|
44
|
-
reportDiscardedReflections(feedback.discarded, "audit-code resynthesize");
|
|
45
|
-
const markdown = renderAuditReportMarkdown(normalized, {
|
|
46
|
-
reflections: feedback?.reflections,
|
|
47
|
-
conceptual_adjudication: await readOptionalJsonFile(join(artifactsDir, "conceptual_review_adjudication.json")),
|
|
48
|
-
});
|
|
49
|
-
await mkdir(auditToolsDir, { recursive: true });
|
|
50
|
-
const outputFindingsPath = promotedAuditFindingsPath(artifactsDir);
|
|
51
|
-
const outputReportPath = promotedAuditReportPath(artifactsDir);
|
|
52
|
-
await writeFile(outputFindingsPath, JSON.stringify(normalized, null, 2), "utf8");
|
|
53
|
-
await writeFile(outputReportPath, markdown, "utf8");
|
|
54
|
-
outputJson({
|
|
55
|
-
source: inputPath,
|
|
56
|
-
findings_output: outputFindingsPath,
|
|
57
|
-
report_output: outputReportPath,
|
|
58
|
-
finding_count: normalized.summary.finding_count,
|
|
59
|
-
work_block_count: normalized.summary.work_block_count,
|
|
60
|
-
contract_version: normalized.contract_version,
|
|
61
|
-
});
|
|
62
63
|
}
|
|
63
64
|
//# sourceMappingURL=resynthesizeCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resynthesizeCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/resynthesizeCommand.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"resynthesizeCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/resynthesizeCommand.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,gCAAgC,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACL,uBAAuB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,uBAAuB,EAC9F,oBAAoB,EAAE,eAAe,EAAE,aAAa,GACrD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,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