audit-tools 0.52.4 → 0.53.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 (348) hide show
  1. package/dist/audit/cli/auditStep.d.ts +1 -1
  2. package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
  3. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  4. package/dist/audit/cli/dispatch/hostHandoff.js +1 -1
  5. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  6. package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
  7. package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
  8. package/dist/audit/cli/dispatch/packetFilter.js +1 -1
  9. package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
  10. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  11. package/dist/audit/cli/nextStepCommand.js +42 -20
  12. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  13. package/dist/audit/cli/nextStepHelpers.d.ts +3 -3
  14. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  15. package/dist/audit/cli/nextStepHelpers.js +50 -75
  16. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  17. package/dist/audit/cli/prompts.d.ts +1 -2
  18. package/dist/audit/cli/prompts.d.ts.map +1 -1
  19. package/dist/audit/cli/prompts.js +2 -12
  20. package/dist/audit/cli/prompts.js.map +1 -1
  21. package/dist/audit/cli/sampleRunCommand.d.ts +2 -2
  22. package/dist/audit/cli/semanticReviewStep.d.ts +11 -2
  23. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  24. package/dist/audit/cli/semanticReviewStep.js +14 -10
  25. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  26. package/dist/audit/contracts/workerSchemas.d.ts +14 -14
  27. package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
  28. package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
  29. package/dist/audit/extractors/graphRoutes.js +1 -3
  30. package/dist/audit/extractors/graphRoutes.js.map +1 -1
  31. package/dist/audit/io/artifacts.d.ts.map +1 -1
  32. package/dist/audit/io/artifacts.js +2 -3
  33. package/dist/audit/io/artifacts.js.map +1 -1
  34. package/dist/audit/orchestrator/architectureDiscovery.d.ts +11 -0
  35. package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -0
  36. package/dist/audit/orchestrator/architectureDiscovery.js +174 -0
  37. package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -0
  38. package/dist/audit/orchestrator/designReviewProjection.d.ts +2 -6
  39. package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
  40. package/dist/audit/orchestrator/designReviewProjection.js +2 -6
  41. package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
  42. package/dist/audit/orchestrator/designReviewSnapshot.d.ts +2 -3
  43. package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
  44. package/dist/audit/orchestrator/designReviewSnapshot.js +2 -3
  45. package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
  46. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  47. package/dist/audit/orchestrator/executorRunners.js +1 -22
  48. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  49. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  50. package/dist/audit/orchestrator/executors.js +1 -13
  51. package/dist/audit/orchestrator/executors.js.map +1 -1
  52. package/dist/audit/orchestrator/nextStep.d.ts +2 -28
  53. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  54. package/dist/audit/orchestrator/nextStep.js +5 -37
  55. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  56. package/dist/audit/orchestrator/obligationDerive.d.ts +2 -3
  57. package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -1
  58. package/dist/audit/orchestrator/obligationDerive.js +2 -3
  59. package/dist/audit/orchestrator/obligationDerive.js.map +1 -1
  60. package/dist/audit/orchestrator/pendingTasks.d.ts +2 -0
  61. package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
  62. package/dist/audit/orchestrator/pendingTasks.js +5 -1
  63. package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
  64. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  65. package/dist/audit/orchestrator/planningExecutors.js +9 -0
  66. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  67. package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
  68. package/dist/audit/orchestrator/resultBaseline.d.ts +5 -5
  69. package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
  70. package/dist/audit/orchestrator/resultBaseline.js +24 -47
  71. package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
  72. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
  73. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +2 -0
  74. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
  75. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  76. package/dist/audit/orchestrator/state.js +2 -0
  77. package/dist/audit/orchestrator/state.js.map +1 -1
  78. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  79. package/dist/audit/orchestrator/synthesisExecutors.js +3 -0
  80. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  81. package/dist/audit/types/auditState.d.ts +6 -6
  82. package/dist/audit/types/flowCoverage.d.ts +6 -6
  83. package/dist/audit/types.d.ts +12 -12
  84. package/dist/remediate/contractPipeline/executionPlan.d.ts +1908 -0
  85. package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -0
  86. package/dist/remediate/contractPipeline/executionPlan.js +467 -0
  87. package/dist/remediate/contractPipeline/executionPlan.js.map +1 -0
  88. package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +12 -0
  89. package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -0
  90. package/dist/remediate/contractPipeline/runtimePlanAuthority.js +41 -0
  91. package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -0
  92. package/dist/remediate/dedup/crossLensDedup.d.ts +3 -16
  93. package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
  94. package/dist/remediate/dedup/crossLensDedup.js +2 -32
  95. package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
  96. package/dist/remediate/index.d.ts +2 -19
  97. package/dist/remediate/index.d.ts.map +1 -1
  98. package/dist/remediate/index.js +22 -138
  99. package/dist/remediate/index.js.map +1 -1
  100. package/dist/remediate/intake.d.ts +10 -10
  101. package/dist/remediate/intent/intentOrdering.d.ts +6 -8
  102. package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
  103. package/dist/remediate/intent/intentOrdering.js +24 -47
  104. package/dist/remediate/intent/intentOrdering.js.map +1 -1
  105. package/dist/remediate/phases/close.d.ts +25 -17
  106. package/dist/remediate/phases/close.d.ts.map +1 -1
  107. package/dist/remediate/phases/close.js +278 -218
  108. package/dist/remediate/phases/close.js.map +1 -1
  109. package/dist/remediate/phases/closeAcceptance.d.ts +42 -0
  110. package/dist/remediate/phases/closeAcceptance.d.ts.map +1 -0
  111. package/dist/remediate/phases/closeAcceptance.js +66 -0
  112. package/dist/remediate/phases/closeAcceptance.js.map +1 -0
  113. package/dist/remediate/phases/closeReviewProvenance.d.ts +1 -1
  114. package/dist/remediate/phases/closeReviewProvenance.d.ts.map +1 -1
  115. package/dist/remediate/phases/closeReviewProvenance.js +9 -8
  116. package/dist/remediate/phases/closeReviewProvenance.js.map +1 -1
  117. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
  118. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +11 -9
  119. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  120. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +21 -86
  121. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
  122. package/dist/remediate/phases/closeVerifyHeadEvidence.js +30 -19
  123. package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
  124. package/dist/remediate/phases/plan.d.ts +3 -60
  125. package/dist/remediate/phases/plan.d.ts.map +1 -1
  126. package/dist/remediate/phases/plan.js +3 -227
  127. package/dist/remediate/phases/plan.js.map +1 -1
  128. package/dist/remediate/phases/triage.d.ts.map +1 -1
  129. package/dist/remediate/phases/triage.js +19 -30
  130. package/dist/remediate/phases/triage.js.map +1 -1
  131. package/dist/remediate/riskSignal.d.ts +9 -43
  132. package/dist/remediate/riskSignal.d.ts.map +1 -1
  133. package/dist/remediate/riskSignal.js +7 -28
  134. package/dist/remediate/riskSignal.js.map +1 -1
  135. package/dist/remediate/state/disposition.d.ts +2 -1
  136. package/dist/remediate/state/disposition.d.ts.map +1 -1
  137. package/dist/remediate/state/disposition.js +37 -1
  138. package/dist/remediate/state/disposition.js.map +1 -1
  139. package/dist/remediate/state/runIdentity.d.ts +2 -13
  140. package/dist/remediate/state/runIdentity.d.ts.map +1 -1
  141. package/dist/remediate/state/runIdentity.js +3 -13
  142. package/dist/remediate/state/runIdentity.js.map +1 -1
  143. package/dist/remediate/state/store.d.ts +12 -36
  144. package/dist/remediate/state/store.d.ts.map +1 -1
  145. package/dist/remediate/state/store.js +58 -150
  146. package/dist/remediate/state/store.js.map +1 -1
  147. package/dist/remediate/state/types.d.ts +406 -504
  148. package/dist/remediate/state/types.d.ts.map +1 -1
  149. package/dist/remediate/state/types.js +24 -104
  150. package/dist/remediate/state/types.js.map +1 -1
  151. package/dist/remediate/steps/contractPipeline.d.ts +7 -661
  152. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  153. package/dist/remediate/steps/contractPipeline.js +259 -3854
  154. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  155. package/dist/remediate/steps/contractPipelinePrompts.d.ts +20 -142
  156. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  157. package/dist/remediate/steps/contractPipelinePrompts.js +48 -581
  158. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  159. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +4 -1
  160. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
  161. package/dist/remediate/steps/dispatch/contractConformanceReview.js +6 -3
  162. package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
  163. package/dist/remediate/steps/dispatch/hostContracts.d.ts +1 -1
  164. package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
  165. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +4 -21
  166. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  167. package/dist/remediate/steps/dispatch/hostHandoff.js +161 -383
  168. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  169. package/dist/remediate/steps/finalGate.d.ts +34 -0
  170. package/dist/remediate/steps/finalGate.d.ts.map +1 -1
  171. package/dist/remediate/steps/finalGate.js +44 -4
  172. package/dist/remediate/steps/finalGate.js.map +1 -1
  173. package/dist/remediate/steps/frictionCloseout.d.ts +1 -30
  174. package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
  175. package/dist/remediate/steps/frictionCloseout.js +6 -99
  176. package/dist/remediate/steps/frictionCloseout.js.map +1 -1
  177. package/dist/remediate/steps/nextStep.d.ts +2 -15
  178. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  179. package/dist/remediate/steps/nextStep.js +255 -1028
  180. package/dist/remediate/steps/nextStep.js.map +1 -1
  181. package/dist/remediate/steps/prompts.js +12 -12
  182. package/dist/remediate/steps/prompts.js.map +1 -1
  183. package/dist/remediate/steps/stepUtils.d.ts +1 -1
  184. package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
  185. package/dist/remediate/steps/types.d.ts +1 -1
  186. package/dist/remediate/steps/types.d.ts.map +1 -1
  187. package/dist/remediate/steps/types.js +1 -1
  188. package/dist/remediate/steps/types.js.map +1 -1
  189. package/dist/remediate/types/options.d.ts +9 -0
  190. package/dist/remediate/types/options.d.ts.map +1 -1
  191. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  192. package/dist/remediate/validation/artifacts.js +10 -56
  193. package/dist/remediate/validation/artifacts.js.map +1 -1
  194. package/dist/remediate/validation/remediationState.d.ts +2 -2
  195. package/dist/remediate/validation/remediationState.d.ts.map +1 -1
  196. package/dist/remediate/validation/remediationState.js +17 -77
  197. package/dist/remediate/validation/remediationState.js.map +1 -1
  198. package/dist/remediate/validation/verificationReport.d.ts +3 -0
  199. package/dist/remediate/validation/verificationReport.d.ts.map +1 -0
  200. package/dist/remediate/validation/verificationReport.js +28 -0
  201. package/dist/remediate/validation/verificationReport.js.map +1 -0
  202. package/dist/shared/analyzers/types.d.ts +10 -10
  203. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  204. package/dist/shared/friction/triage.d.ts +7 -28
  205. package/dist/shared/friction/triage.d.ts.map +1 -1
  206. package/dist/shared/friction/triage.js +7 -28
  207. package/dist/shared/friction/triage.js.map +1 -1
  208. package/dist/shared/graph/orderedReachability.js +1 -1
  209. package/dist/shared/graph/orderedReachability.js.map +1 -1
  210. package/dist/shared/index.d.ts +5 -6
  211. package/dist/shared/index.d.ts.map +1 -1
  212. package/dist/shared/index.js +3 -4
  213. package/dist/shared/index.js.map +1 -1
  214. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  215. package/dist/shared/loopCorePaths.js +6 -0
  216. package/dist/shared/loopCorePaths.js.map +1 -1
  217. package/dist/shared/prompts.d.ts +1 -2
  218. package/dist/shared/prompts.d.ts.map +1 -1
  219. package/dist/shared/prompts.js +1 -2
  220. package/dist/shared/prompts.js.map +1 -1
  221. package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
  222. package/dist/shared/reReview/projectionDiff.js +6 -14
  223. package/dist/shared/reReview/projectionDiff.js.map +1 -1
  224. package/dist/shared/types/executionPlan.d.ts +416 -0
  225. package/dist/shared/types/executionPlan.d.ts.map +1 -0
  226. package/dist/shared/types/executionPlan.js +132 -0
  227. package/dist/shared/types/executionPlan.js.map +1 -0
  228. package/dist/shared/types/remediationOutcome.d.ts +1378 -12
  229. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  230. package/dist/shared/types/remediationOutcome.js +29 -1
  231. package/dist/shared/types/remediationOutcome.js.map +1 -1
  232. package/dist/shared/types/{contractPipeline/verification.d.ts → verificationReport.d.ts} +9 -37
  233. package/dist/shared/types/verificationReport.d.ts.map +1 -0
  234. package/dist/shared/types/verificationReport.js +4 -0
  235. package/dist/shared/types/verificationReport.js.map +1 -0
  236. package/dist/shared/validation/findingGrounding.d.ts +3 -5
  237. package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
  238. package/dist/shared/validation/findingGrounding.js +4 -7
  239. package/dist/shared/validation/findingGrounding.js.map +1 -1
  240. package/package.json +1 -1
  241. package/remediate-code.mjs +16 -3
  242. package/dist/remediate/contractPipeline/artifactNames.d.ts +0 -8
  243. package/dist/remediate/contractPipeline/artifactNames.d.ts.map +0 -1
  244. package/dist/remediate/contractPipeline/artifactNames.js +0 -28
  245. package/dist/remediate/contractPipeline/artifactNames.js.map +0 -1
  246. package/dist/remediate/contractPipeline/artifactStore.d.ts +0 -219
  247. package/dist/remediate/contractPipeline/artifactStore.d.ts.map +0 -1
  248. package/dist/remediate/contractPipeline/artifactStore.js +0 -436
  249. package/dist/remediate/contractPipeline/artifactStore.js.map +0 -1
  250. package/dist/remediate/contractPipeline/changeClassification.d.ts +0 -130
  251. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +0 -1
  252. package/dist/remediate/contractPipeline/changeClassification.js +0 -446
  253. package/dist/remediate/contractPipeline/changeClassification.js.map +0 -1
  254. package/dist/remediate/contractPipeline/contractReviewBinding.d.ts +0 -28
  255. package/dist/remediate/contractPipeline/contractReviewBinding.d.ts.map +0 -1
  256. package/dist/remediate/contractPipeline/contractReviewBinding.js +0 -75
  257. package/dist/remediate/contractPipeline/contractReviewBinding.js.map +0 -1
  258. package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts +0 -27
  259. package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts.map +0 -1
  260. package/dist/remediate/contractPipeline/counterexampleFingerprint.js +0 -37
  261. package/dist/remediate/contractPipeline/counterexampleFingerprint.js.map +0 -1
  262. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +0 -131
  263. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +0 -1
  264. package/dist/remediate/contractPipeline/cyclicSeamResolution.js +0 -257
  265. package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +0 -1
  266. package/dist/remediate/contractPipeline/derive.d.ts +0 -173
  267. package/dist/remediate/contractPipeline/derive.d.ts.map +0 -1
  268. package/dist/remediate/contractPipeline/derive.js +0 -477
  269. package/dist/remediate/contractPipeline/derive.js.map +0 -1
  270. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +0 -50
  271. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +0 -1
  272. package/dist/remediate/contractPipeline/finalizedContractFields.js +0 -77
  273. package/dist/remediate/contractPipeline/finalizedContractFields.js.map +0 -1
  274. package/dist/remediate/contractPipeline/idRegistry.d.ts +0 -144
  275. package/dist/remediate/contractPipeline/idRegistry.d.ts.map +0 -1
  276. package/dist/remediate/contractPipeline/idRegistry.js +0 -214
  277. package/dist/remediate/contractPipeline/idRegistry.js.map +0 -1
  278. package/dist/remediate/contractPipeline/obligationKinds.d.ts +0 -27
  279. package/dist/remediate/contractPipeline/obligationKinds.d.ts.map +0 -1
  280. package/dist/remediate/contractPipeline/obligationKinds.js +0 -18
  281. package/dist/remediate/contractPipeline/obligationKinds.js.map +0 -1
  282. package/dist/remediate/contractPipeline/phaseCut.d.ts +0 -125
  283. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +0 -1
  284. package/dist/remediate/contractPipeline/phaseCut.js +0 -339
  285. package/dist/remediate/contractPipeline/phaseCut.js.map +0 -1
  286. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts +0 -31
  287. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +0 -1
  288. package/dist/remediate/contractPipeline/phaseCutArtifact.js +0 -48
  289. package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +0 -1
  290. package/dist/remediate/contractPipeline/repairState.d.ts +0 -110
  291. package/dist/remediate/contractPipeline/repairState.d.ts.map +0 -1
  292. package/dist/remediate/contractPipeline/repairState.js +0 -185
  293. package/dist/remediate/contractPipeline/repairState.js.map +0 -1
  294. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +0 -79
  295. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +0 -1
  296. package/dist/remediate/contractPipeline/reviewSnapshot.js +0 -140
  297. package/dist/remediate/contractPipeline/reviewSnapshot.js.map +0 -1
  298. package/dist/remediate/contractPipeline/semanticProjection.d.ts +0 -64
  299. package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +0 -1
  300. package/dist/remediate/contractPipeline/semanticProjection.js +0 -136
  301. package/dist/remediate/contractPipeline/semanticProjection.js.map +0 -1
  302. package/dist/remediate/contractPipeline/sketchSource.d.ts +0 -194
  303. package/dist/remediate/contractPipeline/sketchSource.d.ts.map +0 -1
  304. package/dist/remediate/contractPipeline/sketchSource.js +0 -262
  305. package/dist/remediate/contractPipeline/sketchSource.js.map +0 -1
  306. package/dist/remediate/contractPipeline/testPlanCarry.d.ts +0 -17
  307. package/dist/remediate/contractPipeline/testPlanCarry.d.ts.map +0 -1
  308. package/dist/remediate/contractPipeline/testPlanCarry.js +0 -72
  309. package/dist/remediate/contractPipeline/testPlanCarry.js.map +0 -1
  310. package/dist/remediate/steps/dispatch/marshal.d.ts +0 -7
  311. package/dist/remediate/steps/dispatch/marshal.d.ts.map +0 -1
  312. package/dist/remediate/steps/dispatch/marshal.js +0 -11
  313. package/dist/remediate/steps/dispatch/marshal.js.map +0 -1
  314. package/dist/remediate/validation/contractPipeline.d.ts +0 -35
  315. package/dist/remediate/validation/contractPipeline.d.ts.map +0 -1
  316. package/dist/remediate/validation/contractPipeline.js +0 -613
  317. package/dist/remediate/validation/contractPipeline.js.map +0 -1
  318. package/dist/remediate/validation/contractPipelineGates.d.ts +0 -272
  319. package/dist/remediate/validation/contractPipelineGates.d.ts.map +0 -1
  320. package/dist/remediate/validation/contractPipelineGates.js +0 -1397
  321. package/dist/remediate/validation/contractPipelineGates.js.map +0 -1
  322. package/dist/shared/types/contractPipeline/design.d.ts +0 -79
  323. package/dist/shared/types/contractPipeline/design.d.ts.map +0 -1
  324. package/dist/shared/types/contractPipeline/design.js +0 -16
  325. package/dist/shared/types/contractPipeline/design.js.map +0 -1
  326. package/dist/shared/types/contractPipeline/goal.d.ts +0 -41
  327. package/dist/shared/types/contractPipeline/goal.d.ts.map +0 -1
  328. package/dist/shared/types/contractPipeline/goal.js +0 -10
  329. package/dist/shared/types/contractPipeline/goal.js.map +0 -1
  330. package/dist/shared/types/contractPipeline/implementation.d.ts +0 -118
  331. package/dist/shared/types/contractPipeline/implementation.d.ts.map +0 -1
  332. package/dist/shared/types/contractPipeline/implementation.js +0 -13
  333. package/dist/shared/types/contractPipeline/implementation.js.map +0 -1
  334. package/dist/shared/types/contractPipeline/obligations.d.ts +0 -283
  335. package/dist/shared/types/contractPipeline/obligations.d.ts.map +0 -1
  336. package/dist/shared/types/contractPipeline/obligations.js +0 -84
  337. package/dist/shared/types/contractPipeline/obligations.js.map +0 -1
  338. package/dist/shared/types/contractPipeline/verification.d.ts.map +0 -1
  339. package/dist/shared/types/contractPipeline/verification.js +0 -10
  340. package/dist/shared/types/contractPipeline/verification.js.map +0 -1
  341. package/dist/shared/types/contractPipeline.d.ts +0 -48
  342. package/dist/shared/types/contractPipeline.d.ts.map +0 -1
  343. package/dist/shared/types/contractPipeline.js +0 -32
  344. package/dist/shared/types/contractPipeline.js.map +0 -1
  345. package/dist/shared/types/obligationLedger.d.ts +0 -39
  346. package/dist/shared/types/obligationLedger.d.ts.map +0 -1
  347. package/dist/shared/types/obligationLedger.js +0 -49
  348. package/dist/shared/types/obligationLedger.js.map +0 -1
