audit-tools 0.50.21 → 0.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/README.md +1 -1
  2. package/dist/audit/cli/auditStep.d.ts +1 -1
  3. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  4. package/dist/audit/cli/charterExtractionPrompt.js +14 -1
  5. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  6. package/dist/audit/cli/cleanup.d.ts +0 -1
  7. package/dist/audit/cli/cleanup.d.ts.map +1 -1
  8. package/dist/audit/cli/cleanup.js +32 -20
  9. package/dist/audit/cli/cleanup.js.map +1 -1
  10. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  11. package/dist/audit/cli/conceptualDispatch.js +30 -5
  12. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  13. package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
  14. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  15. package/dist/audit/cli/dispatch/hostHandoff.js +48 -20
  16. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  17. package/dist/audit/cli/fanoutLanes.d.ts +7 -0
  18. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  19. package/dist/audit/cli/fanoutLanes.js +9 -1
  20. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  21. package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
  22. package/dist/audit/cli/forceSynthesisCommand.js +2 -14
  23. package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
  24. package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
  25. package/dist/audit/cli/intakeCommand.js +3 -13
  26. package/dist/audit/cli/intakeCommand.js.map +1 -1
  27. package/dist/audit/cli/laneSubmissions.d.ts +42 -57
  28. package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
  29. package/dist/audit/cli/laneSubmissions.js +116 -82
  30. package/dist/audit/cli/laneSubmissions.js.map +1 -1
  31. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  32. package/dist/audit/cli/nextStepCommand.js +132 -99
  33. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  34. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  35. package/dist/audit/cli/nextStepHelpers.js +39 -46
  36. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  37. package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
  38. package/dist/audit/cli/resynthesizeCommand.js +5 -2
  39. package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
  40. package/dist/audit/cli/sampleRunCommand.d.ts +3 -2
  41. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  42. package/dist/audit/cli/stepScaffold.d.ts +21 -0
  43. package/dist/audit/cli/stepScaffold.d.ts.map +1 -0
  44. package/dist/audit/cli/stepScaffold.js +50 -0
  45. package/dist/audit/cli/stepScaffold.js.map +1 -0
  46. package/dist/audit/cli/steps.d.ts +6 -6
  47. package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
  48. package/dist/audit/cli/synthesizeCommand.js +2 -14
  49. package/dist/audit/cli/synthesizeCommand.js.map +1 -1
  50. package/dist/audit/contracts/workerSchemas.d.ts +8 -8
  51. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  52. package/dist/audit/contracts/workerSchemas.js +12 -6
  53. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  54. package/dist/audit/contracts/wrapperResponse.d.ts +7 -7
  55. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  56. package/dist/audit/contracts/wrapperResponse.js +9 -1
  57. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  58. package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
  59. package/dist/audit/extractors/analyzers/merge.js +2 -7
  60. package/dist/audit/extractors/analyzers/merge.js.map +1 -1
  61. package/dist/audit/extractors/commentDecomposition.d.ts +28 -0
  62. package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
  63. package/dist/audit/extractors/commentDecomposition.js +151 -22
  64. package/dist/audit/extractors/commentDecomposition.js.map +1 -1
  65. package/dist/audit/extractors/graph.d.ts +1 -1
  66. package/dist/audit/extractors/graph.d.ts.map +1 -1
  67. package/dist/audit/extractors/graph.js +2 -6
  68. package/dist/audit/extractors/graph.js.map +1 -1
  69. package/dist/audit/extractors/graphManifestEdges/cargo.d.ts.map +1 -1
  70. package/dist/audit/extractors/graphManifestEdges/cargo.js +4 -4
  71. package/dist/audit/extractors/graphManifestEdges/cargo.js.map +1 -1
  72. package/dist/audit/extractors/graphManifestEdges/pnpm.d.ts.map +1 -1
  73. package/dist/audit/extractors/graphManifestEdges/pnpm.js +3 -3
  74. package/dist/audit/extractors/graphManifestEdges/pnpm.js.map +1 -1
  75. package/dist/audit/extractors/graphManifestEdges/pyproject.d.ts.map +1 -1
  76. package/dist/audit/extractors/graphManifestEdges/pyproject.js +3 -2
  77. package/dist/audit/extractors/graphManifestEdges/pyproject.js.map +1 -1
  78. package/dist/audit/extractors/graphManifestEdges/toml.d.ts +0 -6
  79. package/dist/audit/extractors/graphManifestEdges/toml.d.ts.map +1 -1
  80. package/dist/audit/extractors/graphManifestEdges/toml.js +0 -13
  81. package/dist/audit/extractors/graphManifestEdges/toml.js.map +1 -1
  82. package/dist/audit/extractors/graphManifestEdges/workspace.d.ts +9 -0
  83. package/dist/audit/extractors/graphManifestEdges/workspace.d.ts.map +1 -1
  84. package/dist/audit/extractors/graphManifestEdges/workspace.js +16 -0
  85. package/dist/audit/extractors/graphManifestEdges/workspace.js.map +1 -1
  86. package/dist/audit/extractors/graphManifestEdges/yaml.d.ts +0 -2
  87. package/dist/audit/extractors/graphManifestEdges/yaml.d.ts.map +1 -1
  88. package/dist/audit/extractors/graphManifestEdges/yaml.js +0 -9
  89. package/dist/audit/extractors/graphManifestEdges/yaml.js.map +1 -1
  90. package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
  91. package/dist/audit/extractors/graphSignals.js +16 -2
  92. package/dist/audit/extractors/graphSignals.js.map +1 -1
  93. package/dist/audit/io/artifacts.d.ts +19 -0
  94. package/dist/audit/io/artifacts.d.ts.map +1 -1
  95. package/dist/audit/io/artifacts.js +44 -2
  96. package/dist/audit/io/artifacts.js.map +1 -1
  97. package/dist/audit/orchestrator/advance.d.ts +0 -22
  98. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  99. package/dist/audit/orchestrator/advance.js +1 -43
  100. package/dist/audit/orchestrator/advance.js.map +1 -1
  101. package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +1 -1
  102. package/dist/audit/orchestrator/charterDeltaExecutor.js +14 -0
  103. package/dist/audit/orchestrator/charterDeltaExecutor.js.map +1 -1
  104. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +16 -6
  105. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
  106. package/dist/audit/orchestrator/charterExtractionExecutor.js +127 -9
  107. package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
  108. package/dist/audit/orchestrator/charterPacketArchive.d.ts +51 -0
  109. package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -0
  110. package/dist/audit/orchestrator/charterPacketArchive.js +173 -0
  111. package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -0
  112. package/dist/audit/orchestrator/charterPackets.d.ts +31 -13
  113. package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
  114. package/dist/audit/orchestrator/charterPackets.js +299 -96
  115. package/dist/audit/orchestrator/charterPackets.js.map +1 -1
  116. package/dist/audit/orchestrator/designReviewPrompt.d.ts +20 -4
  117. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  118. package/dist/audit/orchestrator/designReviewPrompt.js +89 -12
  119. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  120. package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
  121. package/dist/audit/orchestrator/edgeReasoning.js +4 -9
  122. package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
  123. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  124. package/dist/audit/orchestrator/executorRunners.js +17 -1
  125. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  126. package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts.map +1 -1
  127. package/dist/audit/orchestrator/graphEnrichmentExecutor.js +8 -1
  128. package/dist/audit/orchestrator/graphEnrichmentExecutor.js.map +1 -1
  129. package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
  130. package/dist/audit/orchestrator/intentCheckpointGate.js +11 -2
  131. package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
  132. package/dist/audit/orchestrator/lineCounts.d.ts +44 -0
  133. package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -0
  134. package/dist/audit/orchestrator/lineCounts.js +61 -0
  135. package/dist/audit/orchestrator/lineCounts.js.map +1 -0
  136. package/dist/audit/orchestrator/obligationDerive.d.ts +35 -0
  137. package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -0
  138. package/dist/audit/orchestrator/obligationDerive.js +50 -0
  139. package/dist/audit/orchestrator/obligationDerive.js.map +1 -0
  140. package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
  141. package/dist/audit/orchestrator/reviewPacketMetrics.js +3 -2
  142. package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
  143. package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
  144. package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
  145. package/dist/audit/orchestrator/reviewPacketShared.js +0 -4
  146. package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
  147. package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
  148. package/dist/audit/orchestrator/reviewPackets.js +3 -2
  149. package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
  150. package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
  151. package/dist/audit/orchestrator/selectiveDeepening/conflict.js +3 -2
  152. package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
  153. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
  154. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +3 -2
  155. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
  156. package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
  157. package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +3 -2
  158. package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
  159. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
  160. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +4 -3
  161. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
  162. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
  163. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +2 -1
  164. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
  165. package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +0 -2
  166. package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
  167. package/dist/audit/orchestrator/selectiveDeepening/shared.js +0 -27
  168. package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
  169. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
  170. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +10 -1
  171. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
  172. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  173. package/dist/audit/orchestrator/state.js +21 -14
  174. package/dist/audit/orchestrator/state.js.map +1 -1
  175. package/dist/audit/orchestrator/synthesisExecutors.d.ts +8 -0
  176. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  177. package/dist/audit/orchestrator/synthesisExecutors.js +10 -0
  178. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  179. package/dist/audit/reporting/synthesis.d.ts +42 -2
  180. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  181. package/dist/audit/reporting/synthesis.js +264 -12
  182. package/dist/audit/reporting/synthesis.js.map +1 -1
  183. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  184. package/dist/audit/supervisor/operatorHandoff.js +14 -6
  185. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  186. package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
  187. package/dist/audit/systemic/secondOrderAdversaryPrompt.js +14 -0
  188. package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
  189. package/dist/audit/types/analyzerCapability.d.ts +35 -11
  190. package/dist/audit/types/analyzerCapability.d.ts.map +1 -1
  191. package/dist/audit/types/analyzerCapability.js +83 -5
  192. package/dist/audit/types/analyzerCapability.js.map +1 -1
  193. package/dist/audit/types/auditState.d.ts +8 -8
  194. package/dist/audit/types/charterRegister.d.ts +33 -3
  195. package/dist/audit/types/charterRegister.d.ts.map +1 -1
  196. package/dist/audit/types/charterRegister.js +11 -1
  197. package/dist/audit/types/charterRegister.js.map +1 -1
  198. package/dist/audit/types/conceptualAdjudication.d.ts +395 -16
  199. package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
  200. package/dist/audit/types/conceptualAdjudication.js +109 -5
  201. package/dist/audit/types/conceptualAdjudication.js.map +1 -1
  202. package/dist/audit/types/designAssessment.d.ts +1 -1
  203. package/dist/audit/types/designAssessment.d.ts.map +1 -1
  204. package/dist/audit/types.d.ts +9 -4
  205. package/dist/audit/types.d.ts.map +1 -1
  206. package/dist/remediate/droppedFindingsRecord.d.ts +13 -0
  207. package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -0
  208. package/dist/remediate/droppedFindingsRecord.js +113 -0
  209. package/dist/remediate/droppedFindingsRecord.js.map +1 -0
  210. package/dist/remediate/intake.d.ts +17 -0
  211. package/dist/remediate/intake.d.ts.map +1 -1
  212. package/dist/remediate/intake.js +23 -0
  213. package/dist/remediate/intake.js.map +1 -1
  214. package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
  215. package/dist/remediate/intent/intentOrdering.js +29 -1
  216. package/dist/remediate/intent/intentOrdering.js.map +1 -1
  217. package/dist/remediate/phases/close.d.ts +1 -1
  218. package/dist/remediate/phases/close.d.ts.map +1 -1
  219. package/dist/remediate/phases/close.js +68 -6
  220. package/dist/remediate/phases/close.js.map +1 -1
  221. package/dist/remediate/phases/grounding.d.ts +12 -4
  222. package/dist/remediate/phases/grounding.d.ts.map +1 -1
  223. package/dist/remediate/phases/grounding.js +23 -60
  224. package/dist/remediate/phases/grounding.js.map +1 -1
  225. package/dist/remediate/state/types.d.ts +17 -6
  226. package/dist/remediate/state/types.d.ts.map +1 -1
  227. package/dist/remediate/state/types.js +3 -1
  228. package/dist/remediate/state/types.js.map +1 -1
  229. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  230. package/dist/remediate/steps/contractPipeline.js +10 -4
  231. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  232. package/dist/remediate/steps/contractPipelinePrompts.d.ts +10 -2
  233. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  234. package/dist/remediate/steps/contractPipelinePrompts.js +56 -12
  235. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  236. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  237. package/dist/remediate/steps/dispatch/hostHandoff.js +277 -146
  238. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  239. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  240. package/dist/remediate/steps/nextStep.js +253 -75
  241. package/dist/remediate/steps/nextStep.js.map +1 -1
  242. package/dist/remediate/steps/prompts.d.ts +14 -0
  243. package/dist/remediate/steps/prompts.d.ts.map +1 -1
  244. package/dist/remediate/steps/prompts.js +52 -4
  245. package/dist/remediate/steps/prompts.js.map +1 -1
  246. package/dist/remediate/steps/types.d.ts +1 -1
  247. package/dist/remediate/steps/types.d.ts.map +1 -1
  248. package/dist/remediate/steps/types.js.map +1 -1
  249. package/dist/remediate/validation/contractPipelineGates.d.ts +0 -34
  250. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  251. package/dist/remediate/validation/contractPipelineGates.js +181 -143
  252. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  253. package/dist/shared/agentReflections.d.ts +44 -3
  254. package/dist/shared/agentReflections.d.ts.map +1 -1
  255. package/dist/shared/agentReflections.js +63 -4
  256. package/dist/shared/agentReflections.js.map +1 -1
  257. package/dist/shared/analyzers/acquisitionEngine.d.ts +20 -1
  258. package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
  259. package/dist/shared/analyzers/acquisitionEngine.js +17 -3
  260. package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
  261. package/dist/shared/analyzers/candidates.d.ts.map +1 -1
  262. package/dist/shared/analyzers/candidates.js +13 -4
  263. package/dist/shared/analyzers/candidates.js.map +1 -1
  264. package/dist/shared/analyzers/types.d.ts +17 -6
  265. package/dist/shared/analyzers/types.d.ts.map +1 -1
  266. package/dist/shared/analyzers/types.js +6 -15
  267. package/dist/shared/analyzers/types.js.map +1 -1
  268. package/dist/shared/decompose/systemicChallenge.d.ts +116 -9
  269. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  270. package/dist/shared/decompose/systemicChallenge.js +32 -1
  271. package/dist/shared/decompose/systemicChallenge.js.map +1 -1
  272. package/dist/shared/engine/obligationEngine.d.ts +23 -6
  273. package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
  274. package/dist/shared/engine/obligationEngine.js +38 -3
  275. package/dist/shared/engine/obligationEngine.js.map +1 -1
  276. package/dist/shared/findings/dedupe.d.ts +10 -0
  277. package/dist/shared/findings/dedupe.d.ts.map +1 -1
  278. package/dist/shared/findings/dedupe.js +15 -0
  279. package/dist/shared/findings/dedupe.js.map +1 -1
  280. package/dist/shared/friction/triage.d.ts.map +1 -1
  281. package/dist/shared/friction/triage.js +5 -1
  282. package/dist/shared/friction/triage.js.map +1 -1
  283. package/dist/shared/git.d.ts +6 -0
  284. package/dist/shared/git.d.ts.map +1 -1
  285. package/dist/shared/git.js +8 -0
  286. package/dist/shared/git.js.map +1 -1
  287. package/dist/shared/graph/edgeConfidence.d.ts +12 -0
  288. package/dist/shared/graph/edgeConfidence.d.ts.map +1 -0
  289. package/dist/shared/graph/edgeConfidence.js +15 -0
  290. package/dist/shared/graph/edgeConfidence.js.map +1 -0
  291. package/dist/shared/index.d.ts +26 -9
  292. package/dist/shared/index.d.ts.map +1 -1
  293. package/dist/shared/index.js +20 -8
  294. package/dist/shared/index.js.map +1 -1
  295. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  296. package/dist/shared/loopCorePaths.js +4 -0
  297. package/dist/shared/loopCorePaths.js.map +1 -1
  298. package/dist/shared/measurement/measuredOutcome.d.ts +61 -0
  299. package/dist/shared/measurement/measuredOutcome.d.ts.map +1 -0
  300. package/dist/shared/measurement/measuredOutcome.js +109 -0
  301. package/dist/shared/measurement/measuredOutcome.js.map +1 -0
  302. package/dist/shared/reporting/findingDisplay.d.ts +14 -2
  303. package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
  304. package/dist/shared/reporting/findingDisplay.js +29 -2
  305. package/dist/shared/reporting/findingDisplay.js.map +1 -1
  306. package/dist/shared/reporting/lensCoverage.d.ts +70 -0
  307. package/dist/shared/reporting/lensCoverage.d.ts.map +1 -0
  308. package/dist/shared/reporting/lensCoverage.js +108 -0
  309. package/dist/shared/reporting/lensCoverage.js.map +1 -0
  310. package/dist/shared/submission/hostResultOutcomes.d.ts +42 -0
  311. package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -0
  312. package/dist/shared/submission/hostResultOutcomes.js +129 -0
  313. package/dist/shared/submission/hostResultOutcomes.js.map +1 -0
  314. package/dist/shared/submission/ingestionChecks.d.ts +146 -0
  315. package/dist/shared/submission/ingestionChecks.d.ts.map +1 -0
  316. package/dist/shared/submission/ingestionChecks.js +157 -0
  317. package/dist/shared/submission/ingestionChecks.js.map +1 -0
  318. package/dist/shared/submission/submissionClassifier.d.ts +8 -0
  319. package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
  320. package/dist/shared/submission/submissionClassifier.js.map +1 -1
  321. package/dist/shared/submission/submissionLedger.d.ts +24 -1
  322. package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
  323. package/dist/shared/submission/submissionLedger.js +61 -0
  324. package/dist/shared/submission/submissionLedger.js.map +1 -1
  325. package/dist/shared/submission/submissionScan.d.ts +2 -0
  326. package/dist/shared/submission/submissionScan.d.ts.map +1 -1
  327. package/dist/shared/submission/submissionScan.js +4 -0
  328. package/dist/shared/submission/submissionScan.js.map +1 -1
  329. package/dist/shared/tooling/projectFacts.d.ts +71 -0
  330. package/dist/shared/tooling/projectFacts.d.ts.map +1 -0
  331. package/dist/shared/tooling/projectFacts.js +153 -0
  332. package/dist/shared/tooling/projectFacts.js.map +1 -0
  333. package/dist/shared/tooling/projectTestAdmission.d.ts +5 -15
  334. package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
  335. package/dist/shared/tooling/projectTestAdmission.js +14 -5
  336. package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
  337. package/dist/shared/types/charterPacket.d.ts +156 -0
  338. package/dist/shared/types/charterPacket.d.ts.map +1 -0
  339. package/dist/shared/types/charterPacket.js +9 -0
  340. package/dist/shared/types/charterPacket.js.map +1 -0
  341. package/dist/shared/types/closingActions.d.ts +16 -0
  342. package/dist/shared/types/closingActions.d.ts.map +1 -0
  343. package/dist/shared/types/closingActions.js +25 -0
  344. package/dist/shared/types/closingActions.js.map +1 -0
  345. package/dist/shared/types/finding.d.ts +275 -40
  346. package/dist/shared/types/finding.d.ts.map +1 -1
  347. package/dist/shared/types/finding.js +87 -0
  348. package/dist/shared/types/finding.js.map +1 -1
  349. package/dist/shared/types/intentCheckpoint.d.ts +50 -0
  350. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  351. package/dist/shared/types/intentCheckpoint.js +31 -0
  352. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  353. package/dist/shared/validation/citationGrounding.d.ts +115 -0
  354. package/dist/shared/validation/citationGrounding.d.ts.map +1 -0
  355. package/dist/shared/validation/citationGrounding.js +347 -0
  356. package/dist/shared/validation/citationGrounding.js.map +1 -0
  357. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  358. package/dist/shared/validation/findingsReport.js +62 -0
  359. package/dist/shared/validation/findingsReport.js.map +1 -1
  360. package/docs/audit-pkg/contracts.md +34 -12
  361. package/docs/audit-pkg/operator-guide.md +10 -7
  362. package/package.json +3 -2
  363. package/schemas/audit-code-v1alpha1.schema.json +2 -1
  364. package/skills/audit-code/audit-code.prompt.md +5 -3
  365. package/dist/remediate/state/closingActions.d.ts +0 -3
  366. package/dist/remediate/state/closingActions.d.ts.map +0 -1
  367. package/dist/remediate/state/closingActions.js +0 -10
  368. package/dist/remediate/state/closingActions.js.map +0 -1
