audit-tools 0.45.0 → 0.48.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 (288) hide show
  1. package/README.md +51 -18
  2. package/dispatch/merge-results.mjs +3 -3
  3. package/dispatch/validate-result.mjs +3 -3
  4. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  5. package/dist/audit/cli/charterExtractionPrompt.js +11 -1
  6. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  7. package/dist/audit/cli/cleanupCommand.d.ts +25 -0
  8. package/dist/audit/cli/cleanupCommand.d.ts.map +1 -1
  9. package/dist/audit/cli/cleanupCommand.js +76 -1
  10. package/dist/audit/cli/cleanupCommand.js.map +1 -1
  11. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  12. package/dist/audit/cli/dispatch/hostHandoff.js +52 -76
  13. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  14. package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
  15. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  16. package/dist/audit/cli/fanoutLanes.js +6 -1
  17. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  18. package/dist/audit/cli/laneSubmissions.d.ts +13 -0
  19. package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
  20. package/dist/audit/cli/laneSubmissions.js +38 -27
  21. package/dist/audit/cli/laneSubmissions.js.map +1 -1
  22. package/dist/audit/cli/nextStepCommand.d.ts +12 -0
  23. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  24. package/dist/audit/cli/nextStepCommand.js +23 -12
  25. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  26. package/dist/audit/cli/nextStepHelpers.d.ts +3 -2
  27. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  28. package/dist/audit/cli/nextStepHelpers.js +65 -37
  29. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  30. package/dist/audit/cli/reviewRun.d.ts +1 -1
  31. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  32. package/dist/audit/cli/reviewRun.js +2 -9
  33. package/dist/audit/cli/reviewRun.js.map +1 -1
  34. package/dist/audit/cli/sampleRunCommand.d.ts +215 -0
  35. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  36. package/dist/audit/cli/sampleRunCommand.js +60 -3
  37. package/dist/audit/cli/sampleRunCommand.js.map +1 -1
  38. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  39. package/dist/audit/cli/semanticReviewStep.js +9 -1
  40. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  41. package/dist/audit/cli/steps.d.ts +6 -6
  42. package/dist/audit/contracts/workerSchemas.d.ts +36 -26
  43. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  44. package/dist/audit/contracts/workerSchemas.js +11 -1
  45. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  46. package/dist/audit/contracts/wrapperResponse.d.ts +52 -28
  47. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  48. package/dist/audit/contracts/wrapperResponse.js +8 -5
  49. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  50. package/dist/audit/decompose/sources.d.ts.map +1 -1
  51. package/dist/audit/decompose/sources.js +21 -5
  52. package/dist/audit/decompose/sources.js.map +1 -1
  53. package/dist/audit/extractors/analyzers/registry.d.ts +8 -5
  54. package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -1
  55. package/dist/audit/extractors/analyzers/registry.js +28 -7
  56. package/dist/audit/extractors/analyzers/registry.js.map +1 -1
  57. package/dist/audit/extractors/designAssessment.js +1 -1
  58. package/dist/audit/extractors/gitHistory.d.ts +1 -1
  59. package/dist/audit/extractors/gitHistory.js +1 -1
  60. package/dist/audit/extractors/graph.d.ts +1 -1
  61. package/dist/audit/extractors/graph.js +1 -1
  62. package/dist/audit/extractors/risk.d.ts +1 -1
  63. package/dist/audit/extractors/risk.js +1 -1
  64. package/dist/audit/io/artifacts.d.ts.map +1 -1
  65. package/dist/audit/io/artifacts.js +5 -5
  66. package/dist/audit/io/artifacts.js.map +1 -1
  67. package/dist/audit/orchestrator/acquisitionExecutor.d.ts +12 -7
  68. package/dist/audit/orchestrator/acquisitionExecutor.d.ts.map +1 -1
  69. package/dist/audit/orchestrator/acquisitionExecutor.js +1 -1
  70. package/dist/audit/orchestrator/acquisitionExecutor.js.map +1 -1
  71. package/dist/audit/orchestrator/advance.d.ts +14 -10
  72. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  73. package/dist/audit/orchestrator/advance.js +49 -24
  74. package/dist/audit/orchestrator/advance.js.map +1 -1
  75. package/dist/audit/orchestrator/advanceTypes.d.ts +14 -0
  76. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  77. package/dist/audit/orchestrator/autoFixExecutor.d.ts +20 -1
  78. package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
  79. package/dist/audit/orchestrator/autoFixExecutor.js +77 -15
  80. package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
  81. package/dist/audit/orchestrator/dependencyMap.js +1 -1
  82. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  83. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  84. package/dist/audit/orchestrator/designReviewPrompt.js +7 -0
  85. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  86. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  87. package/dist/audit/orchestrator/executorRunners.js +18 -4
  88. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  89. package/dist/audit/orchestrator/executors.d.ts +54 -0
  90. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  91. package/dist/audit/orchestrator/executors.js +352 -0
  92. package/dist/audit/orchestrator/executors.js.map +1 -1
  93. package/dist/audit/orchestrator/hostInputPause.d.ts +28 -13
  94. package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -1
  95. package/dist/audit/orchestrator/hostInputPause.js +17 -11
  96. package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
  97. package/dist/audit/orchestrator/intentInterpreter.d.ts +15 -18
  98. package/dist/audit/orchestrator/intentInterpreter.d.ts.map +1 -1
  99. package/dist/audit/orchestrator/intentInterpreter.js +12 -26
  100. package/dist/audit/orchestrator/intentInterpreter.js.map +1 -1
  101. package/dist/audit/orchestrator/localCommands.d.ts +24 -1
  102. package/dist/audit/orchestrator/localCommands.d.ts.map +1 -1
  103. package/dist/audit/orchestrator/localCommands.js +44 -9
  104. package/dist/audit/orchestrator/localCommands.js.map +1 -1
  105. package/dist/audit/orchestrator/nextStep.d.ts +13 -0
  106. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  107. package/dist/audit/orchestrator/nextStep.js +13 -0
  108. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  109. package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
  110. package/dist/audit/orchestrator/runtimeCommand.d.ts +32 -1
  111. package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
  112. package/dist/audit/orchestrator/runtimeCommand.js +90 -3
  113. package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
  114. package/dist/audit/orchestrator/structureExecutors.js +1 -1
  115. package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
  116. package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts +11 -1
  117. package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
  118. package/dist/audit/orchestrator/syntaxResolutionExecutor.js +25 -9
  119. package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
  120. package/dist/audit/supervisor/operatorHandoff.d.ts +0 -1
  121. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  122. package/dist/audit/supervisor/operatorHandoff.js +2 -1
  123. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  124. package/dist/audit/types.d.ts +18 -18
  125. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  126. package/dist/remediate/contractPipeline/derive.js +1 -0
  127. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  128. package/dist/remediate/contractPipeline/semanticProjection.d.ts +5 -4
  129. package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
  130. package/dist/remediate/contractPipeline/semanticProjection.js +34 -19
  131. package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
  132. package/dist/remediate/index.d.ts.map +1 -1
  133. package/dist/remediate/index.js +3 -2
  134. package/dist/remediate/index.js.map +1 -1
  135. package/dist/remediate/intake.js +1 -1
  136. package/dist/remediate/intake.js.map +1 -1
  137. package/dist/remediate/phases/close.d.ts +45 -2
  138. package/dist/remediate/phases/close.d.ts.map +1 -1
  139. package/dist/remediate/phases/close.js +111 -43
  140. package/dist/remediate/phases/close.js.map +1 -1
  141. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +2 -2
  142. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  143. package/dist/remediate/phases/triage.d.ts.map +1 -1
  144. package/dist/remediate/phases/triage.js +61 -19
  145. package/dist/remediate/phases/triage.js.map +1 -1
  146. package/dist/remediate/review/autonomousGate.d.ts +3 -7
  147. package/dist/remediate/review/autonomousGate.d.ts.map +1 -1
  148. package/dist/remediate/review/autonomousGate.js +10 -24
  149. package/dist/remediate/review/autonomousGate.js.map +1 -1
  150. package/dist/remediate/riskSignal.d.ts +8 -20
  151. package/dist/remediate/riskSignal.d.ts.map +1 -1
  152. package/dist/remediate/riskSignal.js +21 -76
  153. package/dist/remediate/riskSignal.js.map +1 -1
  154. package/dist/remediate/state/accessMemory.d.ts +2 -3
  155. package/dist/remediate/state/accessMemory.d.ts.map +1 -1
  156. package/dist/remediate/state/accessMemory.js +3 -6
  157. package/dist/remediate/state/accessMemory.js.map +1 -1
  158. package/dist/remediate/state/store.d.ts +6 -7
  159. package/dist/remediate/state/store.d.ts.map +1 -1
  160. package/dist/remediate/state/store.js.map +1 -1
  161. package/dist/remediate/state/types.d.ts +2 -84
  162. package/dist/remediate/state/types.d.ts.map +1 -1
  163. package/dist/remediate/state/types.js +1 -39
  164. package/dist/remediate/state/types.js.map +1 -1
  165. package/dist/remediate/steps/contractPipeline.d.ts +13 -19
  166. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  167. package/dist/remediate/steps/contractPipeline.js +157 -66
  168. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  169. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +1 -1
  170. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  171. package/dist/remediate/steps/dispatch/hostHandoff.js +297 -141
  172. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  173. package/dist/remediate/steps/nextStep.d.ts +16 -7
  174. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  175. package/dist/remediate/steps/nextStep.js +207 -216
  176. package/dist/remediate/steps/nextStep.js.map +1 -1
  177. package/dist/remediate/steps/stepUtils.d.ts +10 -2
  178. package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
  179. package/dist/remediate/steps/stepUtils.js +13 -3
  180. package/dist/remediate/steps/stepUtils.js.map +1 -1
  181. package/dist/remediate/steps/types.d.ts +1 -1
  182. package/dist/remediate/steps/types.d.ts.map +1 -1
  183. package/dist/remediate/steps/types.js.map +1 -1
  184. package/dist/remediate/types/options.d.ts +1 -1
  185. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  186. package/dist/remediate/validation/artifacts.js +1 -16
  187. package/dist/remediate/validation/artifacts.js.map +1 -1
  188. package/dist/remediate/validation/remediationState.d.ts +0 -1
  189. package/dist/remediate/validation/remediationState.d.ts.map +1 -1
  190. package/dist/remediate/validation/remediationState.js +0 -51
  191. package/dist/remediate/validation/remediationState.js.map +1 -1
  192. package/dist/shared/analyzerPolicy.d.ts +18 -6
  193. package/dist/shared/analyzerPolicy.d.ts.map +1 -1
  194. package/dist/shared/analyzerPolicy.js +15 -3
  195. package/dist/shared/analyzerPolicy.js.map +1 -1
  196. package/dist/shared/analyzers/acquisitionEngine.d.ts +71 -32
  197. package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
  198. package/dist/shared/analyzers/acquisitionEngine.js +86 -28
  199. package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
  200. package/dist/shared/analyzers/binaryAcquisition.d.ts +8 -2
  201. package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
  202. package/dist/shared/analyzers/binaryAcquisition.js +4 -4
  203. package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
  204. package/dist/shared/constitutionalDocPaths.d.ts.map +1 -1
  205. package/dist/shared/constitutionalDocPaths.js +7 -0
  206. package/dist/shared/constitutionalDocPaths.js.map +1 -1
  207. package/dist/shared/engine/obligationEngine.d.ts +44 -3
  208. package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
  209. package/dist/shared/engine/obligationEngine.js +53 -7
  210. package/dist/shared/engine/obligationEngine.js.map +1 -1
  211. package/dist/shared/findings/dedupe.d.ts.map +1 -1
  212. package/dist/shared/findings/dedupe.js +8 -0
  213. package/dist/shared/findings/dedupe.js.map +1 -1
  214. package/dist/shared/friction/frictionRecord.d.ts +42 -2
  215. package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
  216. package/dist/shared/friction/frictionRecord.js +111 -3
  217. package/dist/shared/friction/frictionRecord.js.map +1 -1
  218. package/dist/shared/friction/triage.d.ts +15 -0
  219. package/dist/shared/friction/triage.d.ts.map +1 -1
  220. package/dist/shared/friction/triage.js +33 -2
  221. package/dist/shared/friction/triage.js.map +1 -1
  222. package/dist/shared/index.d.ts +15 -9
  223. package/dist/shared/index.d.ts.map +1 -1
  224. package/dist/shared/index.js +15 -7
  225. package/dist/shared/index.js.map +1 -1
  226. package/dist/shared/intent/constraintClauses.d.ts +31 -0
  227. package/dist/shared/intent/constraintClauses.d.ts.map +1 -0
  228. package/dist/shared/intent/constraintClauses.js +37 -0
  229. package/dist/shared/intent/constraintClauses.js.map +1 -0
  230. package/dist/shared/io/fileLock.d.ts.map +1 -1
  231. package/dist/shared/io/fileLock.js +22 -3
  232. package/dist/shared/io/fileLock.js.map +1 -1
  233. package/dist/shared/io/frictionCapture.d.ts +73 -19
  234. package/dist/shared/io/frictionCapture.d.ts.map +1 -1
  235. package/dist/shared/io/frictionCapture.js +21 -30
  236. package/dist/shared/io/frictionCapture.js.map +1 -1
  237. package/dist/shared/io/lockedJsonStore.d.ts +24 -3
  238. package/dist/shared/io/lockedJsonStore.d.ts.map +1 -1
  239. package/dist/shared/io/lockedJsonStore.js +35 -7
  240. package/dist/shared/io/lockedJsonStore.js.map +1 -1
  241. package/dist/shared/io/stepContractWriter.d.ts +3 -3
  242. package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
  243. package/dist/shared/io/stepContractWriter.js +97 -13
  244. package/dist/shared/io/stepContractWriter.js.map +1 -1
  245. package/dist/shared/submission/expectedSubmissions.d.ts +18 -0
  246. package/dist/shared/submission/expectedSubmissions.d.ts.map +1 -1
  247. package/dist/shared/submission/expectedSubmissions.js +17 -0
  248. package/dist/shared/submission/expectedSubmissions.js.map +1 -1
  249. package/dist/shared/submission/handRecovery.d.ts.map +1 -1
  250. package/dist/shared/submission/handRecovery.js +9 -11
  251. package/dist/shared/submission/handRecovery.js.map +1 -1
  252. package/dist/shared/submission/hostHandoffCore.d.ts +155 -0
  253. package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -0
  254. package/dist/shared/submission/hostHandoffCore.js +210 -0
  255. package/dist/shared/submission/hostHandoffCore.js.map +1 -0
  256. package/dist/shared/submission/submissionLedger.d.ts +5 -1
  257. package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
  258. package/dist/shared/submission/submissionLedger.js +33 -3
  259. package/dist/shared/submission/submissionLedger.js.map +1 -1
  260. package/dist/shared/tooling/commandShape.d.ts +29 -0
  261. package/dist/shared/tooling/commandShape.d.ts.map +1 -1
  262. package/dist/shared/tooling/commandShape.js +82 -10
  263. package/dist/shared/tooling/commandShape.js.map +1 -1
  264. package/dist/shared/tooling/exec.d.ts +32 -0
  265. package/dist/shared/tooling/exec.d.ts.map +1 -1
  266. package/dist/shared/tooling/exec.js +189 -0
  267. package/dist/shared/tooling/exec.js.map +1 -1
  268. package/docs/audit-pkg/contracts.md +2 -1
  269. package/docs/audit-pkg/operator-guide.md +12 -6
  270. package/docs/audit-pkg/product.md +22 -6
  271. package/package.json +13 -6
  272. package/schemas/audit-code-v1alpha1.schema.json +297 -0
  273. package/schemas/audit_result.schema.json +4 -0
  274. package/schemas/audit_results.schema.json +4 -0
  275. package/scripts/audit/postinstall.mjs +4 -2
  276. package/scripts/postinstall.mjs +1 -1
  277. package/scripts/remediate/postinstall.mjs +3 -1
  278. package/scripts/shared/install-host-assets.mjs +15 -8
  279. package/skills/audit-code/SKILL.md +4 -2
  280. package/skills/audit-code/audit-code.prompt.md +5 -2
  281. package/skills/audit-code/opencode-command-template.txt +1 -1
  282. package/wrapper/audit-code-wrapper-build.mjs +3 -3
  283. package/wrapper/audit-code-wrapper-install-hosts.mjs +3 -3
  284. package/wrapper/audit-code-wrapper-lib.mjs +82 -16
  285. package/wrapper/installer-verb-help.mjs +14 -4
  286. package/wrapper/remediate-code-wrapper-install-hosts.mjs +3 -3
  287. package/docs/audit-pkg/development.md +0 -113
  288. package/docs/audit-pkg/release.md +0 -140
