audit-tools 0.34.41 → 0.35.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 (328) hide show
  1. package/dist/audit/cli/args.d.ts +6 -0
  2. package/dist/audit/cli/args.d.ts.map +1 -1
  3. package/dist/audit/cli/args.js +21 -4
  4. package/dist/audit/cli/args.js.map +1 -1
  5. package/dist/audit/cli/auditStep.d.ts +6 -15
  6. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  7. package/dist/audit/cli/auditStep.js +1 -1
  8. package/dist/audit/cli/auditStep.js.map +1 -1
  9. package/dist/audit/cli/dispatch/hostFanoutGate.d.ts +21 -61
  10. package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +1 -1
  11. package/dist/audit/cli/dispatch/hostFanoutGate.js +18 -167
  12. package/dist/audit/cli/dispatch/hostFanoutGate.js.map +1 -1
  13. package/dist/audit/cli/dispatch/packetFilter.d.ts +2 -2
  14. package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
  15. package/dist/audit/cli/dispatch/packetFilter.js +3 -1
  16. package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
  17. package/dist/audit/cli/dispatch/quotaPool.d.ts +2 -14
  18. package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
  19. package/dist/audit/cli/dispatch/quotaPool.js +16 -6
  20. package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
  21. package/dist/audit/cli/dispatch/tierRouting.d.ts +2 -2
  22. package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts.map +1 -1
  23. package/dist/audit/cli/dispatch/tokenUsageObservation.js +10 -2
  24. package/dist/audit/cli/dispatch/tokenUsageObservation.js.map +1 -1
  25. package/dist/audit/cli/dispatch.d.ts +14 -3
  26. package/dist/audit/cli/dispatch.d.ts.map +1 -1
  27. package/dist/audit/cli/dispatch.js +87 -65
  28. package/dist/audit/cli/dispatch.js.map +1 -1
  29. package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
  30. package/dist/audit/cli/forceSynthesisCommand.js +9 -1
  31. package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
  32. package/dist/audit/cli/hybridDispatch.d.ts +4 -9
  33. package/dist/audit/cli/hybridDispatch.d.ts.map +1 -1
  34. package/dist/audit/cli/hybridDispatch.js +1 -1
  35. package/dist/audit/cli/hybridDispatch.js.map +1 -1
  36. package/dist/audit/cli/lineIndex.d.ts +2 -0
  37. package/dist/audit/cli/lineIndex.d.ts.map +1 -1
  38. package/dist/audit/cli/lineIndex.js +4 -0
  39. package/dist/audit/cli/lineIndex.js.map +1 -1
  40. package/dist/audit/cli/nextStepCommand.d.ts +0 -26
  41. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  42. package/dist/audit/cli/nextStepCommand.js +14 -358
  43. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  44. package/dist/audit/cli/nextStepHelpers.d.ts +5 -16
  45. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  46. package/dist/audit/cli/nextStepHelpers.js +27 -157
  47. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  48. package/dist/audit/cli/quotaCommand.d.ts.map +1 -1
  49. package/dist/audit/cli/quotaCommand.js +1 -5
  50. package/dist/audit/cli/quotaCommand.js.map +1 -1
  51. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  52. package/dist/audit/cli/reviewRun.js +58 -23
  53. package/dist/audit/cli/reviewRun.js.map +1 -1
  54. package/dist/audit/cli/rollingAuditDispatch.d.ts +1 -1
  55. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  56. package/dist/audit/cli/semanticReviewStep.js +35 -54
  57. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  58. package/dist/audit/cli/steps.d.ts +4 -4
  59. package/dist/audit/cli/steps.d.ts.map +1 -1
  60. package/dist/audit/cli/steps.js +0 -1
  61. package/dist/audit/cli/steps.js.map +1 -1
  62. package/dist/audit/cli/workPartitionRuntime.d.ts +11 -0
  63. package/dist/audit/cli/workPartitionRuntime.d.ts.map +1 -0
  64. package/dist/audit/cli/workPartitionRuntime.js +39 -0
  65. package/dist/audit/cli/workPartitionRuntime.js.map +1 -0
  66. package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
  67. package/dist/audit/io/artifacts.d.ts +1 -3
  68. package/dist/audit/io/artifacts.d.ts.map +1 -1
  69. package/dist/audit/io/artifacts.js +0 -3
  70. package/dist/audit/io/artifacts.js.map +1 -1
  71. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  72. package/dist/audit/orchestrator/advance.js +0 -35
  73. package/dist/audit/orchestrator/advance.js.map +1 -1
  74. package/dist/audit/orchestrator/advanceTypes.d.ts +4 -63
  75. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  76. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  77. package/dist/audit/orchestrator/executorRunners.js +9 -12
  78. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  79. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  80. package/dist/audit/orchestrator/executors.js +0 -5
  81. package/dist/audit/orchestrator/executors.js.map +1 -1
  82. package/dist/audit/orchestrator/hostInputPause.d.ts +1 -1
  83. package/dist/audit/orchestrator/hostInputPause.js +1 -1
  84. package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
  85. package/dist/audit/orchestrator/ingestionExecutors.js +4 -1
  86. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  87. package/dist/audit/orchestrator/intakeExecutors.d.ts +1 -65
  88. package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
  89. package/dist/audit/orchestrator/intakeExecutors.js +3 -425
  90. package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
  91. package/dist/audit/orchestrator/nextStep.d.ts +0 -13
  92. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  93. package/dist/audit/orchestrator/nextStep.js +0 -7
  94. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  95. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  96. package/dist/audit/orchestrator/planningExecutors.js +4 -1
  97. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  98. package/dist/audit/orchestrator/rollingDispatch.d.ts +1 -1
  99. package/dist/audit/orchestrator/rollingDispatch.d.ts.map +1 -1
  100. package/dist/audit/orchestrator/rollingDispatch.js +5 -4
  101. package/dist/audit/orchestrator/rollingDispatch.js.map +1 -1
  102. package/dist/audit/orchestrator/state.d.ts +0 -39
  103. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  104. package/dist/audit/orchestrator/state.js +3 -29
  105. package/dist/audit/orchestrator/state.js.map +1 -1
  106. package/dist/audit/orchestrator/synthesisExecutors.d.ts +8 -2
  107. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  108. package/dist/audit/orchestrator/synthesisExecutors.js +7 -5
  109. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  110. package/dist/audit/reporting/findingIdentity.d.ts +2 -2
  111. package/dist/audit/reporting/findingIdentity.js +2 -2
  112. package/dist/audit/reporting/synthesis.d.ts +7 -1
  113. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  114. package/dist/audit/reporting/synthesis.js +27 -7
  115. package/dist/audit/reporting/synthesis.js.map +1 -1
  116. package/dist/audit/reporting/workBlocks.d.ts +14 -3
  117. package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
  118. package/dist/audit/reporting/workBlocks.js +163 -73
  119. package/dist/audit/reporting/workBlocks.js.map +1 -1
  120. package/dist/audit/types/activeDispatch.d.ts +8 -7
  121. package/dist/audit/types/activeDispatch.d.ts.map +1 -1
  122. package/dist/audit/types/auditState.d.ts +6 -6
  123. package/dist/audit/types/externalAnalyzer.d.ts +6 -6
  124. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  125. package/dist/audit/validation/auditResults.js +6 -1
  126. package/dist/audit/validation/auditResults.js.map +1 -1
  127. package/dist/remediate/contractPipeline/phaseCut.d.ts +8 -0
  128. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
  129. package/dist/remediate/contractPipeline/phaseCut.js +63 -0
  130. package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
  131. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +1 -1
  132. package/dist/remediate/contractPipeline/phaseCutArtifact.js +5 -3
  133. package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +1 -1
  134. package/dist/remediate/phases/plan.d.ts.map +1 -1
  135. package/dist/remediate/phases/plan.js +35 -12
  136. package/dist/remediate/phases/plan.js.map +1 -1
  137. package/dist/remediate/steps/contractPipeline.d.ts +6 -2
  138. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  139. package/dist/remediate/steps/contractPipeline.js +90 -6
  140. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  141. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  142. package/dist/remediate/steps/contractPipelinePrompts.js +4 -2
  143. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  144. package/dist/remediate/steps/dispatch/marshal.d.ts +6 -0
  145. package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
  146. package/dist/remediate/steps/dispatch/marshal.js +16 -17
  147. package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
  148. package/dist/remediate/steps/dispatch/waveScheduling.d.ts +7 -15
  149. package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
  150. package/dist/remediate/steps/dispatch/waveScheduling.js +26 -19
  151. package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
  152. package/dist/remediate/steps/nextStep.d.ts +5 -7
  153. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  154. package/dist/remediate/steps/nextStep.js +100 -82
  155. package/dist/remediate/steps/nextStep.js.map +1 -1
  156. package/dist/remediate/steps/rollingSession.d.ts +2 -1
  157. package/dist/remediate/steps/rollingSession.d.ts.map +1 -1
  158. package/dist/remediate/steps/rollingSession.js +14 -8
  159. package/dist/remediate/steps/rollingSession.js.map +1 -1
  160. package/dist/remediate/steps/sessionConfigLoad.d.ts +3 -2
  161. package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -1
  162. package/dist/remediate/steps/sessionConfigLoad.js +4 -10
  163. package/dist/remediate/steps/sessionConfigLoad.js.map +1 -1
  164. package/dist/remediate/validation/contractPipeline.d.ts +1 -1
  165. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  166. package/dist/remediate/validation/contractPipeline.js +7 -1
  167. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  168. package/dist/remediate/validation/contractPipelineGates.d.ts +8 -0
  169. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  170. package/dist/remediate/validation/contractPipelineGates.js +89 -0
  171. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  172. package/dist/shared/config/resolveSessionConfig.d.ts.map +1 -1
  173. package/dist/shared/config/resolveSessionConfig.js +6 -5
  174. package/dist/shared/config/resolveSessionConfig.js.map +1 -1
  175. package/dist/shared/decompose/workPartition.d.ts +66 -0
  176. package/dist/shared/decompose/workPartition.d.ts.map +1 -0
  177. package/dist/shared/decompose/workPartition.js +523 -0
  178. package/dist/shared/decompose/workPartition.js.map +1 -0
  179. package/dist/shared/dispatch/admissionLoop.d.ts +5 -44
  180. package/dist/shared/dispatch/admissionLoop.d.ts.map +1 -1
  181. package/dist/shared/dispatch/admissionLoop.js +20 -82
  182. package/dist/shared/dispatch/admissionLoop.js.map +1 -1
  183. package/dist/shared/dispatch/coordinator.d.ts +5 -5
  184. package/dist/shared/dispatch/coordinator.d.ts.map +1 -1
  185. package/dist/shared/dispatch/coordinator.js +12 -11
  186. package/dist/shared/dispatch/coordinator.js.map +1 -1
  187. package/dist/shared/dispatch/costRank.d.ts +5 -155
  188. package/dist/shared/dispatch/costRank.d.ts.map +1 -1
  189. package/dist/shared/dispatch/costRank.js +2 -179
  190. package/dist/shared/dispatch/costRank.js.map +1 -1
  191. package/dist/shared/dispatch/dispatchQuotaContract.d.ts +37 -38
  192. package/dist/shared/dispatch/dispatchQuotaContract.d.ts.map +1 -1
  193. package/dist/shared/dispatch/dispatchQuotaContract.js +0 -1
  194. package/dist/shared/dispatch/dispatchQuotaContract.js.map +1 -1
  195. package/dist/shared/dispatch/hybridDispatch.d.ts +6 -2
  196. package/dist/shared/dispatch/hybridDispatch.d.ts.map +1 -1
  197. package/dist/shared/dispatch/hybridDispatch.js +1 -1
  198. package/dist/shared/dispatch/hybridDispatch.js.map +1 -1
  199. package/dist/shared/dispatch/rollingDispatch.d.ts +4 -4
  200. package/dist/shared/dispatch/rollingDispatch.d.ts.map +1 -1
  201. package/dist/shared/dispatch/rollingDispatch.js +13 -11
  202. package/dist/shared/dispatch/rollingDispatch.js.map +1 -1
  203. package/dist/shared/dispatch/unifiedRolling.d.ts +2 -2
  204. package/dist/shared/dispatch/unifiedRolling.d.ts.map +1 -1
  205. package/dist/shared/dispatch/unifiedRolling.js +1 -1
  206. package/dist/shared/dispatch/unifiedRolling.js.map +1 -1
  207. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  208. package/dist/shared/friction/stepBoundaryCapture.d.ts +5 -59
  209. package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
  210. package/dist/shared/friction/stepBoundaryCapture.js +11 -107
  211. package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
  212. package/dist/shared/index.d.ts +13 -16
  213. package/dist/shared/index.d.ts.map +1 -1
  214. package/dist/shared/index.js +9 -13
  215. package/dist/shared/index.js.map +1 -1
  216. package/dist/shared/io/stateDir.d.ts +2 -2
  217. package/dist/shared/io/stateDir.js +2 -2
  218. package/dist/shared/providers/auditorSources.d.ts +10 -84
  219. package/dist/shared/providers/auditorSources.d.ts.map +1 -1
  220. package/dist/shared/providers/auditorSources.js +42 -261
  221. package/dist/shared/providers/auditorSources.js.map +1 -1
  222. package/dist/shared/providers/dispatchExclusion.d.ts +22 -0
  223. package/dist/shared/providers/dispatchExclusion.d.ts.map +1 -0
  224. package/dist/shared/providers/dispatchExclusion.js +23 -0
  225. package/dist/shared/providers/dispatchExclusion.js.map +1 -0
  226. package/dist/shared/providers/identity.d.ts +2 -66
  227. package/dist/shared/providers/identity.d.ts.map +1 -1
  228. package/dist/shared/providers/identity.js +2 -72
  229. package/dist/shared/providers/identity.js.map +1 -1
  230. package/dist/shared/providers/providerFactory.d.ts +0 -3
  231. package/dist/shared/providers/providerFactory.d.ts.map +1 -1
  232. package/dist/shared/providers/providerFactory.js +5 -32
  233. package/dist/shared/providers/providerFactory.js.map +1 -1
  234. package/dist/shared/providers/providerPathGuard.d.ts +3 -3
  235. package/dist/shared/providers/providerPathGuard.js +7 -7
  236. package/dist/shared/providers/providerPathGuard.js.map +1 -1
  237. package/dist/shared/quota/apiPool.d.ts +19 -22
  238. package/dist/shared/quota/apiPool.d.ts.map +1 -1
  239. package/dist/shared/quota/apiPool.js +66 -47
  240. package/dist/shared/quota/apiPool.js.map +1 -1
  241. package/dist/shared/quota/capacity.d.ts +29 -24
  242. package/dist/shared/quota/capacity.d.ts.map +1 -1
  243. package/dist/shared/quota/capacity.js +30 -4
  244. package/dist/shared/quota/capacity.js.map +1 -1
  245. package/dist/shared/quota/codexHostConfig.d.ts +6 -13
  246. package/dist/shared/quota/codexHostConfig.d.ts.map +1 -1
  247. package/dist/shared/quota/codexHostConfig.js +8 -14
  248. package/dist/shared/quota/codexHostConfig.js.map +1 -1
  249. package/dist/shared/quota/fileLock.d.ts +7 -0
  250. package/dist/shared/quota/fileLock.d.ts.map +1 -1
  251. package/dist/shared/quota/fileLock.js +32 -4
  252. package/dist/shared/quota/fileLock.js.map +1 -1
  253. package/dist/shared/quota/hostLimits.d.ts +1 -1
  254. package/dist/shared/quota/hostLimits.d.ts.map +1 -1
  255. package/dist/shared/quota/hostLimits.js +8 -11
  256. package/dist/shared/quota/hostLimits.js.map +1 -1
  257. package/dist/shared/quota/hostPool.d.ts +1 -1
  258. package/dist/shared/quota/hostPool.js +2 -2
  259. package/dist/shared/quota/hostPool.js.map +1 -1
  260. package/dist/shared/quota/limits.d.ts.map +1 -1
  261. package/dist/shared/quota/limits.js +30 -26
  262. package/dist/shared/quota/limits.js.map +1 -1
  263. package/dist/shared/quota/scheduler.d.ts +2 -3
  264. package/dist/shared/quota/scheduler.d.ts.map +1 -1
  265. package/dist/shared/quota/scheduler.js +1 -1
  266. package/dist/shared/quota/scheduler.js.map +1 -1
  267. package/dist/shared/quota/types.d.ts +10 -10
  268. package/dist/shared/quota/types.d.ts.map +1 -1
  269. package/dist/shared/quota/types.js +4 -7
  270. package/dist/shared/quota/types.js.map +1 -1
  271. package/dist/shared/repair/brokeredDispatch.d.ts.map +1 -1
  272. package/dist/shared/repair/brokeredDispatch.js +3 -0
  273. package/dist/shared/repair/brokeredDispatch.js.map +1 -1
  274. package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
  275. package/dist/shared/reporting/auditDeliverable.js +1 -0
  276. package/dist/shared/reporting/auditDeliverable.js.map +1 -1
  277. package/dist/shared/rolling/pausedState.d.ts +7 -7
  278. package/dist/shared/rolling/pausedState.js +3 -3
  279. package/dist/shared/tokens.d.ts +2 -5
  280. package/dist/shared/tokens.d.ts.map +1 -1
  281. package/dist/shared/tokens.js +15 -15
  282. package/dist/shared/tokens.js.map +1 -1
  283. package/dist/shared/types/auditorDescriptor.d.ts +3 -2
  284. package/dist/shared/types/auditorDescriptor.d.ts.map +1 -1
  285. package/dist/shared/types/auditorDescriptor.js +3 -2
  286. package/dist/shared/types/auditorDescriptor.js.map +1 -1
  287. package/dist/shared/types/finding.d.ts +80 -0
  288. package/dist/shared/types/finding.d.ts.map +1 -1
  289. package/dist/shared/types/finding.js +17 -0
  290. package/dist/shared/types/finding.js.map +1 -1
  291. package/dist/shared/types/sessionConfig.d.ts +5 -5
  292. package/dist/shared/types/sessionConfig.js +1 -1
  293. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  294. package/dist/shared/validation/findingsReport.js +3 -0
  295. package/dist/shared/validation/findingsReport.js.map +1 -1
  296. package/docs/audit-pkg/development.md +3 -2
  297. package/docs/audit-pkg/operator-guide.md +13 -106
  298. package/docs/audit-pkg/product.md +8 -7
  299. package/docs/audit-pkg/release.md +38 -29
  300. package/opencode.json +2 -2
  301. package/package.json +7 -4
  302. package/skills/audit-code/SKILL.md +2 -1
  303. package/skills/audit-code/audit-code.prompt.md +4 -3
  304. package/skills/remediate-code/remediate-code.prompt.md +2 -1
  305. package/dist/audit/cli/providerConfirmationStep.d.ts +0 -106
  306. package/dist/audit/cli/providerConfirmationStep.d.ts.map +0 -1
  307. package/dist/audit/cli/providerConfirmationStep.js +0 -396
  308. package/dist/audit/cli/providerConfirmationStep.js.map +0 -1
  309. package/dist/audit/orchestrator/providerConfirmation.d.ts +0 -25
  310. package/dist/audit/orchestrator/providerConfirmation.d.ts.map +0 -1
  311. package/dist/audit/orchestrator/providerConfirmation.js +0 -60
  312. package/dist/audit/orchestrator/providerConfirmation.js.map +0 -1
  313. package/dist/shared/providers/providerConfirmation.d.ts +0 -141
  314. package/dist/shared/providers/providerConfirmation.d.ts.map +0 -1
  315. package/dist/shared/providers/providerConfirmation.js +0 -420
  316. package/dist/shared/providers/providerConfirmation.js.map +0 -1
  317. package/dist/shared/providers/proxyCatalog.d.ts +0 -158
  318. package/dist/shared/providers/proxyCatalog.d.ts.map +0 -1
  319. package/dist/shared/providers/proxyCatalog.js +0 -658
  320. package/dist/shared/providers/proxyCatalog.js.map +0 -1
  321. package/dist/shared/providers/sharedProviderConfirmation.d.ts +0 -802
  322. package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +0 -1
  323. package/dist/shared/providers/sharedProviderConfirmation.js +0 -1865
  324. package/dist/shared/providers/sharedProviderConfirmation.js.map +0 -1
  325. package/dist/shared/types/providerConfirmation.d.ts +0 -334
  326. package/dist/shared/types/providerConfirmation.d.ts.map +0 -1
  327. package/dist/shared/types/providerConfirmation.js +0 -35
  328. package/dist/shared/types/providerConfirmation.js.map +0 -1