@@ -1,37 +0,0 @@
1
- /**
2
- * Content fingerprint for a counterexample.
3
- *
4
- * The judge↔repair convergence gate ({@link evaluateJudgeGate} in
5
- * `../steps/contractPipeline.js`) must detect genuine re-occurrence of the
6
- * same unrepaired defect across independent adversarial rounds. The
7
- * reviewer-supplied counterexample `id` is free text (see
8
- * `Counterexample.id` in `audit-tools/shared`'s obligations types) and is NOT
9
- * a stable cross-round identity: two independent critic rounds each commonly
10
- * label their genuinely-distinct top counterexample "CE-001" (the prompt
11
- * schema's own example value). Keying convergence on the raw id string then
12
- * misreads "two different CEs that happen to share a label" as "the same CE
13
- * re-accepted after a repair" and falsely escalates a stall while a real new
14
- * defect is being correctly repaired.
15
- *
16
- * This fingerprint keys on CONTENT instead: the tool-constrained
17
- * `violated_obligation_ids` vocabulary (sorted, normalized) paired with the
18
- * normalized `claim` prose, falling back to the normalized claim alone when
19
- * no obligations are cited. Mirrors the derivation style of
20
- * `src/shared/findingIdentitySignature.ts` (tiered stable fields, aggressive
21
- * title normalization, truncated content hash) rather than introducing a
22
- * second identity convention.
23
- */
24
- import { hashContent, normalizeTitle } from "audit-tools/shared";
25
- /** Deterministic, content-derived identity for a counterexample. */
26
- export function counterexampleFingerprint(ce) {
27
- const obligations = (ce.violated_obligation_ids ?? [])
28
- .map((id) => id.trim().toLowerCase())
29
- .filter((id) => id.length > 0)
30
- .sort();
31
- const claim = normalizeTitle(ce.claim);
32
- const key = obligations.length > 0
33
- ? `obligations|${obligations.join(",")}|${claim}`
34
- : `claim|${claim}`;
35
- return hashContent(key, { length: 8 });
36
- }
37
- //# sourceMappingURL=counterexampleFingerprint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"counterexampleFingerprint.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/counterexampleFingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAC;AAEtF,oEAAoE;AACpE,MAAM,UAAU,yBAAyB,CAAC,EAAkB;IAC1D,MAAM,WAAW,GAAG,CAAC,EAAE,CAAC,uBAAuB,IAAI,EAAE,CAAC;SACnD,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SACpC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;SAC7B,IAAI,EAAE,CAAC;IACV,MAAM,KAAK,GAAG,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,GAAG,GACP,WAAW,CAAC,MAAM,GAAG,CAAC;QACpB,CAAC,CAAC,eAAe,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,EAAE;QACjD,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC;IACvB,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AACzC,CAAC"}
@@ -1,131 +0,0 @@
1
- /**
2
- * Cyclic-seam resolution: deterministic cycle detection over module seam
3
- * obligations, plus a re-check helper that validates a proposed cycle-break
4
- * does not re-introduce a cycle.
5
- *
6
- * A "seam obligation" is any module that declares an interface obligation
7
- * (via neighbor_needs / inputs / outputs) that depends on a type or interface
8
- * owned by another module. For the purposes of this detector, a module M
9
- * is said to need module N when M lists N in its `needs` array.
10
- *
11
- * Detection is the shared directed-cycle core's exact strongly-connected-
12
- * component membership (`audit-tools/shared` → `findCyclicComponents`). Each
13
- * cyclic component is reported as one detected cycle.
14
- */
15
- /** A module node in the seam-obligation graph. */
16
- export interface SeamObligationNode {
17
- /** Unique module identifier. */
18
- id: string;
19
- /** IDs of modules this module declares an interface obligation toward. */
20
- needs: string[];
21
- }
22
- /**
23
- * One detected cycle (N ≥ 1 nodes — a module that needs ITSELF is a 1-member
24
- * cycle; every other cycle has 2 or more members).
25
- */
26
- export interface DetectedCycle {
27
- /** Module IDs that form the cycle, in input order (not in cycle order). */
28
- members: string[];
29
- }
30
- /** A proposed mediator module that breaks a cycle. */
31
- export interface ProposedMediator {
32
- /** Module ID for the new mediator. */
33
- id: string;
34
- /** Modules the mediator itself needs (must not form a new cycle). */
35
- needs: string[];
36
- }
37
- /** Result of a cycle-break re-check. */
38
- export interface CycleBreakValidation {
39
- accepted: boolean;
40
- /** Present only when accepted === false. */
41
- reason?: string;
42
- }
43
- /**
44
- * The break a worker ACTUALLY authored, read off the `cyclic_seam_resolution`
45
- * record rather than fabricated by the re-checker.
46
- *
47
- * Both sanctioned strategies designate a REAL node: `mediator` names a third
48
- * obligation that now owns the shared primitive, `single_authority` names the
49
- * one cycle member that keeps the interface. A record that designates nothing
50
- * cannot be validated against the real graph at all — see
51
- * {@link validateAuthoredCycleBreak}, which refuses it rather than inventing a
52
- * placeholder.
53
- */
54
- export interface AuthoredCycleBreak {
55
- /** `break_strategy` from the resolution record. */
56
- strategy: "mediator" | "single_authority";
57
- /** The obligation id the record designates, when it named one. */
58
- designatedId?: string;
59
- }
60
- /**
61
- * Detect cyclic seam obligations in a module graph.
62
- *
63
- * Membership is EXACT: each reported cycle is one strongly connected component
64
- * of the (module → modules it needs) graph. Two properties follow, and both
65
- * differ from the Kahn drain this replaced:
66
- *
67
- * - a module DOWNSTREAM of a cycle (it needs a member, no member needs it) is
68
- * not a member and is not reported — the drain reported every node it could
69
- * not drain, tails included;
70
- * - two cycles CHAINED by an edge between them are two cycles, not one — the
71
- * drain's weakly-connected grouping fused them.
72
- *
73
- * A module that needs ITSELF is reported as a 1-member cycle.
74
- *
75
- * Returns an empty array when no cycle is found.
76
- */
77
- export declare function detectCyclicSeamObligations(nodes: SeamObligationNode[]): DetectedCycle[];
78
- /**
79
- * Validate a proposed cycle-break by re-running cycle detection on the
80
- * graph after the break is applied.
81
- *
82
- * The break modifies the original graph as follows:
83
- * - Remove every `needs` edge between original cycle members that crossed the
84
- * cycle (both sides still appear in the graph with their original non-cycle
85
- * needs intact).
86
- * - Add the `proposedMediator` as a new node.
87
- * - For each original cycle member, replace any needs-edge that pointed to
88
- * another cycle member with a needs-edge to the mediator.
89
- *
90
- * If the resulting graph still contains a cycle, the proposed break is
91
- * rejected.
92
- *
93
- * The mediator appears EXACTLY ONCE in the patched graph. When it is already a
94
- * node of `allNodes` — which is the live feed from
95
- * {@link validateAuthoredCycleBreak}, where the mediator is a real obligation —
96
- * its own entry carries the proposed needs instead of a second entry with the
97
- * same id being appended.
98
- */
99
- export declare function validateCycleBreak(originalCycle: DetectedCycle, allNodes: SeamObligationNode[], proposedMediator: ProposedMediator): CycleBreakValidation;
100
- /**
101
- * Re-check a cycle-break AS AUTHORED, against the REAL obligation graph.
102
- *
103
- * The distinction from {@link validateCycleBreak} is the whole point: that
104
- * function asks a HYPOTHETICAL — "if the intra-cycle edges were redirected to
105
- * this proposed node, would the graph be acyclic?" — and its caller used to
106
- * answer it with a node it had fabricated itself (`{ id: "_mediator_A_B",
107
- * needs: [] }`) against the UNMODIFIED ledger. An edge-free sink absorbs every
108
- * redirected edge, so for a single detected cycle that question is acyclic BY
109
- * CONSTRUCTION and the re-check could never reject — a worker could claim
110
- * `status: "resolved"` while leaving the ledger's cycle edges exactly as they
111
- * were, and the pipeline advanced.
112
- *
113
- * This function asks the REAL question instead: does the graph the pipeline
114
- * will actually consume still carry the cycle? The break is accepted only when
115
- *
116
- * 1. the record designates a node (a break with no designated owner is not a
117
- * break, it is a claim), and that node EXISTS in the live graph;
118
- * 2. the strategy and the designated node agree — a mediator is a THIRD node
119
- * outside the cycle, a single authority is one of the cycle's own members;
120
- * 3. the live graph no longer contains a cycle touching the original members
121
- * — i.e. the break is reflected in the edges, not just asserted in prose;
122
- * 4. and, for the mediator strategy, redirecting the cycle's edges at the
123
- * mediator's REAL `needs` (never a fabricated empty set) stays acyclic, so
124
- * a mediator that itself depends back into the cycle is refused.
125
- *
126
- * `currentNodes` must be built from the obligation ledger as it stands NOW, on
127
- * this invocation, after ingestion and the staleness-archive pass — a stale
128
- * snapshot would reintroduce exactly the vacuity this closes.
129
- */
130
- export declare function validateAuthoredCycleBreak(originalCycle: DetectedCycle, currentNodes: SeamObligationNode[], authored: AuthoredCycleBreak): CycleBreakValidation;
131
- //# sourceMappingURL=cyclicSeamResolution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cyclicSeamResolution.d.ts","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/cyclicSeamResolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,QAAQ,EAAE,UAAU,GAAG,kBAAkB,CAAC;IAC1C,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,kBAAkB,EAAE,GAC1B,aAAa,EAAE,CAMjB;AAID;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,kBAAkB,EAAE,EAC9B,gBAAgB,EAAE,gBAAgB,GACjC,oBAAoB,CA6CtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,kBAAkB,EAAE,EAClC,QAAQ,EAAE,kBAAkB,GAC3B,oBAAoB,CAoJtB"}
@@ -1,257 +0,0 @@
1
- /**
2
- * Cyclic-seam resolution: deterministic cycle detection over module seam
3
- * obligations, plus a re-check helper that validates a proposed cycle-break
4
- * does not re-introduce a cycle.
5
- *
6
- * A "seam obligation" is any module that declares an interface obligation
7
- * (via neighbor_needs / inputs / outputs) that depends on a type or interface
8
- * owned by another module. For the purposes of this detector, a module M
9
- * is said to need module N when M lists N in its `needs` array.
10
- *
11
- * Detection is the shared directed-cycle core's exact strongly-connected-
12
- * component membership (`audit-tools/shared` → `findCyclicComponents`). Each
13
- * cyclic component is reported as one detected cycle.
14
- */
15
- import { findCyclicComponents } from "audit-tools/shared";
16
- // ── Cycle detection ───────────────────────────────────────────────────────────
17
- /**
18
- * Detect cyclic seam obligations in a module graph.
19
- *
20
- * Membership is EXACT: each reported cycle is one strongly connected component
21
- * of the (module → modules it needs) graph. Two properties follow, and both
22
- * differ from the Kahn drain this replaced:
23
- *
24
- * - a module DOWNSTREAM of a cycle (it needs a member, no member needs it) is
25
- * not a member and is not reported — the drain reported every node it could
26
- * not drain, tails included;
27
- * - two cycles CHAINED by an edge between them are two cycles, not one — the
28
- * drain's weakly-connected grouping fused them.
29
- *
30
- * A module that needs ITSELF is reported as a 1-member cycle.
31
- *
32
- * Returns an empty array when no cycle is found.
33
- */
34
- export function detectCyclicSeamObligations(nodes) {
35
- const components = findCyclicComponents(nodes.map((node) => ({ id: node.id, depends_on: node.needs })), { includeSelfLoops: true });
36
- return components.map((members) => ({ members }));
37
- }
38
- // ── Cycle-break re-check ──────────────────────────────────────────────────────
39
- /**
40
- * Validate a proposed cycle-break by re-running cycle detection on the
41
- * graph after the break is applied.
42
- *
43
- * The break modifies the original graph as follows:
44
- * - Remove every `needs` edge between original cycle members that crossed the
45
- * cycle (both sides still appear in the graph with their original non-cycle
46
- * needs intact).
47
- * - Add the `proposedMediator` as a new node.
48
- * - For each original cycle member, replace any needs-edge that pointed to
49
- * another cycle member with a needs-edge to the mediator.
50
- *
51
- * If the resulting graph still contains a cycle, the proposed break is
52
- * rejected.
53
- *
54
- * The mediator appears EXACTLY ONCE in the patched graph. When it is already a
55
- * node of `allNodes` — which is the live feed from
56
- * {@link validateAuthoredCycleBreak}, where the mediator is a real obligation —
57
- * its own entry carries the proposed needs instead of a second entry with the
58
- * same id being appended.
59
- */
60
- export function validateCycleBreak(originalCycle, allNodes, proposedMediator) {
61
- const cycleSet = new Set(originalCycle.members);
62
- // Build the patched node list:
63
- // - For each cycle member: replace needs-edges to other cycle members with
64
- // a needs-edge to the mediator.
65
- // - For non-cycle members: unchanged.
66
- // - Add the mediator, unless the graph already carries a node with its id.
67
- const patched = [];
68
- const mediatorAlreadyPresent = allNodes.some((node) => node.id === proposedMediator.id);
69
- for (const node of allNodes) {
70
- if (node.id === proposedMediator.id) {
71
- // The mediator's own entry — carry the proposed needs here rather than
72
- // appending a second node with the same id below.
73
- patched.push({ id: node.id, needs: [...proposedMediator.needs] });
74
- }
75
- else if (cycleSet.has(node.id)) {
76
- const newNeeds = node.needs.map((dep) => cycleSet.has(dep) ? proposedMediator.id : dep);
77
- // Deduplicate mediator references.
78
- patched.push({ id: node.id, needs: [...new Set(newNeeds)] });
79
- }
80
- else {
81
- patched.push(node);
82
- }
83
- }
84
- // Add the mediator itself, unless the live graph already carries it.
85
- if (!mediatorAlreadyPresent) {
86
- patched.push({ id: proposedMediator.id, needs: proposedMediator.needs });
87
- }
88
- const remaining = detectCyclicSeamObligations(patched);
89
- if (remaining.length > 0) {
90
- const affectedIds = remaining.flatMap((c) => c.members).join(", ");
91
- return {
92
- accepted: false,
93
- reason: `Proposed mediator "${proposedMediator.id}" still leaves cycle(s) involving: [${affectedIds}].`,
94
- };
95
- }
96
- return { accepted: true };
97
- }
98
- /**
99
- * Re-check a cycle-break AS AUTHORED, against the REAL obligation graph.
100
- *
101
- * The distinction from {@link validateCycleBreak} is the whole point: that
102
- * function asks a HYPOTHETICAL — "if the intra-cycle edges were redirected to
103
- * this proposed node, would the graph be acyclic?" — and its caller used to
104
- * answer it with a node it had fabricated itself (`{ id: "_mediator_A_B",
105
- * needs: [] }`) against the UNMODIFIED ledger. An edge-free sink absorbs every
106
- * redirected edge, so for a single detected cycle that question is acyclic BY
107
- * CONSTRUCTION and the re-check could never reject — a worker could claim
108
- * `status: "resolved"` while leaving the ledger's cycle edges exactly as they
109
- * were, and the pipeline advanced.
110
- *
111
- * This function asks the REAL question instead: does the graph the pipeline
112
- * will actually consume still carry the cycle? The break is accepted only when
113
- *
114
- * 1. the record designates a node (a break with no designated owner is not a
115
- * break, it is a claim), and that node EXISTS in the live graph;
116
- * 2. the strategy and the designated node agree — a mediator is a THIRD node
117
- * outside the cycle, a single authority is one of the cycle's own members;
118
- * 3. the live graph no longer contains a cycle touching the original members
119
- * — i.e. the break is reflected in the edges, not just asserted in prose;
120
- * 4. and, for the mediator strategy, redirecting the cycle's edges at the
121
- * mediator's REAL `needs` (never a fabricated empty set) stays acyclic, so
122
- * a mediator that itself depends back into the cycle is refused.
123
- *
124
- * `currentNodes` must be built from the obligation ledger as it stands NOW, on
125
- * this invocation, after ingestion and the staleness-archive pass — a stale
126
- * snapshot would reintroduce exactly the vacuity this closes.
127
- */
128
- export function validateAuthoredCycleBreak(originalCycle, currentNodes, authored) {
129
- const members = originalCycle.members;
130
- const cycleSet = new Set(members);
131
- const designatedId = authored.designatedId?.trim();
132
- if (!designatedId) {
133
- return {
134
- accepted: false,
135
- reason: `The ${authored.strategy} break for cycle [${members.join(", ")}] names no obligation. ` +
136
- `A mediator break must name the mediating obligation and a single_authority break must ` +
137
- `name the owning obligation, or there is nothing to re-check against the ledger.`,
138
- };
139
- }
140
- const designated = currentNodes.find((node) => node.id === designatedId);
141
- if (!designated) {
142
- return {
143
- accepted: false,
144
- reason: `The ${authored.strategy} break for cycle [${members.join(", ")}] names "${designatedId}", ` +
145
- `which is not an obligation in the ledger. The break must be recorded in the ledger the ` +
146
- `pipeline reads, not only in the resolution record.`,
147
- };
148
- }
149
- if (authored.strategy === "mediator" && cycleSet.has(designatedId)) {
150
- return {
151
- accepted: false,
152
- reason: `Mediator "${designatedId}" is itself a member of cycle [${members.join(", ")}]. A mediator ` +
153
- `is a THIRD obligation that both sides depend on; designating a participant is a ` +
154
- `single_authority break, not a mediator break.`,
155
- };
156
- }
157
- if (authored.strategy === "single_authority" && !cycleSet.has(designatedId)) {
158
- return {
159
- accepted: false,
160
- reason: `Single authority "${designatedId}" is not a member of cycle [${members.join(", ")}]. The ` +
161
- `authority must be one of the co-defining obligations; the others become consumers.`,
162
- };
163
- }
164
- // (3) The designated obligation must be a member of THE BROKEN CYCLE'S OWN
165
- // node set — the cycle members plus what they now need. Existing in the
166
- // ledger is not enough: a mediator that no cycle member depends on mediates
167
- // nothing, so an arbitrary unrelated obligation could otherwise be named and
168
- // the break would pass on the strength of a graph that is acyclic for
169
- // reasons having nothing to do with the claim.
170
- const brokenCycleNodeSet = new Set(members);
171
- for (const node of currentNodes) {
172
- if (!cycleSet.has(node.id))
173
- continue;
174
- for (const dep of node.needs)
175
- brokenCycleNodeSet.add(dep);
176
- }
177
- if (!brokenCycleNodeSet.has(designatedId)) {
178
- return {
179
- accepted: false,
180
- reason: `The ${authored.strategy} break names "${designatedId}", which no member of cycle ` +
181
- `[${members.join(", ")}] depends on. The designated obligation must be part of the broken ` +
182
- `cycle's own node set — a mediator no cycle member needs is not mediating the cycle.`,
183
- };
184
- }
185
- // (3b) BOTH SIDES, for the mediator strategy. Step (3) above accepts a
186
- // designated node that ANY single member needs, but the prompt this record
187
- // answers states the stronger requirement: "a THIRD obligation that both sides
188
- // depend on". A cycle of A ← B ← C (a two-sided cycle: A needs B, B needs C, C
189
- // needs A) designating C as the mediator passes (3) on A's single edge while
190
- // leaving B — one of the two sides the break is supposed to route through C —
191
- // still pointing at the cycle. The break would then be recorded as a mediated
192
- // resolution over a ledger whose edges the designated node does not mediate.
193
- //
194
- // The cycle is a real cycle, so "both sides" is answerable without guessing
195
- // WHICH two members are the sides: the requirement enforced here is that at
196
- // least TWO distinct cycle members depend on the designated node. For a
197
- // two-member cycle that is exactly both; for a longer cycle it is the
198
- // structural form of the same claim (a mediator one member uses is not shared,
199
- // which is the defect). `single_authority` is deliberately NOT held to this:
200
- // its own branch above already requires the designated node to BE a member,
201
- // and the prompt asks the others to become its consumers, not to share it.
202
- if (authored.strategy === "mediator") {
203
- const dependingMembers = currentNodes.filter((node) => cycleSet.has(node.id) && node.needs.includes(designatedId));
204
- if (dependingMembers.length < 2) {
205
- const named = dependingMembers.map((node) => node.id);
206
- return {
207
- accepted: false,
208
- reason: `Mediator "${designatedId}" is depended on by ` +
209
- `${named.length === 0 ? "no member" : `only [${named.join(", ")}]`} of cycle ` +
210
- `[${members.join(", ")}]. A mediator is a THIRD obligation that BOTH sides depend on; ` +
211
- `one member routing through it does not mediate the cycle, it re-points one edge. ` +
212
- `Rewrite the ledger so every side of the cycle depends on "${designatedId}".`,
213
- };
214
- }
215
- }
216
- // (4) The live edges, not the claim: any remaining cycle that still touches
217
- // the original members means the ledger was never actually rewritten.
218
- const allRemaining = detectCyclicSeamObligations(currentNodes);
219
- const remaining = allRemaining.filter((cycle) => cycle.members.some((id) => cycleSet.has(id)));
220
- if (remaining.length > 0) {
221
- const affectedIds = [...new Set(remaining.flatMap((c) => c.members))].join(", ");
222
- return {
223
- accepted: false,
224
- reason: `Cycle [${members.join(", ")}] is still present in the obligation ledger after the claimed ` +
225
- `${authored.strategy} break via "${designatedId}" — the depends_on edges involving ` +
226
- `[${affectedIds}] were not changed. Rewrite the ledger so the cycle's edges actually route ` +
227
- `through the designated obligation.`,
228
- };
229
- }
230
- // (5) SYMMETRIC across both strategies: the break must not have introduced a
231
- // cycle ELSEWHERE either. Step (4) only looks at cycles touching the original
232
- // members, so a brand-new cycle among untouched obligations would pass it —
233
- // and a single_authority break used to reach the accept with no whole-graph
234
- // check at all.
235
- if (allRemaining.length > 0) {
236
- const affectedIds = [...new Set(allRemaining.flatMap((c) => c.members))].join(", ");
237
- return {
238
- accepted: false,
239
- reason: `The ${authored.strategy} break via "${designatedId}" leaves the obligation graph cyclic ` +
240
- `elsewhere: [${affectedIds}]. Breaking one cycle may not introduce another.`,
241
- };
242
- }
243
- // (6) The mediator's REAL needs — the check the fabricated `needs: []` node
244
- // could never fail. Deliberately NOT run for single_authority: that strategy
245
- // designates a cycle MEMBER, and `validateCycleBreak` redirects a member's
246
- // intra-cycle edges at the designated node, which for the authority itself
247
- // would manufacture a self-edge and reject a sound break. Step (5) is the
248
- // whole-graph guarantee both strategies share.
249
- if (authored.strategy === "mediator") {
250
- return validateCycleBreak(originalCycle, currentNodes, {
251
- id: designated.id,
252
- needs: designated.needs,
253
- });
254
- }
255
- return { accepted: true };
256
- }
257
- //# sourceMappingURL=cyclicSeamResolution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cyclicSeamResolution.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/cyclicSeamResolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAsD1D,iFAAiF;AAEjF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,2BAA2B,CACzC,KAA2B;IAE3B,MAAM,UAAU,GAAG,oBAAoB,CACrC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAC9D,EAAE,gBAAgB,EAAE,IAAI,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,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpF,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,MAAM,EACJ,OAAO,QAAQ,CAAC,QAAQ,eAAe,YAAY,uCAAuC;gBAC1F,eAAe,WAAW,kDAAkD;SAC/E,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,2EAA2E;IAC3E,0EAA0E;IAC1E,+CAA+C;IAC/C,IAAI,QAAQ,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QACrC,OAAO,kBAAkB,CAAC,aAAa,EAAE,YAAY,EAAE;YACrD,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,KAAK,EAAE,UAAU,CAAC,KAAK;SACxB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAC"}
@@ -1,173 +0,0 @@
1
- /**
2
- * Deterministic derivers for contract-pipeline artifacts.
3
- *
4
- * S1 of the contract-authoring determinism design
5
- * (`spec/contract-authoring-determinism-design.md`): the contract pipeline
6
- * historically had the LLM author every structured artifact and the backend
7
- * only validate it afterward. For the artifacts whose *structure* is a pure
8
- * function of an upstream artifact, that is wasted generation and a weak-model
9
- * failure surface ("emit a large, schema-conforming, internally-consistent JSON
10
- * artifact from scratch with correct ids and cross-refs"). This module owns
11
- * those derivations so the tool produces the structure and the model is left
12
- * only the irreducible judgment.
13
- *
14
- * `deriveObligationLedger` is the flagship: the obligation ledger is a 1:1
15
- * restructuring of the finalized module contracts — every module invariant and
16
- * failure mode becomes an obligation, and every module gets a
17
- * contract-conformance obligation — so no judgment is lost by generating it in
18
- * code. Construction goes through the shared `buildObligationLedger` so the
19
- * cycle check, version stamp, and envelope stay single-sourced with the rest of
20
- * the codebase (the non-negotiable "derivers and validators share one source —
21
- * no parallel logic").
22
- */
23
- import { type ObligationLedger } from "audit-tools/shared";
24
- import { isTestablePhaseObligation } from "../validation/contractPipelineGates.js";
25
- /** Options accepted by the derivers (created_at injected for deterministic tests). */
26
- export interface DeriveOptions {
27
- /** Overrides the generated ISO-8601 timestamp (for deterministic snapshots). */
28
- created_at?: string;
29
- }
30
- /**
31
- * Derive the obligation ledger deterministically from the finalized module
32
- * contracts. Pure function of its input (modulo the `created_at` stamp): the
33
- * same contracts always yield the same obligations in the same order, so the
34
- * artifact hash / staleness DAG stays well-behaved.
35
- *
36
- * Mapping (the inverse of the obligation-ledger consumers' expectations):
37
- * - one **structural** obligation per module ("implement this module per its
38
- * finalized contract") — guarantees the ledger is never empty and every
39
- * module has something the implementation DAG must cover, without inventing
40
- * a paired-test burden (structural is not a testable kind);
41
- * - one **invariant** obligation per declared module invariant (testable);
42
- * - one **behavioral** obligation per declared module failure mode (testable).
43
- *
44
- * `depends_on` is left empty: the validated module-contract shape declares no
45
- * inter-obligation ordering, so an honest derivation asserts none (and the
46
- * ledger is acyclic by construction — `buildObligationLedger` cannot throw).
47
- */
48
- export declare function deriveObligationLedger(finalizedModuleContracts: unknown, options?: DeriveOptions): ObligationLedger;
49
- export declare function deriveFinalizedModuleContracts(draftedModuleContracts: unknown, seamReconciliationReport: unknown, options?: DeriveOptions): {
50
- contract_version: string;
51
- goal_id: string;
52
- module_contracts: unknown[];
53
- created_at: string;
54
- };
55
- /**
56
- * Shared obligation-membership predicates — the single source for which
57
- * obligations each downstream scaffold covers.
58
- *
59
- * `isTestablePhaseObligation` (imported above) is now single-sourced in
60
- * `../validation/contractPipelineGates.ts` (MNT-e10b9d9b: this file's former
61
- * local TESTABLE_KINDS set and that file's TESTABLE_OBLIGATION_KINDS were
62
- * "kept in parity by hand" and had already diverged — fail-open here,
63
- * fail-closed there, on an identical unrecognized-kind input). Re-exported
64
- * here so every existing importer of derive.js keeps working unchanged.
65
- *
66
- * `isDagPhaseObligation`: every obligation is covered by the implementation DAG,
67
- * so this is always true. It exists so both scaffolds derive their membership
68
- * from a named predicate rather than an inline ad-hoc filter.
69
- */
70
- export { isTestablePhaseObligation };
71
- export declare function isDagPhaseObligation(_kind: string): boolean;
72
- export interface TestValidatorPlanScaffold {
73
- test_specs: Array<{
74
- obligation_id: string;
75
- name: string;
76
- kind: string;
77
- /**
78
- * The change's scope anchors (touched symbols / file) the negative assertion
79
- * must name to pass the CE-006 negative-scoping gate. Derived here so the
80
- * host sees them IN the skeleton instead of discovering them only after a
81
- * write is rejected (D1). Advisory context — the host reads them, the gate
82
- * enforces them; an empty array means no change-scope constraint applies.
83
- */
84
- scope_anchors: string[];
85
- assertions: string[];
86
- }>;
87
- }
88
- /**
89
- * A prior round's authored test spec, keyed by obligation_id, used to diff-carry
90
- * unchanged assertions across a re-emit (C3). Carries the identity signals
91
- * (`name` + `scope_anchors`) the carry decision is gated on plus the assertions.
92
- */
93
- export interface PriorTestSpec {
94
- name: string;
95
- scope_anchors: string[];
96
- assertions: string[];
97
- }
98
- /**
99
- * Build the test-plan skeleton: one spec per *testable* (invariant/behavioral)
100
- * obligation, with `obligation_id`/`name`/`kind`/`scope_anchors` filled and
101
- * `assertions` left blank for the model. The model fills only the assertions
102
- * (each spec needs a paired positive + negative assertion per the OBL-CO-01
103
- * gate, and the negative must name one of `scope_anchors` per CE-006).
104
- *
105
- * C3 diff-carry: when `priorByObligation` carries a prior round's authored spec
106
- * for an obligation whose premise is UNCHANGED (same `name` + same
107
- * `scope_anchors`), its assertions are pre-filled instead of left blank, so an
108
- * unchanged obligation is not re-authored from scratch every repair round. A
109
- * changed premise (renamed/re-scoped obligation) carries nothing — the host
110
- * re-authors it (fail-safe toward re-author, never toward stale carry).
111
- */
112
- export declare function buildTestValidatorPlanScaffold(ledger: ObligationLedger | undefined, priorByObligation?: Record<string, PriorTestSpec>): TestValidatorPlanScaffold;
113
- export interface ImplementationDagScaffoldNode {
114
- id: string;
115
- title: string;
116
- description: string;
117
- satisfies_obligations: string[];
118
- addresses_counterexamples: string[];
119
- /**
120
- * Advisory conceptual-critique item ids this node addresses (B3). The
121
- * conceptual-design critique's `advisory`-severity items have no obligation or
122
- * counterexample to attach to, so without a structural slot the host smuggles
123
- * them into prose or test assertions. This carrier gives each one a first-class
124
- * home: the host records which advisory items a node's implementation honours.
125
- * Blank in the skeleton (the host fills it); advisory, so it is not gated.
126
- */
127
- addressed_critique_items: string[];
128
- depends_on: string[];
129
- verification_obligation_ids: string[];
130
- targeted_commands: string[];
131
- status: string;
132
- }
133
- /** An advisory conceptual-critique item the host should account for in the DAG. */
134
- export interface AdvisoryCritiqueItem {
135
- id: string;
136
- description: string;
137
- }
138
- /**
139
- * Advisory-severity items from a conceptual_design_critique payload (defensive
140
- * read). Blocking items drive the design-repair loop and are consumed there;
141
- * advisory items survive past the critique gate and need a structural home in
142
- * the implementation DAG — this surfaces them so the skeleton can list them (B3).
143
- */
144
- export declare function advisoryCritiqueItems(critique: unknown): AdvisoryCritiqueItem[];
145
- export interface ImplementationDagScaffold {
146
- nodes: ImplementationDagScaffoldNode[];
147
- edges: never[];
148
- }
149
- /** Accepted counterexample ids from a judge_report payload (defensive read). */
150
- export declare function acceptedCounterexampleIds(judgeReport: unknown): string[];
151
- /**
152
- * Build the implementation-DAG skeleton: ONE node per finalized *module*
153
- * (grouping all that module's obligations), blank title/description/
154
- * targeted_commands for the model, and accepted counterexamples attached so
155
- * coverage holds by construction. Grouping by module means a 1-module change
156
- * derives 1 node instead of N obligation-nodes the host then has to merge (B2);
157
- * obligations with no module home (counterexample/critique-sourced) fall back
158
- * to one node each. Advisory: the model fills the blanks and may further
159
- * merge/split nodes as long as coverage is preserved.
160
- *
161
- * `depends_on` is DERIVED, not left for the host: when `finalizedContracts` is
162
- * supplied, each module node depends on the nodes of the modules it needs first
163
- * (producer/consumer `artifact:<name>` matching over `inputs`/`outputs` — the
164
- * same module-dependency DAG `phase_cut` uses). This
165
- * makes cross-node ordering tool-enforced instead of a thing the host must
166
- * remember to hand-add. Edges are oriented by phase ordinal so the result is
167
- * acyclic by construction: only an edge to a strictly-earlier-phase module is
168
- * kept, which drops the back-edge of any dependency cycle (fail-toward-later,
169
- * mirroring `derivePhaseCut`). The `edges` array stays empty — node `depends_on`
170
- * is the ordering the block promotion reads.
171
- */
172
- export declare function buildImplementationDagScaffold(ledger: ObligationLedger | undefined, acceptedCeIds: string[], finalizedContracts?: unknown): ImplementationDagScaffold;
173
- //# sourceMappingURL=derive.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/derive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAe5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAOnF,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,wBAAwB,EAAE,OAAO,EACjC,OAAO,GAAE,aAAkB,GAC1B,gBAAgB,CA6DlB;AAiFD,wBAAgB,8BAA8B,CAC5C,sBAAsB,EAAE,OAAO,EAC/B,wBAAwB,EAAE,OAAO,EACjC,OAAO,GAAE,aAAkB,GAC1B;IACD,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB,CAsCA;AAaD;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE3D;AASD,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,KAAK,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb;;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