@@ -2,7 +2,7 @@ export declare const REMEDIATION_STEP_CONTRACT_VERSION: "remediate-code-step/v1a
2
2
  export declare const REMEDIATION_HOST_WORKLOAD_CONTRACT_VERSION: "remediation-host-workload/v1alpha2";
3
3
  export declare const REMEDIATION_HOST_RESULT_CONTRACT_VERSION: "remediation-host-result/v1alpha2";
4
4
  export declare const REMEDIATION_HOST_DECISION_CONTRACT_VERSION: "remediation-host-decision/v1alpha1";
5
- export type RemediationStepKind = "confirm_intent" | "confirm_auto_discovered_input" | "confirm_resume_or_restart" | "locate_input" | "collect_starting_point" | "synthesize_intake" | "collect_intake_clarifications" | "contract_pipeline" | "collect_review_approval" | "collect_clarifications" | "dispatch_implement" | "phase_busy" | "collect_triage" | "close_run" | "present_report" | "input_conflict" | "unhandled_state" | "zero_documentable_findings" | "final_gate_red" | "blocked" | "fold_did_not_converge";
5
+ export type RemediationStepKind = "confirm_intent" | "confirm_auto_discovered_input" | "confirm_resume_or_restart" | "locate_input" | "collect_starting_point" | "synthesize_intake" | "collect_intake_clarifications" | "contract_pipeline" | "collect_review_approval" | "collect_clarifications" | "dispatch_implement" | "phase_busy" | "collect_triage" | "close_run" | "present_report" | "input_conflict" | "unhandled_state" | "zero_documentable_findings" | "final_gate_red" | "blocked" | "fold_did_not_converge" | "extracted_plan_discarded";
6
6
  import type { StepStatus, AccessDeclaration } from "audit-tools/shared";