@@ -1,33 +1,12 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
- import { isGitRepo, writeJsonFile, buildSharedProviderConfirmation, writeSharedProviderConfirmation, readSharedProviderConfirmation, readProviderConfirmationInput, carryForwardConfirmationInput, retainAutoExclusions, detectDiscardedCapabilityReorder, capabilityOrderNonAnchors, advanceCapabilityOrderLlmRanked, unlinkProviderConfirmationInput, gatherDispatchableSources, resolveFreshSessionProviderName, resolveSessionConfig, ambientAuditorDescriptor, captureNewlyReachableBackendFriction, PROVIDER_CONFIRMATION_FRICTION_RUN_KEY, captureUnrankedCapabilityPromotionFriction, unmatchedExclusionPatterns, } from "audit-tools/shared";
4
- import { confirmProviders } from "./providerConfirmation.js";
5
- import { loadSessionConfig } from "../supervisor/sessionConfig.js";
3
+ import { isGitRepo, writeJsonFile } from "audit-tools/shared";
6
4
  import { buildFileDisposition, isAuditExcludedStatus, } from "../extractors/disposition.js";
7
5
  import { buildRepoManifestFromFs } from "../extractors/fsIntake.js";
8
6
  import { loadIgnoreFile } from "../extractors/ignore.js";
