audit-tools 0.42.1 → 0.44.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 (237) hide show
  1. package/dispatch/merge-results.mjs +229 -140
  2. package/dispatch/validate-result.mjs +98 -40
  3. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  4. package/dist/audit/cli/conceptualDispatch.js +35 -3
  5. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  6. package/dist/audit/cli/dispatch/hostHandoff.d.ts +9 -1
  7. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  8. package/dist/audit/cli/dispatch/hostHandoff.js +94 -38
  9. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  10. package/dist/audit/cli/laneSubmissions.d.ts +2 -2
  11. package/dist/audit/cli/laneSubmissions.js +2 -2
  12. package/dist/audit/cli/nextStepCommand.d.ts +64 -0
  13. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  14. package/dist/audit/cli/nextStepCommand.js +877 -783
  15. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  16. package/dist/audit/cli/nextStepHelpers.d.ts +12 -36
  17. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  18. package/dist/audit/cli/nextStepHelpers.js +34 -77
  19. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  20. package/dist/audit/cli/steps.d.ts +2 -2
  21. package/dist/audit/extractors/graph.d.ts +28 -2
  22. package/dist/audit/extractors/graph.d.ts.map +1 -1
  23. package/dist/audit/extractors/graph.js +122 -11
  24. package/dist/audit/extractors/graph.js.map +1 -1
  25. package/dist/audit/extractors/graphRoutes.d.ts +8 -0
  26. package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
  27. package/dist/audit/extractors/graphRoutes.js +71 -4
  28. package/dist/audit/extractors/graphRoutes.js.map +1 -1
  29. package/dist/audit/io/artifacts.d.ts +55 -0
  30. package/dist/audit/io/artifacts.d.ts.map +1 -1
  31. package/dist/audit/io/artifacts.js +189 -12
  32. package/dist/audit/io/artifacts.js.map +1 -1
  33. package/dist/audit/io/toolingManifest.d.ts +11 -0
  34. package/dist/audit/io/toolingManifest.d.ts.map +1 -1
  35. package/dist/audit/io/toolingManifest.js +13 -3
  36. package/dist/audit/io/toolingManifest.js.map +1 -1
  37. package/dist/audit/orchestrator/advance.d.ts +64 -0
  38. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  39. package/dist/audit/orchestrator/advance.js +191 -57
  40. package/dist/audit/orchestrator/advance.js.map +1 -1
  41. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
  42. package/dist/audit/orchestrator/charterClarificationExecutor.js +55 -21
  43. package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
  44. package/dist/audit/orchestrator/flowCoverage.d.ts.map +1 -1
  45. package/dist/audit/orchestrator/flowCoverage.js +7 -10
  46. package/dist/audit/orchestrator/flowCoverage.js.map +1 -1
  47. package/dist/audit/orchestrator/flowPlanning.d.ts +54 -1
  48. package/dist/audit/orchestrator/flowPlanning.d.ts.map +1 -1
  49. package/dist/audit/orchestrator/flowPlanning.js +77 -18
  50. package/dist/audit/orchestrator/flowPlanning.js.map +1 -1
  51. package/dist/audit/orchestrator/flowRequeue.d.ts.map +1 -1
  52. package/dist/audit/orchestrator/flowRequeue.js +6 -10
  53. package/dist/audit/orchestrator/flowRequeue.js.map +1 -1
  54. package/dist/audit/orchestrator/requeueFold.d.ts.map +1 -1
  55. package/dist/audit/orchestrator/requeueFold.js +18 -5
  56. package/dist/audit/orchestrator/requeueFold.js.map +1 -1
  57. package/dist/audit/orchestrator/staleness.d.ts +24 -1
  58. package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
  59. package/dist/audit/orchestrator/staleness.js +147 -16
  60. package/dist/audit/orchestrator/staleness.js.map +1 -1
  61. package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts +26 -0
  62. package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
  63. package/dist/audit/orchestrator/syntaxResolutionExecutor.js +97 -12
  64. package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
  65. package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -1
  66. package/dist/audit/orchestrator/taskBuilder.js +111 -21
  67. package/dist/audit/orchestrator/taskBuilder.js.map +1 -1
  68. package/dist/audit/orchestrator/trivialAudit.d.ts +17 -1
  69. package/dist/audit/orchestrator/trivialAudit.d.ts.map +1 -1
  70. package/dist/audit/orchestrator/trivialAudit.js +31 -4
  71. package/dist/audit/orchestrator/trivialAudit.js.map +1 -1
  72. package/dist/audit/types/analyzerCapability.d.ts +6 -6
  73. package/dist/audit/types/charterRegister.d.ts +30 -12
  74. package/dist/audit/types/charterRegister.d.ts.map +1 -1
  75. package/dist/audit/types/charterRegister.js +22 -9
  76. package/dist/audit/types/charterRegister.js.map +1 -1
  77. package/dist/audit/validation/anchorGrounding.d.ts.map +1 -1
  78. package/dist/audit/validation/anchorGrounding.js +17 -0
  79. package/dist/audit/validation/anchorGrounding.js.map +1 -1
  80. package/dist/audit/validation/auditResults.d.ts +17 -0
  81. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  82. package/dist/audit/validation/auditResults.js +50 -17
  83. package/dist/audit/validation/auditResults.js.map +1 -1
  84. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +48 -0
  85. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
  86. package/dist/remediate/contractPipeline/cyclicSeamResolution.js +128 -0
  87. package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
  88. package/dist/remediate/contractPipeline/derive.d.ts +8 -5
  89. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  90. package/dist/remediate/contractPipeline/derive.js +8 -16
  91. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  92. package/dist/remediate/index.d.ts.map +1 -1
  93. package/dist/remediate/index.js +43 -2
  94. package/dist/remediate/index.js.map +1 -1
  95. package/dist/remediate/intent/intentOrdering.d.ts +13 -5
  96. package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
  97. package/dist/remediate/intent/intentOrdering.js +56 -25
  98. package/dist/remediate/intent/intentOrdering.js.map +1 -1
  99. package/dist/remediate/phases/close.d.ts +57 -2
  100. package/dist/remediate/phases/close.d.ts.map +1 -1
  101. package/dist/remediate/phases/close.js +260 -36
  102. package/dist/remediate/phases/close.js.map +1 -1
  103. package/dist/remediate/phases/triage.d.ts.map +1 -1
  104. package/dist/remediate/phases/triage.js +14 -2
  105. package/dist/remediate/phases/triage.js.map +1 -1
  106. package/dist/remediate/state/disposition.d.ts +26 -4
  107. package/dist/remediate/state/disposition.d.ts.map +1 -1
  108. package/dist/remediate/state/itemStatus.d.ts +33 -6
  109. package/dist/remediate/state/itemStatus.d.ts.map +1 -1
  110. package/dist/remediate/state/itemStatus.js +154 -39
  111. package/dist/remediate/state/itemStatus.js.map +1 -1
  112. package/dist/remediate/state/types.d.ts +41 -2
  113. package/dist/remediate/state/types.d.ts.map +1 -1
  114. package/dist/remediate/state/types.js.map +1 -1
  115. package/dist/remediate/steps/contractPipeline.d.ts +296 -15
  116. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  117. package/dist/remediate/steps/contractPipeline.js +1783 -1001
  118. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  119. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +137 -2
  120. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  121. package/dist/remediate/steps/dispatch/hostHandoff.js +657 -59
  122. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  123. package/dist/remediate/steps/finalGate.d.ts +136 -37
  124. package/dist/remediate/steps/finalGate.d.ts.map +1 -1
  125. package/dist/remediate/steps/finalGate.js +120 -86
  126. package/dist/remediate/steps/finalGate.js.map +1 -1
  127. package/dist/remediate/steps/gateCommands.d.ts +8 -0
  128. package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
  129. package/dist/remediate/steps/gateCommands.js +40 -11
  130. package/dist/remediate/steps/gateCommands.js.map +1 -1
  131. package/dist/remediate/steps/nextStep.d.ts +96 -5
  132. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  133. package/dist/remediate/steps/nextStep.js +668 -147
  134. package/dist/remediate/steps/nextStep.js.map +1 -1
  135. package/dist/remediate/steps/types.d.ts +4 -3
  136. package/dist/remediate/steps/types.d.ts.map +1 -1
  137. package/dist/remediate/steps/types.js +10 -2
  138. package/dist/remediate/steps/types.js.map +1 -1
  139. package/dist/remediate/validation/artifacts.d.ts +20 -2
  140. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  141. package/dist/remediate/validation/artifacts.js +224 -130
  142. package/dist/remediate/validation/artifacts.js.map +1 -1
  143. package/dist/remediate/validation/contractPipelineGates.d.ts +58 -0
  144. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  145. package/dist/remediate/validation/contractPipelineGates.js +143 -27
  146. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  147. package/dist/shared/analyzers/acquisitionEngine.d.ts +72 -25
  148. package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
  149. package/dist/shared/analyzers/acquisitionEngine.js +149 -15
  150. package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
  151. package/dist/shared/analyzers/binaryAcquisition.d.ts +27 -2
  152. package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
  153. package/dist/shared/analyzers/binaryAcquisition.js +149 -43
  154. package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
  155. package/dist/shared/analyzers/candidates.d.ts +9 -8
  156. package/dist/shared/analyzers/candidates.d.ts.map +1 -1
  157. package/dist/shared/analyzers/candidates.js +96 -64
  158. package/dist/shared/analyzers/candidates.js.map +1 -1
  159. package/dist/shared/analyzers/normalizeExternal.d.ts +40 -12
  160. package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
  161. package/dist/shared/analyzers/normalizeExternal.js +74 -18
  162. package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
  163. package/dist/shared/analyzers/rubocop.d.ts +14 -13
  164. package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
  165. package/dist/shared/analyzers/rubocop.js +29 -6
  166. package/dist/shared/analyzers/rubocop.js.map +1 -1
  167. package/dist/shared/analyzers/types.d.ts +196 -13
  168. package/dist/shared/analyzers/types.d.ts.map +1 -1
  169. package/dist/shared/analyzers/types.js +122 -9
  170. package/dist/shared/analyzers/types.js.map +1 -1
  171. package/dist/shared/decompose/charterClarification.d.ts +12 -1
  172. package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
  173. package/dist/shared/decompose/charterClarification.js +11 -4
  174. package/dist/shared/decompose/charterClarification.js.map +1 -1
  175. package/dist/shared/decompose/charterExtraction.d.ts +20 -10
  176. package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
  177. package/dist/shared/decompose/charterExtraction.js +52 -23
  178. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  179. package/dist/shared/index.d.ts +1 -0
  180. package/dist/shared/index.d.ts.map +1 -1
  181. package/dist/shared/index.js +5 -0
  182. package/dist/shared/index.js.map +1 -1
  183. package/dist/shared/intent/freeFormIntentInterpreter.d.ts +12 -2
  184. package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
  185. package/dist/shared/intent/freeFormIntentInterpreter.js +27 -22
  186. package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
  187. package/dist/shared/intent/pathScope.d.ts +12 -1
  188. package/dist/shared/intent/pathScope.d.ts.map +1 -1
  189. package/dist/shared/intent/pathScope.js +56 -19
  190. package/dist/shared/intent/pathScope.js.map +1 -1
  191. package/dist/shared/intent/sharedIntentData.d.ts +19 -1
  192. package/dist/shared/intent/sharedIntentData.d.ts.map +1 -1
  193. package/dist/shared/intent/sharedIntentData.js +33 -8
  194. package/dist/shared/intent/sharedIntentData.js.map +1 -1
  195. package/dist/shared/io/fileLock.d.ts +12 -0
  196. package/dist/shared/io/fileLock.d.ts.map +1 -1
  197. package/dist/shared/io/fileLock.js +48 -5
  198. package/dist/shared/io/fileLock.js.map +1 -1
  199. package/dist/shared/io/json.d.ts +13 -0
  200. package/dist/shared/io/json.d.ts.map +1 -1
  201. package/dist/shared/io/json.js +19 -1
  202. package/dist/shared/io/json.js.map +1 -1
  203. package/dist/shared/steps/stepEmissionScaffold.d.ts +69 -0
  204. package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -0
  205. package/dist/shared/steps/stepEmissionScaffold.js +83 -0
  206. package/dist/shared/steps/stepEmissionScaffold.js.map +1 -0
  207. package/dist/shared/submission/handRecovery.d.ts.map +1 -1
  208. package/dist/shared/submission/handRecovery.js +69 -4
  209. package/dist/shared/submission/handRecovery.js.map +1 -1
  210. package/dist/shared/submission/submissionIdentity.d.ts +10 -1
  211. package/dist/shared/submission/submissionIdentity.d.ts.map +1 -1
  212. package/dist/shared/submission/submissionIdentity.js +12 -3
  213. package/dist/shared/submission/submissionIdentity.js.map +1 -1
  214. package/dist/shared/submission/submissionLedger.d.ts +43 -2
  215. package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
  216. package/dist/shared/submission/submissionLedger.js +50 -7
  217. package/dist/shared/submission/submissionLedger.js.map +1 -1
  218. package/dist/shared/tooling/allowlistedExec.d.ts +9 -0
  219. package/dist/shared/tooling/allowlistedExec.d.ts.map +1 -1
  220. package/dist/shared/tooling/allowlistedExec.js +19 -2
  221. package/dist/shared/tooling/allowlistedExec.js.map +1 -1
  222. package/dist/shared/tooling/commandShape.d.ts +21 -0
  223. package/dist/shared/tooling/commandShape.d.ts.map +1 -0
  224. package/dist/shared/tooling/commandShape.js +120 -0
  225. package/dist/shared/tooling/commandShape.js.map +1 -0
  226. package/dist/shared/types/charter.d.ts +24 -0
  227. package/dist/shared/types/charter.d.ts.map +1 -1
  228. package/dist/shared/types/charter.js +9 -0
  229. package/dist/shared/types/charter.js.map +1 -1
  230. package/dist/shared/types/remediationOutcome.d.ts +282 -9
  231. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  232. package/dist/shared/types/remediationOutcome.js +174 -1
  233. package/dist/shared/types/remediationOutcome.js.map +1 -1
  234. package/package.json +2 -1
  235. package/remediate-code.mjs +15 -0
  236. package/wrapper/remediate-code-wrapper-install-hosts.mjs +45 -4
  237. package/wrapper/remediate-code-wrapper-install-renderers.mjs +12 -2