7
7
  export type { AccessDeclaration };
8
8
  export type RemediationStepStatus = StepStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,EAC5C,8BAAuC,CAAC;AAc1C,eAAO,MAAM,0CAA0C,EACrD,oCAA6C,CAAC;AAEhD,eAAO,MAAM,wCAAwC,EACnD,kCAA2C,CAAC;AAE9C,eAAO,MAAM,0CAA0C,EACrD,oCAA6C,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAC3B,gBAAgB,GAChB,+BAA+B,GAC/B,2BAA2B,GAC3B,cAAc,GACd,wBAAwB,GACxB,mBAAmB,GACnB,+BAA+B,GAC/B,mBAAmB,GACnB,yBAAyB,GACzB,wBAAwB,GACxB,oBAAoB,GACpB,YAAY,GACZ,gBAAgB,GAChB,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,4BAA4B,GAa5B,gBAAgB,GAIhB,SAAS,GAgBT,uBAAuB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAMxE,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,OAAO,iCAAiC,C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EAAE,OAAO,iCAAiC,CAAC;IAC3D,SAAS,EAAE,mBAAmB,CAAC;IAC/B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,2CAA2C,EACtD,wCAAiD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/remediate/steps/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iCAAiC,GAC5C,8BAAuC,CAAC;AAE1C,+EAA+E;AAC/E,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,+EAA+E;AAC/E,8EAA8E;AAC9E,yCAAyC;AAEzC,yEAAyE;AACzE,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAEhD,MAAM,CAAC,MAAM,wCAAwC,GACnD,kCAA2C,CAAC;AAE9C,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AA+EhD,MAAM,CAAC,MAAM,2CAA2C,GACtD,wCAAiD,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/remediate/steps/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iCAAiC,GAC5C,8BAAuC,CAAC;AAE1C,+EAA+E;AAC/E,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,+EAA+E;AAC/E,8EAA8E;AAC9E,yCAAyC;AAEzC,yEAAyE;AACzE,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAEhD,MAAM,CAAC,MAAM,wCAAwC,GACnD,kCAA2C,CAAC;AAE9C,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAoGhD,MAAM,CAAC,MAAM,2CAA2C,GACtD,wCAAiD,CAAC"}