@@ -1,7 +1,6 @@
1
1
  import { type ValidationIssue, type JudgeReport, type WorkBlock, type WorkBlockSeam } from "audit-tools/shared";
2
2
  import { readIntakeRiskSignal, type AdversarialDepth } from "../riskSignal.js";
3
3
  import { type ContractPipelineCrossGateInputs, type GateOutcome } from "../validation/contractPipelineGates.js";
4
- import type { Finding } from "audit-tools/shared";
5
4
  import type { ContractPipelineArtifactName } from "../contractPipeline/artifactStore.js";
6
5
  import type { RemediationStep } from "./types.js";
7
6
  import { intakePaths } from "../intake.js";
@@ -496,6 +495,19 @@ export declare function normalizeBlockTargetedCommands(commands: readonly string
496
495
  * rather than as a thrown stack that wedges every subsequent next-step.
497
496
  */
498
497
  export declare function collectDagWriteScopeRefusals(artifactsDir: string, root: string): Promise<string[]>;
498
+ /**
499
+ * Path-A canonical-block membership validation, run BEFORE anything is promoted
500
+ * (OBL-seam-prep-remediate-core-inv-2 / COR-114e4941). These are exactly the
501
+ * checks the promoter itself performs while building its node→canonical-group
502
+ * map — but there they THROW out of `promoteImplementationDagToExtractedPlan`,
503
+ * an unclassified stack that wedged every subsequent next-step. Hoisted here so
504
+ * an invalid `source_finding_ids` declaration takes the same bounded re-emit as
505
+ * every other promotion rejection, with no gate having executed past it.
506
+ *
507
+ * Returns one line per violation; empty means the DAG is promotable on this
508
+ * axis (or Path A is not in play at all).
509
+ */
510
+ export declare function collectPathARefusals(artifactsDir: string): Promise<string[]>;
499
511
  /**
500
512
  * Convert a completed ImplementationDAG into the extracted-plan.json format
501
513
  * that the existing handlePendingExtractedPlan/applyPlanPipeline path consumes.
@@ -549,23 +561,5 @@ export interface ContractPipelinePlanningOutputs {
549
561
  * promoted yet.
550
562
  */
551
563
  export declare function readContractPipelinePlanningOutputs(artifactsDir: string): Promise<ContractPipelinePlanningOutputs | null>;
552
- /** Source tag stamped on a lean-fast-path extracted plan (distinguishes it from `contract_pipeline`). */
553
- export declare const LEAN_FAST_PATH_SOURCE = "lean_fast_path";
554
- /** The minimal `extracted-plan.json` shape the lean path emits. */
555
- export interface LeanExtractedPlan {
556
- plan_id: string;
557
- findings: Finding[];
558
- project_type: string;
559
- source: typeof LEAN_FAST_PATH_SOURCE;
560
- candidate_closing_actions: string[];
561
- }
562
- /**
563
- * Build the lean extracted plan from the approved findings. Blocks are
564
- * intentionally omitted: `normalizeExtractedPlan` synthesizes one block per
565
- * finding and `applyPlanPipeline` then merges blocks sharing a file + splits by
566
- * context budget — the same deterministic block derivation the contract pipeline
567
- * feeds into, single-sourced rather than reimplemented here.
568
- */
569
- export declare function buildLeanExtractedPlan(findings: Finding[], planId: string): LeanExtractedPlan;
570
564
  export {};
571
565
  //# sourceMappingURL=contractPipeline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contractPipeline.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/contractPipeline.ts"],"names":[],"mappings":"AAwBA,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,WAAW,EAIhB,KAAK,SAAS,EACd,KAAK,aAAa,EAQnB,MAAM,oBAAoB,CAAC;AAuB5B,OAAO,EACL,oBAAoB,EAKpB,KAAK,gBAAgB,EAEtB,MAAM,kBAAkB,CAAC;AAyD1B,OAAO,EAML,KAAK,+BAA+B,EACpC,KAAK,WAAW,EACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAGzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA2C3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AAuErD,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,oEAAoE,CAAC;IACrF;;;;;OAKG;IACH,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,EAAE,EAAE,MAAM,CAAC;QACX,cAAc,EAAE,OAAO,CAAC;QACxB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,EAAE,CAAC;IACJ,qDAAqD;IACrD,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAMD,wBAAsB,yBAAyB,CAC7C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAWhC;AAED,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,qBAAqB,G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P_KIND = "contract_pipeline";
64
64
  const PRE_IMPLEMENTATION_PHASE_ORDER = CONTRACT_PIPELINE_PHASE_ORDER.filter((phase) => phase !== "closing");
65
65
  /**
66
- * Granularity collapse group (T1 slice 4b). The framing phases goal, context,
67
- * decomposition are ONE coherent act of authoring (scope the change top-down):
68
- * they carry no adversarial judgment and no deterministic derivation interleaves
69
- * them, so for low-complexity work they fold into a single round-trip producing
70
- * all three artifacts instead of three gated steps. The group deliberately STOPS
71
- * at decomposition (before module_contract_drafting): keeping the decomposition→
72
- * drafting boundary lets the slice-4a escalate-on-evidence intercept inspect the
73
- * fresh decomposition and raise the tier — un-collapsing every remaining phase —
74
- * before any contract is drafted or the per-module wave fans out. Collapse is
66
+ * Granularity collapse GROUPS (T1 slice 4b). Each group is a run of CONSECUTIVE
67
+ * phases that folds into ONE round-trip at the `collapsed` granularity i.e.
68
+ * only at the `low` tier (see `roundTripGranularityForTier`). Collapse is
75
69
  * best-effort: any member artifact the worker omits or writes malformed is
76
70
  * re-emitted as its own fine-grained step by `nextMissingContractPhase`, so no
77
- * work is ever lost. See `roundTripGranularityForTier`.
78
- */
79
- const FRAMING_COLLAPSE_GROUP = [
80
- "goal_normalization",
81
- "context_collection",
82
- "decomposition",
71
+ * work is ever lost.
72
+ *
73
+ * These are the ONLY two safe groups, and the gaps between them are not
74
+ * oversights — each is a property worth more than the round-trip it would save.
75
+ * The full per-phase map is `docs/reviews/low-tier-phase-cost-2026-08-25.md`;
76
+ * the boundaries that matter here:
77
+ *
78
+ * - The framing group STOPS at `decomposition`. Keeping the decomposition→
79
+ * drafting boundary lets the slice-4a escalate-on-evidence intercept read
80
+ * the fresh decomposition and raise the tier — un-collapsing everything
81
+ * after it — before any contract is drafted or the module wave fans out.
82
+ * - `critique`, `critic` and `judge` are independent-adversary phases and can
83
+ * never join a group with what they review. Collapsing critic+judge is the
84
+ * sharpest case: the judge verdict is the SOLE admission to implementation
85
+ * planning, so one worker emitting both artifacts could write zero
86
+ * counterexamples plus `approved` and let the loop certify its own exit.
87
+ * - `implementation_planning` is the phase `judgeRepairGate` protects, and its
88
+ * scaffold is built from the judge's accepted counterexamples, which do not
89
+ * exist at judge-render time.
90
+ *
91
+ * A collapsed section carries exactly what its fine-grained step would have
92
+ * carried — see `collapsedSectionExtra`.
93
+ */
94
+ const COLLAPSE_GROUPS = [
95
+ // Framing: scope the change top-down. One coherent authoring act, no
96
+ // adversarial judgment, no deterministic derivation interleaved.
97
+ ["goal_normalization", "context_collection", "decomposition"],
98
+ // Authoring tail: the test/validator plan and the author's OWN coverage
99
+ // self-assessment. `assessment` is deliberately not an independent-critic
100
+ // phase, and `contract_assessment_report` already depends on
101
+ // `test_validator_plan` — the same later-reads-earlier shape the framing
102
+ // group relies on. The critic reviews both afterwards, unchanged.
103
+ ["test_validator_plan", "assessment"],
83
104
  ];
84
105
  // ── Bounded-loop caps ─────────────────────────────────────────────────────────
85
106
  /**
@@ -1297,8 +1318,25 @@ function writeContractBlockedStep(ctx, params) {
1297
1318
  * overrides the per-section "stop after writing" lines so they are not read as
1298
1319
  * three separate stop points.
1299
1320
  */
1300
- function writeCollapsedFramingStep(ctx, phases) {
1301
- const sections = phases.map((phase) => ({
1321
+ /**
1322
+ * The extra section a collapsed member carries, mirroring the gate that would
1323
+ * have claimed that phase on its own — so collapsing changes the number of
1324
+ * round-trips and nothing else about what the worker is told.
1325
+ *
1326
+ * This is load-bearing, not tidiness. `collapsedRoundTripGate` is registered
1327
+ * BEFORE `scaffoldedPhaseGate`, so without this a group containing
1328
+ * `test_validator_plan` would silently drop the S3 skeleton the worker is
1329
+ * supposed to fill in, and the collapse would quietly make that phase HARDER
1330
+ * rather than cheaper.
1331
+ */
1332
+ async function collapsedSectionExtra(phase, artifactsDir) {
1333
+ if (phase === "test_validator_plan" || phase === "implementation_planning") {
1334
+ return await buildScaffoldSection(phase, artifactsDir);
1335
+ }
1336
+ return await buildReReviewSection(phase, artifactsDir);
1337
+ }
1338
+ async function writeCollapsedRoundTripStep(ctx, phases) {
1339
+ const sections = await Promise.all(phases.map(async (phase) => ({
1302
1340
  phase,
1303
1341
  rendered: renderContractPipelinePrompt({
1304
1342
  role: phase,
@@ -1308,7 +1346,8 @@ function writeCollapsedFramingStep(ctx, phases) {
1308
1346
  pathASeedPath: ctx.pathASeedPath,
1309
1347
  adversarialDepth: ctx.adversarialDepth,
1310
1348
  }),
1311
- }));
1349
+ extra: await collapsedSectionExtra(phase, ctx.artifactsDir),
1350
+ })));
1312
1351
  const outputPaths = sections.map((s) => s.rendered.outputPath);
1313
1352
  const header = `# Collapsed Authoring Round-Trip — ${phases.length} Phases
1314
1353
 
@@ -1320,11 +1359,13 @@ If you cannot complete a section (an artifact would be malformed), write the one
1320
1359
 
1321
1360
  Artifacts to produce (in order):
1322
1361
  ${outputPaths.map((p, i) => `${i + 1}. \`${p}\` (${phases[i]})`).join("\n")}`;
1323
- const body = sections.map((s) => `\n---\n\n${s.rendered.prompt}`).join("\n");
1362
+ const body = sections
1363
+ .map((s) => `\n---\n\n${s.extra ? `${s.rendered.prompt}\n${s.extra}` : s.rendered.prompt}`)
1364
+ .join("\n");
1324
1365
  return writeContractPromptStep(ctx, {
1325
1366
  prompt: `${header}\n${body}`,
1326
1367
  outputPath: outputPaths[outputPaths.length - 1],
1327
- stopCondition: `Stop after writing all ${phases.length} collapsed-framing artifacts (${phases.join(", ")}) and running next-step once.`,
1368
+ stopCondition: `Stop after writing all ${phases.length} collapsed artifacts (${phases.join(", ")}) and running next-step once.`,
1328
1369
  });
1329
1370
  }
1330
1371
  /**
@@ -1420,8 +1461,8 @@ async function writeContractStepPlan(ctx, plan) {
1420
1461
  return await writeContractBlockedStep(ctx, plan);
1421
1462
  case "module_wave":
1422
1463
  return await writeParallelModuleWaveStep(ctx, plan.phase);
1423
- case "collapsed_framing":
1424
- return await writeCollapsedFramingStep(ctx, plan.phases);
1464
+ case "collapsed_round_trip":
1465
+ return await writeCollapsedRoundTripStep(ctx, plan.phases);
1425
1466
  case "rederive":
1426
1467
  // A deterministic artifact was just written; the frontier moved, so the
1427
1468
  // whole walk re-runs against the new state rather than guessing the phase.
@@ -1999,13 +2040,29 @@ ${rejectionRewriteInstruction(archived)}`,
1999
2040
  };
2000
2041
  }
2001
2042
  /**
2002
- * All phases exist: enforce referential integrity, traceability and the
2003
- * fail-closed contract-obligation gates, then convert the implementation_dag
2004
- * into an extracted plan and ground its citations.
2043
+ * All phases exist: enforce referential integrity, traceability, the
2044
+ * fail-closed contract-obligation gates, and the Path-A canonical-block join,
2045
+ * then convert the implementation_dag into an extracted plan and ground its citations.
2005
2046
  */
2006
2047
  const implementationPlanPromotionGate = async (ctx) => {
2007
2048
  if (ctx.nextPhase)
2008
2049
  return null;
2050
+ // Path-A canonical-block membership (inv-2), FIRST in this walk so a late
2051
+ // source_finding_ids violation fails before any other gate executes instead
2052
+ // of throwing out of the promoter below and wedging every subsequent
2053
+ // next-step (COR-114e4941). Same bounded re-emit as every other promotion
2054
+ // rejection; no gate has executed past it.
2055
+ const pathARefusals = await collectPathARefusals(ctx.artifactsDir);
2056
+ if (pathARefusals.length > 0) {
2057
+ return await dagRegenerationPlan(ctx, {
2058
+ heading: "Path-A Canonical Block Join Failed",
2059
+ blockedBody: "The implementation_dag repeatedly declares source_finding_ids that cannot be joined to a canonical audit work block:",
2060
+ reEmitBody: `## Path-A Canonical Block Errors From the Previous Attempt
2061
+
2062
+ Each node's source_finding_ids must name exactly one canonical audit work block, and together the nodes must cover every block exactly once. Fix every entry below:`,
2063
+ violations: pathARefusals,
2064
+ });
2065
+ }
2009
2066
  // DAG referential integrity + bidirectional coverage (ARC-86b18f1b-2), run
2010
2067
  // before the traceability check so specific referential violations are
2011
2068
  // reported first (traceability is a superset check).
@@ -2547,25 +2604,27 @@ const phaseCutCritiqueGate = async (ctx) => {
2547
2604
  };
2548
2605
  };
2549
2606
  /**
2550
- * Granularity collapse (T1 slice 4b): for low-complexity work, fold the framing
2551
- * suffix [nextPhase..decomposition] into ONE round-trip producing several
2607
+ * Granularity collapse (T1 slice 4b): for low-complexity work, fold the suffix
2608
+ * [nextPhase .. end of its group] into ONE round-trip producing several
2552
2609
  * artifacts, instead of one gated step per phase. Reads the POST-escalation
2553
2610
  * riskSignal (the escalate-on-evidence intercept may have already raised the
2554
2611
  * tier), so the dial is never frozen at run start — `fine` for medium/high keeps
2555
- * full per-phase isolation. Only collapses a genuine multi-phase suffix.
2612
+ * full per-phase isolation. Only collapses a genuine multi-phase suffix, so a
2613
+ * lone trailing member falls through to its ordinary per-phase step.
2556
2614
  */
2557
- const collapsedFramingGate = (ctx) => {
2615
+ const collapsedRoundTripGate = (ctx) => {
2558
2616
  const phase = ctx.nextPhase;
2559
2617
  if (phase === null ||
2560
- roundTripGranularityForTier(ctx.riskSignal?.tier) !== "collapsed" ||
2561
- !FRAMING_COLLAPSE_GROUP.includes(phase)) {
2618
+ roundTripGranularityForTier(ctx.riskSignal?.tier) !== "collapsed") {
2562
2619
  return null;
2563
2620
  }
2564
- const startIdx = FRAMING_COLLAPSE_GROUP.indexOf(phase);
2565
- const suffix = FRAMING_COLLAPSE_GROUP.slice(startIdx);
2621
+ const group = COLLAPSE_GROUPS.find((g) => g.includes(phase));
2622
+ if (!group)
2623
+ return null;
2624
+ const suffix = group.slice(group.indexOf(phase));
2566
2625
  if (suffix.length <= 1)
2567
2626
  return null;
2568
- return { via: "collapsed_framing", phases: [...suffix] };
2627
+ return { via: "collapsed_round_trip", phases: [...suffix] };
2569
2628
  };
2570
2629
  /**
2571
2630
  * Skeleton-scaffolded phases (S3): the tool pre-fills structure/ids from the
@@ -2630,7 +2689,7 @@ const CONTRACT_PIPELINE_GATES = {
2630
2689
  pre_critic_structural: preCriticStructuralGate,
2631
2690
  parallel_module_wave: parallelModuleWaveGate,
2632
2691
  phase_cut_critique: phaseCutCritiqueGate,
2633
- collapsed_framing_round_trip: collapsedFramingGate,
2692
+ collapsed_round_trip: collapsedRoundTripGate,
2634
2693
  scaffolded_phase: scaffoldedPhaseGate,
2635
2694
  };
2636
2695
  /**
@@ -2928,6 +2987,69 @@ export async function collectDagWriteScopeRefusals(artifactsDir, root) {
2928
2987
  }
2929
2988
  return refusals;
2930
2989
  }
2990
+ /**
2991
+ * Path-A canonical-block membership validation, run BEFORE anything is promoted
2992
+ * (OBL-seam-prep-remediate-core-inv-2 / COR-114e4941). These are exactly the
2993
+ * checks the promoter itself performs while building its node→canonical-group
2994
+ * map — but there they THROW out of `promoteImplementationDagToExtractedPlan`,
2995
+ * an unclassified stack that wedged every subsequent next-step. Hoisted here so
2996
+ * an invalid `source_finding_ids` declaration takes the same bounded re-emit as
2997
+ * every other promotion rejection, with no gate having executed past it.
2998
+ *
2999
+ * Returns one line per violation; empty means the DAG is promotable on this
3000
+ * axis (or Path A is not in play at all).
3001
+ */
3002
+ export async function collectPathARefusals(artifactsDir) {
3003
+ const dag = envelopePayload(await readContractArtifact(artifactsDir, "implementation_dag"));
3004
+ const nodes = Array.isArray(dag?.nodes) ? dag.nodes : [];
3005
+ if (nodes.length === 0)
3006
+ return [];
3007
+ if (!nodes.some((node) => Array.isArray(node.source_finding_ids)))
3008
+ return [];
3009
+ const pathASeed = await readOptionalJsonFile(pathASeedFilePath(artifactsDir));
3010
+ const approvedSource = pathASeed
3011
+ ? projectApprovedFindings(await readOptionalJsonFile(pathASeed.audit_findings_path))
3012
+ : undefined;
3013
+ if (!approvedSource) {
3014
+ return [
3015
+ "implementation_dag declares source_finding_ids but no Path-A seed is present, so the ids cannot be joined to a canonical audit work block.",
3016
+ ];
3017
+ }
3018
+ const signature = (ids) => JSON.stringify([...ids].sort((left, right) => left.localeCompare(right)));
3019
+ const canonicalGroups = new Map(approvedSource.workBlocks.map((block) => [
3020
+ signature(block.finding_ids),
3021
+ [...block.finding_ids].sort((left, right) => left.localeCompare(right)),
3022
+ ]));
3023
+ const usedGroups = new Set();
3024
+ const refusals = [];
3025
+ for (const [index, node] of nodes.entries()) {
3026
+ const nodeId = ensureNodeId(node.id, index);
3027
+ const sourceIds = node.source_finding_ids;
3028
+ if (!Array.isArray(sourceIds) || sourceIds.length === 0) {
3029
+ refusals.push(`implementation_dag node "${nodeId}" must declare source_finding_ids for Path-A promotion.`);
3030
+ continue;
3031
+ }
3032
+ const uniqueIds = [...new Set(sourceIds)];
3033
+ if (uniqueIds.length !== sourceIds.length) {
3034
+ refusals.push(`implementation_dag node "${nodeId}" repeats a source_finding_ids member.`);
3035
+ }
3036
+ const groupSignature = signature(uniqueIds);
3037
+ const canonicalGroup = canonicalGroups.get(groupSignature);
3038
+ if (!canonicalGroup) {
3039
+ refusals.push(`implementation_dag node "${nodeId}" source_finding_ids do not match a canonical audit work block.`);
3040
+ continue;
3041
+ }
3042
+ if (usedGroups.has(groupSignature)) {
3043
+ refusals.push(`implementation_dag node "${nodeId}" duplicates a canonical audit work block.`);
3044
+ }
3045
+ usedGroups.add(groupSignature);
3046
+ }
3047
+ if (refusals.length === 0 &&
3048
+ usedGroups.size !== canonicalGroups.size) {
3049
+ refusals.push("implementation_dag source_finding_ids do not cover every canonical audit work block exactly once.");
3050
+ }
3051
+ return refusals;
3052
+ }
2931
3053
  /**
2932
3054
  * Convert a completed ImplementationDAG into the extracted-plan.json format
2933
3055
  * that the existing handlePendingExtractedPlan/applyPlanPipeline path consumes.
@@ -3240,35 +3362,4 @@ export async function readContractPipelinePlanningOutputs(artifactsDir) {
3240
3362
  ].sort((left, right) => compareCodeUnits(left.path, right.path)),
3241
3363
  };
3242
3364
  }
3243
- // ── Lean-path extracted plan (the `low` risk tier's plan emission) ────────────
3244
- //
3245
- // The heavy pipeline above derives its `extracted-plan.json` from the adversarial
3246
- // DAG (`source: "contract_pipeline"`). The `low` risk tier skips that design loop
3247
- // (its findings are a handful of concrete, already-grounded fixes) and emits this
3248
- // lean sibling instead, tagged `source: "lean_fast_path"` so the two producers are
3249
- // distinguished at the artifact level. Both rejoin the SAME plan→implement→close
3250
- // machinery — `normalizeExtractedPlan` synthesizes one block per finding and
3251
- // `applyPlanPipeline` merges blocks sharing a file + splits by context budget, so
3252
- // block derivation is single-sourced, not reimplemented here. The retained safety
3253
- // net (grounding re-pass, affected-file hash snapshot, per-node verify-before-merge,
3254
- // final whole-repo gate) still runs; only the adversarial DESIGN loop + obligation
3255
- // derivation are dropped. (Relocated from the retired `steps/leanFastPath.ts` — DD-21.)
3256
- /** Source tag stamped on a lean-fast-path extracted plan (distinguishes it from `contract_pipeline`). */
3257
- export const LEAN_FAST_PATH_SOURCE = "lean_fast_path";
3258
- /**
3259
- * Build the lean extracted plan from the approved findings. Blocks are
3260
- * intentionally omitted: `normalizeExtractedPlan` synthesizes one block per
3261
- * finding and `applyPlanPipeline` then merges blocks sharing a file + splits by
3262
- * context budget — the same deterministic block derivation the contract pipeline
3263
- * feeds into, single-sourced rather than reimplemented here.
3264
- */
3265
- export function buildLeanExtractedPlan(findings, planId) {
3266
- return {
3267
- plan_id: planId,
3268
- findings,
3269
- project_type: "unknown",
3270
- source: LEAN_FAST_PATH_SOURCE,
3271
- candidate_closing_actions: ["none"],
3272
- };
3273
- }
3274
3365
  //# sourceMappingURL=contractPipeline.js.map