@@ -1,7 +1,10 @@
1
1
  import { type ValidationIssue, type JudgeReport, type WorkBlock, type WorkBlockSeam } from "audit-tools/shared";
2
+ import { readIntakeRiskSignal, type AdversarialDepth } from "../riskSignal.js";
3
+ import { type ContractPipelineCrossGateInputs, type GateOutcome } from "../validation/contractPipelineGates.js";
2
4
  import type { Finding } from "audit-tools/shared";
3
5
  import type { ContractPipelineArtifactName } from "../contractPipeline/artifactStore.js";
4
6
  import type { RemediationStep } from "./types.js";
7
+ import { intakePaths } from "../intake.js";
5
8
  /**
6
9
  * Runaway backstop for the judge↔repair loop — the LOUD exception path, NOT the
7
10
  * normal terminator. The loop normally terminates by *convergence*: it keeps
@@ -24,11 +27,17 @@ export declare const MAX_DAG_REGENERATION_ATTEMPTS = 2;
24
27
  export declare const MAX_CYCLIC_SEAM_RESOLUTION_ATTEMPTS = 2;
25
28
  export interface CyclicSeamRepairState {
26
29
  schema_version: "remediate-code-contract-pipeline/cyclic-seam-repair-state/v1alpha1";
27
- /** Each attempt to resolve the detected cycles (keyed by obligation_ledger hash). */
30
+ /**
31
+ * Each attempt to resolve the detected cycles (keyed by obligation_ledger
32
+ * hash). `recheck_reason` records WHY the re-check rejected an attempt, so the
33
+ * next resolution prompt can state it instead of re-asking for the same claim
34
+ * and burning the attempt cap on an unexplained retry.
35
+ */
28
36
  attempts: {
29
37
  ledger_hash: string;
30
38
  at: string;
31
39
  recheck_passed: boolean;
40
+ recheck_reason?: string;
32
41
  }[];
