audit-tools 0.56.1 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/README.md +8 -22
  2. package/dist/audit/cli/args.d.ts +0 -1
  3. package/dist/audit/cli/args.d.ts.map +1 -1
  4. package/dist/audit/cli/args.js +0 -14
  5. package/dist/audit/cli/args.js.map +1 -1
  6. package/dist/audit/cli/auditStep.d.ts +0 -59
  7. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  8. package/dist/audit/cli/auditStep.js +2 -136
  9. package/dist/audit/cli/auditStep.js.map +1 -1
  10. package/dist/audit/cli/cleanup.d.ts.map +1 -1
  11. package/dist/audit/cli/cleanup.js +4 -1
  12. package/dist/audit/cli/cleanup.js.map +1 -1
  13. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  14. package/dist/audit/cli/confirmIntentStep.js +16 -31
  15. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  16. package/dist/audit/cli/dispatch/hostHandoff.d.ts +414 -1
  17. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  18. package/dist/audit/cli/dispatch/hostHandoff.js +223 -1
  19. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  20. package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts +254 -0
  21. package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts.map +1 -0
  22. package/dist/audit/cli/dispatch/questionReviewAcceptance.js +181 -0
  23. package/dist/audit/cli/dispatch/questionReviewAcceptance.js.map +1 -0
  24. package/dist/audit/cli/functionalPreflight.d.ts +4 -4
  25. package/dist/audit/cli/laneSubmissions.d.ts +4 -4
  26. package/dist/audit/cli/nextStepCommand.d.ts +3 -20
  27. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  28. package/dist/audit/cli/nextStepCommand.js +39 -133
  29. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  30. package/dist/audit/cli/nextStepHelpers.d.ts +10 -72
  31. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  32. package/dist/audit/cli/nextStepHelpers.js +95 -363
  33. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  34. package/dist/audit/cli/prompts.d.ts +0 -2
  35. package/dist/audit/cli/prompts.d.ts.map +1 -1
  36. package/dist/audit/cli/prompts.js +3 -14
  37. package/dist/audit/cli/prompts.js.map +1 -1
  38. package/dist/audit/cli/questionReviewCycle.d.ts +239 -0
  39. package/dist/audit/cli/questionReviewCycle.d.ts.map +1 -0
  40. package/dist/audit/cli/questionReviewCycle.js +55 -0
  41. package/dist/audit/cli/questionReviewCycle.js.map +1 -0
  42. package/dist/audit/cli/questionReviewSession.d.ts +7 -0
  43. package/dist/audit/cli/questionReviewSession.d.ts.map +1 -0
  44. package/dist/audit/cli/questionReviewSession.js +46 -0
  45. package/dist/audit/cli/questionReviewSession.js.map +1 -0
  46. package/dist/audit/cli/questionWorkloadBindings.d.ts +7 -0
  47. package/dist/audit/cli/questionWorkloadBindings.d.ts.map +1 -0
  48. package/dist/audit/cli/questionWorkloadBindings.js +66 -0
  49. package/dist/audit/cli/questionWorkloadBindings.js.map +1 -0
  50. package/dist/audit/cli/resynthesizeCommand.d.ts +1 -0
  51. package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
  52. package/dist/audit/cli/resynthesizeCommand.js +52 -51
  53. package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
  54. package/dist/audit/cli/sampleRunCommand.d.ts +565 -160
  55. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  56. package/dist/audit/cli/sampleRunCommand.js +66 -152
  57. package/dist/audit/cli/sampleRunCommand.js.map +1 -1
  58. package/dist/audit/cli/statusCommand.d.ts.map +1 -1
  59. package/dist/audit/cli/statusCommand.js +20 -14
  60. package/dist/audit/cli/statusCommand.js.map +1 -1
  61. package/dist/audit/cli/steps.d.ts +10 -10
  62. package/dist/audit/cli/submitCommand.d.ts +11 -6
  63. package/dist/audit/cli/submitCommand.d.ts.map +1 -1
  64. package/dist/audit/cli/submitCommand.js +91 -24
  65. package/dist/audit/cli/submitCommand.js.map +1 -1
  66. package/dist/audit/cli.d.ts.map +1 -1
  67. package/dist/audit/cli.js +6 -17
  68. package/dist/audit/cli.js.map +1 -1
  69. package/dist/audit/contracts/findingContractPrompt.d.ts +4 -4
  70. package/dist/audit/contracts/workerSchemas.d.ts +69 -68
  71. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  72. package/dist/audit/contracts/workerSchemas.js +8 -1
  73. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  74. package/dist/audit/contracts/wrapperResponse.d.ts +13 -13
  75. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  76. package/dist/audit/contracts/wrapperResponse.js +0 -1
  77. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  78. package/dist/audit/extractors/designAssessment.js +2 -2
  79. package/dist/audit/extractors/designAssessment.js.map +1 -1
  80. package/dist/audit/io/artifacts.d.ts +31 -9
  81. package/dist/audit/io/artifacts.d.ts.map +1 -1
  82. package/dist/audit/io/artifacts.js +197 -31
  83. package/dist/audit/io/artifacts.js.map +1 -1
  84. package/dist/audit/io/rollover.d.ts.map +1 -1
  85. package/dist/audit/io/rollover.js +7 -16
  86. package/dist/audit/io/rollover.js.map +1 -1
  87. package/dist/audit/io/runSnapshot.d.ts +1 -1
  88. package/dist/audit/io/runSnapshot.js +1 -1
  89. package/dist/audit/orchestrator/architectureDiscovery.d.ts +9 -10
  90. package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -1
  91. package/dist/audit/orchestrator/architectureDiscovery.js +95 -13
  92. package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -1
  93. package/dist/audit/orchestrator/charterPacketArchive.d.ts +3 -0
  94. package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -1
  95. package/dist/audit/orchestrator/charterPacketArchive.js +31 -2
  96. package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -1
  97. package/dist/audit/orchestrator/dependencyMap.d.ts +2 -8
  98. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  99. package/dist/audit/orchestrator/dependencyMap.js +10 -105
  100. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  101. package/dist/audit/orchestrator/dependencySlices.d.ts +2 -3
  102. package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
  103. package/dist/audit/orchestrator/dependencySlices.js +2 -35
  104. package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
  105. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  106. package/dist/audit/orchestrator/designReviewPrompt.js +24 -14
  107. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  108. package/dist/audit/orchestrator/executorRunners.d.ts +1 -1
  109. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  110. package/dist/audit/orchestrator/executorRunners.js +14 -21
  111. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  112. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  113. package/dist/audit/orchestrator/executors.js +1 -131
  114. package/dist/audit/orchestrator/executors.js.map +1 -1
  115. package/dist/audit/orchestrator/flowPlanning.d.ts +1 -1
  116. package/dist/audit/orchestrator/flowPlanning.js +1 -1
  117. package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
  118. package/dist/audit/orchestrator/ingestionExecutors.js +19 -12
  119. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  120. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +2 -2
  121. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  122. package/dist/audit/orchestrator/intentCheckpointExecutor.js +37 -36
  123. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  124. package/dist/audit/orchestrator/lensSelection.d.ts +6 -37
  125. package/dist/audit/orchestrator/lensSelection.d.ts.map +1 -1
  126. package/dist/audit/orchestrator/lensSelection.js +42 -68
  127. package/dist/audit/orchestrator/lensSelection.js.map +1 -1
  128. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  129. package/dist/audit/orchestrator/nextStep.js +1 -4
  130. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  131. package/dist/audit/orchestrator/questionEvidence.d.ts +67 -0
  132. package/dist/audit/orchestrator/questionEvidence.d.ts.map +1 -0
  133. package/dist/audit/orchestrator/questionEvidence.js +177 -0
  134. package/dist/audit/orchestrator/questionEvidence.js.map +1 -0
  135. package/dist/audit/orchestrator/questionPlanExecutor.d.ts +10 -0
  136. package/dist/audit/orchestrator/questionPlanExecutor.d.ts.map +1 -0
  137. package/dist/audit/orchestrator/questionPlanExecutor.js +23 -0
  138. package/dist/audit/orchestrator/questionPlanExecutor.js.map +1 -0
  139. package/dist/audit/orchestrator/questionPlanning.d.ts +48 -0
  140. package/dist/audit/orchestrator/questionPlanning.d.ts.map +1 -0
  141. package/dist/audit/orchestrator/questionPlanning.js +326 -0
  142. package/dist/audit/orchestrator/questionPlanning.js.map +1 -0
  143. package/dist/audit/orchestrator/reviewLensPlaybooks.d.ts +11 -0
  144. package/dist/audit/orchestrator/reviewLensPlaybooks.d.ts.map +1 -0
  145. package/dist/audit/orchestrator/reviewLensPlaybooks.js +11 -0
  146. package/dist/audit/orchestrator/reviewLensPlaybooks.js.map +1 -0
  147. package/dist/audit/orchestrator/runtimeValidation.d.ts.map +1 -1
  148. package/dist/audit/orchestrator/runtimeValidation.js +14 -0
  149. package/dist/audit/orchestrator/runtimeValidation.js.map +1 -1
  150. package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts +1 -1
  151. package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts.map +1 -1
  152. package/dist/audit/orchestrator/runtimeValidationUpdate.js +13 -4
  153. package/dist/audit/orchestrator/runtimeValidationUpdate.js.map +1 -1
  154. package/dist/audit/orchestrator/selectiveDeepening/conflict.js +1 -1
  155. package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
  156. package/dist/audit/orchestrator/selectiveDeepening/index.js +1 -1
  157. package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -1
  158. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  159. package/dist/audit/orchestrator/state.js +8 -60
  160. package/dist/audit/orchestrator/state.js.map +1 -1
  161. package/dist/audit/orchestrator/synthesisExecutors.d.ts +15 -1
  162. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  163. package/dist/audit/orchestrator/synthesisExecutors.js +76 -25
  164. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  165. package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
  166. package/dist/audit/orchestrator/systemicChallengeExecutor.js +11 -6
  167. package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
  168. package/dist/audit/orchestrator/taskAffinityGraph.d.ts +4 -4
  169. package/dist/audit/reporting/questionReport.d.ts +27 -0
  170. package/dist/audit/reporting/questionReport.d.ts.map +1 -0
  171. package/dist/audit/reporting/questionReport.js +183 -0
  172. package/dist/audit/reporting/questionReport.js.map +1 -0
  173. package/dist/audit/reporting/synthesis.d.ts +10 -1
  174. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  175. package/dist/audit/reporting/synthesis.js +161 -24
  176. package/dist/audit/reporting/synthesis.js.map +1 -1
  177. package/dist/audit/reporting/synthesisNarrativePrompt.d.ts +4 -1
  178. package/dist/audit/reporting/synthesisNarrativePrompt.d.ts.map +1 -1
  179. package/dist/audit/reporting/synthesisNarrativePrompt.js +5 -1
  180. package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -1
  181. package/dist/audit/supervisor/operatorHandoff.d.ts +2 -3
  182. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  183. package/dist/audit/supervisor/operatorHandoff.js +3 -18
  184. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  185. package/dist/audit/systemic/aggregateMetricsDigest.d.ts.map +1 -1
  186. package/dist/audit/systemic/aggregateMetricsDigest.js +0 -2
  187. package/dist/audit/systemic/aggregateMetricsDigest.js.map +1 -1
  188. package/dist/audit/types/artifactMetadata.d.ts +1 -2
  189. package/dist/audit/types/artifactMetadata.d.ts.map +1 -1
  190. package/dist/audit/types/auditState.d.ts +6 -6
  191. package/dist/audit/types/conceptualAdjudication.d.ts +708 -50
  192. package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
  193. package/dist/audit/types/conceptualAdjudication.js +2 -0
  194. package/dist/audit/types/conceptualAdjudication.js.map +1 -1
  195. package/dist/audit/types/runtimeValidation.d.ts +58 -6
  196. package/dist/audit/types/runtimeValidation.d.ts.map +1 -1
  197. package/dist/audit/types/runtimeValidation.js +8 -0
  198. package/dist/audit/types/runtimeValidation.js.map +1 -1
  199. package/dist/audit/types.d.ts +539 -22
  200. package/dist/audit/types.d.ts.map +1 -1
  201. package/dist/audit/validation/auditResults.d.ts +1 -1
  202. package/dist/audit/validation/auditResults.js +1 -1
  203. package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
  204. package/dist/audit/validation/ingestIssueCodes.js +0 -1
  205. package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
  206. package/dist/remediate/contractPipeline/executionPlan.d.ts +679 -52
  207. package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -1
  208. package/dist/remediate/contractPipeline/executionPlan.js +23 -0
  209. package/dist/remediate/contractPipeline/executionPlan.js.map +1 -1
  210. package/dist/remediate/findingFilter.d.ts.map +1 -1
  211. package/dist/remediate/findingFilter.js +6 -2
  212. package/dist/remediate/findingFilter.js.map +1 -1
  213. package/dist/remediate/intake.d.ts +4 -4
  214. package/dist/remediate/phases/close.d.ts.map +1 -1
  215. package/dist/remediate/phases/close.js +15 -5
  216. package/dist/remediate/phases/close.js.map +1 -1
  217. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts +5 -0
  218. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
  219. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +37 -8
  220. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  221. package/dist/remediate/state/types.d.ts +619 -26
  222. package/dist/remediate/state/types.d.ts.map +1 -1
  223. package/dist/remediate/state/types.js +2 -1
  224. package/dist/remediate/state/types.js.map +1 -1
  225. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  226. package/dist/remediate/steps/contractPipeline.js +2 -0
  227. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  228. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  229. package/dist/remediate/steps/contractPipelinePrompts.js +2 -0
  230. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  231. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +3 -3
  232. package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
  233. package/dist/remediate/steps/intakeResolver.js +31 -6
  234. package/dist/remediate/steps/intakeResolver.js.map +1 -1
  235. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  236. package/dist/remediate/steps/nextStep.js +31 -40
  237. package/dist/remediate/steps/nextStep.js.map +1 -1
  238. package/dist/remediate/steps/prompts.d.ts.map +1 -1
  239. package/dist/remediate/steps/prompts.js +3 -0
  240. package/dist/remediate/steps/prompts.js.map +1 -1
  241. package/dist/shared/analyzers/types.d.ts +18 -18
  242. package/dist/shared/contentKey.d.ts +1 -1
  243. package/dist/shared/contentKey.js +1 -1
  244. package/dist/shared/decompose/charterClarification.d.ts +4 -4
  245. package/dist/shared/decompose/charterExtraction.d.ts +30 -30
  246. package/dist/shared/decompose/contentCoherence.d.ts +1 -1
  247. package/dist/shared/decompose/contentCoherence.js +1 -1
  248. package/dist/shared/decompose/systemicChallenge.d.ts +629 -18
  249. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  250. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  251. package/dist/shared/index.d.ts +2 -0
  252. package/dist/shared/index.d.ts.map +1 -1
  253. package/dist/shared/index.js +2 -0
  254. package/dist/shared/index.js.map +1 -1
  255. package/dist/shared/io/stepContractWriter.js +1 -1
  256. package/dist/shared/io/stepContractWriter.js.map +1 -1
  257. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  258. package/dist/shared/loopCorePaths.js +5 -2
  259. package/dist/shared/loopCorePaths.js.map +1 -1
  260. package/dist/shared/mcp/submitServer.d.ts +1 -0
  261. package/dist/shared/mcp/submitServer.d.ts.map +1 -1
  262. package/dist/shared/mcp/submitServer.js +1 -1
  263. package/dist/shared/mcp/submitServer.js.map +1 -1
  264. package/dist/shared/submission/hostResultOutcomes.js +1 -1
  265. package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
  266. package/dist/shared/tooling/exec.js +1 -1
  267. package/dist/shared/tooling/exec.js.map +1 -1
  268. package/dist/shared/types/charter.d.ts +38 -38
  269. package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -1
  270. package/dist/shared/types/contractPropertyShapes.js +7 -0
  271. package/dist/shared/types/contractPropertyShapes.js.map +1 -1
  272. package/dist/shared/types/executionPlan.d.ts +88 -12
  273. package/dist/shared/types/executionPlan.d.ts.map +1 -1
  274. package/dist/shared/types/executionPlan.js +1 -0
  275. package/dist/shared/types/executionPlan.js.map +1 -1
  276. package/dist/shared/types/finding.d.ts +1721 -56
  277. package/dist/shared/types/finding.d.ts.map +1 -1
  278. package/dist/shared/types/finding.js +7 -10
  279. package/dist/shared/types/finding.js.map +1 -1
  280. package/dist/shared/types/findingVocabulary.d.ts +8 -0
  281. package/dist/shared/types/findingVocabulary.d.ts.map +1 -0
  282. package/dist/shared/types/findingVocabulary.js +13 -0
  283. package/dist/shared/types/findingVocabulary.js.map +1 -0
  284. package/dist/shared/types/intentCheckpoint.d.ts +8 -3
  285. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  286. package/dist/shared/types/intentCheckpoint.js +4 -3
  287. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  288. package/dist/shared/types/questionReviewReport.d.ts +9912 -0
  289. package/dist/shared/types/questionReviewReport.d.ts.map +1 -0
  290. package/dist/shared/types/questionReviewReport.js +185 -0
  291. package/dist/shared/types/questionReviewReport.js.map +1 -0
  292. package/dist/shared/types/remediationOutcome.d.ts +1379 -148
  293. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  294. package/dist/shared/types/remediationOutcome.js +5 -0
  295. package/dist/shared/types/remediationOutcome.js.map +1 -1
  296. package/dist/shared/types/reviewIndependence.d.ts +24 -24
  297. package/dist/shared/types/reviewQuestion.d.ts +4359 -0
  298. package/dist/shared/types/reviewQuestion.d.ts.map +1 -0
  299. package/dist/shared/types/reviewQuestion.js +182 -0
  300. package/dist/shared/types/reviewQuestion.js.map +1 -0
  301. package/dist/shared/types/stepContract.js +1 -1
  302. package/dist/shared/types/stepContract.js.map +1 -1
  303. package/dist/shared/validation/designFindingGrounding.js +1 -1
  304. package/dist/shared/validation/designFindingGrounding.js.map +1 -1
  305. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  306. package/dist/shared/validation/findingsReport.js +19 -4
  307. package/dist/shared/validation/findingsReport.js.map +1 -1
  308. package/docs/audit-pkg/contracts.md +27 -56
  309. package/docs/audit-pkg/operator-guide.md +31 -17
  310. package/docs/audit-pkg/product.md +17 -23
  311. package/package.json +1 -1
  312. package/schemas/audit-code-v1alpha1.schema.json +0 -1
  313. package/schemas/review_submission.schema.json +514 -0
  314. package/scripts/postinstall.mjs +16 -9
  315. package/skills/audit-code/audit-code.prompt.md +7 -5
  316. package/wrapper/audit-code-wrapper-lib.mjs +1 -5
  317. package/wrapper/installer-verb-help.mjs +1 -1
  318. package/dist/audit/cli/explainTaskCommand.d.ts +0 -4
  319. package/dist/audit/cli/explainTaskCommand.d.ts.map +0 -1
  320. package/dist/audit/cli/explainTaskCommand.js +0 -45
  321. package/dist/audit/cli/explainTaskCommand.js.map +0 -1
  322. package/dist/audit/cli/ingestResultsCommand.d.ts +0 -2
  323. package/dist/audit/cli/ingestResultsCommand.d.ts.map +0 -1
  324. package/dist/audit/cli/ingestResultsCommand.js +0 -42
  325. package/dist/audit/cli/ingestResultsCommand.js.map +0 -1
  326. package/dist/audit/cli/requeueCommand.d.ts +0 -2
  327. package/dist/audit/cli/requeueCommand.d.ts.map +0 -1
  328. package/dist/audit/cli/requeueCommand.js +0 -12
  329. package/dist/audit/cli/requeueCommand.js.map +0 -1
  330. package/dist/audit/cli/semanticReviewStep.d.ts +0 -41
  331. package/dist/audit/cli/semanticReviewStep.d.ts.map +0 -1
  332. package/dist/audit/cli/semanticReviewStep.js +0 -185
  333. package/dist/audit/cli/semanticReviewStep.js.map +0 -1
  334. package/dist/audit/cli/unacceptResultsCommand.d.ts +0 -19
  335. package/dist/audit/cli/unacceptResultsCommand.d.ts.map +0 -1
  336. package/dist/audit/cli/unacceptResultsCommand.js +0 -52
  337. package/dist/audit/cli/unacceptResultsCommand.js.map +0 -1
  338. package/dist/audit/cli/updateRuntimeValidationCommand.d.ts +0 -2
  339. package/dist/audit/cli/updateRuntimeValidationCommand.d.ts.map +0 -1
  340. package/dist/audit/cli/updateRuntimeValidationCommand.js +0 -18
  341. package/dist/audit/cli/updateRuntimeValidationCommand.js.map +0 -1
  342. package/dist/audit/cli/validateResultsCommand.d.ts +0 -13
  343. package/dist/audit/cli/validateResultsCommand.d.ts.map +0 -1
  344. package/dist/audit/cli/validateResultsCommand.js +0 -87
  345. package/dist/audit/cli/validateResultsCommand.js.map +0 -1
  346. package/dist/audit/cli/workerResult.d.ts +0 -2
  347. package/dist/audit/cli/workerResult.d.ts.map +0 -1
  348. package/dist/audit/cli/workerResult.js +0 -6
  349. package/dist/audit/cli/workerResult.js.map +0 -1
  350. package/dist/audit/orchestrator/coverageElementBaseline.d.ts +0 -54
  351. package/dist/audit/orchestrator/coverageElementBaseline.d.ts.map +0 -1
  352. package/dist/audit/orchestrator/coverageElementBaseline.js +0 -136
  353. package/dist/audit/orchestrator/coverageElementBaseline.js.map +0 -1
  354. package/dist/audit/orchestrator/planning.d.ts +0 -5
  355. package/dist/audit/orchestrator/planning.d.ts.map +0 -1
  356. package/dist/audit/orchestrator/planning.js +0 -79
  357. package/dist/audit/orchestrator/planning.js.map +0 -1
  358. package/dist/audit/orchestrator/planningExecutors.d.ts +0 -21
  359. package/dist/audit/orchestrator/planningExecutors.d.ts.map +0 -1
  360. package/dist/audit/orchestrator/planningExecutors.js +0 -273
  361. package/dist/audit/orchestrator/planningExecutors.js.map +0 -1
  362. package/dist/audit/orchestrator/taskBuilder.d.ts +0 -62
  363. package/dist/audit/orchestrator/taskBuilder.d.ts.map +0 -1
  364. package/dist/audit/orchestrator/taskBuilder.js +0 -412
  365. package/dist/audit/orchestrator/taskBuilder.js.map +0 -1
  366. package/dist/audit/orchestrator/trivialAudit.d.ts +0 -21
  367. package/dist/audit/orchestrator/trivialAudit.d.ts.map +0 -1
  368. package/dist/audit/orchestrator/trivialAudit.js +0 -80
  369. package/dist/audit/orchestrator/trivialAudit.js.map +0 -1
