audit-tools 0.56.2 → 0.57.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 +24 -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 +7 -139
- 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 +459 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +312 -1
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
- package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts +254 -0
- package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/questionReviewAcceptance.js +183 -0
- package/dist/audit/cli/dispatch/questionReviewAcceptance.js.map +1 -0
- package/dist/audit/cli/foldTransaction.d.ts +1 -1
- package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
- package/dist/audit/cli/foldTransaction.js +3 -2
- package/dist/audit/cli/foldTransaction.js.map +1 -1
- 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 +64 -141
- 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 +115 -375
- 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 +281 -0
- package/dist/audit/cli/questionReviewCycle.d.ts.map +1 -0
- package/dist/audit/cli/questionReviewCycle.js +87 -0
- package/dist/audit/cli/questionReviewCycle.js.map +1 -0
- package/dist/audit/cli/questionReviewSession.d.ts +21 -0
- package/dist/audit/cli/questionReviewSession.d.ts.map +1 -0
- package/dist/audit/cli/questionReviewSession.js +111 -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 +68 -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 +600 -159
- 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 +13 -6
- package/dist/audit/cli/submitCommand.d.ts.map +1 -1
- package/dist/audit/cli/submitCommand.js +121 -24
- package/dist/audit/cli/submitCommand.js.map +1 -1
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +7 -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 +83 -82
- 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 +37 -10
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +217 -33
- 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/requeueCommand.d.ts +1 -1
- 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 +28 -0
- package/dist/audit/reporting/questionReport.d.ts.map +1 -0
- package/dist/audit/reporting/questionReport.js +186 -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 +551 -34
- 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 +47 -44
- 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 +31 -31
- 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 +10574 -0
- package/dist/shared/types/questionReviewReport.d.ts.map +1 -0
- package/dist/shared/types/questionReviewReport.js +186 -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 +4710 -0
- package/dist/shared/types/reviewQuestion.d.ts.map +1 -0
- package/dist/shared/types/reviewQuestion.js +216 -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
package/README.md
CHANGED
|
@@ -101,35 +101,21 @@ confidence, lens, and grounding:
|
|
|
101
101
|
|
|
102
102
|
<!-- BEGIN sample-report — generated by scripts/check-readme-sample-report.mjs from the real renderer; do not hand-edit -->
|
|
103
103
|
|
|
104
|
-
*(Illustrative excerpt — rendered by the real report renderer from a fabricated sample repo and one fixture finding; the cited src/
|
|
104
|
+
*(Illustrative excerpt — rendered by the real report renderer from a fabricated sample repo and one fixture finding; the cited src/queue.ts path belongs to that fabricated repo, not to this repository. A real report carries more sections between Lens coverage and Findings and leads.)*
|
|
105
105
|
|
|
106
106
|
```text
|
|
107
107
|
# Audit Report
|
|
108
108
|
|
|
109
|
-
##
|
|
109
|
+
## Lens coverage
|
|
110
110
|
|
|
111
|
-
-
|
|
112
|
-
- Work blocks: 1
|
|
113
|
-
- Severity breakdown: high: 1
|
|
114
|
-
- Lens breakdown: security: 1
|
|
115
|
-
- Grounding (S7): grounded: 1
|
|
116
|
-
- Fully audited files: 0
|
|
117
|
-
- Excluded non-auditable files: 1
|
|
111
|
+
- behavior: selected. Illustrative fabricated fixture only; no repository was inspected. (findings: 1)
|
|
118
112
|
|
|
119
|
-
## Findings
|
|
113
|
+
## Findings and leads
|
|
120
114
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
- Severity: high
|
|
126
|
-
- Confidence: high
|
|
127
|
-
- Lens: security
|
|
128
|
-
- Grounding: grounded
|
|
129
|
-
- Impact: A leaked token stays usable indefinitely.
|
|
130
|
-
- Likelihood: Any expired token replayed against the refresh endpoint.
|
|
131
|
-
- Files: src/api/auth.ts:41–58
|
|
132
|
-
- Evidence: The expiry field read at line 44 is never compared against the clock.
|
|
115
|
+
- question-finding-69f8d3ab67ba05511a101ef8d6795c33bb960611476b67c9397f70f08e4ba35b: confirmed_defect (actionable; medium).
|
|
116
|
+
- sample-queue-001 on sample-review-queue: Queue summary omits pending entries. The reported total differs from the number of queued entries.
|
|
117
|
+
- Next step: Count pending entries in the same total.
|
|
118
|
+
- Verification: queue-summary-total.
|
|
133
119
|
```
|
|
134
120
|
|
|
135
121
|
<!-- END sample-report -->
|
|
@@ -252,6 +238,22 @@ Run them from anywhere inside the target repository — each resolves that repos
|
|
|
252
238
|
from the working directory. `--root <repo>` is the explicit override for running from outside
|
|
253
239
|
it (or for targeting a sub-project inside a larger repo).
|
|
254
240
|
|
|
241
|
+
If an accepted answer in an **active** audit addressed the wrong question, run
|
|
242
|
+
`audit-code reopen-questions --from <review-reopen.json>` with a unique `reopen_id`,
|
|
243
|
+
a `reason`, and a `questions` array. Each entry names the exact `question_id`,
|
|
244
|
+
`revision_id`, `snapshot_id`, and `expected_submission_ids` (all current answer IDs
|
|
245
|
+
for that question). This preserves the old answers and decisions as history.
|
|
246
|
+
Run `audit-code next-step` to issue replacement assignments; do not reuse old
|
|
247
|
+
assignment IDs or result paths. Exact request replay is a no-op. Finished audits
|
|
248
|
+
are not changed by this command.
|
|
249
|
+
|
|
250
|
+
If a **review-only tooling upgrade** would stale the active plan, an explicit
|
|
251
|
+
`tooling_transition` in that request may qualify the existing evidence. Give
|
|
252
|
+
`prior_implementation_hash`, `current_implementation_hash`, and a `reason`
|
|
253
|
+
for reusing the historical evidence. Both hashes, the frozen source, scope,
|
|
254
|
+
intent, and analyzer evidence must match. This authorizes continuing review
|
|
255
|
+
under the new host, not rerunning analysis or recertifying old findings.
|
|
256
|
+
|
|
255
257
|
## Develop
|
|
256
258
|
|
|
257
259
|
TypeScript, Node 22+. From the repo root:
|
package/dist/audit/cli/args.d.ts
CHANGED
|
@@ -47,5 +47,4 @@ export declare function getBatchResultsDir(argv: string[]): string | undefined;
|
|
|
47
47
|
export declare function getTimeoutMs(argv: string[]): number;
|
|
48
48
|
export declare function looksLikeCliFlag(value: string | undefined): boolean;
|
|
49
49
|
export declare function countLines(path: string): Promise<number>;
|
|
50
|
-
export declare function listBatchResultFiles(batchDir: string): Promise<string[]>;
|
|
51
50
|
//# sourceMappingURL=args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/args.ts"],"names":[],"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,SAAS,CAGrE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAKnD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEnE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB9D"}
|
package/dist/audit/cli/args.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// sites-pinned: tests/audit/cli-args-utils.test.ts, tests/audit/functional-preflight.test.ts
|
|
2
2
|
import { createReadStream, existsSync } from "node:fs";
|
|
3
|
-
import { readdir } from "node:fs/promises";
|
|
4
3
|
import { Buffer } from "node:buffer";
|
|
5
4
|
import { join, resolve } from "node:path";
|
|
6
5
|
import { artifactNameForId, auditArtifactsDir, callerWorkingDirectory, discoverRepoRoot, isCanonicalResultFilename, quotePromptCommandArg, renderPromptCommand, resolveRepoRoot, toPromptPathToken, } from "audit-tools/shared";
|
|
@@ -120,17 +119,4 @@ export async function countLines(path) {
|
|
|
120
119
|
stream.on("error", reject);
|
|
121
120
|
});
|
|
122
121
|
}
|
|
123
|
-
export async function listBatchResultFiles(batchDir) {
|
|
124
|
-
const entries = await readdir(batchDir, { withFileTypes: true });
|
|
125
|
-
const files = entries
|
|
126
|
-
.filter((entry) => entry.isFile() &&
|
|
127
|
-
entry.name.toLowerCase().endsWith(".json") &&
|
|
128
|
-
isCanonicalResultFilename(entry.name))
|
|
129
|
-
.map((entry) => join(batchDir, entry.name))
|
|
130
|
-
.sort();
|
|
131
|
-
if (files.length === 0) {
|
|
132
|
-
throw new Error(`No canonical audit result files (<stem>_<digest>.json) found in ${batchDir}.`);
|
|
133
|
-
}
|
|
134
|
-
return files;
|
|
135
|
-
}
|
|
136
122
|
//# sourceMappingURL=args.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../src/audit/cli/args.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actBundle } from "../io/artifacts.js";
|
|
4
4
|
import type { EdgeReasoningResults } from "../orchestrator/edgeReasoning.js";
|
|
5
|
-
import type { AuditResult } from "../types.js";
|
|
6
5
|
import type { AnalyzerSetting } from "audit-tools/shared";
|
|
7
6
|
import type { ExternalAnalyzerResults } from "audit-tools/shared";
|
|
8
7
|
import type { ExternalAcquisitionAdvanceOptions } from "../orchestrator/acquisitionExecutor.js";
|
|
@@ -16,22 +15,7 @@ export interface RunAuditStepOptions {
|
|
|
16
15
|
* one it resolved under its hold; {@link runAuditStep} resolves it itself.
|
|
17
16
|
*/
|
|
18
17
|
sourceRoot?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Overwrite every supplied finding's `grounding` with the tool's own re-check
|
|
21
|
-
* against the source root, before validation (the CLI batch lane's half of the
|
|
22
|
-
* S7 grounding contract — see {@link stampToolComputedGrounding}).
|
|
23
|
-
*/
|
|
24
|
-
groundAuditResults?: boolean;
|
|
25
18
|
preferredExecutor?: string;
|
|
26
|
-
auditResultsPath?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Already-validated host-handoff results. This is the in-process counterpart
|
|
29
|
-
* to `auditResultsPath`: the zero-adapter host boundary validates and binds
|
|
30
|
-
* each untrusted result before handing the normalized AuditResult objects to
|
|
31
|
-
* the ordinary result-ingestion executor.
|
|
32
|
-
*/
|
|
33
|
-
auditResultsData?: AuditResult[];
|
|
34
|
-
runtimeUpdatesPath?: string;
|
|
35
19
|
/** Provide a file path OR an already-parsed object; path is only read when the object is absent. */
|
|
36
20
|
externalAnalyzerPath?: string;
|
|
37
21
|
externalAnalyzerData?: ExternalAnalyzerResults;
|
|
@@ -87,47 +71,4 @@ export declare function runAuditStep(options: RunAuditStepOptions): Promise<Adva
|
|
|
87
71
|
export declare function runAuditStepUnlocked(options: RunAuditStepOptions & {
|
|
88
72
|
sourceRoot: string;
|
|
89
73
|
}, bundle: ArtifactBundle, runLogger?: RunLogger): Promise<AdvanceAuditResult>;
|
|
90
|
-
/**
|
|
91
|
-
* The CLI batch lane's half of the S7 grounding contract (docs-16): overwrite
|
|
92
|
-
* every finding's `grounding` with the TOOL's own re-check before the payload
|
|
93
|
-
* reaches validation or the ledger.
|
|
94
|
-
*
|
|
95
|
-
* OVERWRITE, not refuse: unlike the host-handoff boundary — whose worker
|
|
96
|
-
* submissions are raw and where a supplied verdict is rejected outright — this
|
|
97
|
-
* lane also carries results a previous ingest already grounded, so a refusal
|
|
98
|
-
* would reject legitimate re-imports. Recomputing is idempotent on those and
|
|
99
|
-
* strips a self-reported verdict from the rest. Runs BEFORE `validateAuditResults`
|
|
100
|
-
* and shape-guards its own traversal, so a malformed payload still fails at the
|
|
101
|
-
* validation gate with its normal message instead of throwing here.
|
|
102
|
-
*
|
|
103
|
-
* Exported so the contract is tested against THIS mechanism directly: the only
|
|
104
|
-
* alternative seam is the multi-minute end-to-end batch-ingest fixture, and a
|
|
105
|
-
* test that cannot reach the code it names is not a guard.
|
|
106
|
-
*/
|
|
107
|
-
export declare function stampToolComputedGrounding(root: string, results: readonly unknown[]): Promise<void>;
|
|
108
|
-
export declare function ingestBatchAuditResults(options: {
|
|
109
|
-
root: string;
|
|
110
|
-
artifactsDir: string;
|
|
111
|
-
batchDir: string;
|
|
112
|
-
}): Promise<{
|
|
113
|
-
batchFiles: string[];
|
|
114
|
-
bundle: ArtifactBundle;
|
|
115
|
-
audit_state: {
|
|
116
|
-
status: "active" | "blocked" | "complete" | "not_started";
|
|
117
|
-
obligations: {
|
|
118
|
-
state: "not_applicable" | "blocked" | "missing" | "present" | "stale" | "satisfied";
|
|
119
|
-
id: string;
|
|
120
|
-
reason?: string | undefined;
|
|
121
|
-
}[];
|
|
122
|
-
last_executor?: string | undefined;
|
|
123
|
-
last_obligation?: string | undefined;
|
|
124
|
-
blockers?: string[] | undefined;
|
|
125
|
-
};
|
|
126
|
-
selected_obligation: string | null;
|
|
127
|
-
selected_executor: string;
|
|
128
|
-
progress_made: boolean;
|
|
129
|
-
artifacts_written: string[];
|
|
130
|
-
progress_summary: string;
|
|
131
|
-
next_likely_step: string | null;
|
|
132
|
-
}>;
|
|
133
74
|
//# sourceMappingURL=auditStep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"auditStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,SAAS,EAMV,MAAM,oBAAoB,CAAC;AAO5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAI7E,OAAO,KAAK,EAAE,eAAe,EAAkD,MAAM,oBAAoB,CAAC;AAC1G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oGAAoG;IACpG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,uBAAuB,CAAC;IAC/C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uFAAuF;IACvF,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,iCAAiC,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAmB7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EACrD,MAAM,EAAE,cAAc,EACtB,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAO7B"}
|
|
@@ -4,20 +4,14 @@ import { readAuditReviewSubmission, currentAuditReviewInputRevision } from "./re
|
|
|
4
4
|
import { GATE_LANES, systemicChallengeLane } from "./laneSubmissions.js";
|
|
5
5
|
// sites-pinned: tests/audit/next-step-helpers.test.ts, tests/audit/charter-emit-order.test.ts, tests/audit/executor-registry-sync.test.ts, tests/audit/pipeline-integration.test.ts, tests/audit/review-evidence-right-sizing.test.ts
|
|
6
6
|
import { access } from "node:fs/promises";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { readJsonFile, RunLogger, CharterExtractionMergedSchema, CharterComparisonSubmissionSchema, CharterFidelitySubmissionSchema, ClarificationAnswersSubmissionSchema, } from "audit-tools/shared";
|
|
9
9
|
import { systemicChallengeSchemaForBundle } from "../orchestrator/systemicChallengeExecutor.js";
|
|
10
10
|
import { loadArtifactBundle, writeCoreArtifacts, } from "../io/artifacts.js";
|
|
11
11
|
import { advanceAudit } from "../orchestrator/advance.js";
|
|
12
|
-
import { decideNextStep } from "../orchestrator/nextStep.js";
|
|
13
|
-
import { deriveAuditState } from "../orchestrator/state.js";
|
|
14
12
|
import { IntentEquivalenceVerdictSchema } from "../orchestrator/intentEquivalenceExecutor.js";
|
|
15
13
|
import { sizeIndexFromManifest } from "../orchestrator/reviewPackets.js";
|
|
16
|
-
import { partitionOrphanedAuditResults } from "../orchestrator/resultIngestion.js";
|
|
17
|
-
import { validateAuditResults, formatAuditResultIssues, } from "../validation/auditResults.js";
|
|
18
|
-
import { formatAuditResultValidationError } from "./workerResult.js";
|
|
19
14
|
import { laneSubmissionPath } from "./laneSubmissions.js";
|
|
20
|
-
import { looksLikeCliFlag, listBatchResultFiles } from "./args.js";
|
|
21
15
|
import { buildLineIndex } from "./lineIndex.js";
|
|
22
16
|
export async function runAuditStep(options) {
|
|
23
17
|
const runLogger = new RunLogger(join(options.artifactsDir, "run.log.jsonl"), {
|
|
@@ -27,13 +21,16 @@ export async function runAuditStep(options) {
|
|
|
27
21
|
// Host semantic review never runs here: it is emitted as a workload and this
|
|
28
22
|
// lock only covers local artifact derivation and result ingestion.
|
|
29
23
|
return await withArtifactTreeHold(options.artifactsDir, runLogger, async () => {
|
|
24
|
+
// Check admitted tooling policy before an unsupported standalone executor
|
|
25
|
+
// can restore, create or change the qualified review's frozen snapshot.
|
|
26
|
+
const bundle = await loadArtifactBundle(options.artifactsDir);
|
|
30
27
|
// The run's frozen snapshot is run state: created once per run, under the
|
|
31
28
|
// hold, and read by every content reader of this step.
|
|
32
29
|
const sourceRoot = await ensureRunSourceRoot(options.root, options.artifactsDir);
|
|
33
30
|
const since = options.since === undefined
|
|
34
31
|
? undefined
|
|
35
32
|
: await resolveRunSince(options.root, options.artifactsDir, options.since);
|
|
36
|
-
return runAuditStepLocked({ ...options, since }, runLogger, sourceRoot);
|
|
33
|
+
return runAuditStepLocked({ ...options, since }, runLogger, sourceRoot, bundle);
|
|
37
34
|
});
|
|
38
35
|
}
|
|
39
36
|
/**
|
|
@@ -59,8 +56,7 @@ export async function runAuditStepUnlocked(options, bundle, runLogger) {
|
|
|
59
56
|
});
|
|
60
57
|
return await executeAdvance(options, bundle, logger, options.sourceRoot);
|
|
61
58
|
}
|
|
62
|
-
async function runAuditStepLocked(options, runLogger, sourceRoot) {
|
|
63
|
-
const bundle = await loadArtifactBundle(options.artifactsDir);
|
|
59
|
+
async function runAuditStepLocked(options, runLogger, sourceRoot, bundle) {
|
|
64
60
|
const result = await executeAdvance(options, bundle, runLogger, sourceRoot);
|
|
65
61
|
// Prune: result.updated_bundle is the full accumulated bundle, so an artifact
|
|
66
62
|
// an executor cleared to `undefined` must be removed from disk (not left to
|
|
@@ -82,60 +78,6 @@ async function executeAdvance(options, bundle, runLogger, sourceRoot) {
|
|
|
82
78
|
const sizeIndex = bundle.repo_manifest
|
|
83
79
|
? sizeIndexFromManifest(bundle.repo_manifest)
|
|
84
80
|
: undefined;
|
|
85
|
-
if (looksLikeCliFlag(options.auditResultsPath)) {
|
|
86
|
-
throw new Error(`Invalid audit results path '${options.auditResultsPath}'. This looks like a CLI flag rather than a file path.`);
|
|
87
|
-
}
|
|
88
|
-
if (options.auditResultsPath !== undefined && options.auditResultsData !== undefined) {
|
|
89
|
-
throw new Error("Provide either auditResultsPath or auditResultsData, not both.");
|
|
90
|
-
}
|
|
91
|
-
let auditResults = options.auditResultsData ??
|
|
92
|
-
(options.auditResultsPath
|
|
93
|
-
? await readJsonFile(options.auditResultsPath)
|
|
94
|
-
: undefined);
|
|
95
|
-
if (options.groundAuditResults === true && Array.isArray(auditResults)) {
|
|
96
|
-
await stampToolComputedGrounding(sourceRoot, auditResults);
|
|
97
|
-
}
|
|
98
|
-
if (auditResults !== undefined) {
|
|
99
|
-
// Partition results whose task_id is no longer in the active manifest — e.g.
|
|
100
|
-
// selective-deepening tasks pruned by a later re-plan. Only the RETAINED
|
|
101
|
-
// (task-known) subset is validated below: an orphan cannot be validated
|
|
102
|
-
// against a task that no longer exists, and would otherwise abort the whole
|
|
103
|
-
// batch at the validation gate and strand every valid result. But O2's
|
|
104
|
-
// RETAIN-UNASSIGNED invariant means an orphan is NEVER pruned from the
|
|
105
|
-
// ledger — so the FULL set (retained + orphaned) still flows to advanceAudit,
|
|
106
|
-
// where the append-only ledger keeps the orphan, just un-associated.
|
|
107
|
-
const partition = partitionOrphanedAuditResults(auditResults, new Set((bundle.audit_tasks ?? []).map((task) => task.task_id)));
|
|
108
|
-
const orphaned = partition && partition.orphanedTaskIds.length > 0 ? partition : null;
|
|
109
|
-
const resultsToValidate = orphaned ? orphaned.retained : auditResults;
|
|
110
|
-
if (orphaned) {
|
|
111
|
-
process.stderr.write(`audit-results ingestion: ${orphaned.orphanedTaskIds.length} result(s) whose task_id ` +
|
|
112
|
-
`is not in the active manifest (orphaned by re-planning) retained in the ledger but skipped at the validation gate: ${orphaned.orphanedTaskIds.join(", ")}\n`);
|
|
113
|
-
}
|
|
114
|
-
const issues = validateAuditResults(resultsToValidate, bundle.audit_tasks ?? [], {
|
|
115
|
-
lineIndex,
|
|
116
|
-
});
|
|
117
|
-
const errors = issues.filter((issue) => issue.severity === "error");
|
|
118
|
-
const warnings = issues.filter((issue) => issue.severity === "warning");
|
|
119
|
-
if (warnings.length > 0) {
|
|
120
|
-
// Cap the per-warning detail so a run with many out-of-scope-evidence
|
|
121
|
-
// warnings (each listing the task's full assigned-file set) doesn't bury
|
|
122
|
-
// the rest of the output. The count is exact; the detail is a sample.
|
|
123
|
-
const WARNING_DETAIL_CAP = 10;
|
|
124
|
-
const moreSuffix = warnings.length > WARNING_DETAIL_CAP
|
|
125
|
-
? `\n ... (+${warnings.length - WARNING_DETAIL_CAP} more warning(s) suppressed)`
|
|
126
|
-
: "";
|
|
127
|
-
process.stderr.write(`[${new Date().toISOString()}] audit-results validation (artifacts: ${options.artifactsDir}): ${warnings.length} warning(s):\n` +
|
|
128
|
-
formatAuditResultIssues(warnings.slice(0, WARNING_DETAIL_CAP)) +
|
|
129
|
-
moreSuffix +
|
|
130
|
-
"\n");
|
|
131
|
-
}
|
|
132
|
-
if (errors.length > 0) {
|
|
133
|
-
throw new Error(formatAuditResultValidationError(errors));
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const runtimeValidationUpdates = options.runtimeUpdatesPath
|
|
137
|
-
? await readJsonFile(options.runtimeUpdatesPath)
|
|
138
|
-
: undefined;
|
|
139
81
|
const externalAnalyzerResults = options.externalAnalyzerData ??
|
|
140
82
|
(options.externalAnalyzerPath
|
|
141
83
|
? await readJsonFile(options.externalAnalyzerPath)
|
|
@@ -170,8 +112,6 @@ async function executeAdvance(options, bundle, runLogger, sourceRoot) {
|
|
|
170
112
|
artifactsDir: options.artifactsDir,
|
|
171
113
|
lineIndex,
|
|
172
114
|
sizeIndex,
|
|
173
|
-
auditResults: auditResults,
|
|
174
|
-
runtimeValidationUpdates,
|
|
175
115
|
externalAnalyzerResults,
|
|
176
116
|
narrativeResults,
|
|
177
117
|
criticalFlowFallbackResults,
|
|
@@ -206,76 +146,4 @@ async function executeAdvance(options, bundle, runLogger, sourceRoot) {
|
|
|
206
146
|
runLogger,
|
|
207
147
|
});
|
|
208
148
|
}
|
|
209
|
-
/**
|
|
210
|
-
* The CLI batch lane's half of the S7 grounding contract (docs-16): overwrite
|
|
211
|
-
* every finding's `grounding` with the TOOL's own re-check before the payload
|
|
212
|
-
* reaches validation or the ledger.
|
|
213
|
-
*
|
|
214
|
-
* OVERWRITE, not refuse: unlike the host-handoff boundary — whose worker
|
|
215
|
-
* submissions are raw and where a supplied verdict is rejected outright — this
|
|
216
|
-
* lane also carries results a previous ingest already grounded, so a refusal
|
|
217
|
-
* would reject legitimate re-imports. Recomputing is idempotent on those and
|
|
218
|
-
* strips a self-reported verdict from the rest. Runs BEFORE `validateAuditResults`
|
|
219
|
-
* and shape-guards its own traversal, so a malformed payload still fails at the
|
|
220
|
-
* validation gate with its normal message instead of throwing here.
|
|
221
|
-
*
|
|
222
|
-
* Exported so the contract is tested against THIS mechanism directly: the only
|
|
223
|
-
* alternative seam is the multi-minute end-to-end batch-ingest fixture, and a
|
|
224
|
-
* test that cannot reach the code it names is not a guard.
|
|
225
|
-
*/
|
|
226
|
-
export async function stampToolComputedGrounding(root, results) {
|
|
227
|
-
const readSource = createMemoizedSourceReader();
|
|
228
|
-
// Enumerate once when there are findings; empty submissions need no git call.
|
|
229
|
-
let knownPaths;
|
|
230
|
-
for (const result of results) {
|
|
231
|
-
if (typeof result !== "object" || result === null)
|
|
232
|
-
continue;
|
|
233
|
-
const findings = result.findings;
|
|
234
|
-
if (!Array.isArray(findings))
|
|
235
|
-
continue;
|
|
236
|
-
for (const finding of findings) {
|
|
237
|
-
if (typeof finding !== "object" || finding === null)
|
|
238
|
-
continue;
|
|
239
|
-
const typed = finding;
|
|
240
|
-
knownPaths ??= await enumerateTrackedFilePaths(root);
|
|
241
|
-
await groundFinding(root, typed, readSource, knownPaths);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
export async function ingestBatchAuditResults(options) {
|
|
246
|
-
const batchFiles = await listBatchResultFiles(options.batchDir);
|
|
247
|
-
// A batch directory is one host submission boundary. Ingest every canonical
|
|
248
|
-
// file atomically so partial files cannot trigger selective-deepening/requeue
|
|
249
|
-
// derivation between siblings and manufacture new pending review tasks before
|
|
250
|
-
// the rest of the same batch is visible.
|
|
251
|
-
const payloads = await Promise.all(batchFiles.map((batchFile) => readJsonFile(batchFile)));
|
|
252
|
-
const auditResultsData = payloads.flatMap((payload) => Array.isArray(payload) ? payload : [payload]);
|
|
253
|
-
const step = batchFiles.length > 0
|
|
254
|
-
? await runAuditStep({
|
|
255
|
-
root: options.root,
|
|
256
|
-
artifactsDir: options.artifactsDir,
|
|
257
|
-
preferredExecutor: "result_ingestion_executor",
|
|
258
|
-
auditResultsData,
|
|
259
|
-
groundAuditResults: true,
|
|
260
|
-
})
|
|
261
|
-
: null;
|
|
262
|
-
const bundle = step?.updated_bundle ??
|
|
263
|
-
(await loadArtifactBundle(options.artifactsDir));
|
|
264
|
-
const state = deriveAuditState(bundle);
|
|
265
|
-
const decision = decideNextStep(bundle);
|
|
266
|
-
return {
|
|
267
|
-
batchFiles,
|
|
268
|
-
bundle,
|
|
269
|
-
audit_state: state,
|
|
270
|
-
selected_obligation: step?.selected_obligation ?? decision.selected_obligation,
|
|
271
|
-
selected_executor: step?.selected_executor ?? "result_ingestion_executor",
|
|
272
|
-
progress_made: step?.progress_made ?? false,
|
|
273
|
-
artifacts_written: step?.artifacts_written ?? [],
|
|
274
|
-
progress_summary: `Imported ${batchFiles.length} batch result file${batchFiles.length === 1 ? "" : "s"} from ${options.batchDir}.` +
|
|
275
|
-
(step
|
|
276
|
-
? `\n${batchFiles.map((file) => basename(file)).join(", ")}: ${step.progress_summary}`
|
|
277
|
-
: ""),
|
|
278
|
-
next_likely_step: state.status === "complete" ? null : decision.selected_obligation,
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
149
|
//# sourceMappingURL=auditStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditStep.js","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACzE,sOAAsO;AACtO,OAAO,EAAE,MAA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cleanup.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/cleanup.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC1C,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAiCF,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/cleanup.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC1C,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAiCF,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAoExB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { rm } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { isFileMissingError, readJsonFile } from "audit-tools/shared";
|
|
5
|
-
import { ARTIFACT_DEFINITIONS, isWorkingDirFullyPromoted } from "../io/artifacts.js";
|
|
5
|
+
import { ARTIFACT_DEFINITIONS, isWorkingDirFullyPromoted, retiredRunEvidenceIsArchived } from "../io/artifacts.js";
|
|
6
6
|
import { removeRunSnapshot } from "../io/runSnapshot.js";
|
|
7
7
|
// Remove a stale working artifacts directory. Two callers, ONE rule: the
|
|
8
8
|
// `cleanup` CLI command (cmdCleanup) and the next-step pre-run sweep
|
|
@@ -48,6 +48,9 @@ export async function cleanupStaleArtifactsDir(artifactsDir, options = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
// State file missing — status stays "unknown".
|
|
50
50
|
}
|
|
51
|
+
if (!force && status === "not_started" && !(await retiredRunEvidenceIsArchived(artifactsDir))) {
|
|
52
|
+
return { action: "skipped", status, reason: "Historical audit evidence is not safely archived. The working audit was kept." };
|
|
53
|
+
}
|
|
51
54
|
const stale = status === "not_started" ||
|
|
52
55
|
(status === "complete" && (force || (await isWorkingDirFullyPromoted(artifactsDir))));
|
|
53
56
|
const resumable = status === "active" || status === "blocked";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/audit/cli/cleanup.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/audit/cli/cleanup.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,E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M,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GACA,MAAM,
|
|
1
|
+
{"version":3,"file":"confirmIntentStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/confirmIntentStep.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,6CAA6C,CAAC;AAYzG;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,CAAC,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM,EACvB,SAAS,GAAE,cAAc,CAAC,MAAM,CAAU,GACzC,SAAS,GAAG,MAAM,CAUpB;AAwBD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,cAAc,EACzB,IAAI,EAAE;IACJ,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GACA,MAAM,CAuRR"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// sites-pinned: tests/audit/intent-checkpoint.test.ts
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { IntentCheckpointSchema, FileDispositionStatusSchema } from "audit-tools/shared";
|
|
3
|
+
import { BUILT_IN_REVIEW_LENSES } from "../../shared/types/reviewQuestion.js";
|
|
4
|
+
import { REVIEW_LENS_PLAYBOOKS } from "../orchestrator/reviewLensPlaybooks.js";
|
|
5
5
|
import { CONCEPTUAL_PERSPECTIVES, DEFAULT_CONCEPTUAL_PERSPECTIVES, } from "../orchestrator/designReviewPrompt.js";
|
|
6
6
|
function isAggregatedRow(row) {
|
|
7
7
|
return "prefix" in row && row.prefix !== undefined;
|
|
@@ -88,10 +88,8 @@ export function renderConfirmIntentPrompt(preDigest, opts) {
|
|
|
88
88
|
const overrideProposalLines = preDigest.disposition_override_proposals
|
|
89
89
|
.map((p) => `- \`${p.path}\` → \`${p.proposed_status}\` (${p.reason})`)
|
|
90
90
|
.join("\n");
|
|
91
|
-
// Render
|
|
92
|
-
// row per lens, in registry order. Mandatory rows always show ● mandatory.
|
|
91
|
+
// Render one recommendation per built-in question lens, in registry order.
|
|
93
92
|
const dispositionCell = {
|
|
94
|
-
mandatory: "● mandatory",
|
|
95
93
|
recommend_include: "✓ recommend include",
|
|
96
94
|
recommend_exclude: "✗ recommend exclude",
|
|
97
95
|
};
|
|
@@ -99,10 +97,6 @@ export function renderConfirmIntentPrompt(preDigest, opts) {
|
|
|
99
97
|
.map((p) => `| ${p.lens.padEnd(18)} | ${(dispositionCell[p.disposition] ?? p.disposition).padEnd(21)} | ${p.reason} |`)
|
|
100
98
|
.join("\n");
|
|
101
99
|
const hasOverrideProposals = preDigest.disposition_override_proposals.length > 0;
|
|
102
|
-
// Derive the mandatory-lens prose from the authoritative MANDATORY_LENSES
|
|
103
|
-
// constant so the rendered guidance can never drift from the enforced set
|
|
104
|
-
// (MNT-df8c4551).
|
|
105
|
-
const mandatoryLensList = MANDATORY_LENSES.join(", ");
|
|
106
100
|
const unresolvedClauses = opts.unresolvedConstraintClauses ?? [];
|
|
107
101
|
const hasBlockingClauses = unresolvedClauses.length > 0;
|
|
108
102
|
const proposedDepth = proposeConceptualDepth(opts.intentSummary, opts.freeFormIntent, preDigest.mode);
|
|
@@ -204,24 +198,18 @@ export function renderConfirmIntentPrompt(preDigest, opts) {
|
|
|
204
198
|
: []),
|
|
205
199
|
"## Lens proposition",
|
|
206
200
|
"",
|
|
207
|
-
"
|
|
208
|
-
"never re-confirmed), ✓ = recommend include, ✗ = recommend exclude.",
|
|
201
|
+
"Intake evidence suggests which questions may be useful. Recommendations are not coverage and no lens is mandatory.",
|
|
209
202
|
"",
|
|
210
203
|
"| Lens | Disposition | Why |",
|
|
211
204
|
"|--------------------|-----------------------|-----|",
|
|
212
205
|
lensTableRows,
|
|
213
206
|
"",
|
|
214
207
|
"Use this prepared table as the proposal for the operator's choices.",
|
|
215
|
-
"The operator
|
|
216
|
-
`Mandatory lenses (${mandatoryLensList}) stay enabled.`,
|
|
208
|
+
"The operator can narrow the selection or request a materially different custom question; do not start separate code research during confirmation.",
|
|
217
209
|
"",
|
|
218
210
|
"Canonical lens meanings (for your review; you need not show these to the user):",
|
|
219
211
|
"",
|
|
220
|
-
...
|
|
221
|
-
// The one-line meaning lives in the lens registry, the one home for lens prose.
|
|
222
|
-
const desc = lensDefinition(lens)?.summary;
|
|
223
|
-
return `- **${lens}**${desc ? ` — ${desc}` : ""}`;
|
|
224
|
-
}),
|
|
212
|
+
...BUILT_IN_REVIEW_LENSES.map((lens) => `- **${lens}**: ${REVIEW_LENS_PLAYBOOKS[lens]}`),
|
|
225
213
|
"",
|
|
226
214
|
"## Conceptual design-review depth",
|
|
227
215
|
"",
|
|
@@ -247,17 +235,15 @@ export function renderConfirmIntentPrompt(preDigest, opts) {
|
|
|
247
235
|
"specific tool). Ask:",
|
|
248
236
|
"",
|
|
249
237
|
"1. Present the scope summary above.",
|
|
250
|
-
"2.
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
" mandatory (●) rows — they are always on. The user may add **any number** of",
|
|
254
|
-
" additional custom lenses (freeform names).",
|
|
238
|
+
"2. Confirm the question lenses that matter for this audit. For targeted work,",
|
|
239
|
+
" record the exact chosen set and any reasons the operator gives for omissions.",
|
|
240
|
+
" Add a custom lens only when it represents a materially different question.",
|
|
255
241
|
`3. Ask the conceptual design-review depth (proposed **${proposedDepth}** for this intent). The choice is fresh each run and remains the user's confirmation.`,
|
|
256
242
|
"4. Wait for the user to confirm before proceeding.",
|
|
257
243
|
"",
|
|
258
|
-
"Record
|
|
259
|
-
"
|
|
260
|
-
"
|
|
244
|
+
"Record a deliberate `lens_selection.include` as an exact list, not an addition to a default set.",
|
|
245
|
+
"Use `exclude` to remove named lenses from otherwise applicable planning, and record operator reasons in `omission_reasons`.",
|
|
246
|
+
"Omit the selection if the operator asked the planner to choose all applicable lenses. Do not infer an explicit omission from weak evidence.",
|
|
261
247
|
"",
|
|
262
248
|
"## What to do",
|
|
263
249
|
"",
|
|
@@ -289,7 +275,7 @@ export function renderConfirmIntentPrompt(preDigest, opts) {
|
|
|
289
275
|
' "excluded_scope": [{ "path": "<path or prefix>", "reason": "<why>" }],',
|
|
290
276
|
' "must_not_touch": ["<glob>"],',
|
|
291
277
|
` "disposition_overrides": [{ "path": "<path>", "status": "<${FileDispositionStatusSchema.options.join("|")}>", "reason": "<why>" }],`,
|
|
292
|
-
' "lens_selection": { "include": ["
|
|
278
|
+
' "lens_selection": { "include": ["behavior"], "exclude": ["performance"], "omission_reasons": {"performance":"not needed for this retry-focused review"} },',
|
|
293
279
|
// The example carries the PROPOSED depth; on deep it carries the default
|
|
294
280
|
// perspective count the prose above promises, and on shallow it omits
|
|
295
281
|
// `perspectives` (the bullet below says to), so copying it is never wrong.
|
|
@@ -312,9 +298,8 @@ export function renderConfirmIntentPrompt(preDigest, opts) {
|
|
|
312
298
|
' "Excluded / Out-of-Scope".',
|
|
313
299
|
"- `disposition_overrides` patches the file disposition before coverage",
|
|
314
300
|
" initialization — overridden files never enter coverage at all.",
|
|
315
|
-
"-
|
|
316
|
-
"
|
|
317
|
-
" with context derived from the lens name and `free_form_intent`.",
|
|
301
|
+
"- Lens IDs are the seven above or `custom:<slug>`. Reconfirm archived or invalid IDs instead of silently translating them.",
|
|
302
|
+
" A custom name alone does not establish a reviewable question or grant access to files.",
|
|
318
303
|
"- `design_review.answered_at` MUST repeat this run's `confirmed_at` verbatim.",
|
|
319
304
|
" These dials are answered **per run** — the tool honors them only for the",
|
|
320
305
|
" confirmation that supplied them, so the next audit asks again rather than",
|