33
42
  /** Whether a user-decision step has been emitted. */
34
43
  user_decision_emitted: boolean;
@@ -116,6 +125,15 @@ export interface ContractPipelineStepOptions {
116
125
  artifactsDir: string;
117
126
  runId: string;
118
127
  sourcePaths?: string[];
128
+ /**
129
+ * The same DI seam {@link archiveContractArtifact} already exposes, lifted to
130
+ * the entry point so a FAILED history move is reachable from an end-to-end
131
+ * test. Undefined uses `node:fs/promises` rename, so production behavior is
132
+ * unchanged. It exists because the archive-failure branch (COR-114e4941) is a
133
+ * correctness gate whose whole point is what the pipeline does when the move
134
+ * does not succeed — a branch no fixture can reach by arranging files.
135
+ */
136
+ renameFn?: (from: string, to: string) => Promise<void>;
119
137
  }
120
138
  export interface PathASeed {
121
139
  schema_version: "remediate-code-contract-pipeline/path-a-seed/v1alpha2";
@@ -135,6 +153,24 @@ export interface PathASeed {
135
153
  work_blocks: WorkBlock[];
136
154
  /** Explicit cross-block overlaps; required seams must be prepared before refactors. */
137
155
  work_block_seams: WorkBlockSeam[];
156
+ /**
157
+ * Seed source-digest binding. One sha256 per source path the seed was built
158
+ * FROM, recorded at seed-build time: the audit-findings file itself plus every
159
+ * `affected_files` path that existed on disk. `buildNextContractPipelineStep`
160
+ * re-hashes each on entry and refuses when one no longer matches, instead of
161
+ * spending a whole design pipeline on content that no longer holds the
162
+ * findings the seed enumerates.
163
+ *
164
+ * OPTIONAL for READING, always written for WRITING: a seed persisted before
165
+ * this field existed carries none, and an absent list binds nothing rather
166
+ * than blocking a run mid-flight. Paths are stored exactly as the seed knows
167
+ * them — the findings path absolute, `affected_files` repo-relative — and the
168
+ * verifier resolves a relative entry against the repo root it is handed.
169
+ */
170
+ source_digests?: Array<{
171
+ path: string;
172
+ sha256: string;
173
+ }>;
138
174
  created_at: string;
139
175
  }
140
176
  /**
@@ -144,6 +180,22 @@ export interface PathASeed {
144
180
  * include its contents so every pipeline node traces to an auditor finding.
145
181
  */
146
182
  export declare function writePathASeedFromFindings(artifactsDir: string, auditFindingsPath: string, auditFindings: unknown): Promise<void>;
183
+ /** One seed-recorded source path whose content no longer matches its digest. */
184
+ export interface SeedSourceDigestMismatch {
185
+ path: string;
186
+ expected: string;
187
+ /** The path's current sha256, or `null` when it is no longer readable. */
188
+ actual: string | null;
189
+ }
190
+ /**
191
+ * Seed source-digest binding — re-hash every path the path_a seed recorded and
192
+ * report the ones that moved. Pure over (root, seed): the caller decides what a
193
+ * mismatch means, so this is directly red-green testable without a pipeline.
194
+ *
195
+ * A seed with no `source_digests` (written before the field existed) binds
196
+ * nothing and yields no mismatches.
197
+ */
198
+ export declare function detectSeedSourceDigestMismatches(root: string, seed: PathASeed | undefined): Promise<SeedSourceDigestMismatch[]>;
147
199
  /**
148
200
  * When a judge report omits `repair_directive`, infer the repair target from
149
201
  * the failing classifications. Post-redesign the default is
@@ -212,18 +264,18 @@ export interface ContractObligationsGateResult {
212
264
  }
213
265
  /**
214
266
  * Run the fail-closed contract-obligation gates against the persisted contract
215
- * artifacts. Aggregates:
216
- * - validatePairedObligations (obligation_ledger × test_validator_plan)
217
- * - validateEvidenceThreaded (assessment × judge × implementation_dag)
218
- * - validateDigestCoverage (goal_spec.source_type × finding-enumeration × ledger)
219
- * - validateReconciliationDerivation (seam report × finalized contracts)
267
+ * artifacts: paired obligations, evidence threading, source-scoped digest
268
+ * coverage, and INV-CO-12 reconciliation derivation.
220
269
  *
221
- * Only error-severity issues fail the gate. Each gate is individually tolerant
222
- * of an absent input artifact (the upstream phase order guarantees presence by
223
- * the time this runs, except the source-scoped digest-coverage check which is
224
- * vacuous for non-enumerable sources).
270
+ * Branch on `evaluated` before trusting emptiness. This no longer flattens four `ValidationIssue[]`
271
+ * into one array, where a gate that never RAN and a gate that ran CLEAN both
272
+ * contributed nothing and were indistinguishable. It consumes the shared
273
+ * gate-outcome record and branches on `evaluated` first: at this boundary every
274
+ * phase artifact exists, so a skipped gate is a violation, not a pass. See
275
+ * {@link consumeGateOutcomes} for the per-boundary `required` policy and the one
276
+ * declared exception (`digest_coverage`).
225
277
  */
226
- export declare function evaluateContractObligationsPromotionGate(artifactsDir: string): Promise<ContractObligationsGateResult>;
278
+ export declare function evaluateContractObligationsPromotionGate(artifactsDir: string, root?: string, inputs?: ContractPipelineCrossGateInputs): Promise<ContractObligationsGateResult>;
227
279
  /**
228
280
  * Pre-adversarial structural floor (S5). The subset of the contract-obligation
229
281
  * gates whose inputs all exist by the time the critic phase is reached
@@ -238,10 +290,13 @@ export declare function evaluateContractObligationsPromotionGate(artifactsDir: s
238
290
  * at promotion as the fail-closed backstop; this gate never replaces it.
239
291
  *
240
292
  * Returns the first failing gate's responsible phase + rendered error lines, or
241
- * null when the structural floor is clean. Each underlying validator is tolerant
242
- * of an absent input, so this is safe to call at the critic boundary.
293
+ * null when the structural floor is clean. Branches on each outcome's
294
+ * `evaluated` before its empty issue list is allowed to mean clean
295
+ * (the branch-on-evaluated rule); `contract_finalization`, `seam_reconciliation`
296
+ * and `test_validator_plan` all precede `critic` in the phase order, so a
297
+ * skipped gate here is a malformed payload rather than an absent one.
243
298
  */
244
- export declare function evaluatePreCriticStructuralGate(artifactsDir: string): Promise<{
299
+ export declare function evaluatePreCriticStructuralGate(artifactsDir: string, root?: string, inputs?: ContractPipelineCrossGateInputs): Promise<{
245
300
  phase: "contract_finalization" | "test_validator_plan";
246
301
  errorLines: string[];
247
302
  } | null>;
@@ -258,16 +313,242 @@ declare const PARALLEL_MODULE_PHASES: {
258
313
  };
259
314
  type ParallelModulePhase = keyof typeof PARALLEL_MODULE_PHASES;
260
315
  export declare function isParallelModulePhase(phase: string): phase is ParallelModulePhase;
316
+ /**
317
+ * Everything a gate is handed. Assembled once per invocation, then passed to
318
+ * every gate in the walk, so each gate is a module-level function that can be
319
+ * called and tested on its own.
320
+ *
321
+ * Two fields are deliberately MUTABLE, each written by exactly one gate:
322
+ * • `artifactsSettled` — set by the staleness gate once this invocation's own
323
+ * ingestion + archive pass has run. {@link readCrossGatePayloads} REFUSES
324
+ * before it is set, which is how the branch-on-evaluated invariant's freshness
325
+ * half is enforced mechanically instead of by a caller remembering to
326
+ * re-read: a payload cached from before the pass is unrepresentable.
327
+ * • `nextPhase` — the phase frontier, resolved AFTER the archive pass because
328
+ * archiving a stale artifact re-opens its producing phase.
329
+ */
330
+ export interface ContractGateContext {
331
+ readonly options: ContractPipelineStepOptions;
332
+ readonly root: string;
333
+ readonly artifactsDir: string;
334
+ readonly runId: string;
335
+ readonly sourcePaths?: string[];
336
+ readonly paths: ReturnType<typeof intakePaths>;
337
+ readonly artifactPaths: Partial<Record<ContractPipelineArtifactName, string>>;
338
+ /** Present only for structured_audit (path-A) runs. */
339
+ readonly pathASeedPath?: string;
340
+ readonly riskSignal: Awaited<ReturnType<typeof readIntakeRiskSignal>>;
341
+ readonly adversarialDepth: AdversarialDepth | undefined;
342
+ artifactsSettled: boolean;
343
+ nextPhase: string | null;
344
+ }
345
+ /** The verdict a call site derives from a subset of the shared gate outcomes. */
346
+ export interface CrossGateVerdict {
347
+ ok: boolean;
348
+ violations: string[];
349
+ }
350
+ /**
351
+ * Consume a subset of the shared cross-gate outcomes, branching on `evaluated`
352
+ * BEFORE an empty `issues` array is allowed to mean "clean".
353
+ *
354
+ * `required` is DECLARED PER CALL SITE, as data, because "did not run" means
355
+ * different things at different boundaries. At a boundary whose upstream phase
356
+ * order guarantees the gate's input exists, a skip is a refusal — its empty
357
+ * issue list is proof of nothing. Earlier in the pipeline the same skip means
358
+ * "not applicable yet", and the gate is simply not required there.
359
+ *
360
+ * THE UNCOVERED HALF, stated rather than implied: `digest_coverage` is the one
361
+ * gate of the eight whose skip is a DOMAIN non-applicability (a source that is
362
+ * not finding-enumerable) rather than a missing payload, so no boundary lists
363
+ * it as required and a genuinely absent finding-enumeration file for an
364
+ * enumerable source still skips silently. Closing that needs the gate module to
365
+ * expose its enumerability predicate — an edit outside this work item's write
366
+ * scope.
367
+ */
368
+ export declare function consumeGateOutcomes(outcomes: readonly GateOutcome[], selected: readonly GateOutcome["gate"][], required: ReadonlySet<GateOutcome["gate"]>): CrossGateVerdict;
369
+ /**
370
+ * The gate walk order, exported so a drift guard reads the real set instead of
371
+ * reconstructing one by reflecting over a chain of `if` statements.
372
+ *
373
+ * This and the scaffold's `handledKeys` are BOTH `Object.keys` of the SAME
374
+ * object literal, and the walk consumes `handledKeys` directly — so the two
375
+ * agree by construction, not by a test that compares them. No such test exists,
376
+ * and none is needed: there is no second list to drift from.
377
+ */
378
+ export declare const CONTRACT_PIPELINE_GATE_ORDER: readonly string[];
261
379
  /**
262
380
  * Build and write the next contract-pipeline step.
263
381
  * Returns null when the pipeline is complete and the extracted plan is ready.
264
382
  */
265
383
  export declare function buildNextContractPipelineStep(options: ContractPipelineStepOptions): Promise<RemediationStep | null>;
384
+ /**
385
+ * The obligation-kind vocabulary, in priority order (higher index = higher
386
+ * priority; `invariant` is highest).
387
+ *
388
+ * MNT-114e4941-3: this used to be a THIRD independent copy of the vocabulary —
389
+ * a local `type ObligationKind` union beside derive.ts's `TESTABLE_KINDS` and
390
+ * contractPipelineGates.ts's `TESTABLE_OBLIGATION_KINDS`, with nothing forcing
391
+ * the three to agree, while the ledger's own `obligation.kind` is typed as a
392
+ * bare `string`. The consequence was not theoretical: an unrecognized kind was
393
+ * CAST to this union, scored -1 by `indexOf`, and then indexed the lens map to
394
+ * `undefined` — so a ledger kind outside these four promoted a finding with
395
+ * `lens: undefined`.
396
+ *
397
+ * It is now single-sourced two ways at once:
398
+ * • MEMBERSHIP — {@link obligationKindVocabularyDivergence} reconciles this
399
+ * list against the gate module's exported `TESTABLE_OBLIGATION_KINDS`, so a
400
+ * kind added there and not here is a red contract test rather than a silent
401
+ * misclassification;
402
+ * • SEMANTICS — an unrecognized kind is not dropped or cast. It is routed
403
+ * through the gate module's own `isTestablePhaseObligation` predicate, so
404
+ * the two modules answer "is this kind testable?" with ONE implementation.
405
+ */
406
+ export declare const OBLIGATION_KIND_PRIORITY: readonly ["test", "structural", "behavioral", "invariant"];
407
+ export type ObligationKind = (typeof OBLIGATION_KIND_PRIORITY)[number];
408
+ /**
409
+ * Classify a raw ledger `kind` string (which the ledger types as a bare
410
+ * `string`) into this module's vocabulary. A recognized kind maps to itself; an
411
+ * unrecognized one is classified by the SHARED testability predicate rather
412
+ * than guessed here — testable ⇒ `behavioral` (the testable default, so it
413
+ * carries a real lens and a mid severity), otherwise ⇒ `structural`.
414
+ */
415
+ export declare function classifyObligationKind(kind: string): ObligationKind;
416
+ /**
417
+ * Kinds the gate module declares TESTABLE that this module's vocabulary does
418
+ * not carry — the drift MNT-114e4941-3 names, reported as data so a contract
419
+ * test can go red on it instead of a reviewer having to notice.
420
+ * Empty when the two agree.
421
+ */
422
+ export declare function obligationKindVocabularyDivergence(): string[];
423
+ /**
424
+ * Normalize one block's declared write scope into repo-relative, forward-slashed,
425
+ * unique, sorted paths, refusing outright anything that leaves the repository.
426
+ *
427
+ * Case is PRESERVED (`repoRelativePath`, not the lowercasing
428
+ * `normalizeRepoPath`): this string is the write scope a host enforces against a
429
+ * landed diff on a case-sensitive filesystem, so lowercasing it would make a
430
+ * legitimate edit look out of scope. Lowercasing is used only as a MATCH key,
431
+ * never as the stored value.
432
+ *
433
+ * The tracked-tree half is NOT here: see
434
+ * {@link evaluatePromotedPlanWriteScope}, which runs at this same promotion
435
+ * boundary with a bounded re-emit instead of an unrecoverable throw.
436
+ */
437
+ export interface BlockWriteScopeNormalization {
438
+ /** The entries that normalized cleanly, repo-relative, unique and sorted. */
439
+ touched_files: string[];
440
+ /** One line per REFUSED entry. Non-empty ⇒ the caller must not promote. */
441
+ refusals: string[];
442
+ }
443
+ export declare function normalizeBlockTouchedFiles(root: string, files: readonly string[], blockId: string): BlockWriteScopeNormalization;
444
+ /**
445
+ * The tracked-tree half of The normalized-write-scope invariant, run against
446
+ * the PROMOTED plan so a violation takes the same bounded re-emit path the M-B3
447
+ * citation gate takes, rather than throwing out of the promotion.
448
+ *
449
+ * It exists because the citation gate is NOT a superset: a finding grounds if
450
+ * ANY cited path OR SYMBOL is real, so a node whose prose names a real symbol
451
+ * can ground while its declared write scope is still fabricated — and the write
452
+ * scope is what a host binds a worker to.
453
+ *
454
+ * A path that is not tracked but whose parent directory IS stays legal: a
455
+ * remediation block legitimately creates new files, and dropping a declared
456
+ * write target is the failure mode that strands an implementer with an
457
+ * obligation it has no scope to discharge. Fail-open on an unreadable tree, as
458
+ * the citation gate does.
459
+ */
460
+ export declare function evaluatePromotedPlanWriteScope(artifactsDir: string, root: string): Promise<{
461
+ violations: string[];
462
+ } | null>;
463
+ /**
464
+ * Refuse a targeted command that leaves the declared shape — a single
465
+ * invocation with no shell chaining, substitution or redirection. Deliberately
466
+ * ecosystem-neutral: this module never asserts WHICH runner is legitimate
467
+ * (language-neutral by contract), only that the string handed to a shell cannot
468
+ * do more than invoke one command.
469
+ *
470
+ * The RULE is not here. It is `commandLeavesDeclaredShape`
471
+ * (`audit-tools/shared`), the one predicate the host-handoff consumer and the
472
+ * triage re-verification spawn also ask. This function owns only the WORDING and
473
+ * the refusals-as-data contract. It used to own a second, quote-BLIND regex
474
+ * instead, and the two disagreed in both directions: `pytest -k 'not slow'`
475
+ * cleared promotion and then dead-ended at the consumer as
476
+ * `block_contract_invalid`, while `echo "a & b"` was refused here though the
477
+ * consumer admits it.
478
+ *
479
+ * Refusals are RETURNED, never thrown: the promotion boundary turns them into
480
+ * the same bounded re-emit every other promotion rejection takes, so a
481
+ * malformed command re-emits implementation_planning instead of wedging every
482
+ * subsequent next-step with an unclassified stack.
483
+ */
484
+ export interface BlockCommandNormalization {
485
+ targeted_commands: string[];
486
+ /** One line per REFUSED command. Non-empty ⇒ the caller must not promote. */
487
+ refusals: string[];
488
+ }
489
+ export declare function normalizeBlockTargetedCommands(commands: readonly string[], blockId: string): BlockCommandNormalization;
490
+ /**
491
+ * Collect every write-scope and command refusal the promotion WOULD hit, before
492
+ * a plan is written. Runs the same two normalizers over the same derived node
493
+ * scope the promoter uses, so this pre-check and the promotion cannot disagree
494
+ * about what is refusable — and the refusal reaches the host as the bounded
495
+ * `implementation_planning` re-emit every other promotion rejection takes,
496
+ * rather than as a thrown stack that wedges every subsequent next-step.
497
+ */
498
+ export declare function collectDagWriteScopeRefusals(artifactsDir: string, root: string): Promise<string[]>;
266
499
  /**
267
500
  * Convert a completed ImplementationDAG into the extracted-plan.json format
268
501
  * that the existing handlePendingExtractedPlan/applyPlanPipeline path consumes.
502
+ *
503
+ * `root` defaults to the repository that owns `artifactsDir`, so the existing
504
+ * one-argument callers keep working while the pipeline passes the run's real
505
+ * root for write-scope normalization.
506
+ */
507
+ export declare function promoteImplementationDagToExtractedPlan(artifactsDir: string, root?: string): Promise<void>;
508
+ /**
509
+ * The PINNED shape of everything this module's two planning producers decide —
510
+ * `promoteImplementationDagToExtractedPlan`'s canonical block membership and
511
+ * normalized write scope, and `writePathASeedFromFindings`' sha256 baselines —
512
+ * exported as ONE record so the regression guard that pins them imports a real
513
+ * contract instead of re-deriving the plan's internals from JSON by hand.
514
+ *
515
+ * CDC-03: the guard consumes this token, so the phase deriver places it adjacent
516
+ * to this module rather than four phases later, and a change to block membership
517
+ * goes red in the phase immediately after this one.
518
+ *
519
+ * `estimated_tokens` is byte-derived and LOCAL (`estimateTokensFromBytes`) — it
520
+ * describes content size only and is never a backend-fit claim; audit-tools does
521
+ * not route.
522
+ */
523
+ export interface ContractPipelinePlanningOutputs {
524
+ /** Canonical membership + normalized write scope, in block-id order. */
525
+ block_membership: Array<{
526
+ block_id: string;
527
+ items: string[];
528
+ touched_files: string[];
529
+ targeted_commands: string[];
530
+ }>;
531
+ /** Every promoted finding id, and whether each is claimed by exactly one block. */
532
+ coverage: {
533
+ finding_ids: string[];
534
+ exhaustive_once: boolean;
535
+ };
536
+ /** Byte-derived per-block estimate over the findings the block claims. */
537
+ token_estimates: Array<{
538
+ block_id: string;
539
+ estimated_tokens: number;
540
+ }>;
541
+ /** The path_a seed's recorded per-path sha256 baselines, path-sorted. */
542
+ seed_source_digests: Array<{
543
+ path: string;
544
+ sha256: string;
545
+ }>;
546
+ }
547
+ /**
548
+ * Read the pinned planning outputs for a run, or null when no plan has been
549
+ * promoted yet.
269
550
  */
270
- export declare function promoteImplementationDagToExtractedPlan(artifactsDir: string): Promise<void>;
551
+ export declare function readContractPipelinePlanningOutputs(artifactsDir: string): Promise<ContractPipelinePlanningOutputs | null>;
271
552
  /** Source tag stamped on a lean-fast-path extracted plan (distinguishes it from `contract_pipeline`). */
272
553
  export declare const LEAN_FAST_PATH_SOURCE = "lean_fast_path";
273
554
  /** The minimal `extracted-plan.json` shape the lean path emits. */
@@ -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,EAGnB,MAAM,oBAAoB,CAAC;AAgF5B,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;AA6ClD;;;;;;;;;;;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,qFAAqF;IACrF,QAAQ,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACzE,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,GAC3B,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