@@ -6,7 +6,7 @@
6
6
  // command it owns — never sees them. That left `remediate-code install --help`
7
7
  // running the installer and writing four files, and `audit-code install --help`
8
8
  // doing the same, because audit's `hasLeadingFlag` deliberately stops at the
9
- // first non-flag token (it must, or `explain-task -v` would print the wrapper's
9
+ // first non-flag token (it must, or `status -v` would print the wrapper's
10
10
  // version instead of forwarding `-v`). Two reasonable local decisions adding up
11
11
  // to the same surprise on the commands a new operator touches first, two of
12
12
  // which write into the repository.
@@ -1,4 +0,0 @@
1
- import { type AuditArgumentContract } from "./argumentContract.js";
2
- export declare const EXPLAIN_TASK_ARGUMENTS: AuditArgumentContract;
3
- export declare function cmdExplainTask(argv: string[]): Promise<void>;
4
- //# sourceMappingURL=explainTaskCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"explainTaskCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/explainTaskCommand.ts"],"names":[],"mappings":"AAKA,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE3F,eAAO,MAAM,sBAAsB,EAAE,qBAEpC,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDlE"}
@@ -1,45 +0,0 @@
1
- // sites-pinned: tests/audit/cli-dispatcher.test.ts, tests/audit/cli-remediation.test.ts
2
- import { outputJson } from "./cliHelpers.js";
3
- import { loadArtifactBundle } from "../io/artifacts.js";
4
- import { getArtifactsDir, getFlag } from "./args.js";
5
- import { compareCodeUnits } from "../../shared/compareCodeUnits.js";
6
- import { validateAuditArguments } from "./argumentContract.js";
7
- export const EXPLAIN_TASK_ARGUMENTS = {
8
- values: ["--task-id"], positionals: 1,
9
- };
10
- export async function cmdExplainTask(argv) {
11
- const args = argv.slice(3);
12
- const positionals = validateAuditArguments("explain-task", args, EXPLAIN_TASK_ARGUMENTS);
13
- const delimiter = args.indexOf("--");
14
- const options = delimiter < 0 ? args : args.slice(0, delimiter);
15
- const taskId = getFlag(options, "--task-id") ?? positionals[0];
16
- if (!taskId) {
17
- throw new Error("explain-task requires <task_id> or --task-id <task_id>");
18
- }
19
- const artifactsDir = getArtifactsDir(options);
20
- const bundle = await loadArtifactBundle(artifactsDir);
21
- const task = [...(bundle.audit_tasks ?? []), ...(bundle.requeue_tasks ?? [])].find((item) => item.task_id === taskId);
22
- if (!task) {
23
- throw new Error(`Unknown task_id '${taskId}'.`);
24
- }
25
- const coverageEntries = (bundle.coverage_matrix?.files ?? [])
26
- .filter((file) => task.file_paths.includes(file.path))
27
- .sort((a, b) => compareCodeUnits(a.path, b.path));
28
- const matchingResults = (bundle.audit_results ?? []).filter((result) => result.task_id === task.task_id);
29
- outputJson({
30
- artifacts_dir: artifactsDir,
31
- task_id: task.task_id,
32
- task,
33
- file_count: task.file_paths.length,
34
- coverage_entries: coverageEntries,
35
- pending_coverage: coverageEntries
36
- .map((file) => ({
37
- path: file.path,
38
- missing_lenses: file.required_lenses.filter((lens) => !file.completed_lenses.includes(lens)),
39
- }))
40
- .filter((file) => file.missing_lenses.length > 0),
41
- matching_result_count: matchingResults.length,
42
- matching_finding_ids: matchingResults.flatMap((result) => result.findings.map((finding) => finding.id)),
43
- });
44
- }
45
- //# sourceMappingURL=explainTaskCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"explainTaskCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/explainTaskCommand.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAA8B,MAAM,uBAAuB,CAAC;AAE3F,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;CACtC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,WAAW,GAAG,sBAAsB,CAAC,cAAc,EAAE,IAAI,EAAE,sBAAsB,CAAC,CAAC;IACzF,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;IAC/D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,I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AE,CAAC,CAAC;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CACzC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAChD;SACF,CAAC,CAAC;aACF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QACnD,qBAAqB,EAAE,eAAe,CAAC,MAAM;QAC7C,oBAAoB,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CACvD,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAC7C;KACF,CACF,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function cmdIngestResults(argv: string[]): Promise<void>;
2
- //# sourceMappingURL=ingestResultsCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ingestResultsCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/ingestResultsCommand.ts"],"names":[],"mappings":"AAGA,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkDpE"}
@@ -1,42 +0,0 @@
1
- import { runAuditStep, ingestBatchAuditResults } from "./auditStep.js";
2
- import { getArtifactsDir, getBatchResultsDir, getFlag, getRootDir, hasFlag } from "./args.js";
3
- export async function cmdIngestResults(argv) {
4
- const artifactsDir = getArtifactsDir(argv);
5
- const batchResultsDir = getBatchResultsDir(argv);
6
- // Explicitly check both directions of the mutual-exclusion so the guard does
7
- // not silently short-circuit when --batch-results is absent (COR-d40e2710).
8
- // Detect --results by TOKEN presence (hasFlag) rather than a resolved value,
9
- // so a value-less `--batch-results <dir> --results` still trips the guard
10
- // instead of silently running the batch path (COR-79283e3b).
11
- const hasBatchResults = batchResultsDir !== undefined;
12
- const hasSingleResults = hasFlag(argv, "--results");
13
- if (hasBatchResults && hasSingleResults) {
14
- throw new Error("Use either --results <file> or --batch-results <dir>, not both.");
15
- }
16
- if (batchResultsDir) {
17
- const result = await ingestBatchAuditResults({
18
- root: getRootDir(argv),
19
- artifactsDir,
20
- batchDir: batchResultsDir,
21
- });
22
- console.log(JSON.stringify({
23
- artifacts_dir: artifactsDir,
24
- imported_files: result.batchFiles,
25
- selected_executor: result.selected_executor,
26
- progress_summary: result.progress_summary,
27
- }, null, 2));
28
- return;
29
- }
30
- const result = await runAuditStep({
31
- root: getRootDir(argv),
32
- artifactsDir,
33
- preferredExecutor: "result_ingestion_executor",
34
- auditResultsPath: getFlag(argv, "--results"),
35
- });
36
- console.log(JSON.stringify({
37
- artifacts_dir: artifactsDir,
38
- selected_executor: result.selected_executor,
39
- progress_summary: result.progress_summary,
40
- }, null, 2));
41
- }
42
- //# sourceMappingURL=ingestResultsCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ingestResultsCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/ingestResultsCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9F,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAc;IACnD,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,eAAe,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACjD,6EAA6E;IAC7E,4EAA4E;IAC5E,6EAA6E;IAC7E,0EAA0E;IAC1E,6DAA6D;IAC7D,MAAM,eAAe,GAAG,eAAe,KAAK,SAAS,CAAC;IACtD,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpD,IAAI,eAAe,IAAI,gBAAgB,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IACD,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC;YAC3C,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;YACtB,YAAY;YACZ,QAAQ,EAAE,eAAe;SAC1B,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ;YACE,aAAa,EAAE,YAAY;YAC3B,cAAc,EAAE,MAAM,CAAC,UAAU;YACjC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;SAC1C,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC;QAChC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;QACtB,YAAY;QACZ,iBAAiB,EAAE,2BAA2B;QAC9C,gBAAgB,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;KAC7C,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ;QACE,aAAa,EAAE,YAAY;QAC3B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function cmdRequeue(argv: string[]): Promise<void>;
2
- //# sourceMappingURL=requeueCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requeueCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/requeueCommand.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9D"}
@@ -1,12 +0,0 @@
1
- import { loadArtifactBundle } from "../io/artifacts.js";
2
- import { getArtifactsDir } from "./args.js";
3
- import { outputJson } from "./cliHelpers.js";
4
- export async function cmdRequeue(argv) {
5
- const artifactsDir = getArtifactsDir(argv);
6
- const bundle = await loadArtifactBundle(artifactsDir);
7
- outputJson({
8
- artifacts_dir: artifactsDir,
9
- task_count: bundle.requeue_tasks?.length ?? 0,
10
- });
11
- }
12
- //# sourceMappingURL=requeueCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requeueCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/requeueCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAc;IAC7C,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACtD,UAAU,CAAC;QACT,aAAa,EAAE,YAAY;QAC3B,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;KAC9C,CAAC,CAAC;AACL,CAAC"}
@@ -1,41 +0,0 @@
1
- import type { ArtifactBundle } from "../io/artifacts.js";
2
- import type { ActiveReviewRun } from "../supervisor/operatorHandoff.js";
3
- import { type AuditHostIngestIssue } from "../validation/ingestIssueCodes.js";
4
- import { type AuditHostValidationWarning } from "./dispatch/hostHandoff.js";
5
- import { writeCurrentStep } from "./steps.js";
6
- interface SemanticReviewStepParams {
7
- root: string;
8
- /** The run's frozen snapshot root the workload's prompts direct host lanes to. */
9
- sourceRoot: string;
10
- artifactsDir: string;
11
- activeReviewRun: ActiveReviewRun;
12
- /**
13
- * The bundle this draw's review obligation was selected against. REQUIRED:
14
- * the completed count has no second derivation — it comes from the ONE
15
- * pending-set partition (`derivePendingTaskPartition`), which is the same
16
- * source the published workload's task list is built from. A caller that has
17
- * no bundle has no review obligation either.
18
- */
19
- bundle: ArtifactBundle;
20
- selectedExecutor?: string | null;
21
- inProcessMadeProgress?: boolean;
22
- /** Failures the ingest that preceded this emission classified. */
23
- ingestIssues?: readonly AuditHostIngestIssue[];
24
- /** Advisory validation findings on results the SAME ingest accepted. */
25
- validationWarnings?: readonly AuditHostValidationWarning[];
26
- }
27
- /** Prepare bound work without taking over the host's current architecture step. */
28
- export declare function prepareSemanticReviewWorkload(params: SemanticReviewStepParams): Promise<{
29
- handoff: import("./dispatch/hostHandoff.js").PreparedAuditHostHandoff;
30
- completedTaskIds: Set<string>;
31
- resultDir: string;
32
- continueCommand: string;
33
- }>;
34
- /**
35
- * Publish the complete semantic-review workload. The host owns every execution
36
- * choice; audit-tools only binds prompts/results and ingests validated
37
- * AuditResult objects on the next invocation.
38
- */
39
- export declare function renderSemanticReviewStep(params: SemanticReviewStepParams): Promise<Awaited<ReturnType<typeof writeCurrentStep>>>;
40
- export {};
41
- //# sourceMappingURL=semanticReviewStep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semanticReviewStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/semanticReviewStep.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAKL,KAAK,0BAA0B,EAEhC,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,UAAU,wBAAwB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,eAAe,CAAC;IACjC;;;;;;OAMG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kEAAkE;IAClE,YAAY,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC/C,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;CAC5D;AAED,mFAAmF;AACnF,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,wBAAwB;;;;;GAmDnF;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAgFtI"}
@@ -1,185 +0,0 @@
1
- // sites-pinned: tests/audit/host-handoff.test.ts, tests/audit/inspection-handoff-binding.test.ts, tests/audit/semantic-review-step.test.ts
2
- // (the steward-lane verification
3
- // contract — `toAuditHostTask` is where the lane tags were being dropped, so this is
4
- // the site whose revert makes the prompt branch unreachable)
5
- import { linkFrictionRunIds, readJsonFile, resolveHostHandoffPaths, toPosixPath, } from "audit-tools/shared";
6
- import { AUDIT_FRICTION_RUN_ID } from "../orchestrator/nextStep.js";
7
- import { derivePendingTaskPartition } from "../orchestrator/pendingTasks.js";
8
- import { auditIngestRemedy, } from "../validation/ingestIssueCodes.js";
9
- import { renderIngestReportLines } from "audit-tools/shared";
10
- import { buildAuditHostCoherenceGroups, prepareAuditHostHandoff, toAuditHostTask, } from "./dispatch/hostHandoff.js";
11
- import { nextStepCommand, validateResultsCommand } from "./prompts.js";
12
- import { ARCHITECTURE_REVIEW_SCOPE } from "../orchestrator/architectureDiscovery.js";
13
- import { resolveIntentLensSelection } from "../orchestrator/lensSelection.js";
14
- import { writeCurrentStep } from "./steps.js";
15
- /** Prepare bound work without taking over the host's current architecture step. */
16
- export async function prepareSemanticReviewWorkload(params) {
17
- const { root, artifactsDir, activeReviewRun } = params;
18
- if (!activeReviewRun.pending_audit_tasks_path) {
19
- throw new Error(`Semantic review run ${activeReviewRun.run_id} has no pending-task manifest.`);
20
- }
21
- const tasks = await readJsonFile(activeReviewRun.pending_audit_tasks_path);
22
- // The completed half of this pause's count comes from the ONE pending-set
23
- // partition — the same derivation `buildPendingAuditTasks` projects the
24
- // published tasks from — never from `tasks.length - work_items.length`. That
25
- // subtraction only ever measured how many items the handoff boundary HID, so
26
- // it read zero for every run whose publish was exhaustive (which is every
27
- // run: the boundary suppresses nothing), and it would misreport the moment a
28
- // task left the pending set for any reason other than acceptance.
29
- const { completedTaskIds, pendingTasks } = derivePendingTaskPartition(params.bundle);
30
- const handoff = await prepareAuditHostHandoff({
31
- root,
32
- sourceRoot: params.sourceRoot,
33
- artifactsDir,
34
- runId: activeReviewRun.run_id,
35
- tasks: tasks.map((task) => toAuditHostTask(task, params.bundle.repo_manifest)),
36
- pendingTaskCount: pendingTasks.length,
37
- // Grouped over exactly the tasks this wave publishes, so a group never
38
- // names work that is already done; the handoff writes them beside the
39
- // workload, under the workload's own lock, never into a work item.
40
- coherenceGroups: buildAuditHostCoherenceGroups(tasks, params.bundle.graph_bundle),
41
- });
42
- // Name this round's runs on the audit friction record, which is keyed by a fixed
43
- // literal and so on its own names no run at all (semantics: `FrictionRunLinks`). Each
44
- // reference is sourced from the envelope that owns it, never synthesized.
45
- await linkFrictionRunIds(artifactsDir, AUDIT_FRICTION_RUN_ID, {
46
- step_run_id: activeReviewRun.run_id,
47
- dispatch_run_id: handoff.workload.run_id,
48
- }, "audit-code");
49
- const continueCommand = nextStepCommand(root, artifactsDir);
50
- const { resultDir } = resolveHostHandoffPaths({ root, artifactsDir, runId: activeReviewRun.run_id });
51
- return {
52
- handoff,
53
- completedTaskIds,
54
- resultDir,
55
- continueCommand,
56
- };
57
- }
58
- /**
59
- * Publish the complete semantic-review workload. The host owns every execution
60
- * choice; audit-tools only binds prompts/results and ingests validated
61
- * AuditResult objects on the next invocation.
62
- */
63
- export async function renderSemanticReviewStep(params) {
64
- const { root, artifactsDir, activeReviewRun } = params;
65
- const { handoff, completedTaskIds, resultDir, continueCommand } = await prepareSemanticReviewWorkload(params);
66
- const hasWork = handoff.workload.work_items.length > 0;
67
- const issues = params.ingestIssues ?? [];
68
- const validationWarnings = params.validationWarnings ?? [];
69
- return writeCurrentStep({
70
- artifactsDir,
71
- stepKind: "dispatch_review",
72
- status: "ready",
73
- runId: activeReviewRun.run_id,
74
- allowedCommands: [continueCommand],
75
- progress: {
76
- summary: `Published ${handoff.workload.work_items.length} pending semantic-review ` +
77
- `work item(s) for host execution.` +
78
- // The summary states the COUNT and points at the report; it does not
79
- // quote a heading. Which headings render depends on the remedy of each
80
- // issue, so a quoted heading can name a section that is not there.
81
- (issues.length > 0
82
- ? ` ${issues.length} prior submission issue(s) are stated in the step prompt.`
83
- : ""),
84
- pending_tasks: handoff.workload.work_items.length,
85
- completed_tasks: completedTaskIds.size,
86
- },
87
- stopCondition: "Execute the published host workload, write each bound result, then run next-step.",
88
- repoRoot: root,
89
- artifactPaths: {
90
- host_workload: handoff.workload_path,
91
- host_result_map: handoff.result_map_path,
92
- host_coherence_groups: handoff.coherence_groups_path,
93
- active_review_run: activeReviewRun.review_run_path,
94
- pending_audit_tasks: activeReviewRun.pending_audit_tasks_path,
95
- },
96
- prompt: [
97
- "# audit-code semantic review",
98
- "",
99
- ...renderIngestReportLines({
100
- issues,
101
- remedy: auditIngestRemedy,
102
- workload: "follows",
103
- advisories: validationWarnings,
104
- }),
105
- `Read the workload at: ${handoff.workload_path}`,
106
- "",
107
- // Two imperative steps, not one directive plus a plea. The removed plea
108
- // ("do not edit audit state or hand-merge results") asked the reader to
109
- // remember a rule `ingestAuditHostResults` already enforces: a result is
110
- // bound to its run id, work item id and prompt digest, so a hand-merged
111
- // or moved result is refused mechanically.
112
- "For each work item in the workload:",
113
- "1. Follow its prompt.",
114
- "2. Write the result JSON at its bound `result_path`.",
115
- "",
116
- ...(hasWork ? workerAccessLines(params.sourceRoot, resultDir) : []),
117
- ...schedulingLines(handoff.workload, handoff.coherence_groups, handoff.coherence_groups_path),
118
- ...lensScopeLines(params.bundle, handoff.workload),
119
- `To check one result file before ingestion, by the rules ingestion applies: ${validateResultsCommand(root, artifactsDir)}`,
120
- "",
121
- `When the results are written, run: ${continueCommand}`,
122
- "",
123
- ].join("\n"),
124
- access: {
125
- read_paths: [
126
- handoff.workload_path,
127
- handoff.result_map_path,
128
- activeReviewRun.pending_audit_tasks_path,
129
- handoff.coherence_groups_path,
130
- // Every work-item prompt sends its worker here to read source; a grant
131
- // that omits it makes each worker stop on a permission prompt.
132
- params.sourceRoot,
133
- ],
134
- // The dedicated output directory is the host's grant; each work item's
135
- // prompt and the ingestion boundary still require its exact bound file.
136
- // Do not duplicate every pending filename in this orchestration envelope.
137
- write_paths: hasWork ? [resultDir] : [],
138
- },
139
- });
140
- }
141
- /**
142
- * What a worker touches, stated once for the host that launches it: every path
143
- * in a work-item prompt is absolute, so a worker may run in any directory, and
144
- * these two directories are all it needs.
145
- */
146
- function workerAccessLines(sourceRoot, resultDir) {
147
- return [
148
- "Every path in a work-item prompt is absolute, so a worker may run in any working directory. " +
149
- "A worker reads only the run's source snapshot and writes only its own result file:",
150
- `- read: ${toPosixPath(sourceRoot)}`,
151
- `- write: ${toPosixPath(resultDir)}`,
152
- "",
153
- ];
154
- }
155
- /**
156
- * The deterministic facts a host schedules by — counts, the local size
157
- * estimate, the content-coherence groups. Facts only: which backend runs an
158
- * item, in what order, and how many at once is the host's choice.
159
- */
160
- function schedulingLines(workload, coherence, coherencePath) {
161
- const items = workload.work_items;
162
- if (items.length === 0)
163
- return [];
164
- const tokens = items.reduce((sum, item) => sum + item.metadata.token_estimate, 0);
165
- return [
166
- `The workload holds ${String(items.length)} independent work item(s), about ${String(tokens)} tokens of source by the local estimate, ` +
167
- `in ${String(coherence.groups.length)} content-coherence group(s) listed at ${toPosixPath(coherencePath)}. ` +
168
- "Items in one group share files, a unit, a flow, a directory or graph adjacency, so one worker taking them together reads each file once; " +
169
- "each item's `metadata.token_estimate` and `metadata.demand` size it. Every item is independent: order, grouping and parallelism are yours.",
170
- "",
171
- ];
172
- }
173
- /**
174
- * A lens the operator selected that no work item carries, said out loud. The
175
- * architecture lens is the standing case: it is reviewed whole-system, so its
176
- * absence from per-file inspection is by design, not a dropped lens.
177
- */
178
- function lensScopeLines(bundle, workload) {
179
- const selected = resolveIntentLensSelection(bundle.intent_checkpoint?.lens_selection);
180
- const inEffect = selected === undefined || selected.includes("architecture");
181
- if (!inEffect || workload.work_items.some((item) => item.lens === "architecture"))
182
- return [];
183
- return [`The architecture lens is ${ARCHITECTURE_REVIEW_SCOPE}, so no work item in the workload carries it.`, ""];
184
- }
185
- //# sourceMappingURL=semanticReviewStep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semanticReviewStep.js","sourceRoot":"","sources":["../../../src/audit/cli/semanticReviewStep.ts"],"names":[],"mappings":"AAAA,2IAA2I;AAC3I,iCAAiC;AACjC,qFAAqF;AACrF,6DAA6D;AAC7D,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,EACvB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAG7E,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,eAAe,GAIhB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAA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AS,cAAc,CAAC,MAAsB,EAAE,QAA2B;IACzE,MAAM,QAAQ,GAAG,0BAA0B,CAAC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;IACtF,MAAM,QAAQ,GAAG,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC7E,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC;QAAE,OAAO,EAAE,CAAC;IAC7F,OAAO,CAAC,4BAA4B,yBAAyB,+CAA+C,EAAE,EAAE,CAAC,CAAC;AACpH,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * `audit-code unaccept-results --work-item <id> [--work-item <id> …] | --all`
3
- *
4
- * Remove entries from the run's accepted host-results pair — the supported path
5
- * back out of an acceptance, per the recovery-verb doctrine: operator-facing,
6
- * refusing what it cannot validate (the strict accepted-ledger loader throws on
7
- * a corrupt pair), recording the removal so a repaired run stays
8
- * distinguishable from a clean one, and invalidating the persisted step
9
- * contract. After dropping, the next fold re-reads the bound result files.
10
- *
11
- * Argument validation lives in {@link dropAcceptedResults} — the ONE copy of
12
- * the "requires --work-item or --all" refusal; this command parses argv only.
13
- *
14
- * The run id resolves from the persisted review-run manifest. `--run-id` is the
15
- * fallback for a removed manifest only: the operator names WHAT to drop, and the
16
- * manifest says WHERE the state lives.
17
- */
18
- export declare function cmdUnacceptResults(argv: string[]): Promise<void>;
19
- //# sourceMappingURL=unacceptResultsCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unacceptResultsCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/unacceptResultsCommand.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCtE"}
@@ -1,52 +0,0 @@
1
- // sites-pinned: tests/audit/unaccept-results-single-message.test.ts, tests/audit/host-handoff-unaccept-results.test.ts
2
- import { outputJson } from "./cliHelpers.js";
3
- import { dropAcceptedResults } from "./dispatch/hostHandoff.js";
4
- import { getArtifactsDir, getFlag, getRootDir, hasFlag, } from "./args.js";
5
- import { loadCurrentActiveReviewRun } from "./reviewRun.js";
6
- /**
7
- * `audit-code unaccept-results --work-item <id> [--work-item <id> …] | --all`
8
- *
9
- * Remove entries from the run's accepted host-results pair — the supported path
10
- * back out of an acceptance, per the recovery-verb doctrine: operator-facing,
11
- * refusing what it cannot validate (the strict accepted-ledger loader throws on
12
- * a corrupt pair), recording the removal so a repaired run stays
13
- * distinguishable from a clean one, and invalidating the persisted step
14
- * contract. After dropping, the next fold re-reads the bound result files.
15
- *
16
- * Argument validation lives in {@link dropAcceptedResults} — the ONE copy of
17
- * the "requires --work-item or --all" refusal; this command parses argv only.
18
- *
19
- * The run id resolves from the persisted review-run manifest. `--run-id` is the
20
- * fallback for a removed manifest only: the operator names WHAT to drop, and the
21
- * manifest says WHERE the state lives.
22
- */
23
- export async function cmdUnacceptResults(argv) {
24
- const root = getRootDir(argv);
25
- const artifactsDir = getArtifactsDir(argv);
26
- const all = hasFlag(argv, "--all");
27
- const workItemIds = argv
28
- .flatMap((token, index) => token === "--work-item" ? [argv[index + 1]] : token.startsWith("--work-item=") ? [token.slice("--work-item=".length)] : [])
29
- .filter((value) => typeof value === "string");
30
- // Canonical run resolution: the same manifest `next-step`'s ingest fold reads.
31
- // `--run-id` overrides it, for the case the refusal below names: a removed
32
- // manifest.
33
- const overrideRunId = getFlag(argv, "--run-id");
34
- const runId = overrideRunId ?? (await loadCurrentActiveReviewRun(artifactsDir))?.run_id;
35
- if (runId === undefined) {
36
- throw new Error(`unaccept-results could not resolve the active review run under ${artifactsDir} ` +
37
- "(no dispatch manifest); pass --run-id <id> only if the manifest was removed");
38
- }
39
- const outcome = await dropAcceptedResults({
40
- root,
41
- artifactsDir,
42
- runId,
43
- ...(all ? { all: true } : { workItemIds }),
44
- });
45
- outputJson({
46
- status: "unaccepted",
47
- run_id: runId,
48
- dropped_work_item_ids: outcome.dropped_work_item_ids,
49
- next: "audit-code next-step re-reads the bound result files for the dropped items",
50
- });
51
- }
52
- //# sourceMappingURL=unacceptResultsCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unacceptResultsCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/unacceptResultsCommand.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,eAAe,EACf,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAc;IACrD,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,IAAI;SACrB,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACxB,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAC3H;SACA,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;IAEjE,+EAA+E;IAC/E,2EAA2E;IAC3E,YAAY;IACZ,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAChD,MAAM,KAAK,GACT,aAAa,IAAI,CAAC,MAAM,0BAA0B,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC;IAC5E,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CACb,kEAAkE,YAAY,GAAG;YAC/E,6EAA6E,CAChF,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC;QACxC,IAAI;QACJ,YAAY;QACZ,KAAK;QACL,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;KAC3C,CAAC,CAAC;IAEH,UAAU,CACR;QACE,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,KAAK;QACb,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,IAAI,EAAE,4EAA4E;KACnF,CACF,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function cmdUpdateRuntimeValidation(argv: string[]): Promise<void>;
2
- //# sourceMappingURL=updateRuntimeValidationCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateRuntimeValidationCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/updateRuntimeValidationCommand.ts"],"names":[],"mappings":"AAIA,wBAAsB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAa9E"}
@@ -1,18 +0,0 @@
1
- import { runAuditStep } from "./auditStep.js";
2
- import { getArtifactsDir, getFlag, getRootDir } from "./args.js";
3
- import { outputJson } from "./cliHelpers.js";
4
- export async function cmdUpdateRuntimeValidation(argv) {
5
- const artifactsDir = getArtifactsDir(argv);
6
- const result = await runAuditStep({
7
- root: getRootDir(argv),
8
- artifactsDir,
9
- preferredExecutor: "runtime_validation_update_executor",
10
- runtimeUpdatesPath: getFlag(argv, "--updates"),
11
- });
12
- outputJson({
13
- artifacts_dir: artifactsDir,
14
- selected_executor: result.selected_executor,
15
- progress_summary: result.progress_summary,
16
- });
17
- }
18
- //# sourceMappingURL=updateRuntimeValidationCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateRuntimeValidationCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/updateRuntimeValidationCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,IAAc;IAC7D,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC;QAChC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;QACtB,YAAY;QACZ,iBAAiB,EAAE,oCAAoC;QACvD,kBAAkB,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;KAC/C,CAAC,CAAC;IACH,UAAU,CAAC;QACT,aAAa,EAAE,YAAY;QAC3B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,CAAC,CAAC;AACL,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Check a results file BEFORE it is ingested, by the rules of the door it will
3
- * go through:
4
- * - a host result (what every semantic-review work item asks for) is judged
5
- * by `checkAuditHostResult`, the same judgment — and the same classified
6
- * refusals — the next-step fold applies when it ingests that file;
7
- * - anything else is judged by `validateAuditResults`, the gate of
8
- * `ingest-results --results` (a JSON array of AuditResults); a lone object
9
- * also gets a hint naming both shapes.
10
- * Neither branch writes anything.
11
- */
12
- export declare function cmdValidateResults(argv: string[]): Promise<void>;
13
- //# sourceMappingURL=validateResultsCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateResultsCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/validateResultsCommand.ts"],"names":[],"mappings":"AAgCA;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoDtE"}
@@ -1,87 +0,0 @@
1
- // sites-pinned: tests/audit/frozen-snapshot.test.ts, tests/audit/inspection-handoff-binding.test.ts
2
- import { outputJson } from "./cliHelpers.js";
3
- import { readJsonFile } from "audit-tools/shared";
4
- import { resolve } from "node:path";
5
- import { loadArtifactBundle } from "../io/artifacts.js";
6
- import { validateAuditResults } from "../validation/auditResults.js";
7
- import { buildLineIndex } from "./lineIndex.js";
8
- import { readRunSourceRoot } from "../io/runSnapshot.js";
9
- import { getArtifactsDir, getFlag, getRootDir } from "./args.js";
10
- import { checkAuditHostResult } from "./dispatch/hostHandoff.js";
11
- const SHAPE_HINT = "validate-results takes either a semantic-review result — the audit-host-result/v1alpha1 object a work item's prompt " +
12
- "asks for, written at its bound result_path under runs/<run id>/host-results/ — or, for `ingest-results --results`, " +
13
- "a JSON array of AuditResult objects (wrap a single AuditResult in [ ]).";
14
- /**
15
- * A host result is recognized by what it declares OR by where it lives: a file
16
- * at a host-results path is judged by the host door even when its
17
- * `contract_version` is misspelled, so the host gets that door's refusal and not
18
- * the array door's.
19
- */
20
- function isHostResult(value, path) {
21
- if (Array.isArray(value))
22
- return false;
23
- const declared = typeof value === "object" &&
24
- value !== null &&
25
- typeof value.contract_version === "string" &&
26
- value.contract_version.startsWith("audit-host-result/");
27
- return declared || /(^|\/)host-results\/[^/]+$/u.test(resolve(path).replace(/\\/g, "/"));
28
- }
29
- /**
30
- * Check a results file BEFORE it is ingested, by the rules of the door it will
31
- * go through:
32
- * - a host result (what every semantic-review work item asks for) is judged
33
- * by `checkAuditHostResult`, the same judgment — and the same classified
34
- * refusals — the next-step fold applies when it ingests that file;
35
- * - anything else is judged by `validateAuditResults`, the gate of
36
- * `ingest-results --results` (a JSON array of AuditResults); a lone object
37
- * also gets a hint naming both shapes.
38
- * Neither branch writes anything.
39
- */
40
- export async function cmdValidateResults(argv) {
41
- const artifactsDir = getArtifactsDir(argv);
42
- const resultsPath = getFlag(argv, "--results");
43
- if (!resultsPath) {
44
- throw new Error("validate-results requires --results <file>");
45
- }
46
- const root = getRootDir(argv);
47
- const bundle = await loadArtifactBundle(artifactsDir);
48
- const sourceRoot = await readRunSourceRoot(root, artifactsDir);
49
- const lineIndex = bundle.repo_manifest
50
- ? await buildLineIndex(sourceRoot, bundle.repo_manifest)
51
- : undefined;
52
- const results = await readJsonFile(resultsPath);
53
- if (isHostResult(results, resultsPath)) {
54
- const check = await checkAuditHostResult({
55
- root,
56
- sourceRoot,
57
- artifactsDir,
58
- resultPath: resultsPath,
59
- auditTasks: bundle.audit_tasks ?? [],
60
- lineIndex,
61
- });
62
- outputJson({
63
- artifacts_dir: artifactsDir,
64
- results_path: resolve(resultsPath),
65
- ...check,
66
- warning_count: check.validation_warnings.length,
67
- error_count: check.issues.length,
68
- });
69
- process.exitCode = check.issues.length > 0 ? 1 : 0;
70
- return;
71
- }
72
- const issues = validateAuditResults(results, bundle.audit_tasks ?? [], {
73
- lineIndex,
74
- });
75
- const errors = issues.filter((issue) => issue.severity === "error");
76
- const warnings = issues.filter((issue) => issue.severity === "warning");
77
- outputJson({
78
- artifacts_dir: artifactsDir,
79
- results_path: resolve(resultsPath),
80
- warning_count: warnings.length,
81
- error_count: errors.length,
82
- issues,
83
- ...(Array.isArray(results) ? {} : { hint: SHAPE_HINT }),
84
- });
85
- process.exitCode = errors.length > 0 ? 1 : 0;
86
- }
87
- //# sourceMappingURL=validateResultsCommand.js.map
@@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