@@ -22,23 +22,6 @@ export declare function validateDesignSpecGates(designSpec: unknown, obligationL
22
22
  * validators already flag missing goal_ids). Issues are errors.
23
23
  */
24
24
  export declare function validateGoalIdConsistency(artifacts: Record<string, unknown>): ValidationIssue[];
25
- /**
26
- * ARC-86b18f1b-2: validate the implementation_dag against the obligation_ledger
27
- * and counterexample/judge artifacts for:
28
- *
29
- * 1. Referential integrity — every id referenced in `satisfies_obligations`,
30
- * `verification_obligation_ids`, and `addresses_counterexamples` must exist
31
- * in the obligation_ledger or as an accepted counterexample in the judge
32
- * report (respectively).
33
- *
34
- * 2. Bidirectional coverage — every obligation in the ledger, and every
35
- * accepted counterexample (per the judge report), must be addressed by at
36
- * least one DAG node.
37
- *
38
- * All issues are errors. Accepts `undefined` payloads for missing artifacts —
39
- * referential checks are skipped when the target artifact is absent (the caller
40
- * is responsible for ensuring the artifacts exist before calling this gate).
41
- */
42
25
  export declare function validateImplementationDAGIntegrity(dagPayload: unknown, obligationLedgerPayload: unknown, counterexamplePayload: unknown, judgeReportPayload: unknown, waivedCounterexampleIds?: ReadonlySet<string>): ValidationIssue[];
