audit-tools 0.51.7 → 0.51.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/clarification/blastRadius.d.ts +17 -16
- package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
- package/dist/audit/clarification/blastRadius.js +48 -44
- package/dist/audit/clarification/blastRadius.js.map +1 -1
- package/dist/audit/clarification/dials.d.ts +4 -4
- package/dist/audit/clarification/dials.d.ts.map +1 -1
- package/dist/audit/clarification/dials.js +1 -0
- package/dist/audit/clarification/dials.js.map +1 -1
- package/dist/audit/clarification/partition.d.ts +12 -21
- package/dist/audit/clarification/partition.d.ts.map +1 -1
- package/dist/audit/clarification/partition.js +52 -59
- package/dist/audit/clarification/partition.js.map +1 -1
- package/dist/audit/clarification/riskGate.d.ts +2 -2
- package/dist/audit/clarification/riskGate.d.ts.map +1 -1
- package/dist/audit/clarification/riskGate.js +1 -0
- package/dist/audit/clarification/riskGate.js.map +1 -1
- package/dist/audit/clarification/voiQueue.d.ts +3 -3
- package/dist/audit/clarification/voiQueue.d.ts.map +1 -1
- package/dist/audit/clarification/voiQueue.js +1 -0
- package/dist/audit/clarification/voiQueue.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +14 -2
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +13 -5
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.d.ts +6 -9
- package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.js +35 -47
- package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +14 -0
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterComparisonPrompt.js +111 -0
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -0
- package/dist/audit/cli/charterExtractionPrompt.d.ts +14 -17
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +81 -104
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/charterFidelityPrompt.d.ts +14 -0
- package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterFidelityPrompt.js +58 -0
- package/dist/audit/cli/charterFidelityPrompt.js.map +1 -0
- package/dist/audit/cli/conceptualDispatch.d.ts +39 -6
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +59 -12
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +46 -2
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +18 -6
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +525 -67
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +24 -0
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +9 -1
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
- package/dist/audit/cli/foldTransaction.js +14 -3
- package/dist/audit/cli/foldTransaction.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +4 -1
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
- package/dist/audit/cli/intakeCommand.js +1 -0
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +18 -12
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +40 -4
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +14 -14
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +7 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +206 -31
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +92 -28
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +363 -126
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +10 -0
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +3 -1
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +12 -0
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +242 -29
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +12 -4
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +9 -0
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +71 -30
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +29 -66
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +43 -2
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -1
- package/dist/audit/cli/stepScaffold.js +24 -10
- package/dist/audit/cli/stepScaffold.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +52 -29
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +44 -14
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +4 -1
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +65 -16
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +89 -8
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +14 -21
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +0 -1
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/decompose/findings.d.ts.map +1 -1
- package/dist/audit/decompose/findings.js +10 -2
- package/dist/audit/decompose/findings.js.map +1 -1
- package/dist/audit/extractors/designAssessment.d.ts.map +1 -1
- package/dist/audit/extractors/designAssessment.js +13 -4
- package/dist/audit/extractors/designAssessment.js.map +1 -1
- package/dist/audit/extractors/disposition.d.ts.map +1 -1
- package/dist/audit/extractors/disposition.js +17 -5
- package/dist/audit/extractors/disposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +224 -17
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/extractors/leadLineage.d.ts +10 -0
- package/dist/audit/extractors/leadLineage.d.ts.map +1 -0
- package/dist/audit/extractors/leadLineage.js +44 -0
- package/dist/audit/extractors/leadLineage.js.map +1 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +25 -8
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +76 -1
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +113 -20
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts +15 -0
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +158 -11
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +30 -4
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +28 -5
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +39 -1
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.js +4 -1
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +11 -17
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +61 -93
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts +24 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js +110 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +34 -20
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +80 -106
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts +20 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js +76 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts +7 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js +68 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +9 -8
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +7 -6
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +7 -0
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +58 -19
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +6 -2
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +22 -8
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +1 -0
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +40 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +32 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +5 -3
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +34 -5
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -1
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts +2 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +19 -7
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +1 -0
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.js +3 -1
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts +72 -0
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +177 -20
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts +56 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js +114 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts +70 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +171 -21
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +49 -25
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +7 -5
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +1 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +13 -2
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +166 -12
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +6 -5
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +117 -0
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +277 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +0 -2
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +0 -3
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/systemic/coveredThemes.d.ts +28 -0
- package/dist/audit/systemic/coveredThemes.d.ts.map +1 -0
- package/dist/audit/systemic/coveredThemes.js +52 -0
- package/dist/audit/systemic/coveredThemes.js.map +1 -0
- package/dist/audit/systemic/reviewFileMap.d.ts +81 -0
- package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -0
- package/dist/audit/systemic/reviewFileMap.js +169 -0
- package/dist/audit/systemic/reviewFileMap.js.map +1 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +149 -26
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.d.ts +44 -4
- package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +114 -10
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/charterClarification.d.ts +9 -4
- package/dist/audit/types/charterClarification.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.d.ts +48 -93
- package/dist/audit/types/charterRegister.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.js +15 -26
- package/dist/audit/types/charterRegister.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +88 -18
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +77 -16
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types/designAssessment.d.ts +8 -6
- package/dist/audit/types/designAssessment.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +2 -2
- package/dist/audit/types/systemicChallenge.d.ts +43 -7
- package/dist/audit/types/systemicChallenge.d.ts.map +1 -1
- package/dist/audit/types.d.ts +71 -10
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +23 -2
- package/dist/audit/types.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +30 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +50 -8
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.js +14 -0
- package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +97 -2
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +163 -9
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.js +93 -3
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +31 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
- package/dist/remediate/contractPipeline/derive.d.ts +0 -14
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +52 -24
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +50 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js +77 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js.map +1 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts +85 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/idRegistry.js +147 -0
- package/dist/remediate/contractPipeline/idRegistry.js.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +13 -16
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.js +15 -30
- package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +20 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.js +23 -7
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +17 -0
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +6 -9
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +183 -0
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/sketchSource.js +255 -0
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -0
- package/dist/remediate/findingFilter.d.ts.map +1 -1
- package/dist/remediate/findingFilter.js +1 -0
- package/dist/remediate/findingFilter.js.map +1 -1
- package/dist/remediate/index.d.ts +81 -0
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +162 -53
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +43 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +82 -13
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +33 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +227 -13
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +154 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +242 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -0
- package/dist/remediate/state/runStatus.d.ts +35 -0
- package/dist/remediate/state/runStatus.d.ts.map +1 -0
- package/dist/remediate/state/runStatus.js +46 -0
- package/dist/remediate/state/runStatus.js.map +1 -0
- package/dist/remediate/state/store.d.ts +52 -2
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +124 -21
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +83 -13
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +65 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +302 -85
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +58 -21
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +87 -2
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +344 -44
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +109 -5
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +135 -27
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +167 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +428 -1
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +2 -13
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +22 -4
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +44 -40
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +501 -106
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/stepWriter.d.ts +1 -1
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +1 -0
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +32 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +1 -0
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +8 -0
- package/dist/remediate/types/options.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.d.ts +8 -0
- package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.js +12 -1
- package/dist/remediate/utils/fileIntegrity.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +19 -2
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +26 -39
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +18 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +33 -5
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +83 -5
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +46 -14
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +35 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +5 -5
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +1 -0
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/clippy.d.ts +9 -1
- package/dist/shared/analyzers/clippy.d.ts.map +1 -1
- package/dist/shared/analyzers/clippy.js +10 -2
- package/dist/shared/analyzers/clippy.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +1 -0
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +7 -1
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +8 -2
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +24 -24
- package/dist/shared/analyzers/types.d.ts.map +1 -1
- package/dist/shared/analyzers/types.js +15 -0
- package/dist/shared/analyzers/types.js.map +1 -1
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +42 -7
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/chunkByBudget.d.ts.map +1 -1
- package/dist/shared/chunkByBudget.js.map +1 -1
- package/dist/shared/continuityScore.d.ts.map +1 -1
- package/dist/shared/continuityScore.js +12 -4
- package/dist/shared/continuityScore.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +49 -45
- package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
- package/dist/shared/decompose/charterClarification.js +50 -57
- package/dist/shared/decompose/charterClarification.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +616 -342
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +590 -488
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts +36 -2
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +45 -5
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts +98 -1
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +89 -8
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +111 -0
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +28 -0
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +8 -2
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findingSimilarity.d.ts +8 -0
- package/dist/shared/findingSimilarity.d.ts.map +1 -1
- package/dist/shared/findingSimilarity.js +10 -3
- package/dist/shared/findingSimilarity.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts +15 -0
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +137 -1
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +14 -1
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +4 -0
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +41 -29
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +14 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +22 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +42 -38
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +35 -23
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/clauseBoundaries.d.ts +75 -0
- package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -0
- package/dist/shared/intent/clauseBoundaries.js +134 -0
- package/dist/shared/intent/clauseBoundaries.js.map +1 -0
- package/dist/shared/intent/clauseInterpreter.d.ts +11 -5
- package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/clauseInterpreter.js +16 -41
- package/dist/shared/intent/clauseInterpreter.js.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts +11 -0
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.js +31 -17
- package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +18 -6
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +25 -5
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +30 -9
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/schemaVersion.d.ts +4 -3
- package/dist/shared/io/schemaVersion.d.ts.map +1 -1
- package/dist/shared/io/schemaVersion.js +27 -4
- package/dist/shared/io/schemaVersion.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +38 -4
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +59 -1
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +8 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/opencodePermissions.d.ts +27 -3
- package/dist/shared/opencodePermissions.d.ts.map +1 -1
- package/dist/shared/opencodePermissions.js +77 -26
- package/dist/shared/opencodePermissions.js.map +1 -1
- package/dist/shared/prompts.d.ts +12 -1
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +11 -1
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reReview/projectionDiff.d.ts +13 -0
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
- package/dist/shared/reReview/projectionDiff.js +1 -1
- package/dist/shared/reReview/projectionDiff.js.map +1 -1
- package/dist/shared/reporting/findingDisplay.d.ts +7 -0
- package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
- package/dist/shared/reporting/findingDisplay.js +8 -1
- package/dist/shared/reporting/findingDisplay.js.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.d.ts +15 -3
- package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.js +8 -6
- package/dist/shared/steps/stepEmissionScaffold.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +37 -12
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
- package/dist/shared/submission/hostHandoffCore.js +81 -18
- package/dist/shared/submission/hostHandoffCore.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +70 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +66 -1
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +86 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +108 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +1 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/analyzerDeps.d.ts +14 -0
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
- package/dist/shared/tooling/analyzerDeps.js +23 -0
- package/dist/shared/tooling/analyzerDeps.js.map +1 -1
- package/dist/shared/tooling/commandShape.d.ts +35 -1
- package/dist/shared/tooling/commandShape.d.ts.map +1 -1
- package/dist/shared/tooling/commandShape.js +66 -4
- package/dist/shared/tooling/commandShape.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +62 -4
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +127 -8
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +674 -156
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +172 -118
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/closingActions.d.ts +25 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -1
- package/dist/shared/types/closingActions.js +26 -0
- package/dist/shared/types/closingActions.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +63 -2
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +51 -0
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/contractPipeline.d.ts +1 -0
- package/dist/shared/types/contractPipeline.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline.js +1 -0
- package/dist/shared/types/contractPipeline.js.map +1 -1
- package/dist/shared/types/contractPropertyShapes.d.ts +34 -0
- package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -0
- package/dist/shared/types/contractPropertyShapes.js +255 -0
- package/dist/shared/types/contractPropertyShapes.js.map +1 -0
- package/dist/shared/types/finding.d.ts +376 -18
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +111 -0
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +214 -2
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +273 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/intentInterpretation.d.ts +1 -1
- package/dist/shared/types/intentInterpretation.js +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +294 -30
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +96 -7
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/stepContract.d.ts +47 -0
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +113 -0
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/charterGate.d.ts +13 -28
- package/dist/shared/validation/charterGate.d.ts.map +1 -1
- package/dist/shared/validation/charterGate.js +13 -35
- package/dist/shared/validation/charterGate.js.map +1 -1
- package/dist/shared/validation/contractConstructionSites.d.ts +116 -0
- package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -0
- package/dist/shared/validation/contractConstructionSites.js +277 -0
- package/dist/shared/validation/contractConstructionSites.js.map +1 -0
- package/dist/shared/validation/designFindingGrounding.d.ts +33 -4
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +40 -6
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +11 -1
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +5 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +8 -2
- package/opencode.json +29 -29
- package/package.json +16 -3
- package/schemas/audit-code-v1alpha1.schema.json +0 -4
- package/scripts/audit/postinstall.mjs +81 -96
- package/scripts/remediate/postinstall.mjs +43 -83
- package/scripts/shared/host-asset-plan.mjs +176 -0
- package/scripts/shared/install-host-assets.mjs +44 -1
- package/scripts/shared/primitives.mjs +89 -0
- package/skills/audit-code/SKILL.md +4 -4
- package/skills/audit-code/audit-code.prompt.md +14 -10
- package/skills/remediate-code/SKILL.md +9 -5
- package/skills/remediate-code/remediate-code.prompt.md +11 -4
- package/wrapper/audit-code-wrapper-build.mjs +6 -3
- package/dist/audit/cli/charterDeltaPrompt.d.ts +0 -18
- package/dist/audit/cli/charterDeltaPrompt.d.ts.map +0 -1
- package/dist/audit/cli/charterDeltaPrompt.js +0 -150
- package/dist/audit/cli/charterDeltaPrompt.js.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts +0 -24
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.js +0 -128
- package/dist/audit/orchestrator/charterDeltaExecutor.js.map +0 -1
- package/dist/audit/supervisor/runLedger.d.ts +0 -3
- package/dist/audit/supervisor/runLedger.d.ts.map +0 -1
- package/dist/audit/supervisor/runLedger.js +0 -69
- package/dist/audit/supervisor/runLedger.js.map +0 -1
- package/dist/shared/types/executionRecord.d.ts +0 -58
- package/dist/shared/types/executionRecord.d.ts.map +0 -1
- package/dist/shared/types/executionRecord.js +0 -26
- package/dist/shared/types/executionRecord.js.map +0 -1
- package/dist/shared/types/runLedger.d.ts +0 -17
- package/dist/shared/types/runLedger.d.ts.map +0 -1
- package/dist/shared/types/runLedger.js +0 -7
- package/dist/shared/types/runLedger.js.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// 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
|
|
1
2
|
/**
|
|
2
3
|
* Extracted helpers for the next-step command.
|
|
3
4
|
*
|
|
@@ -8,14 +9,14 @@
|
|
|
8
9
|
import { randomUUID } from "node:crypto";
|
|
9
10
|
import { mkdir, readFile, unlink } from "node:fs/promises";
|
|
10
11
|
import { join, relative } from "node:path";
|
|
11
|
-
import { advance, describeStoppedFold, RunLogger, compareCodeUnits, hashContent, isFileMissingError, isJsonParseError, isRecord, readJsonFile, readTrailingSubmissionRefusals, persistAnalyzerConsent, persistAnalyzerSettings, writeJsonFile, } from "audit-tools/shared";
|
|
12
|
+
import { advance, describeStoppedFold, RunLogger, compareCodeUnits, hashContent, isFileMissingError, isJsonParseError, isMissingObservation, isRecord, readJsonFile, readSubmissionIngestHistory, readTrailingSubmissionRefusals, persistAnalyzerConsent, persistAnalyzerSettings, writeJsonFile, } from "audit-tools/shared";
|
|
12
13
|
import { loadArtifactBundle, promoteFinalAuditReport, } from "../io/artifacts.js";
|
|
13
14
|
import { auditReportPath, groundDesignFindings, laneAssetsDir, promotedAuditReportPath, } from "audit-tools/shared";
|
|
14
15
|
import { charterExtractionKindsForCeiling } from "./charterExtractionPrompt.js";
|
|
15
16
|
import { archiveCharterPackets } from "../orchestrator/charterPacketArchive.js";
|
|
16
17
|
import { LANE_SUBMISSION_SCHEMAS, charterLaneSchema, describeSubmissionShapeMismatch, unwrapSubmissionArray, } from "./laneValidators.js";
|
|
17
|
-
import { ConceptualJudgeSubmissionSchema, buildConceptualReviewAdjudication, deriveConceptualVerificationStatus, loadConceptualPerspectiveFindings, MalformedConceptualPerspectivesError, readConceptualReviewRoundManifest, } from "../types/conceptualAdjudication.js";
|
|
18
|
-
import { advanceAudit, engineMaxTransitions, findExecutorFailure, runSingleAdvanceStep, MAX_DRAIN_STEPS, } from "../orchestrator/advance.js";
|
|
18
|
+
import { ConceptualJudgeSubmissionSchema, buildConceptualReviewAdjudication, deriveConceptualVerificationStatus, loadConceptualPerspectiveFindings, MalformedConceptualPerspectivesError, readConceptualReviewRoundManifest, suppliedToolVerdictIssue, } from "../types/conceptualAdjudication.js";
|
|
19
|
+
import { advanceAudit, engineMaxTransitions, findExecutorFailure, runSingleAdvanceStep, startAdvanceHeartbeat, MAX_DRAIN_STEPS, } from "../orchestrator/advance.js";
|
|
19
20
|
import { buildDesignReviewSnapshot, isDesignReviewStale, } from "../orchestrator/designReviewSnapshot.js";
|
|
20
21
|
import { computeStaleArtifacts, emitStalenessRecord, isMetadataMigrationStaleness, resetStalenessDedup, } from "../orchestrator/staleness.js";
|
|
21
22
|
import { commitFold, createFoldTransaction, markSubmissionApplied, describeQuarantineLocation, quarantineLocationPhrase, quarantineSubmissionFile, quarantineSurvivalNote, recoverStagedSubmissions, stageLaneSubmission, } from "./foldTransaction.js";
|
|
@@ -99,7 +100,8 @@ const NEXT_STEP_RETURN_KIND_TABLE = {
|
|
|
99
100
|
design_review_contract: true,
|
|
100
101
|
design_review_conceptual: true,
|
|
101
102
|
charter_extraction: true,
|
|
102
|
-
|
|
103
|
+
charter_comparison: true,
|
|
104
|
+
charter_fidelity: true,
|
|
103
105
|
charter_clarification: true,
|
|
104
106
|
systemic_challenge: true,
|
|
105
107
|
confirm_intent: true,
|
|
@@ -408,7 +410,10 @@ export async function handleGraphEnrichmentBranch(params, bundle, state, analyze
|
|
|
408
410
|
* - `design_review_contract` → only contract pass still needed.
|
|
409
411
|
* - `design_review_conceptual` → only conceptual pass still needed.
|
|
410
412
|
*
|
|
411
|
-
*
|
|
413
|
+
* Exactly these two passes exist. The pre-split combined submission
|
|
414
|
+
* (`design-review-findings.json`) is retired: it is neither polled here nor
|
|
415
|
+
* translated anywhere, and a pre-split directory is re-asked for both current
|
|
416
|
+
* passes (see `orchestrator/state.ts`).
|
|
412
417
|
*/
|
|
413
418
|
/** Whether a completed design-review pass has gone stale vs. its snapshot. */
|
|
414
419
|
function passIsStale(bundle, pass) {
|
|
@@ -573,6 +578,23 @@ async function consumeConceptualSubmission(artifactsDir, tx) {
|
|
|
573
578
|
if (incoming.status === "quarantined") {
|
|
574
579
|
return { ...incoming, lane };
|
|
575
580
|
}
|
|
581
|
+
// BEFORE the schema parse, deliberately. The schema omits
|
|
582
|
+
// `verification_status` from every submitted finding, so a supplied value is
|
|
583
|
+
// stripped SILENTLY by the parse below — and the check that names the field
|
|
584
|
+
// lived only inside `buildConceptualReviewAdjudication`, which is reached with
|
|
585
|
+
// the ALREADY-PARSED submission. It therefore never fired here, and a judge
|
|
586
|
+
// could supply the field this whole vocabulary derives and be told nothing.
|
|
587
|
+
// Refusing it at the gate is what makes the naming reach the production path.
|
|
588
|
+
const suppliedStatus = suppliedToolVerdictIssue(incoming.value);
|
|
589
|
+
if (suppliedStatus !== null) {
|
|
590
|
+
const quarantinePath = await quarantineMisshapedSubmission(artifactsDir, incoming.path, lane, suppliedStatus);
|
|
591
|
+
return {
|
|
592
|
+
status: "quarantined",
|
|
593
|
+
quarantinePath,
|
|
594
|
+
lane,
|
|
595
|
+
reason: suppliedStatus,
|
|
596
|
+
};
|
|
597
|
+
}
|
|
576
598
|
const parsed = ConceptualJudgeSubmissionSchema.safeParse(incoming.value);
|
|
577
599
|
if (!parsed.success) {
|
|
578
600
|
const quarantinePath = await quarantineMisshapedSubmission(artifactsDir, incoming.path, lane, parsed.error);
|
|
@@ -606,9 +628,19 @@ async function consumeConceptualSubmission(artifactsDir, tx) {
|
|
|
606
628
|
generatedAt: new Date().toISOString(),
|
|
607
629
|
});
|
|
608
630
|
const refusals = await readTrailingSubmissionRefusals(artifactsDir, manifest.perspectives.map((p) => laneSubmissionId(p.lane_id)), { runId: AUDIT_GATE_SUBMISSION_SCOPE });
|
|
631
|
+
// ONE ledger read for this batch. `readTrailingSubmissionRefusals` above
|
|
632
|
+
// already paid for a scan; reusing ITS map as the accepted-history view
|
|
633
|
+
// would be wrong (it holds refusals, not acceptances) and re-reading per
|
|
634
|
+
// perspective would scan the ledger once per lane. So the shared view is
|
|
635
|
+
// taken here, and the refusal question above keeps its own reader — the two
|
|
636
|
+
// ask different questions and a single scan answering both would have to
|
|
637
|
+
// reimplement each.
|
|
638
|
+
const perspectiveHistory = await readSubmissionIngestHistory(artifactsDir, {
|
|
639
|
+
runId: AUDIT_GATE_SUBMISSION_SCOPE,
|
|
640
|
+
});
|
|
609
641
|
for (const perspective of manifest.perspectives) {
|
|
610
642
|
if (refusals.has(laneSubmissionId(perspective.lane_id))) {
|
|
611
|
-
await recordLaneOutcome(artifactsDir, perspective.lane_id, { kind: "accepted" });
|
|
643
|
+
await recordLaneOutcome(artifactsDir, perspective.lane_id, { kind: "accepted" }, perspectiveHistory);
|
|
612
644
|
}
|
|
613
645
|
}
|
|
614
646
|
// THE observation boundary for this round's perspective lanes. The tool
|
|
@@ -825,7 +857,7 @@ export async function handleDesignReviewBranch(params, bundle, state, tx) {
|
|
|
825
857
|
if (consumed) {
|
|
826
858
|
// A review changes the assessment's content, not its structural baseline.
|
|
827
859
|
// Only a newly produced adjudication may bind the new assessment revision;
|
|
828
|
-
// a contract
|
|
860
|
+
// a contract-only update must leave an older adjudication stale.
|
|
829
861
|
next.artifact_metadata = computeArtifactMetadata(next, bundle.artifact_metadata, conceptualAdjudication !== undefined && conceptualAdjudication !== bundle.conceptual_review_adjudication
|
|
830
862
|
? ["conceptual_review_adjudication.json"]
|
|
831
863
|
: []);
|
|
@@ -867,32 +899,15 @@ export async function handleDesignReviewBranch(params, bundle, state, tx) {
|
|
|
867
899
|
reason,
|
|
868
900
|
}) ?? assessment;
|
|
869
901
|
};
|
|
870
|
-
//
|
|
871
|
-
//
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
if (legacyResult.status === "ok") {
|
|
880
|
-
if (assessment) {
|
|
881
|
-
assessment = {
|
|
882
|
-
...assessment,
|
|
883
|
-
review_findings: groundDesignFindings(legacyResult.value, bundle.repo_manifest),
|
|
884
|
-
reviewed: true,
|
|
885
|
-
rejected_submissions: (assessment.rejected_submissions ?? []).filter((r) => r.pass !== "legacy"),
|
|
886
|
-
};
|
|
887
|
-
consumed = true;
|
|
888
|
-
markSubmissionApplied(tx, legacyResult.path);
|
|
889
|
-
return { action: "continue", bundle: carried() };
|
|
890
|
-
}
|
|
891
|
-
await holdWithoutTarget("legacy", GATE_LANES.design_review_legacy, legacyResult.path);
|
|
892
|
-
return { action: "continue", bundle: carried() };
|
|
893
|
-
}
|
|
894
|
-
// absent: fall through to the contract/conceptual check.
|
|
895
|
-
// New: consume contract-findings and/or conceptual-findings independently.
|
|
902
|
+
// Only the two CURRENT passes are polled. The pre-split combined-findings lane
|
|
903
|
+
// (`design_review_legacy`) was retired: it was a third judgment type that no
|
|
904
|
+
// longer corresponds to anything the tool emits, and leaving it polled meant a
|
|
905
|
+
// directory written by the pre-split release kept satisfying a pass the modern
|
|
906
|
+
// tool never asked for. A resumed pre-split run now leaves BOTH modern
|
|
907
|
+
// obligations unmet and is re-asked for each pass in its current shape — never
|
|
908
|
+
// translated from the old lane. See the invalidation at load —
|
|
909
|
+
// `designReviewPassState` in `orchestrator/state.ts`, which reads only the two
|
|
910
|
+
// modern per-pass flags and never the retired combined one.
|
|
896
911
|
const contractResult = await consumeArraySubmission(params.artifactsDir, GATE_LANES.design_review_contract, tx);
|
|
897
912
|
const conceptualResult = await consumeConceptualSubmission(params.artifactsDir, tx);
|
|
898
913
|
if (contractResult.status === "quarantined") {
|
|
@@ -1036,6 +1051,7 @@ export async function handleSynthesisNarrativeBranch(params, bundle, state, tx)
|
|
|
1036
1051
|
artifactsDir: p.artifactsDir,
|
|
1037
1052
|
preferredExecutor: "synthesis_narrative_executor",
|
|
1038
1053
|
narrativeResultsPath: path,
|
|
1054
|
+
scopeIndexMemo: p.scopeIndexMemo,
|
|
1039
1055
|
}, foldBundle),
|
|
1040
1056
|
// Narrative disabled: omit (run the deterministic omit executor below).
|
|
1041
1057
|
// Single-sourced with the plan draw's classifier (obligationPolicy.ts).
|
|
@@ -1068,6 +1084,7 @@ export async function handleIntentEquivalenceBranch(params, bundle, state, tx) {
|
|
|
1068
1084
|
artifactsDir: params.artifactsDir,
|
|
1069
1085
|
preferredExecutor: "intent_equivalence_executor",
|
|
1070
1086
|
intentEquivalenceVerdictPath: incoming.path,
|
|
1087
|
+
scopeIndexMemo: params.scopeIndexMemo,
|
|
1071
1088
|
}, bundle);
|
|
1072
1089
|
markSubmissionApplied(tx, incoming.path);
|
|
1073
1090
|
return { action: "continue", bundle: applied.updated_bundle };
|
|
@@ -1103,6 +1120,7 @@ export async function handleCriticalFlowFallbackBranch(params, bundle, state, tx
|
|
|
1103
1120
|
artifactsDir: p.artifactsDir,
|
|
1104
1121
|
preferredExecutor: "critical_flow_fallback_executor",
|
|
1105
1122
|
criticalFlowFallbackResultsPath: path,
|
|
1123
|
+
scopeIndexMemo: p.scopeIndexMemo,
|
|
1106
1124
|
}, foldBundle),
|
|
1107
1125
|
// Never omit: the obligation is only reached when the deterministic bar
|
|
1108
1126
|
// failed, and the host is always available to author the enrichment.
|
|
@@ -1127,16 +1145,15 @@ export async function handleCharterExtractionBranch(params, bundle, state, tx) {
|
|
|
1127
1145
|
if (charterExtractionOmits(bundle)) {
|
|
1128
1146
|
return { action: "run_omit" };
|
|
1129
1147
|
}
|
|
1130
|
-
// Per-kind blind lanes (design resolution 2): one submission file per
|
|
1131
|
-
// each validated at THIS chokepoint — schema shape + kind purity (a lane
|
|
1132
|
-
// only carry its own kind; anything else is a mis-routed submission)
|
|
1133
|
-
//
|
|
1134
|
-
//
|
|
1135
|
-
//
|
|
1136
|
-
//
|
|
1137
|
-
//
|
|
1138
|
-
//
|
|
1139
|
-
// ingests (`assembleCharters` joins teleologies by file-set overlap).
|
|
1148
|
+
// Per-kind blind lanes (design resolution 2): one goal-DAG submission file per
|
|
1149
|
+
// kind, each validated at THIS chokepoint — schema shape + kind purity (a lane
|
|
1150
|
+
// may only carry its own kind; anything else is a mis-routed submission). An
|
|
1151
|
+
// invalid lane is quarantined loudly and the step re-emits naming it; valid
|
|
1152
|
+
// lanes stay on disk untouched (K-of-N resume), and only when EVERY lane is
|
|
1153
|
+
// present and valid does the tool merge them into the single submission the
|
|
1154
|
+
// executor ingests (`assembleLaneGraph` per lane: cycles refused, levels
|
|
1155
|
+
// derived, scopes grounded against the repo universe with every unknown file
|
|
1156
|
+
// named — never silently narrowed).
|
|
1140
1157
|
const kinds = charterExtractionKindsForCeiling(ceiling);
|
|
1141
1158
|
const universe = new Set((bundle.repo_manifest?.files ?? []).map((file) => file.path));
|
|
1142
1159
|
const laneValues = new Map();
|
|
@@ -1172,7 +1189,7 @@ export async function handleCharterExtractionBranch(params, bundle, state, tx) {
|
|
|
1172
1189
|
// would make a later staleness-triggered re-extraction read them as fresh
|
|
1173
1190
|
// results and silently skip re-authoring.
|
|
1174
1191
|
const merged = {
|
|
1175
|
-
|
|
1192
|
+
lanes: kinds.map((kind) => laneValues.get(kind).value),
|
|
1176
1193
|
};
|
|
1177
1194
|
// The merged submission is TOOL-written, so it lives with the other lane
|
|
1178
1195
|
// assets rather than under `submissions/` (which holds only what a host
|
|
@@ -1184,6 +1201,7 @@ export async function handleCharterExtractionBranch(params, bundle, state, tx) {
|
|
|
1184
1201
|
artifactsDir: params.artifactsDir,
|
|
1185
1202
|
preferredExecutor: "charter_extraction_executor",
|
|
1186
1203
|
charterSubmissionPath: mergedPath,
|
|
1204
|
+
scopeIndexMemo: params.scopeIndexMemo,
|
|
1187
1205
|
}, bundle);
|
|
1188
1206
|
await unlink(mergedPath).catch(() => { });
|
|
1189
1207
|
for (const lane of laneValues.values()) {
|
|
@@ -1216,30 +1234,47 @@ export async function handleCharterExtractionBranch(params, bundle, state, tx) {
|
|
|
1216
1234
|
return { action: "return", result: { kind: "charter_extraction", state, bundle } };
|
|
1217
1235
|
}
|
|
1218
1236
|
/**
|
|
1219
|
-
* Handle the `
|
|
1220
|
-
* the
|
|
1221
|
-
* - a pending `
|
|
1222
|
-
* executor (ingest), then `continue`;
|
|
1223
|
-
* - otherwise, when the register is NOT `
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
|
|
1227
|
-
|
|
1237
|
+
* Handle the `charter_comparison_executor` submission-polling block (steps 2–3
|
|
1238
|
+
* — the comparison reader). Mirrors the charter-extraction branch:
|
|
1239
|
+
* - a pending `charter_comparison` lane submission → assemble + pre-check it
|
|
1240
|
+
* via the preferred executor (ingest), then `continue`;
|
|
1241
|
+
* - otherwise, when the register is NOT `comparison_pending` → `run_omit`;
|
|
1242
|
+
* - a `comparison_pending` register with no submission yet → `return` the host
|
|
1243
|
+
* step that renders the comparison prompt.
|
|
1244
|
+
*/
|
|
1245
|
+
export async function handleCharterComparisonBranch(params, bundle, state, tx) {
|
|
1246
|
+
return runOmittableGate({
|
|
1247
|
+
kind: "charter_comparison",
|
|
1248
|
+
lane: GATE_LANES.charter_comparison,
|
|
1249
|
+
schema: LANE_SUBMISSION_SCHEMAS[GATE_LANES.charter_comparison],
|
|
1250
|
+
apply: (_value, path, p, foldBundle) => runAuditStepUnlocked({
|
|
1251
|
+
root: p.root,
|
|
1252
|
+
artifactsDir: p.artifactsDir,
|
|
1253
|
+
preferredExecutor: "charter_comparison_executor",
|
|
1254
|
+
charterComparisonSubmissionPath: path,
|
|
1255
|
+
scopeIndexMemo: p.scopeIndexMemo,
|
|
1256
|
+
}, foldBundle),
|
|
1257
|
+
shouldOmit: (b) => !(b.charter_register?.comparison_pending === true),
|
|
1258
|
+
}, params, bundle, state, tx);
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Handle the `charter_fidelity_executor` submission-polling block (step 4 — the
|
|
1262
|
+
* separate fidelity lane). Same three arms as the comparison branch, keyed on
|
|
1263
|
+
* `fidelity_pending`.
|
|
1228
1264
|
*/
|
|
1229
|
-
export async function
|
|
1265
|
+
export async function handleCharterFidelityBranch(params, bundle, state, tx) {
|
|
1230
1266
|
return runOmittableGate({
|
|
1231
|
-
kind: "
|
|
1232
|
-
lane: GATE_LANES.
|
|
1233
|
-
schema: LANE_SUBMISSION_SCHEMAS[GATE_LANES.
|
|
1267
|
+
kind: "charter_fidelity",
|
|
1268
|
+
lane: GATE_LANES.charter_fidelity,
|
|
1269
|
+
schema: LANE_SUBMISSION_SCHEMAS[GATE_LANES.charter_fidelity],
|
|
1234
1270
|
apply: (_value, path, p, foldBundle) => runAuditStepUnlocked({
|
|
1235
1271
|
root: p.root,
|
|
1236
1272
|
artifactsDir: p.artifactsDir,
|
|
1237
|
-
preferredExecutor: "
|
|
1238
|
-
|
|
1273
|
+
preferredExecutor: "charter_fidelity_executor",
|
|
1274
|
+
charterFidelitySubmissionPath: path,
|
|
1275
|
+
scopeIndexMemo: p.scopeIndexMemo,
|
|
1239
1276
|
}, foldBundle),
|
|
1240
|
-
|
|
1241
|
-
// deterministically, no host turn.
|
|
1242
|
-
shouldOmit: (b) => !(b.charter_register?.deltas_pending === true),
|
|
1277
|
+
shouldOmit: (b) => !(b.charter_register?.fidelity_pending === true),
|
|
1243
1278
|
}, params, bundle, state, tx);
|
|
1244
1279
|
}
|
|
1245
1280
|
/**
|
|
@@ -1266,6 +1301,7 @@ export async function handleCharterClarificationBranch(params, bundle, state, tx
|
|
|
1266
1301
|
artifactsDir: p.artifactsDir,
|
|
1267
1302
|
preferredExecutor: "charter_clarification_executor",
|
|
1268
1303
|
clarificationAnswersPath: path,
|
|
1304
|
+
scopeIndexMemo: p.scopeIndexMemo,
|
|
1269
1305
|
}, foldBundle),
|
|
1270
1306
|
// The omit predicate is single-sourced with the plan draw's classifier
|
|
1271
1307
|
// (obligationPolicy.ts) — the two draws must agree on the boundary.
|
|
@@ -1302,6 +1338,7 @@ export async function handleSystemicChallengeBranch(params, bundle, state, tx) {
|
|
|
1302
1338
|
systemicChallengeSubmissionHash: staged.contentHash === undefined
|
|
1303
1339
|
? undefined
|
|
1304
1340
|
: hashContent(`${lane}\n${staged.contentHash}`),
|
|
1341
|
+
scopeIndexMemo: p.scopeIndexMemo,
|
|
1305
1342
|
}, foldBundle),
|
|
1306
1343
|
// Single-sourced with the plan draw's classifier (obligationPolicy.ts).
|
|
1307
1344
|
shouldOmit: systemicChallengeOmits,
|
|
@@ -1345,6 +1382,8 @@ export async function executeAndRecord(params, analyzers, decision, index, lastS
|
|
|
1345
1382
|
since: params.since,
|
|
1346
1383
|
lineIndex: indexes.lineIndex,
|
|
1347
1384
|
sizeIndex: indexes.sizeIndex,
|
|
1385
|
+
// ONE git-index probe per fold (see `ScopeIndexMemo`).
|
|
1386
|
+
scopeIndexMemo: params.scopeIndexMemo,
|
|
1348
1387
|
});
|
|
1349
1388
|
await writeJsonFile(join(params.artifactsDir, "steps", "deterministic-progress.json"), {
|
|
1350
1389
|
iteration: index + 1,
|
|
@@ -1514,10 +1553,68 @@ export async function checkFinalizationCycle(ctx) {
|
|
|
1514
1553
|
"obligations are erroneously invalidating each other.",
|
|
1515
1554
|
};
|
|
1516
1555
|
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1556
|
+
/**
|
|
1557
|
+
* A FRESH empty carry — a factory, never a shared constant. The carry is
|
|
1558
|
+
* MUTATED in place (`mergeFoldAdvisoriesInto` appends to both arrays), so two
|
|
1559
|
+
* holders that received the same object would alias: the persistent carry is
|
|
1560
|
+
* read as `emptyFoldAdvisories()`, merged into, and persisted, and a shared
|
|
1561
|
+
* constant would mean the "empty" sentinel itself grew the advisories — after
|
|
1562
|
+
* which every `writePendingAdvisories(emptyFoldAdvisories())` call is no longer
|
|
1563
|
+
* empty, stops deleting the file, and re-states the advisory on EVERY later
|
|
1564
|
+
* emission. That is not hypothetical: it is what a shallow spread of the
|
|
1565
|
+
* constant did, and it turned the once-only property into once-per-emission.
|
|
1566
|
+
*/
|
|
1567
|
+
function emptyFoldAdvisories() {
|
|
1568
|
+
return { ingestIssues: [], validationWarnings: [] };
|
|
1569
|
+
}
|
|
1570
|
+
/** `<artifactsDir>/steps/pending-advisories.json` — the drainable prompt carry. */
|
|
1571
|
+
function pendingAdvisoriesPath(artifactsDir) {
|
|
1572
|
+
return join(artifactsDir, "steps", "pending-advisories.json");
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* Read the persisted carry. Lenient by design: an absent or unreadable file is
|
|
1576
|
+
* an empty carry, because this is a PROMPT convenience over a ledger that
|
|
1577
|
+
* remains authoritative — a bookkeeping file must never be able to fail the
|
|
1578
|
+
* call it decorates. Shape-checked rather than schema-parsed for the same
|
|
1579
|
+
* reason: unrecognized entries are dropped, never thrown on.
|
|
1580
|
+
*/
|
|
1581
|
+
async function readPendingAdvisories(artifactsDir) {
|
|
1582
|
+
let raw;
|
|
1583
|
+
try {
|
|
1584
|
+
raw = JSON.parse(await readFile(pendingAdvisoriesPath(artifactsDir), "utf8"));
|
|
1585
|
+
}
|
|
1586
|
+
catch {
|
|
1587
|
+
return emptyFoldAdvisories();
|
|
1588
|
+
}
|
|
1589
|
+
if (!isRecord(raw))
|
|
1590
|
+
return emptyFoldAdvisories();
|
|
1591
|
+
const take = (value) => (Array.isArray(value) ? value : []);
|
|
1592
|
+
return {
|
|
1593
|
+
ingestIssues: take(raw.ingestIssues),
|
|
1594
|
+
validationWarnings: take(raw.validationWarnings),
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Persist the carry, or DELETE it when empty. Deleting rather than writing an
|
|
1599
|
+
* empty object is what keeps presence a signal: a later fold reads "nothing
|
|
1600
|
+
* pending" from absence, and no reader has to distinguish `[]` from "not yet
|
|
1601
|
+
* written".
|
|
1602
|
+
*/
|
|
1603
|
+
async function writePendingAdvisories(artifactsDir, advisories) {
|
|
1604
|
+
const path = pendingAdvisoriesPath(artifactsDir);
|
|
1605
|
+
if (advisories.ingestIssues.length === 0 &&
|
|
1606
|
+
advisories.validationWarnings.length === 0) {
|
|
1607
|
+
try {
|
|
1608
|
+
await unlink(path);
|
|
1609
|
+
}
|
|
1610
|
+
catch (error) {
|
|
1611
|
+
if (!isFileMissingError(error))
|
|
1612
|
+
throw error;
|
|
1613
|
+
}
|
|
1614
|
+
return;
|
|
1615
|
+
}
|
|
1616
|
+
await writeJsonFile(path, advisories);
|
|
1617
|
+
}
|
|
1521
1618
|
/**
|
|
1522
1619
|
* Append one fold iteration's advisories to the pending carry. Dedupe by
|
|
1523
1620
|
* identity signature keeps an issue the SAME ingest re-classifies on a later
|
|
@@ -1540,16 +1637,20 @@ function mergeFoldAdvisoriesInto(carried, fresh) {
|
|
|
1540
1637
|
carried.validationWarnings.push(warning);
|
|
1541
1638
|
}
|
|
1542
1639
|
}
|
|
1543
|
-
/**
|
|
1544
|
-
|
|
1640
|
+
/**
|
|
1641
|
+
* Drain the carry: what the NEXT emission must state, now consumed. Clears the
|
|
1642
|
+
* in-memory ref AND the persisted copy TOGETHER, so the once-only property holds
|
|
1643
|
+
* across a call boundary exactly as it does within one call — a ref cleared
|
|
1644
|
+
* without the file would re-state on the next call, and a file left behind after
|
|
1645
|
+
* a render would do the same.
|
|
1646
|
+
*/
|
|
1647
|
+
async function takeFoldAdvisories(artifactsDir, ref) {
|
|
1545
1648
|
const taken = {
|
|
1546
1649
|
ingestIssues: ref.value.ingestIssues,
|
|
1547
1650
|
validationWarnings: ref.value.validationWarnings,
|
|
1548
1651
|
};
|
|
1549
|
-
ref.value =
|
|
1550
|
-
|
|
1551
|
-
validationWarnings: [...EMPTY_FOLD_ADVISORIES.validationWarnings],
|
|
1552
|
-
};
|
|
1652
|
+
ref.value = emptyFoldAdvisories();
|
|
1653
|
+
await writePendingAdvisories(artifactsDir, emptyFoldAdvisories());
|
|
1553
1654
|
return taken;
|
|
1554
1655
|
}
|
|
1555
1656
|
/** Content identity of one advisory, across both channels. */
|
|
@@ -1738,12 +1839,24 @@ export function buildAuditObligations() {
|
|
|
1738
1839
|
}
|
|
1739
1840
|
return { kind: "transition", state: branch.bundle };
|
|
1740
1841
|
},
|
|
1741
|
-
// Charter
|
|
1742
|
-
//
|
|
1743
|
-
//
|
|
1744
|
-
|
|
1842
|
+
// Charter comparison (steps 2–3): consume the comparison submission, settle
|
|
1843
|
+
// deterministically when the register is not comparison_pending, or emit the
|
|
1844
|
+
// comparison reader's host step.
|
|
1845
|
+
charter_comparison_current: async (bundle, ctx) => {
|
|
1745
1846
|
const state = deriveAuditState(bundle, { emitStaleness: false });
|
|
1746
|
-
const branch = await
|
|
1847
|
+
const branch = await handleCharterComparisonBranch(ctx.params, bundle, state, ctx.tx);
|
|
1848
|
+
if (branch.action === "return") {
|
|
1849
|
+
return { kind: "emit", step: branch.result, state: bundle };
|
|
1850
|
+
}
|
|
1851
|
+
if (branch.action === "run_omit") {
|
|
1852
|
+
return runDeterministicExecutor(bundle, ctx);
|
|
1853
|
+
}
|
|
1854
|
+
return { kind: "transition", state: branch.bundle };
|
|
1855
|
+
},
|
|
1856
|
+
// Charter fidelity (step 4): the separate lane's verdicts, or the settle.
|
|
1857
|
+
charter_fidelity_current: async (bundle, ctx) => {
|
|
1858
|
+
const state = deriveAuditState(bundle, { emitStaleness: false });
|
|
1859
|
+
const branch = await handleCharterFidelityBranch(ctx.params, bundle, state, ctx.tx);
|
|
1747
1860
|
if (branch.action === "return") {
|
|
1748
1861
|
return { kind: "emit", step: branch.result, state: bundle };
|
|
1749
1862
|
}
|
|
@@ -1878,7 +1991,16 @@ async function runHostDelegationObligation(bundle, ctx) {
|
|
|
1878
1991
|
}
|
|
1879
1992
|
catch (error) {
|
|
1880
1993
|
// No handoff exists on the first visit, or prepare was interrupted before
|
|
1881
|
-
// all binding artifacts landed. Re-preparing below restores it exactly
|
|
1994
|
+
// all binding artifacts landed. Re-preparing below restores it exactly:
|
|
1995
|
+
// the prepare writes the workload, result map and binding set together,
|
|
1996
|
+
// so a partial trio is overwritten whole.
|
|
1997
|
+
//
|
|
1998
|
+
// A STALE binding set is deliberately NOT in this class and must not be
|
|
1999
|
+
// added to it: the ingest already classifies it and returns an issue
|
|
2000
|
+
// WITHOUT throwing (see `StaleAuditHostTaskBindingsError`), precisely so
|
|
2001
|
+
// the fold reaches the re-prepare below instead of aborting here. An
|
|
2002
|
+
// error that arrives at this line was not classified by the ingest, and
|
|
2003
|
+
// swallowing it would turn an unreadable handoff into a silent one.
|
|
1882
2004
|
if (!isFileMissingError(error))
|
|
1883
2005
|
throw error;
|
|
1884
2006
|
}
|
|
@@ -1913,15 +2035,20 @@ async function runHostDelegationObligation(bundle, ctx) {
|
|
|
1913
2035
|
issues: ingestIssues,
|
|
1914
2036
|
validationWarnings,
|
|
1915
2037
|
});
|
|
2038
|
+
// PERSIST with the merge, not at the emission: the transition below can
|
|
2039
|
+
// end the call (the budget cap), and an emission-only write would lose
|
|
2040
|
+
// exactly the advisory a call-ending transition produced — the case this
|
|
2041
|
+
// carry exists to cover.
|
|
2042
|
+
await writePendingAdvisories(ctx.params.artifactsDir, ctx.foldAdvisoriesRef.value);
|
|
1916
2043
|
return { kind: "transition", state: ingested.updated_bundle };
|
|
1917
2044
|
}
|
|
1918
2045
|
}
|
|
1919
2046
|
// The UNLOCKED variant: the fold already holds the artifact-tree lock, and
|
|
1920
|
-
// `withFileLock` is non-reentrant — the
|
|
1921
|
-
//
|
|
1922
|
-
//
|
|
1923
|
-
//
|
|
1924
|
-
//
|
|
2047
|
+
// `withFileLock` is non-reentrant — taking the artifact-tree hold here would
|
|
2048
|
+
// be a deterministic FileLockTimeoutError on the audit loop's most common
|
|
2049
|
+
// exit path. Its blocked core state rides the emit's `state` below, so the
|
|
2050
|
+
// fold's single commit persists it (the pause's own persist was the split's
|
|
2051
|
+
// other half).
|
|
1925
2052
|
const review = await ensureSemanticReviewRunUnlocked({
|
|
1926
2053
|
root: ctx.params.root,
|
|
1927
2054
|
artifactsDir: ctx.params.artifactsDir,
|
|
@@ -1931,37 +2058,89 @@ async function runHostDelegationObligation(bundle, ctx) {
|
|
|
1931
2058
|
selfCliPath: ctx.params.selfCliPath,
|
|
1932
2059
|
timeoutMs: ctx.params.timeoutMs,
|
|
1933
2060
|
});
|
|
1934
|
-
//
|
|
1935
|
-
//
|
|
1936
|
-
//
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
selectedExecutor: decision.selected_executor,
|
|
1941
|
-
...review,
|
|
1942
|
-
...(ingestIssues.length > 0 ? { ingestIssues } : {}),
|
|
1943
|
-
...(validationWarnings.length > 0 ? { validationWarnings } : {}),
|
|
1944
|
-
};
|
|
2061
|
+
// What THIS ingest saw. Deliberately NOT drained here: the carried advisories
|
|
2062
|
+
// are taken at the fold's single emission boundary (`runDeterministicForNextStep`),
|
|
2063
|
+
// which every emitted step kind passes through — draining at this obligation
|
|
2064
|
+
// would state them only for a semantic-review emission and silently drop them
|
|
2065
|
+
// the moment the run's next step happened to be a different kind
|
|
2066
|
+
// (design_review_conceptual, charter_*, synthesis_narrative…).
|
|
1945
2067
|
return {
|
|
1946
2068
|
kind: "emit",
|
|
1947
|
-
step:
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
validationWarnings: [
|
|
1955
|
-
...validationWarnings,
|
|
1956
|
-
...carried.validationWarnings,
|
|
1957
|
-
],
|
|
1958
|
-
}
|
|
1959
|
-
: emitted,
|
|
2069
|
+
step: {
|
|
2070
|
+
kind: "semantic_review",
|
|
2071
|
+
selectedExecutor: decision.selected_executor,
|
|
2072
|
+
...review,
|
|
2073
|
+
...(ingestIssues.length > 0 ? { ingestIssues } : {}),
|
|
2074
|
+
...(validationWarnings.length > 0 ? { validationWarnings } : {}),
|
|
2075
|
+
},
|
|
1960
2076
|
// The pause's blocked core state — the fold's single commit persists it
|
|
1961
2077
|
// (the locking variant's own write was the other half of the split).
|
|
1962
2078
|
state: review.bundle,
|
|
1963
2079
|
};
|
|
1964
2080
|
}
|
|
2081
|
+
/**
|
|
2082
|
+
* State the fold's carried advisories on the step about to be emitted, and
|
|
2083
|
+
* DRAIN them.
|
|
2084
|
+
*
|
|
2085
|
+
* THE single emission-boundary drain. It lives here, not at any one obligation,
|
|
2086
|
+
* because the property is "stated on exactly one emitted step, whichever call
|
|
2087
|
+
* and whichever step kind emits it": a carry produced by a call-ending
|
|
2088
|
+
* transition must survive to a later fold, and that fold's step may be ANY
|
|
2089
|
+
* kind. Hanging the drain off the semantic-review obligation made it correct
|
|
2090
|
+
* only for as long as the next step happened to be a semantic review.
|
|
2091
|
+
*
|
|
2092
|
+
* Advisories are only ever RENDERED by the semantic-review step today (the
|
|
2093
|
+
* other kinds carry no advisory channel), so a carry drained onto one of them
|
|
2094
|
+
* still reaches the operator — as a stated line in this step's prompt — rather
|
|
2095
|
+
* than being lost. A step with nothing carried is returned untouched.
|
|
2096
|
+
*/
|
|
2097
|
+
async function withFoldAdvisories(step, ctx) {
|
|
2098
|
+
const carried = await takeFoldAdvisories(ctx.params.artifactsDir, ctx.foldAdvisoriesRef);
|
|
2099
|
+
if (carried.ingestIssues.length === 0 &&
|
|
2100
|
+
carried.validationWarnings.length === 0) {
|
|
2101
|
+
return step;
|
|
2102
|
+
}
|
|
2103
|
+
if (step.kind !== "semantic_review") {
|
|
2104
|
+
return {
|
|
2105
|
+
...step,
|
|
2106
|
+
advisoryNotice: renderCarriedAdvisoryLines(carried),
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2109
|
+
return {
|
|
2110
|
+
...step,
|
|
2111
|
+
ingestIssues: [...(step.ingestIssues ?? []), ...carried.ingestIssues],
|
|
2112
|
+
validationWarnings: [
|
|
2113
|
+
...(step.validationWarnings ?? []),
|
|
2114
|
+
...carried.validationWarnings,
|
|
2115
|
+
],
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* The advisory lines a step that carries no advisory CHANNEL still states. A
|
|
2120
|
+
* carried advisory is never dropped on the floor because the run happened to
|
|
2121
|
+
* move on to a different step kind — it is rendered as text, in the same
|
|
2122
|
+
* wording the semantic-review step's own sections use.
|
|
2123
|
+
*/
|
|
2124
|
+
function renderCarriedAdvisoryLines(carried) {
|
|
2125
|
+
const lines = [];
|
|
2126
|
+
// The SAME missing/rejected split the semantic-review step renders, because a
|
|
2127
|
+
// carried advisory and the step's own issues are the same fact reaching the
|
|
2128
|
+
// operator through two different channels; they must not disagree on shape.
|
|
2129
|
+
const describe = (issue) => `${issue.work_item_id ? `\`${issue.work_item_id}\` (${issue.code}): ` : `${issue.code}: `}` +
|
|
2130
|
+
`${issue.message}${issue.result_path ? ` (\`${issue.result_path}\`)` : ""}`;
|
|
2131
|
+
const missing = carried.ingestIssues.filter(isMissingObservation);
|
|
2132
|
+
const refused = carried.ingestIssues.filter((issue) => !isMissingObservation(issue));
|
|
2133
|
+
if (missing.length > 0) {
|
|
2134
|
+
lines.push("## Results not yet written", "", ...missing.map((issue) => `- ${describe(issue)}`), "");
|
|
2135
|
+
}
|
|
2136
|
+
if (refused.length > 0) {
|
|
2137
|
+
lines.push("## Result status requiring attention", "", ...refused.map((issue) => `- ${describe(issue)}`), "");
|
|
2138
|
+
}
|
|
2139
|
+
if (carried.validationWarnings.length > 0) {
|
|
2140
|
+
lines.push("## Advisory notes on accepted results", "", ...carried.validationWarnings.map((warning) => `- \`${warning.work_item_id}\` was ACCEPTED; advisory: ${warning.message}`), "");
|
|
2141
|
+
}
|
|
2142
|
+
return lines;
|
|
2143
|
+
}
|
|
1965
2144
|
/** Emit the no-executor blocked step (the hand loop's `!selected_executor` arm). */
|
|
1966
2145
|
async function emitNoExecutorBlocked(bundle, ctx, decision) {
|
|
1967
2146
|
const state = decision.state;
|
|
@@ -1987,17 +2166,46 @@ function trackFoldBundle(obligations) {
|
|
|
1987
2166
|
return obligations.map((obligation) => ({
|
|
1988
2167
|
...obligation,
|
|
1989
2168
|
execute: async (bundle, ctx) => {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2169
|
+
// Liveness for the LONG deterministic drain (the >2min stale-artifact
|
|
2170
|
+
// re-extraction next-step that blew a caller timeout with no output). The
|
|
2171
|
+
// per-execution label is set HERE because this is the one place every fold
|
|
2172
|
+
// execution passes through, whatever it dispatches; `runSingleAdvanceStep`
|
|
2173
|
+
// then refines it to the selected obligation once the engine has picked
|
|
2174
|
+
// one, so a beat is never unattributed. `advanceAudit`'s heartbeat already
|
|
2175
|
+
// covers the un-forced `advanceAudit` path; the fold drives the shared
|
|
2176
|
+
// engine directly and so owns its own.
|
|
2177
|
+
ctx.heartbeat?.setLabel(obligation.id);
|
|
2178
|
+
const startedAt = Date.now();
|
|
2179
|
+
try {
|
|
2180
|
+
const outcome = await obligation.execute(bundle, ctx);
|
|
2181
|
+
if (outcome.kind === "transition") {
|
|
2182
|
+
ctx.currentBundleRef.value = outcome.state;
|
|
2183
|
+
}
|
|
2184
|
+
else if (outcome.state !== undefined) {
|
|
2185
|
+
ctx.currentBundleRef.value = outcome.state;
|
|
2186
|
+
}
|
|
2187
|
+
return outcome;
|
|
1993
2188
|
}
|
|
1994
|
-
|
|
1995
|
-
|
|
2189
|
+
finally {
|
|
2190
|
+
foldHeartbeatRecord(obligation.id, Date.now() - startedAt);
|
|
1996
2191
|
}
|
|
1997
|
-
return outcome;
|
|
1998
2192
|
},
|
|
1999
2193
|
}));
|
|
2000
2194
|
}
|
|
2195
|
+
/**
|
|
2196
|
+
* One JSONL line naming an obligation the fold finished executing and how long
|
|
2197
|
+
* it took. Written to stderr beside the interval beat (same channel and shape as
|
|
2198
|
+
* `progress_heartbeat`, so one reader consumes both) and to the fold's run log
|
|
2199
|
+
* via its own logger when one is attached.
|
|
2200
|
+
*/
|
|
2201
|
+
function foldHeartbeatRecord(obligation, durationMs) {
|
|
2202
|
+
process.stderr.write(JSON.stringify({
|
|
2203
|
+
kind: "progress_heartbeat",
|
|
2204
|
+
phase: obligation,
|
|
2205
|
+
duration_ms: durationMs,
|
|
2206
|
+
ts: new Date().toISOString(),
|
|
2207
|
+
}) + "\n");
|
|
2208
|
+
}
|
|
2001
2209
|
// ── Coordinator ───────────────────────────────────────────────────────────────
|
|
2002
2210
|
/**
|
|
2003
2211
|
* Drive the deterministic fold for one `next-step` call.
|
|
@@ -2019,6 +2227,24 @@ function trackFoldBundle(obligations) {
|
|
|
2019
2227
|
* terminal step (present_report when a report is rendered, else blocked).
|
|
2020
2228
|
*/
|
|
2021
2229
|
export async function runDeterministicForNextStep(params) {
|
|
2230
|
+
// The heartbeat wraps the WHOLE call, throw path included: a drain that dies
|
|
2231
|
+
// halfway is exactly when a caller most needs to know how far it got, and the
|
|
2232
|
+
// interval beat has no other owner on this path (the fold drives the shared
|
|
2233
|
+
// engine directly rather than through `advanceAudit`).
|
|
2234
|
+
const heartbeat = startAdvanceHeartbeat();
|
|
2235
|
+
try {
|
|
2236
|
+
return await runDeterministicFold(params, heartbeat);
|
|
2237
|
+
}
|
|
2238
|
+
finally {
|
|
2239
|
+
heartbeat.stop();
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
async function runDeterministicFold(params, heartbeat) {
|
|
2243
|
+
// THE fold's one git-index probe cache (`ScopeIndexMemo`). It is created here
|
|
2244
|
+
// and held on `params` — the object every dispatch path already shares, the
|
|
2245
|
+
// gate handlers included — so one `next-step` call spawns `git` once rather
|
|
2246
|
+
// than once per obligation execution.
|
|
2247
|
+
params.scopeIndexMemo = {};
|
|
2022
2248
|
const analyzersRef = {
|
|
2023
2249
|
value: params.analyzers,
|
|
2024
2250
|
};
|
|
@@ -2058,12 +2284,8 @@ export async function runDeterministicForNextStep(params) {
|
|
|
2058
2284
|
params,
|
|
2059
2285
|
analyzersRef,
|
|
2060
2286
|
lastSummaryRef: { value: "" },
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
ingestIssues: [...EMPTY_FOLD_ADVISORIES.ingestIssues],
|
|
2064
|
-
validationWarnings: [...EMPTY_FOLD_ADVISORIES.validationWarnings],
|
|
2065
|
-
},
|
|
2066
|
-
},
|
|
2287
|
+
heartbeat,
|
|
2288
|
+
foldAdvisoriesRef: { value: emptyFoldAdvisories() },
|
|
2067
2289
|
dispatchOrdinalRef: { value: 0 },
|
|
2068
2290
|
dispatchedSignatures: new Set(),
|
|
2069
2291
|
seenStateSignatures: new Set(),
|
|
@@ -2091,6 +2313,14 @@ export async function runDeterministicForNextStep(params) {
|
|
|
2091
2313
|
const holdStartMs = Date.now();
|
|
2092
2314
|
let chargedExecutions;
|
|
2093
2315
|
await recoverStagedSubmissions(params.artifactsDir);
|
|
2316
|
+
// The PERSISTED carry, read back under the hold. A transition that ENDED
|
|
2317
|
+
// an earlier call left its advisories on disk for the next emission to
|
|
2318
|
+
// state, and that emission may be this call's — the ctx ref starts empty
|
|
2319
|
+
// per call, so without this read the durable half would be write-only and
|
|
2320
|
+
// the advisories would still die at the call boundary. Seeding the ref
|
|
2321
|
+
// (rather than merging at the emit site) keeps ONE drain point, so the
|
|
2322
|
+
// once-only property is the same one the in-call path already relies on.
|
|
2323
|
+
ctx.foldAdvisoriesRef.value = await readPendingAdvisories(params.artifactsDir);
|
|
2094
2324
|
const startBundle = await loadArtifactBundle(params.artifactsDir);
|
|
2095
2325
|
ctx.currentBundleRef.value = startBundle;
|
|
2096
2326
|
try {
|
|
@@ -2141,14 +2371,21 @@ export async function runDeterministicForNextStep(params) {
|
|
|
2141
2371
|
const finalStale = computeStaleArtifacts(outcome.state, { emit: false });
|
|
2142
2372
|
emitStalenessRecord(finalStale, isMetadataMigrationStaleness(outcome.state)
|
|
2143
2373
|
? "metadata_schema_version_migration"
|
|
2144
|
-
: undefined);
|
|
2374
|
+
: undefined, outcome.state);
|
|
2375
|
+
// THE emission boundary — the one place every emitted step kind passes
|
|
2376
|
+
// through. Draining the carry here, rather than at the semantic-review
|
|
2377
|
+
// obligation that produces most of it, is what makes "stated on exactly one
|
|
2378
|
+
// emitted step, WHICHEVER step that is" true for every kind. A terminal
|
|
2379
|
+
// intent is deliberately excluded: it is not a step, and the terminal
|
|
2380
|
+
// conversion below promotes and deletes the artifacts dir — the carry has
|
|
2381
|
+
// nowhere left to be stated, and the run is over.
|
|
2382
|
+
if (outcome.step && outcome.step.kind !== "terminal_intent") {
|
|
2383
|
+
return await withFoldAdvisories(outcome.step, ctx);
|
|
2384
|
+
}
|
|
2145
2385
|
if (outcome.step) {
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
return await buildTerminalStep(params, outcome.step.bundle, outcome.step.state, outcome.step.reason);
|
|
2150
|
-
}
|
|
2151
|
-
return outcome.step;
|
|
2386
|
+
// Guard terminals convert POST-commit, POST-hold: buildTerminalStep can
|
|
2387
|
+
// promote, and promotion deletes artifactsDir.
|
|
2388
|
+
return await buildTerminalStep(params, outcome.step.bundle, outcome.step.state, outcome.step.reason);
|
|
2152
2389
|
}
|
|
2153
2390
|
if (outcome.stopped === "budget") {
|
|
2154
2391
|
// The pacing cap (MAX_DRAIN_STEPS charged executions), spent gracefully:
|