9
- /**
10
- * Synthetic run key for Gate-0 friction. The confirmation gate runs BEFORE any run
11
- * id exists, and the capture chokepoint keys de-dup on {eventType, runId,
12
- * discriminator} — a stable constant here means the real discriminator (the backend
13
- * key) does the distinguishing, so a re-derive never double-logs the same backend.
14
- */
15
- /**
16
- * Detect signals that the resolved audit root may be the *wrong* directory.
17
- * Two heuristics, returned as zero or more human-readable warnings:
18
- *
19
- * a. No-git-but-ancestor-is-repo — `root` is not a git repo but some ancestor
20
- * directory is (you probably targeted a subdirectory instead of the repo
21
- * root).
22
- * b. Workspace-member — `root` has a `package.json` with a `name`, and its
23
- * parent has a `package.json` declaring `workspaces` (you probably want to
24
- * audit from the monorepo root).
25
- *
26
- * Returns an empty array when the scope looks correct. Never throws.
27
- */
7
+ /** Detect signals that the resolved audit root may be the wrong directory. */
28
8
  export function detectMisScopeSmells(root) {
29
9
  const smells = [];
30
- // (a) No .git here, but an ancestor is a git repository.
31
10
  if (!isGitRepo(root)) {
32
11
  let current = dirname(root);
33
12
  let previous = root;
@@ -40,12 +19,6 @@ export function detectMisScopeSmells(root) {
40
19
  current = dirname(current);
41
20
  }
42
21
  }
43
- // (b) Workspace member of a parent monorepo.
44
- // Walk up ancestor directories (up to 3 levels) looking for a package.json
45
- // that declares a `workspaces` field. This handles standard nested monorepo
46
- // layouts like `monorepo-root/packages/my-pkg` where the direct parent
47
- // (`packages/`) has no package.json of its own. Stop early if a .git
48
- // boundary is found (we already checked that case under heuristic (a)).
49
22
  const rootPkg = readPackageJson(root);
50
23
  if (rootPkg && rootPkg.name !== undefined) {
51
24
  let current = dirname(root);
@@ -58,10 +31,8 @@ export function detectMisScopeSmells(root) {
58
31
  smells.push(`root appears to be a workspace member of a parent monorepo at '${current}' — consider auditing from the monorepo root instead`);
59
32
  break;
60
33
  }
61
- // Stop at a .git boundary — the repo root won't be a workspaces ancestor.
62
- if (existsSync(join(current, ".git"))) {
34
+ if (existsSync(join(current, ".git")))
63
35
  break;
64
- }
65
36
  previous = current;
66
37
  current = dirname(current);
67
38
  levelsChecked++;
@@ -80,399 +51,9 @@ function readPackageJson(dir) {
80
51
  : undefined;
81
52
  }
82
53
  catch {
83
- // Missing or malformed package.json — treat as absent for smell purposes.
84
54
  return undefined;
85
55
  }
86
56
  }
87
- /**
88
- * Headless deterministic fallback for the provider confirmation gate — mirrors
89
- * the `runIntentCheckpointAutoComplete` pattern. The conversation-first flow
90
- * emits a `provider_confirmation` host step; this runs only when `advanceAudit`
91
- * is driven headlessly with no host to confirm the provider pool, writing a
92
- * default provider_confirmation artifact so the pipeline can proceed.
93
- *
94
- * DC-2: audit is the single WRITER of the shared session-level confirmation at
95
- * `<root>/.audit-tools/provider-confirmation.json`. When `root` is known we also
96
- * write that shared artifact (atomic temp-then-rename under a file lock — CE-003)
97
- * so a subsequent remediate run can read + honor the same pool. The per-tool
98
- * `provider_confirmation` bundle field (the N-X06 seam contract) is unchanged;
99
- * the shared artifact carries the operator's reach-free route DECISION.
100
- *
101
- * G3 — the write half of the reconciliation gate. **This executor never silently
102
- * honors a newly-reachable backend.** If it is asked to promote while the gate
103
- * carries a delta and there is NO operator submission, it fails CLOSED (persists an
104
- * exclusion) and records a `newly_reachable_backend` friction event.
105
- *
106
- * That rule is deliberately NOT keyed on `autonomous` ALONE, and the asymmetry
107
- * matters: `autonomous` decides who gets ASKED — the CLI emits the delta prompt on
108
- * an attended run and folds straight to this executor on an unattended one — but it
109
- * can never make silently including an unconfirmed backend correct. This function is
110
- * exported and reachable from `advanceAudit` directly, so the no-silent-honor
111
- * property is enforced HERE rather than resting on a caller's branch being right (a
112
- * caller that promotes an attended delta without asking IS the bug the gate exists
113
- * to catch). Enforce in the tool, never in a caller remembering.
114
- *
115
- * R3-3 sharpens the edge rather than replacing it: on an autonomous run, a
116
- * submission CAN now exist (the host LLM answering the capability-ranker prompt),
117
- * but it is never an operator's reach decision — so `authoredByLlm` (derived below)
118
- * fails closed on reach exactly like `input === null` does. An LLM may rank
119
- * capability; it may never confirm a newly-reachable backend.
120
- *
121
- * A first-ever confirmation is unaffected: with no confirmation on disk there is no
122
- * decision to reconcile against, so the delta is empty and nothing fails closed.
123
- *
124
- * The persist is MANDATORY, not incidental: `provider_confirmation` is `PRIORITY[0]`,
125
- * so a delta that never clears is a drain LIVELOCK, not a no-op. On a successful
126
- * promotion the gate is CLEARED — the rebuild folds every reachable backend into
127
- * `provider_pool` (an excluded entry stays IN the pool), so all of REACH-NOW is now
128
- * CONFIRMED and the delta is empty by construction.
129
- */
130
- export async function runProviderConfirmationAutoComplete(bundle, root, artifactsDir, effectiveConfig, gate) {
131
- // G2: prefer the EFFECTIVE dispatch config threaded from the next-step drain (the
132
- // per-auditor descriptor resolved over the repo INTENT). The confirmed pool this
133
- // executor builds + persists is what routes for the whole session, so it MUST reflect
134
- // the current auditor's descriptor, not a re-read of the repo config
135
- // (spec/unified-dispatch-worker-model.md). Fall back to the repo INTENT resolved against
136
- // the AMBIENT descriptor when no effective config was threaded — e.g. the legacy headless
137
- // advance-audit entrypoint, which carries no handshake but still HAS an environment, so
138
- // its reachable lanes must appear in the confirmed roster (what the operator confirms is
139
- // what routes). A `null` descriptor here would hide a declared+reachable backend from
140
- // Gate-0 entirely. Degrade to the empty permissive default when the config is
141
- // absent/unreadable — pricing is best-effort and must never block confirmation.
142
- const sessionConfig = effectiveConfig ??
143
- (artifactsDir
144
- ? resolveSessionConfig(await loadSessionConfig(artifactsDir).catch(() => ({})), ambientAuditorDescriptor())
145
- : {});
146
- // Interactive Gate-0: the host may have submitted an operator ordering + host
147
- // roster to `provider-confirmation.input.json` (spec/dispatch-quota.md).
148
- // Absent ⇒ the tool's price-ascending suggestion (headless / no-operator path).
149
- const rawInput = artifactsDir
150
- ? await readProviderConfirmationInput(artifactsDir)
151
- : null;
152
- // The confirmation as it stands BEFORE this promotion — read once, used for the
153
- // carry-forward merge below. Absent on a first-time confirmation.
154
- const priorConfirmation = root ? await readSharedProviderConfirmation(root) : null;
155
- /**
156
- * R3-3 authorship, tool-derived — never host-supplied, so the host cannot mislabel
157
- * it. On an autonomous run nobody is present to submit input, so a submission that
158
- * exists there was written by the host LLM answering the ranker prompt
159
- * (`nextStepHelpers.ts`'s `provider_confirmation` emission branch), never an
160
- * operator. An attended submission is always the operator's, regardless of who
161
- * technically typed it. This one boolean decides the reach fail-closed keying
162
- * below, which side of the `capability_order_llm_ranked` provenance split
163
- * (rule 1 vs rule 2) this promotion falls on, and the sanitize step next.
164
- */
165
- const authoredByLlm = gate?.autonomous === true && rawInput != null;
166
- /**
167
- * R3-3 sanitize — the LLM was asked exactly ONE question, so `capability_order` is
168
- * the only field an LLM-authored submission may carry into the promotion. Every
169
- * other field (`exclude` / `include` / `cost_order` / `host_models` /
170
- * `dispatch_bias`) is an OPERATOR decision: the carry-forward branches and
171
- * `retainAutoExclusions` are authorship-blind, so an un-stripped LLM `include`
172
- * (or an `exclude` addressing a fail-closed pattern) would drop a prior
173
- * auto-exclusion and silently re-admit a backend no human ever confirmed — the
174
- * exact negation of the G3 gate, reachable one round after a fail-closed write.
175
- * Stripped HERE, at the single point every consumer reads from, so the guarantee
176
- * never depends on the prompt having asked nicely — and stripped LOUDLY: the
177
- * dropped field names go to the progress summary rather than vanishing.
178
- */
179
- const droppedLlmFields = [];
180
- let input = rawInput;
181
- if (authoredByLlm && rawInput) {
182
- for (const [key, value] of Object.entries(rawInput)) {
183
- if (key !== "schema_version" && key !== "capability_order" && value !== undefined) {
184
- droppedLlmFields.push(key);
185
- }
186
- }
187
- if (droppedLlmFields.length > 0) {
188
- droppedLlmFields.sort();
189
- input = {
190
- schema_version: rawInput.schema_version,
191
- ...(rawInput.capability_order !== undefined
192
- ? { capability_order: rawInput.capability_order }
193
- : {}),
194
- };
195
- }
196
- }
197
- /**
198
- * Which previously-ranked ids this submission may freely reposition (R3-3 rule 2)
199
- * rather than treat as fixed anchors (rule 1) — see `capabilityOrderNonAnchors`.
200
- * Threaded into BOTH the discard-detector below and the merge inside
201
- * `carryForwardConfirmationInput`, so the two can never disagree about what an
202
- * "anchor" is for this submission.
203
- */
204
- const capabilityNonAnchors = capabilityOrderNonAnchors(priorConfirmation?.policy?.capability_order_llm_ranked ?? [], authoredByLlm);
205
- /** Models the capability gate flagged that this promotion clears WITHOUT ranking. */
206
- let unrankedOnPromotion = [];
207
- /**
208
- * Operator `exclude` rules that matched NOTHING in the reach this gate gathered.
209
- *
210
- * ADVISORY, never a refusal — a zero-match rule is legitimate (the tool authors
211
- * them itself, and an operator may pre-declare an exclusion for a backend that is
212
- * not reachable yet). It is reported because it is the only available signal for
213
- * the grammatically-VALID typo the authorship validator cannot catch:
214
- * `openai-compatible:model-typo` has a real provider head and an open model
215
- * segment, so it parses fine and excludes nothing.
216
- *
217
- * Computed inside `if (root)` below, which is the only place the gathered sources
218
- * exist; empty everywhere else, which reports nothing rather than guessing.
219
- */
220
- let unmatchedExclusions = [];
221
- /**
222
- * Anchor ids whose reorder this promotion is about to DISCARD. Computed before the
223
- * merge, from the RAW submission — `effectiveInput` already carries the merged (i.e.
224
- * reorder-free) order, so asking it afterwards can never reveal what was dropped.
225
- *
226
- * Reported rather than honored: repositioning an already-ranked model without
227
- * restating the whole roster needs the anchor-provenance split in `docs/backlog.md`.
228
- * What is NOT acceptable is doing it silently — an accepted-then-discarded operator
229
- * decision is the same "the operator had to notice" failure the reach delta and the
230
- * capability fail-open are both reported for. An LLM-authored submission is held to
231
- * the identical honesty rule: reordering an anchor it must not move is discarded
232
- * AND reported exactly like an operator's would be.
233
- */
234
- const discardedReorder = detectDiscardedCapabilityReorder(priorConfirmation?.policy?.capability_order ?? [], input?.capability_order ?? [], capabilityNonAnchors, authoredByLlm);
235
- // G3 fail-closed reconciliation: a backend the operator never confirmed must not
236
- // become dispatchable merely because it is reachable. Excluding it is the
237
- // conservative direction — the run proceeds on the confirmed backends.
238
- //
239
- // Keyed on `input === null` OR `authoredByLlm`: a submission IS the operator's
240
- // decision and supersedes ONLY on an attended run (the gate prompts the delta and
241
- // this promotes their answer) — with NO submission, or one an autonomous run's LLM
242
- // wrote, there is no OPERATOR decision to honor, and including the backend would be
243
- // the silent dispatch the gate exists to prevent. R3-3 draws this line explicitly:
244
- // an LLM may rank capability (that judgment IS recorded, see `capability_order`
245
- // below); it may never confirm a newly-reachable backend on the operator's behalf.
246
- // See the header for why this is enforced here rather than in the caller's branch.
247
- //
248
- // A″: each backend carries the `DispatchExclusionPattern` that rules out EXACTLY
249
- // it — `provider:model` where the model is knowable, else the coarse `provider`
250
- // tier for a CLI whose model only arrives at the dispatch handshake. So excluding
251
- // one new model of a multi-model backend no longer drops that backend's other
252
- // sources. The pattern is built by the gate beside the key it compared, never
253
- // re-derived here, so the rule persisted cannot drift from the delta detected.
254
- // Stage 5: the autonomous fail-closed write emits the `service:` axis, because that
255
- // is the axis that does not decay and closes multi-transport residue durably.
256
- // R3-3 (SHIPPED): a headless run with a non-empty capability-evidence delta no
257
- // longer wedges here — `nextStepHelpers.ts`'s emission branch routes it to the
258
- // host LLM instead of folding to this executor, addressing the same ranker prompt
259
- // an operator would answer. The LLM's `capability_order` submission is promoted
260
- // through this exact seam on the NEXT invocation (the generic `if (input)` fold in
261
- // `nextStepHelpers.ts` applies regardless of attended/autonomous), tagged
262
- // LLM-authored via `authoredByLlm` above rather than fabricated locally — never a
263
- // locally-derived proxy (context window, price, name), which would manufacture
264
- // evidence where the design says there is none. See
265
- // `docs/reviews/capability-evidence-salvage-2026-07-20.md` → Landing gate for the
266
- // wedge this replaces.
267
- const effectiveInput = carryForwardConfirmationInput(input, priorConfirmation, authoredByLlm);
268
- const failClosed = input === null || authoredByLlm ? [...(gate?.newlyReachable ?? [])] : [];
269
- // Read the CARRIED input, not the raw submission: the operator's prior exclusions are
270
- // a durable rule, and rebuilding this list from `input.exclude` alone is what let a
271
- // capability-only submission silently lift them — a fail-OPEN, the worst direction.
272
- //
273
- // Kept SEPARATE from the gate's own fail-closed patterns below. Merging them was the
274
- // mirror-image bug: the carry-forward could not tell the two apart, so a tool guess
275
- // became permanent operator policy and the operator's next submission no longer
276
- // superseded it (with no signal — by then the backend is a confirmed key, so the
277
- // reconciliation delta never re-surfaces it either).
278
- const exclude = [...new Set(effectiveInput?.exclude ?? [])];
279
- // Gate-authored. The NEW fail-closed patterns from this promotion, UNIONED with the
280
- // prior ones that this submission did not address ({@link retainAutoExclusions}).
281
- //
282
- // Rebuilding from `failClosed` alone was a fail-OPEN: an excluded entry still counts
283
- // as a confirmed key, so the reach delta goes empty after the first promotion and the
284
- // next one dropped the exclusion entirely — re-admitting a backend the operator never
285
- // confirmed. Carrying is therefore mandatory; what a submission supersedes is only the
286
- // patterns it actually speaks to.
287
- const autoExclude = [
288
- ...new Set([
289
- ...retainAutoExclusions(priorConfirmation?.policy?.auto_exclude ?? [], input),
290
- ...failClosed.map((b) => b.service_exclusion_pattern ?? b.exclusion_pattern),
291
- ]),
292
- ];
293
- const confirmation = confirmProviders(sessionConfig, process.env,
294
- // The per-tool seam carries no policy provenance — it is a pool SNAPSHOT, so what
295
- // matters here is only which entries are excluded. Union, deliberately.
296
- [...exclude, ...autoExclude], effectiveInput ?? undefined);
297
- const artifactsWritten = ["provider_confirmation.json"];
298
- if (root) {
299
- // Gate-0 source fold: expand every dispatchable source pool (the explicit
300
- // `sources[]`) so the confirmed cost ordering the operator approves is exactly
301
- // what routes.
302
- const primaryProviderName = resolveFreshSessionProviderName(undefined, sessionConfig, {
303
- env: process.env,
304
- });
305
- const { sources } = await gatherDispatchableSources(sessionConfig, primaryProviderName);
306
- // The zero-match advisory's operand: the reach this gate is actually confirming.
307
- // Both halves are needed — `sources` carries the endpoints a `host:` rule keys on,
308
- // and the provider pool carries the CLI/host entries that have no source row at all
309
- // (a `transport:codex` rule would otherwise read as matching nothing).
310
- //
311
- // Honest limit: a pool entry carries no endpoint, so a `host:` rule naming a
312
- // launcher COMMAND path can still be reported unmatched. Advisory-only, so the
313
- // cost of that residue is one line of noise, never a blocked run.
314
- const gatheredBackends = [
315
- ...sources.map((source) => ({
316
- transport: source.transport,
317
- ...(source.service !== undefined ? { service: source.service } : {}),
318
- ...(source.model !== undefined ? { model: source.model } : {}),
319
- ...(source.endpoint !== undefined ? { endpoint: source.endpoint } : {}),
320
- })),
321
- ...confirmation.provider_pool.map((entry) => ({
322
- transport: entry.name,
323
- ...(entry.model_id !== undefined ? { model: entry.model_id } : {}),
324
- })),
325
- ];
326
- // The OPERATOR's rules only — never `autoExclude`. The tool authors zero-match
327
- // rules by design (a fail-closed exclusion outlives the reach that prompted it),
328
- // so folding them in would make this advisory fire on the tool's own correct
329
- // behavior every run — the fastest way to train an operator to read past it.
330
- unmatchedExclusions = unmatchedExclusionPatterns(exclude, gatheredBackends);
331
- // R3-3: advance the LLM-ranked authorship set across this promotion (rule 1/2 —
332
- // see `advanceCapabilityOrderLlmRanked`), from the RAW submission (never
333
- // `effectiveInput.capability_order`, which is already the merged ordering and
334
- // no longer distinguishes "named by this submission" from "carried forward").
335
- const capabilityOrderLlmRanked = advanceCapabilityOrderLlmRanked(priorConfirmation?.policy?.capability_order_llm_ranked ?? [], priorConfirmation?.policy?.capability_order ?? [], input?.capability_order, authoredByLlm);
336
- await writeSharedProviderConfirmation(root, buildSharedProviderConfirmation(sessionConfig, process.env, exclude,
337
- // `effectiveInput`, never the raw submission — the sixth face of the same
338
- // defect class, and the last one: reading `input.include` here destroys a
339
- // prior `policy.include` on any submission that does not restate it. Unlike
340
- // the `exclude` case this fails CLOSED (a self-spawn-blocked provider the
341
- // operator deliberately opted back in silently drops out of the pool again),
342
- // so it is not a routing-safety hole — but it is still an operator decision
343
- // deleted without a signal.
344
- effectiveInput?.include ?? [], undefined, effectiveInput ?? undefined, sources, autoExclude, capabilityOrderLlmRanked));
345
- artifactsWritten.push("provider-confirmation.json");
346
- // G3: the shared confirmation — the ONLY artifact dispatch reads, and the gate's
347
- // CONFIRMED operand — now folds every reachable backend into `provider_pool`. So
348
- // the delta is empty by construction and the gate must say so: leaving it set
349
- // re-selects this `PRIORITY[0]` obligation on the very next fold (autonomous →
350
- // re-promote until `advance` throws; attended → re-prompt a delta that is now a
351
- // lie). Cleared HERE, inside `if (root)`, because that is exactly where CONFIRMED
352
- // actually changed.
353
- if (gate)
354
- gate.newlyReachable = [];
355
- // Same clearing rule, same reason: the promotion just wrote `capability_rank` for
356
- // everything the operator/LLM ordered, so the capability delta is empty by
357
- // construction and a stale non-empty value re-selects this `PRIORITY[0]`
358
- // obligation forever. Cleared HERE because this is where the ranks actually
359
- // changed. (Any model still genuinely unranked is re-detected next invocation by
360
- // `resolveUnevidencedCapabilityPools` — the delta is recomputed, never inherited.)
361
- //
362
- // What the submission did NOT rank is captured first: on the autonomous path there
363
- // is no input file at all and this executor is deterministic, so the delta clears
364
- // with nothing recorded. That promotion is legitimate (refusing would livelock,
365
- // and fail-closed-excluding an unranked pool would silently shrink the dispatch
366
- // set) but it must not be SILENT — it is reported in the progress summary.
367
- unrankedOnPromotion = (gate?.unevidencedCapability ?? []).filter((model) => !(effectiveInput?.capability_order ?? []).includes(model));
368
- if (gate)
369
- gate.unevidencedCapability = [];
370
- }
371
- // G3 consume-and-INVALIDATE. The input has now been promoted, so it is spent — and
372
- // leaving it on disk is what would make the gate never fire at all: a LATER delta
373
- // re-opens this obligation, the CLI finds the old submission still sitting there,
374
- // routes to this executor instead of emitting the prompt, and folds the
375
- // newly-reachable backend into the confirmed pool with `excluded: false` — silently
376
- // dispatching a backend the operator never confirmed, the exact negation of the
377
- // gate. Unlinking makes a stale submission unable to answer a question it was never
378
- // asked.
379
- //
380
- // Guarded on `root`: without it the shared artifact — the only one dispatch reads —
381
- // was never written, so the submission has NOT been promoted anywhere durable.
382
- // Deleting it would destroy the operator's decision unrecoverably.
383
- if (input && artifactsDir && root) {
384
- await unlinkProviderConfirmationInput(artifactsDir);
385
- }
386
- if (failClosed.length > 0 && artifactsDir) {
387
- // Loud, not silent: the operator learns (out of band) that autonomy ruled a
388
- // backend out on their behalf, and can re-include it at the next attended gate.
389
- // Gate-0 predates any run id, so the facts are discriminated by backend key under
390
- // a stable synthetic run key — enough for the de-dup this capture needs.
391
- await captureNewlyReachableBackendFriction(artifactsDir, PROVIDER_CONFIRMATION_FRICTION_RUN_KEY, failClosed.map((b) => b.key), "audit-code");
392
- }
393
- if (unrankedOnPromotion.length > 0 && artifactsDir) {
394
- // Parity with the reach delta above, and for the same reason: the progress summary
395
- // states this, but a drain can fold that summary away — the friction record is what
396
- // survives to the close-out walk. Same synthetic run key: Gate-0 predates any run id.
397
- await captureUnrankedCapabilityPromotionFriction(artifactsDir, PROVIDER_CONFIRMATION_FRICTION_RUN_KEY, unrankedOnPromotion, "audit-code");
398
- }
399
- return {
400
- updated: { ...bundle, provider_confirmation: confirmation },
401
- artifacts_written: artifactsWritten,
402
- progress_summary: renderConfirmationSummary(input, failClosed, unrankedOnPromotion, discardedReorder, droppedLlmFields, unmatchedExclusions),
403
- };
404
- }
405
- function renderConfirmationSummary(input, newlyReachable, unrankedOnPromotion = [], discardedReorder = [], droppedLlmFields = [], unmatchedExclusions = []) {
406
- // ACCUMULATE, never early-return. These outcomes CO-OCCUR: a submission can reorder
407
- // anchors (discarded) while the same promotion clears a capability delta it did not
408
- // rank (`unrankedOnPromotion`). An if/return chain reported only the first, so the
409
- // second cleared SILENTLY — the very thing each of these lines exists to prevent.
410
- // Ordering within the list is significance, not exclusivity.
411
- const parts = [];
412
- // R3-3 sanitize report — like the discarded reorder below, this states what the
413
- // tool DECLINED to do: an LLM-authored submission carried operator-only fields and
414
- // they were stripped, not honored. Silent stripping would leave the host believing
415
- // its exclude/include took effect.
416
- if (droppedLlmFields.length > 0) {
417
- parts.push(`Dropped operator-only field(s) from the LLM-authored submission ` +
418
- `(${droppedLlmFields.join(", ")}) — an autonomous ranking answer may carry ` +
419
- `only capability_order; exclude/include/cost_order/host_models/dispatch_bias ` +
420
- `are operator decisions and require an attended confirmation.`);
421
- }
422
- // First: the operator submitted a decision and this promotion did not apply it.
423
- // Every other line reports what the tool DID; this reports what it DECLINED to do,
424
- // which the operator would otherwise have to notice by diffing the artifact.
425
- if (discardedReorder.length > 0) {
426
- const message = `Your capability_order REORDERED already-ranked model(s) ` +
427
- `(${discardedReorder.join(", ")}), and that reorder was NOT applied — ` +
428
- `previously-ranked models keep their confirmed positions, and only NEW models ` +
429
- `are placed by this answer. To change the relative order of models you already ` +
430
- `ranked, restate the FULL ordering (every previously-ranked model) in one ` +
431
- `capability_order. Any new models in this submission were still placed.`;
432
- // Also to stderr: a progress summary can be folded away by a drain, and a
433
- // discarded operator decision must not vanish with it.
434
- process.stderr.write(`WARNING: ${message}\n`);
435
- parts.push(message);
436
- }
437
- // Say the true thing when the capability delta is cleared with nothing recorded.
438
- // The autonomous path folds here with NO input file, and this executor is purely
439
- // deterministic — there is no LLM on it to synthesize an ordering. Clearing the
440
- // delta silently would be the "silently routed around" the obligation exists to
441
- // prevent, so the no-evidence promotion is stated rather than implied.
442
- if (unrankedOnPromotion.length > 0) {
443
- parts.push(`Promoted the provider confirmation with NO capability evidence for ` +
444
- `${unrankedOnPromotion.length} model(s) (${unrankedOnPromotion.join(", ")}) — ` +
445
- `they stay unranked and will fail OPEN at the admission capability floor. ` +
446
- `Supply a ranker, or answer capability_order on an attended run.`);
447
- }
448
- if (newlyReachable.length > 0) {
449
- parts.push(`No operator decision covers ${newlyReachable.length} newly-reachable ` +
450
- `backend(s), so they were fail-closed-excluded rather than dispatched ` +
451
- `unconfirmed (${newlyReachable.map((b) => b.key).join(", ")}).`);
452
- }
453
- // LAST, and ADVISORY — the only line here that reports a suspicion rather than an
454
- // outcome. It exists for the typo the authorship validator provably cannot catch:
455
- // `openai-compatible:model-typo` is grammatical (real provider head, open model
456
- // segment), so it parses, persists, and rules out nothing. A zero-match rule is NOT
457
- // an error and is never refused — the tool authors zero-match rules itself, and an
458
- // operator may pre-declare an exclusion for a backend they have not configured yet
459
- // — so this states the fact and stops. Phrased to stand alone, since it may be the
460
- // only part.
461
- if (unmatchedExclusions.length > 0) {
462
- parts.push(`Note: ${unmatchedExclusions.length} of your \`exclude\` rule(s) matched no ` +
463
- `backend in the pool just confirmed ` +
464
- `(${unmatchedExclusions.map((p) => `\`${p}\``).join(", ")}) — they are kept ` +
465
- `as policy (a rule may legitimately name a backend that is not reachable ` +
466
- `yet), but if one was meant to rule something out, it is not doing so. ` +
467
- `Check the model/provider/host segment against the table above. Advisory ` +
468
- `only — nothing was blocked.`);
469
- }
470
- if (parts.length > 0)
471
- return parts.join(" ");
472
- return input
473
- ? "Applied operator provider confirmation (cost ordering + host roster)."
474
- : "Auto-completed provider confirmation gate (headless).";
475
- }
476
57
  export async function runIntakeExecutor(bundle, root, artifactsDir) {
477
58
  const ignore = await loadIgnoreFile(root);
478
59
  const repoManifest = await buildRepoManifestFromFs({
@@ -492,9 +73,6 @@ export async function runIntakeExecutor(bundle, root, artifactsDir) {
492
73
  mis_scope_smells: detectMisScopeSmells(root),
493
74
  };
494
75
  const artifactsWritten = ["repo_manifest.json", "file_disposition.json"];
495
- // Persist the scope summary alongside the other intake artifacts when we know
496
- // where the artifacts directory is. Hosts read scope_summary.json directly;
497
- // the typed `scope_summary` field on ExecutorRunResult is the in-process channel.
498
76
  if (artifactsDir) {
499
77
  await writeJsonFile(join(artifactsDir, "scope_summary.json"), scopeSummary);
500
78
  artifactsWritten.push("scope_summary.json");
@@ -1 +1 @@
1
- {"version":3,"file":"intakeExecutors.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/intakeExecutors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,SAAS,EACT,aAAa,EACb,+BAA+B,EAC/B,+BAA+B,EAC/B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,gCAAgC,EAChC,yBAAyB,EACzB,+BAA+B,EAC/B,+BAA+B,EAC/B,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,wBAAwB,EACxB,oCAAoC,EACpC,sCAAsC,EACtC,0CAA0C,EAC1C,0BAA0B,GAK3B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AASzD;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,yDAAyD;IACzD,IAAI,CAAC,SAAS,CAA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AAE,SAAS,CAAC,IAAI,CAAC;QAC9B,gBAAgB,EAAE,oBAAoB,CAAC,IAAI,CAAC;KAC7C,CAAC;IAEF,MAAM,gBAAgB,GAAG,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC;IACzE,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAAE,YAAY,CAAC,CAAC;QAC5E,gBAAgB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,eAAe,GACnB,gCAAgC,YAAY,CAAC,KAAK,CAAC,MAAM,SAAS;QAClE,IAAI,cAAc,uBAAuB,IAAI,UAAU,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QAClG,CAAC,YAAY,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC;YACvC,CAAC,CAAC,KAAK,YAAY,CAAC,gBAAgB,CAAC,MAAM,uBAAuB;YAClE,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC;IAEN,OAAO;QACL,OAAO,EAAE;YACP,GAAG,MAAM;YACT,aAAa,EAAE,YAAY;YAC3B,gBAAgB,EAAE,WAAW;SAC9B;QACD,iBAAiB,EAAE,gBAAgB;QACnC,gBAAgB,EAAE,eAAe;QACjC,aAAa,EAAE,YAAY;KAC5B,CAAC;AACJ,CAAC"}
@@ -24,19 +24,6 @@ export interface DecideNextStepOptions {
24
24
  * Defaults to `true`.
25
25
  */
26
26
  emitStaleness?: boolean;
27
- /**
28
- * Forwarded to `deriveAuditState` — the G3 reconciliation gate's precomputed
29
- * delta. MUST be passed anywhere the selection drives an executor: the obligation
30
- * engine's `derive` is gate-aware, so a gate-blind `decideNextStep` here would
31
- * disagree with it and dispatch the executor for a DIFFERENT obligation.
32
- */
33
- newlyReachableBackends?: readonly string[];
34
- /**
35
- * Forwarded to `deriveAuditState` — the capability-evidence gate's precomputed
36
- * delta. Same MUST as above: a gate-blind `decideNextStep` would disagree with the
37
- * obligation engine's gate-aware `derive` and dispatch the wrong executor.
38
- */
39
- unevidencedCapabilityPools?: readonly string[];
40
27
  }
41
28
  export declare function decideNextStep(bundle: ArtifactBundle, options?: DecideNextStepOptions): NextStepDecision;
42
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/nextStep.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAI1E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,6BAA6B,CAAC;AAEzE,eAAO,MAAM,QAAQ,EAAE,MAAM,EAmC5B,CAAC;AAkCF,wBAAgB,cAAc,CAC5B,WAAW,EAAE,eAAe,EAAE,GAC7B,eAAe,GAAG,SAAS,CAE7B;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,qBAA0B,GAClC,gBAAgB,CA6ClB;AAED;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,sBAAsB,CAAC,CAEjC"}
1
+ {"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/nextStep.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAI1E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,6BAA6B,CAAC;AAEzE,eAAO,MAAM,QAAQ,EAAE,MAAM,EAkC5B,CAAC;AAkCF,wBAAgB,cAAc,CAC5B,WAAW,EAAE,eAAe,EAAE,GAC7B,eAAe,GAAG,SAAS,CAE7B;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,qBAA0B,GAClC,gBAAgB,CAuClB;AAED;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,sBAAsB,CAAC,CAEjC"}
@@ -9,7 +9,6 @@ import { deriveAuditState } from "./state.js";
9
9
  */
10
10
  export const FRICTION_CAPTURE_OBLIGATION_ID = "friction_capture_current";
11
11
  export const PRIORITY = [
12
- "provider_confirmation",
13
12
  "repo_manifest",
14
13
  "file_disposition",
15
14
  "auto_fixes_applied",
@@ -84,12 +83,6 @@ export function decideNextStep(bundle, options = {}) {
84
83
  }
85
84
  const state = deriveAuditState(bundle, {
86
85
  emitStaleness: options.emitStaleness ?? true,
87
- ...(options.newlyReachableBackends
88
- ? { newlyReachableBackends: options.newlyReachableBackends }
89
- : {}),
90
- ...(options.unevidencedCapabilityPools
91
- ? { unevidencedCapabilityPools: options.unevidencedCapabilityPools }
92
- : {}),
93
86
  });
94
87
  const next = findObligation(state.obligations);
95
88
  if (!next) {
@@ -1 +1 @@
1
- {"version":3,"file":"nextStep.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/nextStep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,oBAAoB,GAErB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAS9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,0BAA0B,CAAC;AAEzE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,uBAAuB;IACvB,eAAe;IACf,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,4BAA4B;IAC5B,qBAAqB;IACrB,gCAAgC;IAChC,0BAA0B;IAC1B,2BAA2B;IAC3B,iCAAiC;IACjC,2BAA2B;IAC3B,4EAA4E;IAC5E,6EAA6E;IAC7E,oEAAoE;IACpE,4BAA4B;IAC5B,4BAA4B;IAC5B,uBAAuB;IACvB,kCAAkC;IAClC,oCAAoC;IACpC,+BAA+B;IAC/B,4BAA4B;IAC5B,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,4BAA4B;IAC5B,mBAAmB;IACnB,6BAA6B;IAC7B,gFAAgF;IAChF,kFAAkF;IAClF,+EAA+E;IAC/E,yEAAyE;IACzE,mFAAmF;IACnF,8BAA8B;CAC/B,CAAC;A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AM,EAAE,MAAM,CAAM,EACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,KAAK,CAAC,EAAE,kBAAkB,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAmQ5B"}
1
+ {"version":3,"file":"planningExecutors.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/planningExecutors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAmCjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAMnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAU5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,SAAS,EAAE,EACzB,UAAU,EAAE,SAAS,EAAE,EACvB,eAAe,CAAC,EAAE,MAAM,EAAE,GACzB,SAAS,EAAE,CAkBb;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,KAAK,CAAC,EAAE,kBAAkB,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAqQ5B"}
@@ -9,6 +9,7 @@ import { taskContentTokens } from "./reviewPacketSizing.js";
9
9
  import { computeRiskEstimate } from "./auditTaskUtils.js";
10
10
  import { buildTaskAffinityGraph } from "./taskAffinityGraph.js";
11
11
  import { resolveEffectiveLenses } from "./lensSelection.js";
12
+ import { isUnmeasuredLineCount } from "../cli/lineIndex.js";
12
13
  import { autoCompleteTrivialCoverage } from "./trivialAudit.js";
13
14
  import { applyContentAddressedPreservation, coverageContentSignature, readCoverageElementBaselines, recordCoverageElementBaselines, withCoverageElementBaselines, } from "./coverageElementBaseline.js";
14
15
  import { interpretFreeFormIntentForAudit } from "./intentInterpreter.js";
@@ -194,7 +195,9 @@ export async function runPlanningExecutor(bundle, root, lineIndex = {}, sizeInde
194
195
  const pendingRequeueTasks = selectUncoveredRequeueTasks(requeuePayload.tasks, taggedAuditTasks, effectiveLenses).map((t) => ({
195
196
  ...t,
196
197
  file_line_counts: Object.fromEntries(t.file_paths
197
- .filter((p) => lineIndex[p] != null)
198
+ // Exclude the unmeasured sentinel (NaN) alongside absent keys: NaN would
199
+ // JSON-serialize as null and violate the numeric file_line_counts contract.
200
+ .filter((p) => lineIndex[p] != null && !isUnmeasuredLineCount(lineIndex[p]))
198
201
  .map((p) => [p, lineIndex[p]])),
199
202
  }));
200
203
  // Freeze provider-neutral estimates on every dispatch task: a byte-based