43
26
  /**
44
27
  * Testable obligation kinds — THE single source of truth for whether an
@@ -94,23 +77,6 @@ export declare function isTestablePhaseObligation(kind: string): boolean;
94
77
  export declare function validatePairedObligations(obligationLedgerPayload: unknown, testValidatorPlanPayload: unknown): ValidationIssue[];
95
78
  /** Re-exported PairingVerdict so importers of this gate module can type the result. */
96
79
  export type { PairingVerdict };
97
- /**
98
- * OBL-CO-03 — evidence-threading gate (fail-closed).
99
- *
100
- * Evidence produced upstream must survive every downstream seam:
101
- *
102
- * 1. A contract_assessment_report finding with status "violated" must carry
103
- * non-empty evidence — a violation asserted without evidence is unfalsifiable.
104
- * 2. Every judge-accepted counterexample must be threaded forward into the
105
- * implementation_dag (a node must list it in addresses_counterexamples).
106
- * This is the seam where adversarial evidence is most often dropped.
107
- * 3. Every DAG node that satisfies an obligation must carry obligation-derived
108
- * evidence in its description (the node must not be an empty placeholder).
109
- *
110
- * Accepts `undefined` payloads — a check whose source artifact is absent is
111
- * skipped, except the counterexample-threading check, which is fail-closed when
112
- * accepted counterexamples exist but the DAG is missing.
113
- */
114
80
  export declare function validateEvidenceThreaded(assessmentReportPayload: unknown, judgeReportPayload: unknown, dagPayload: unknown, waivedCounterexampleIds?: ReadonlySet<string>): ValidationIssue[];
115
81
  /**
116
82
  * OBL-CO-04 — source_type-scoped digest-coverage gate (fail-closed for
@@ -1 +1 @@
1
- {"version":3,"file":"contractPipelineGates.d.ts","sourceRoot":"","sources":["../../../src/remediate/validation/contractPipelineGates.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,OAAO,EAab,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAInF;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,OAAO,EACnB,gBAAgB,CAAC,EAAE,OAAO,GACzB,eAAe,EAAE,CAqMnB;AAGD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,eAAe,EAAE,CAsBnB;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,OAAO,EACnB,uBAAuB,EAAE,OAAO,EAChC,qBA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AAE,OAAO,CAAC,CAAC;IAC7D;;2CAEuC;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;uBACmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;sEAKkE;IAClE,uBAAuB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,yCAAyC,CAC7D,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,WAAW,EAAE,CAAC,CA2ExB"}
1
+ {"version":3,"file":"contractPipelineGates.d.ts","sourceRoot":"","sources":["../../../src/remediate/validation/contractPipelineGates.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,OAAO,EAab,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAInF;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,OAAO,EACnB,gBAAgB,CAAC,EAAE,OAAO,GACzB,eAAe,EAAE,CAqMnB;AAGD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,eAAe,EAAE,CAsBnB;AAqKD,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,OAAO,EACnB,uBAAuB,EAAE,OAAO,EAChC,qBAAqB,EAAE,OAAO,EAC9B,kBAAkB,EAAE,OAAO,EAC3B,uBAAuB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5C,eAAe,EAAE,CA0BnB;AAsBD;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;;;;;GAMG;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;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,yCAAyC,CAC7D,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,WAAW,EAAE,CAAC,CA2ExB"}
@@ -225,87 +225,74 @@ export function validateGoalIdConsistency(artifacts) {
225
225
  * referential checks are skipped when the target artifact is absent (the caller
226
226
  * is responsible for ensuring the artifacts exist before calling this gate).
227
227
  */
228
- export function validateImplementationDAGIntegrity(dagPayload, obligationLedgerPayload, counterexamplePayload, judgeReportPayload, waivedCounterexampleIds) {
229
- const issues = [];
230
- if (!canEvaluateImplementationDagIntegrity(dagPayload))
231
- return issues;
232
- // Build reference sets from sibling artifacts.
233
- const obligationIds = new Set();
234
- if (isRecord(obligationLedgerPayload) && Array.isArray(obligationLedgerPayload.obligations)) {
235
- for (const obl of obligationLedgerPayload.obligations) {
236
- if (isRecord(obl) && typeof obl.id === "string" && obl.id.length > 0) {
237
- obligationIds.add(obl.id);
228
+ /**
229
+ * The non-empty string ids a sibling artifact declares, read defensively from an
230
+ * `unknown` payload shaped `{ [arrayKey]: [{ id }] }`.
231
+ *
232
+ * The obligation ledger and the counterexample artifact were each read by their
233
+ * own copy of this loop, identical but for the key they look under.
234
+ */
235
+ function collectDeclaredIds(payload, arrayKey) {
236
+ const ids = new Set();
237
+ if (isRecord(payload) && Array.isArray(payload[arrayKey])) {
238
+ for (const entry of payload[arrayKey]) {
239
+ if (isRecord(entry) && typeof entry.id === "string" && entry.id.length > 0) {
240
+ ids.add(entry.id);
238
241
  }
239
242
  }
240
243
  }
241
- const counterexampleIds = new Set();
242
- if (isRecord(counterexamplePayload) && Array.isArray(counterexamplePayload.counterexamples)) {
243
- for (const ce of counterexamplePayload.counterexamples) {
244
- if (isRecord(ce) && typeof ce.id === "string" && ce.id.length > 0) {
245
- counterexampleIds.add(ce.id);
246
- }
244
+ return ids;
245
+ }
246
+ /**
247
+ * One node's obligation references, for one of the two fields that carry them.
248
+ * Both fields were checked by the same fifteen lines, differing only in the field
249
+ * name — which appears in the issue path AND in its message, so a copy that
250
+ * drifted would have misreported which field was wrong.
251
+ *
252
+ * ⚠ An EMPTY `obligationIds` means the ledger declared nothing, which is not the
253
+ * same as "this reference is unknown". In that case every referenced id counts as
254
+ * covered and NOTHING is reported — the gate refuses to invent a referential
255
+ * error against an artifact that stated no ids at all.
256
+ */
257
+ function checkNodeObligationRefs(issues, node, nodeIndex, field, obligationIds, coveredObligationIds) {
258
+ const refs = node[field];
259
+ if (!Array.isArray(refs))
260
+ return;
261
+ for (const oblId of refs) {
262
+ if (typeof oblId !== "string")
263
+ continue;
264
+ if (obligationIds.size > 0 && !obligationIds.has(oblId)) {
265
+ pushValidationIssue(issues, `implementation_dag.nodes[${nodeIndex}].${field}`, `Node "${node.id}" references obligation "${oblId}" in ${field}, but no such obligation exists in the obligation_ledger.`);
266
+ }
267
+ else {
268
+ coveredObligationIds.add(oblId);
247
269
  }
248
270
  }
249
- const acceptedCounterexampleIds = new Set();
250
- if (isRecord(judgeReportPayload) && Array.isArray(judgeReportPayload.classifications)) {
251
- for (const cls of judgeReportPayload.classifications) {
252
- if (isRecord(cls) &&
253
- cls.classification === "accepted" &&
254
- typeof cls.counterexample_id === "string" &&
255
- cls.counterexample_id.length > 0 &&
256
- // A waived counterexample is resolved by a recorded owner decision —
257
- // coverage must not be demanded for it (open-bugs.md:108).
258
- !waivedCounterexampleIds?.has(cls.counterexample_id)) {
259
- acceptedCounterexampleIds.add(cls.counterexample_id);
260
- }
271
+ }
272
+ /** Report every declared id no node covered. An empty set reports nothing. */
273
+ function reportUncovered(issues, declared, covered, message) {
274
+ for (const id of declared) {
275
+ if (!covered.has(id)) {
276
+ pushValidationIssue(issues, "implementation_dag.coverage", message(id));
261
277
  }
262
278
  }
263
- // Track which obligations and accepted counterexamples are covered.
279
+ }
280
+ /**
281
+ * Phase 1 — referential integrity, node by node: every obligation and
282
+ * counterexample a node references must exist in the artifact that declares it.
283
+ *
284
+ * Returns the covered sets alongside the issues, because phase 2 asks the
285
+ * opposite question of the same walk and must not walk the nodes again.
286
+ */
287
+ function validateDAGReferentialIntegrity(nodes, obligationIds, counterexampleIds, acceptedCounterexampleIds) {
288
+ const issues = [];
264
289
  const coveredObligationIds = new Set();
265
290
  const coveredCounterexampleIds = new Set();
266
- const nodes = dagPayload.nodes;
267
291
  for (const [i, node] of nodes.entries()) {
268
292
  if (!isRecord(node))
269
293
  continue;
270
- // 1a. Referential integrity: satisfies_obligations obligation_ledger.
271
- if (obligationIds.size > 0 && Array.isArray(node.satisfies_obligations)) {
272
- for (const oblId of node.satisfies_obligations) {
273
- if (typeof oblId !== "string")
274
- continue;
275
- if (!obligationIds.has(oblId)) {
276
- pushValidationIssue(issues, `implementation_dag.nodes[${i}].satisfies_obligations`, `Node "${node.id}" references obligation "${oblId}" in satisfies_obligations, but no such obligation exists in the obligation_ledger.`);
277
- }
278
- else {
279
- coveredObligationIds.add(oblId);
280
- }
281
- }
282
- }
283
- else if (Array.isArray(node.satisfies_obligations)) {
284
- for (const oblId of node.satisfies_obligations) {
285
- if (typeof oblId === "string")
286
- coveredObligationIds.add(oblId);
287
- }
288
- }
289
- // 1b. Referential integrity: verification_obligation_ids → obligation_ledger.
290
- if (obligationIds.size > 0 && Array.isArray(node.verification_obligation_ids)) {
291
- for (const oblId of node.verification_obligation_ids) {
292
- if (typeof oblId !== "string")
293
- continue;
294
- if (!obligationIds.has(oblId)) {
295
- pushValidationIssue(issues, `implementation_dag.nodes[${i}].verification_obligation_ids`, `Node "${node.id}" references obligation "${oblId}" in verification_obligation_ids, but no such obligation exists in the obligation_ledger.`);
296
- }
297
- else {
298
- coveredObligationIds.add(oblId);
299
- }
300
- }
301
- }
302
- else if (Array.isArray(node.verification_obligation_ids)) {
303
- for (const oblId of node.verification_obligation_ids) {
304
- if (typeof oblId === "string")
305
- coveredObligationIds.add(oblId);
306
- }
307
- }
308
- // 1c. Referential integrity: addresses_counterexamples → counterexample artifact.
294
+ checkNodeObligationRefs(issues, node, i, "satisfies_obligations", obligationIds, coveredObligationIds);
295
+ checkNodeObligationRefs(issues, node, i, "verification_obligation_ids", obligationIds, coveredObligationIds);
309
296
  if (Array.isArray(node.addresses_counterexamples)) {
310
297
  for (const ceId of node.addresses_counterexamples) {
311
298
  if (typeof ceId !== "string")
@@ -319,24 +306,31 @@ export function validateImplementationDAGIntegrity(dagPayload, obligationLedgerP
319
306
  }
320
307
  }
321
308
  }
322
- // 2. Bidirectional coverage: every obligation must be covered.
323
- if (obligationIds.size > 0) {
324
- for (const oblId of obligationIds) {
325
- if (!coveredObligationIds.has(oblId)) {
326
- pushValidationIssue(issues, "implementation_dag.coverage", `Obligation "${oblId}" from the obligation_ledger is not addressed by any implementation_dag node (neither in satisfies_obligations nor verification_obligation_ids).`);
327
- }
328
- }
329
- }
330
- // 2b. Bidirectional coverage: every accepted counterexample must be covered.
331
- if (acceptedCounterexampleIds.size > 0) {
332
- for (const ceId of acceptedCounterexampleIds) {
333
- if (!coveredCounterexampleIds.has(ceId)) {
334
- pushValidationIssue(issues, "implementation_dag.coverage", `Judge-accepted counterexample "${ceId}" is not addressed by any implementation_dag node in addresses_counterexamples.`);
335
- }
336
- }
337
- }
309
+ return { issues, coveredObligationIds, coveredCounterexampleIds };
310
+ }
311
+ /**
312
+ * Phase 2 — the other direction: every declared obligation and every accepted
313
+ * counterexample must be addressed by SOME node. Phase 1 asks whether each
314
+ * reference resolves; this asks whether each declaration was reached.
315
+ */
316
+ function validateDAGCoverageGaps(obligationIds, acceptedCounterexampleIds, coveredObligationIds, coveredCounterexampleIds) {
317
+ const issues = [];
318
+ reportUncovered(issues, obligationIds, coveredObligationIds, (oblId) => `Obligation "${oblId}" from the obligation_ledger is not addressed by any implementation_dag node (neither in satisfies_obligations nor verification_obligation_ids).`);
319
+ reportUncovered(issues, acceptedCounterexampleIds, coveredCounterexampleIds, (ceId) => `Judge-accepted counterexample "${ceId}" is not addressed by any implementation_dag node in addresses_counterexamples.`);
338
320
  return issues;
339
321
  }
322
+ export function validateImplementationDAGIntegrity(dagPayload, obligationLedgerPayload, counterexamplePayload, judgeReportPayload, waivedCounterexampleIds) {
323
+ if (!canEvaluateImplementationDagIntegrity(dagPayload))
324
+ return [];
325
+ const obligationIds = collectDeclaredIds(obligationLedgerPayload, "obligations");
326
+ const counterexampleIds = collectDeclaredIds(counterexamplePayload, "counterexamples");
327
+ const acceptedCounterexampleIds = collectUnwaivedAcceptedCounterexampleIds(judgeReportPayload, waivedCounterexampleIds);
328
+ const referential = validateDAGReferentialIntegrity(dagPayload.nodes, obligationIds, counterexampleIds, acceptedCounterexampleIds);
329
+ return [
330
+ ...referential.issues,
331
+ ...validateDAGCoverageGaps(obligationIds, acceptedCounterexampleIds, referential.coveredObligationIds, referential.coveredCounterexampleIds),
332
+ ];
333
+ }
340
334
  // ── Contract-obligations gates (CP-BLOCK-N-contract-obligations) ───────────────
341
335
  //
342
336
  // The gates below enforce the auditor-agnostic robustness invariants for the
@@ -504,75 +498,85 @@ export function validatePairedObligations(obligationLedgerPayload, testValidator
504
498
  * skipped, except the counterexample-threading check, which is fail-closed when
505
499
  * accepted counterexamples exist but the DAG is missing.
506
500
  */
507
- export function validateEvidenceThreaded(assessmentReportPayload, judgeReportPayload, dagPayload, waivedCounterexampleIds) {
501
+ /** The DAG's node array, or `[]` when the payload declares none. */
502
+ function dagNodes(dagPayload) {
503
+ return isRecord(dagPayload) && Array.isArray(dagPayload.nodes)
504
+ ? dagPayload.nodes
505
+ : [];
506
+ }
507
+ /** Check 1: a finding that reports a violation must carry concrete evidence. */
508
+ function validateViolatedFindingsEvidence(assessmentReportPayload) {
508
509
  const issues = [];
509
- // 1. violated assessment findings must carry evidence.
510
- if (isRecord(assessmentReportPayload) && Array.isArray(assessmentReportPayload.findings)) {
511
- for (const [i, finding] of assessmentReportPayload.findings.entries()) {
512
- if (!isRecord(finding))
513
- continue;
514
- if (finding.status !== "violated")
515
- continue;
516
- const evidence = Array.isArray(finding.evidence)
517
- ? finding.evidence.filter((e) => typeof e === "string" && e.length > 0)
518
- : [];
519
- if (evidence.length === 0) {
520
- pushValidationIssue(issues, `contract_assessment_report.findings[${i}].evidence`, `Assessment finding for obligation "${typeof finding.obligation_id === "string" ? finding.obligation_id : "?"}" is "violated" but carries no evidence — a violation must thread concrete evidence forward.`);
521
- }
522
- }
510
+ if (!isRecord(assessmentReportPayload) || !Array.isArray(assessmentReportPayload.findings)) {
511
+ return issues;
523
512
  }
524
- // 2. accepted counterexamples must be threaded into the DAG. A waived
525
- // counterexample is resolved by a recorded owner decision and is not
526
- // demanded here (open-bugs.md:108).
527
- const acceptedCounterexampleIds = new Set();
528
- if (isRecord(judgeReportPayload) && Array.isArray(judgeReportPayload.classifications)) {
529
- for (const cls of judgeReportPayload.classifications) {
530
- if (isRecord(cls) &&
531
- cls.classification === "accepted" &&
532
- typeof cls.counterexample_id === "string" &&
533
- cls.counterexample_id.length > 0 &&
534
- !waivedCounterexampleIds?.has(cls.counterexample_id)) {
535
- acceptedCounterexampleIds.add(cls.counterexample_id);
536
- }
513
+ for (const [i, finding] of assessmentReportPayload.findings.entries()) {
514
+ if (!isRecord(finding))
515
+ continue;
516
+ if (finding.status !== "violated")
517
+ continue;
518
+ const evidence = Array.isArray(finding.evidence)
519
+ ? finding.evidence.filter((e) => typeof e === "string" && e.length > 0)
520
+ : [];
521
+ if (evidence.length === 0) {
522
+ pushValidationIssue(issues, `contract_assessment_report.findings[${i}].evidence`, `Assessment finding for obligation "${typeof finding.obligation_id === "string" ? finding.obligation_id : "?"}" is "violated" but carries no evidence — a violation must thread concrete evidence forward.`);
537
523
  }
538
524
  }
539
- if (acceptedCounterexampleIds.size > 0) {
540
- const threaded = new Set();
541
- const nodes = isRecord(dagPayload) && Array.isArray(dagPayload.nodes)
542
- ? dagPayload.nodes
543
- : [];
544
- for (const node of nodes) {
545
- if (!isRecord(node) || !Array.isArray(node.addresses_counterexamples))
546
- continue;
547
- for (const ceId of node.addresses_counterexamples) {
548
- if (typeof ceId === "string")
549
- threaded.add(ceId);
550
- }
525
+ return issues;
526
+ }
527
+ /**
528
+ * Check 2: every judge-accepted counterexample must reach implementation.
529
+ *
530
+ * FAIL-CLOSED, and the shape of the code is what makes it so. An ABSENT dag
531
+ * yields no nodes, so nothing is threaded, so every accepted id is reported.
532
+ * Accepted adversarial evidence with no DAG to reach is the failure this gate
533
+ * exists to catch — not a case to skip for want of a payload.
534
+ */
535
+ function validateCounterexampleThreading(acceptedCounterexampleIds, dagPayload) {
536
+ const issues = [];
537
+ if (acceptedCounterexampleIds.size === 0)
538
+ return issues;
539
+ const threaded = new Set();
540
+ for (const node of dagNodes(dagPayload)) {
541
+ if (!isRecord(node) || !Array.isArray(node.addresses_counterexamples))
542
+ continue;
543
+ for (const ceId of node.addresses_counterexamples) {
544
+ if (typeof ceId === "string")
545
+ threaded.add(ceId);
551
546
  }
552
- for (const ceId of acceptedCounterexampleIds) {
553
- if (!threaded.has(ceId)) {
554
- pushValidationIssue(issues, "implementation_dag.evidence_threading", `Judge-accepted counterexample "${ceId}" is not threaded into any implementation_dag node (addresses_counterexamples) — accepted adversarial evidence must reach implementation.`);
555
- }
547
+ }
548
+ for (const ceId of acceptedCounterexampleIds) {
549
+ if (!threaded.has(ceId)) {
550
+ pushValidationIssue(issues, "implementation_dag.evidence_threading", `Judge-accepted counterexample "${ceId}" is not threaded into any implementation_dag node (addresses_counterexamples) — accepted adversarial evidence must reach implementation.`);
556
551
  }
557
552
  }
558
- // 3. obligation-satisfying nodes must not be empty placeholders.
559
- if (isRecord(dagPayload) && Array.isArray(dagPayload.nodes)) {
560
- for (const [i, node] of dagPayload.nodes.entries()) {
561
- if (!isRecord(node))
562
- continue;
563
- const satisfies = Array.isArray(node.satisfies_obligations)
564
- ? node.satisfies_obligations.filter((o) => typeof o === "string")
565
- : [];
566
- if (satisfies.length === 0)
567
- continue;
568
- const description = typeof node.description === "string" ? node.description.trim() : "";
569
- if (description.length === 0) {
570
- pushValidationIssue(issues, `implementation_dag.nodes[${i}].description`, `Node "${typeof node.id === "string" ? node.id : "?"}" satisfies obligations but has an empty description — the evidence of what work satisfies the obligation must not be blank.`);
571
- }
553
+ return issues;
554
+ }
555
+ /** Check 3: a node that claims to satisfy obligations must say what it does. */
556
+ function validateSatisfyingNodeDescriptions(dagPayload) {
557
+ const issues = [];
558
+ for (const [i, node] of dagNodes(dagPayload).entries()) {
559
+ if (!isRecord(node))
560
+ continue;
561
+ const satisfies = Array.isArray(node.satisfies_obligations)
562
+ ? node.satisfies_obligations.filter((o) => typeof o === "string")
563
+ : [];
564
+ if (satisfies.length === 0)
565
+ continue;
566
+ const description = typeof node.description === "string" ? node.description.trim() : "";
567
+ if (description.length === 0) {
568
+ pushValidationIssue(issues, `implementation_dag.nodes[${i}].description`, `Node "${typeof node.id === "string" ? node.id : "?"}" satisfies obligations but has an empty description — the evidence of what work satisfies the obligation must not be blank.`);
572
569
  }
573
570
  }
574
571
  return issues;
575
572
  }
573
+ export function validateEvidenceThreaded(assessmentReportPayload, judgeReportPayload, dagPayload, waivedCounterexampleIds) {
574
+ return [
575
+ ...validateViolatedFindingsEvidence(assessmentReportPayload),
576
+ ...validateCounterexampleThreading(collectUnwaivedAcceptedCounterexampleIds(judgeReportPayload, waivedCounterexampleIds), dagPayload),
577
+ ...validateSatisfyingNodeDescriptions(dagPayload),
578
+ ];
579
+ }
576
580
  /**
577
581
  * OBL-CO-04 — source_type-scoped digest-coverage gate (fail-closed for
578
582
  * enumerable sources).
@@ -732,6 +736,40 @@ export function validateWorkBlockSeamPreparation(pathASeedPayload, moduleDecompo
732
736
  function escapeRegExp(value) {
733
737
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
734
738
  }
739
+ /**
740
+ * The judge-accepted counterexample ids this pipeline still DEMANDS coverage
741
+ * for: accepted, non-empty, and not resolved by a recorded owner waiver.
742
+ *
743
+ * Two gates in this file need that set and each built it inline, character for
744
+ * character. Every conjunct is load-bearing, which is why they must not drift
745
+ * apart: the `length > 0` test keeps an empty id out of a demand nothing can
746
+ * satisfy, and the optional chaining on the waiver set is required because most
747
+ * callers omit the argument entirely.
748
+ *
749
+ * Deliberately NOT `acceptedCounterexampleIds` from `contractPipeline/derive.ts`,
750
+ * despite the name. That one returns a possibly-duplicated array, filters no
751
+ * waiver and admits the empty string — and importing its value here would close
752
+ * a module cycle, since `derive.ts` already imports `isTestablePhaseObligation`
753
+ * from this file.
754
+ *
755
+ * A waived counterexample is resolved by a recorded owner decision, so coverage
756
+ * is not demanded for it — see the waiver entry in `docs/backlog/open-bugs.md`.
757
+ */
758
+ function collectUnwaivedAcceptedCounterexampleIds(judgeReportPayload, waivedCounterexampleIds) {
759
+ const accepted = new Set();
760
+ if (isRecord(judgeReportPayload) && Array.isArray(judgeReportPayload.classifications)) {
761
+ for (const cls of judgeReportPayload.classifications) {
762
+ if (isRecord(cls) &&
763
+ cls.classification === "accepted" &&
764
+ typeof cls.counterexample_id === "string" &&
765
+ cls.counterexample_id.length > 0 &&
766
+ !waivedCounterexampleIds?.has(cls.counterexample_id)) {
767
+ accepted.add(cls.counterexample_id);
768
+ }
769
+ }
770
+ }
771
+ return accepted;
772
+ }
735
773
  /**
736
774
  * OBL-CO-12 / INV-CO-12 — reconciliation-derivation gate (fail-closed).
737
775
  *