audit-tools 0.28.8 → 0.28.10

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 (188) hide show
  1. package/audit-code-wrapper-install-hosts.mjs +133 -27
  2. package/dist/audit/cli/confirmIntentStep.d.ts +1 -0
  3. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  4. package/dist/audit/cli/confirmIntentStep.js +14 -10
  5. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  6. package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
  7. package/dist/audit/cli/dispatch/quotaPool.js +47 -39
  8. package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
  9. package/dist/audit/cli/dispatch.d.ts +15 -1
  10. package/dist/audit/cli/dispatch.d.ts.map +1 -1
  11. package/dist/audit/cli/dispatch.js +54 -19
  12. package/dist/audit/cli/dispatch.js.map +1 -1
  13. package/dist/audit/cli/hybridDispatch.d.ts +46 -0
  14. package/dist/audit/cli/hybridDispatch.d.ts.map +1 -0
  15. package/dist/audit/cli/hybridDispatch.js +77 -0
  16. package/dist/audit/cli/hybridDispatch.js.map +1 -0
  17. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  18. package/dist/audit/cli/nextStepHelpers.js +119 -2
  19. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  20. package/dist/audit/cli/reviewRun.d.ts +19 -0
  21. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  22. package/dist/audit/cli/reviewRun.js +2 -2
  23. package/dist/audit/cli/reviewRun.js.map +1 -1
  24. package/dist/audit/cli/rollingAuditDispatch.d.ts +57 -4
  25. package/dist/audit/cli/rollingAuditDispatch.d.ts.map +1 -1
  26. package/dist/audit/cli/rollingAuditDispatch.js +137 -10
  27. package/dist/audit/cli/rollingAuditDispatch.js.map +1 -1
  28. package/dist/audit/cli/scoreAuditCommand.d.ts +16 -0
  29. package/dist/audit/cli/scoreAuditCommand.d.ts.map +1 -0
  30. package/dist/audit/cli/scoreAuditCommand.js +82 -0
  31. package/dist/audit/cli/scoreAuditCommand.js.map +1 -0
  32. package/dist/audit/cli.d.ts.map +1 -1
  33. package/dist/audit/cli.js +5 -1
  34. package/dist/audit/cli.js.map +1 -1
  35. package/dist/audit/orchestrator/designReviewProjection.d.ts +9 -1
  36. package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
  37. package/dist/audit/orchestrator/designReviewProjection.js +19 -1
  38. package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
  39. package/dist/audit/orchestrator/designReviewPrompt.d.ts +2 -0
  40. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  41. package/dist/audit/orchestrator/designReviewPrompt.js +11 -1
  42. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  43. package/dist/audit/orchestrator/executorRunners.js +1 -1
  44. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  45. package/dist/audit/orchestrator/intakeExecutors.d.ts +9 -1
  46. package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
  47. package/dist/audit/orchestrator/intakeExecutors.js +16 -3
  48. package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
  49. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  50. package/dist/audit/orchestrator/intentCheckpointExecutor.js +3 -0
  51. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  52. package/dist/audit/orchestrator/intentInterpreter.d.ts +21 -7
  53. package/dist/audit/orchestrator/intentInterpreter.d.ts.map +1 -1
  54. package/dist/audit/orchestrator/intentInterpreter.js +30 -11
  55. package/dist/audit/orchestrator/intentInterpreter.js.map +1 -1
  56. package/dist/audit/orchestrator/intentScopeDisposition.d.ts +49 -0
  57. package/dist/audit/orchestrator/intentScopeDisposition.d.ts.map +1 -0
  58. package/dist/audit/orchestrator/intentScopeDisposition.js +57 -0
  59. package/dist/audit/orchestrator/intentScopeDisposition.js.map +1 -0
  60. package/dist/audit/orchestrator/rollingDispatch.d.ts +9 -0
  61. package/dist/audit/orchestrator/rollingDispatch.d.ts.map +1 -1
  62. package/dist/audit/orchestrator/rollingDispatch.js +10 -0
  63. package/dist/audit/orchestrator/rollingDispatch.js.map +1 -1
  64. package/dist/audit/orchestrator/scope.d.ts +1 -0
  65. package/dist/audit/orchestrator/scope.d.ts.map +1 -1
  66. package/dist/audit/orchestrator/scope.js +2 -7
  67. package/dist/audit/orchestrator/scope.js.map +1 -1
  68. package/dist/audit/quota/index.d.ts +5 -0
  69. package/dist/audit/quota/index.d.ts.map +1 -1
  70. package/dist/audit/reporting/scoreAudit.d.ts +161 -0
  71. package/dist/audit/reporting/scoreAudit.d.ts.map +1 -0
  72. package/dist/audit/reporting/scoreAudit.js +224 -0
  73. package/dist/audit/reporting/scoreAudit.js.map +1 -0
  74. package/dist/audit/types/activeDispatch.d.ts +29 -1
  75. package/dist/audit/types/activeDispatch.d.ts.map +1 -1
  76. package/dist/audit/types/activeDispatch.js.map +1 -1
  77. package/dist/audit/types/analyzerCapability.d.ts +6 -6
  78. package/dist/remediate/contractPipeline/changeClassification.d.ts +146 -0
  79. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -0
  80. package/dist/remediate/contractPipeline/changeClassification.js +398 -0
  81. package/dist/remediate/contractPipeline/changeClassification.js.map +1 -0
  82. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  83. package/dist/remediate/contractPipeline/derive.js +9 -0
  84. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  85. package/dist/remediate/intent/intentOrdering.d.ts +51 -0
  86. package/dist/remediate/intent/intentOrdering.d.ts.map +1 -0
  87. package/dist/remediate/intent/intentOrdering.js +150 -0
  88. package/dist/remediate/intent/intentOrdering.js.map +1 -0
  89. package/dist/remediate/phases/plan.d.ts.map +1 -1
  90. package/dist/remediate/phases/plan.js +14 -1
  91. package/dist/remediate/phases/plan.js.map +1 -1
  92. package/dist/remediate/providers/index.d.ts +32 -0
  93. package/dist/remediate/providers/index.d.ts.map +1 -1
  94. package/dist/remediate/providers/index.js +28 -1
  95. package/dist/remediate/providers/index.js.map +1 -1
  96. package/dist/remediate/steps/contractPipeline.d.ts +15 -1
  97. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  98. package/dist/remediate/steps/contractPipeline.js +282 -14
  99. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  100. package/dist/remediate/steps/dispatch.d.ts +75 -1
  101. package/dist/remediate/steps/dispatch.d.ts.map +1 -1
  102. package/dist/remediate/steps/dispatch.js +159 -43
  103. package/dist/remediate/steps/dispatch.js.map +1 -1
  104. package/dist/remediate/steps/nextStep.d.ts +53 -2
  105. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  106. package/dist/remediate/steps/nextStep.js +255 -81
  107. package/dist/remediate/steps/nextStep.js.map +1 -1
  108. package/dist/remediate/steps/providerNodeDispatch.d.ts +8 -1
  109. package/dist/remediate/steps/providerNodeDispatch.d.ts.map +1 -1
  110. package/dist/remediate/steps/providerNodeDispatch.js +7 -2
  111. package/dist/remediate/steps/providerNodeDispatch.js.map +1 -1
  112. package/dist/remediate/steps/rollingSession.d.ts +55 -1
  113. package/dist/remediate/steps/rollingSession.d.ts.map +1 -1
  114. package/dist/remediate/steps/rollingSession.js +132 -21
  115. package/dist/remediate/steps/rollingSession.js.map +1 -1
  116. package/dist/remediate/validation/contractPipelineGates.d.ts +23 -8
  117. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  118. package/dist/remediate/validation/contractPipelineGates.js +43 -38
  119. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  120. package/dist/shared/dispatch/coordinator.d.ts +170 -0
  121. package/dist/shared/dispatch/coordinator.d.ts.map +1 -0
  122. package/dist/shared/dispatch/coordinator.js +177 -0
  123. package/dist/shared/dispatch/coordinator.js.map +1 -0
  124. package/dist/shared/dispatch/hybridDispatch.d.ts +74 -0
  125. package/dist/shared/dispatch/hybridDispatch.d.ts.map +1 -0
  126. package/dist/shared/dispatch/hybridDispatch.js +54 -0
  127. package/dist/shared/dispatch/hybridDispatch.js.map +1 -0
  128. package/dist/shared/dispatch/settledPools.d.ts +21 -0
  129. package/dist/shared/dispatch/settledPools.d.ts.map +1 -0
  130. package/dist/shared/dispatch/settledPools.js +34 -0
  131. package/dist/shared/dispatch/settledPools.js.map +1 -0
  132. package/dist/shared/index.d.ts +15 -5
  133. package/dist/shared/index.d.ts.map +1 -1
  134. package/dist/shared/index.js +14 -2
  135. package/dist/shared/index.js.map +1 -1
  136. package/dist/shared/intent/clauseInterpreter.d.ts +19 -0
  137. package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
  138. package/dist/shared/intent/clauseInterpreter.js +19 -0
  139. package/dist/shared/intent/clauseInterpreter.js.map +1 -1
  140. package/dist/shared/providers/sharedProviderConfirmation.d.ts +134 -0
  141. package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +1 -0
  142. package/dist/shared/providers/sharedProviderConfirmation.js +244 -0
  143. package/dist/shared/providers/sharedProviderConfirmation.js.map +1 -0
  144. package/dist/shared/quota/apiPool.d.ts +109 -0
  145. package/dist/shared/quota/apiPool.d.ts.map +1 -0
  146. package/dist/shared/quota/apiPool.js +183 -0
  147. package/dist/shared/quota/apiPool.js.map +1 -0
  148. package/dist/shared/quota/capacity.d.ts +29 -1
  149. package/dist/shared/quota/capacity.d.ts.map +1 -1
  150. package/dist/shared/quota/capacity.js +5 -0
  151. package/dist/shared/quota/capacity.js.map +1 -1
  152. package/dist/shared/quota/claimRegistry.d.ts +64 -0
  153. package/dist/shared/quota/claimRegistry.d.ts.map +1 -0
  154. package/dist/shared/quota/claimRegistry.js +157 -0
  155. package/dist/shared/quota/claimRegistry.js.map +1 -0
  156. package/dist/shared/quota/compositeQuotaSource.d.ts +10 -1
  157. package/dist/shared/quota/compositeQuotaSource.d.ts.map +1 -1
  158. package/dist/shared/quota/compositeQuotaSource.js +34 -6
  159. package/dist/shared/quota/compositeQuotaSource.js.map +1 -1
  160. package/dist/shared/quota/fileLock.d.ts.map +1 -1
  161. package/dist/shared/quota/fileLock.js +7 -1
  162. package/dist/shared/quota/fileLock.js.map +1 -1
  163. package/dist/shared/quota/httpQuotaSource.d.ts +9 -1
  164. package/dist/shared/quota/httpQuotaSource.d.ts.map +1 -1
  165. package/dist/shared/quota/httpQuotaSource.js +33 -8
  166. package/dist/shared/quota/httpQuotaSource.js.map +1 -1
  167. package/dist/shared/quota/learnedQuotaSource.d.ts +7 -1
  168. package/dist/shared/quota/learnedQuotaSource.d.ts.map +1 -1
  169. package/dist/shared/quota/learnedQuotaSource.js +18 -7
  170. package/dist/shared/quota/learnedQuotaSource.js.map +1 -1
  171. package/dist/shared/quota/quotaSource.d.ts +41 -0
  172. package/dist/shared/quota/quotaSource.d.ts.map +1 -1
  173. package/dist/shared/quota/quotaSource.js +19 -0
  174. package/dist/shared/quota/quotaSource.js.map +1 -1
  175. package/dist/shared/types/contractPipeline/obligations.d.ts +42 -0
  176. package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
  177. package/dist/shared/types/contractPipeline.d.ts +1 -1
  178. package/dist/shared/types/contractPipeline.d.ts.map +1 -1
  179. package/dist/shared/types/contractPipeline.js.map +1 -1
  180. package/dist/shared/types/intentCheckpoint.d.ts +14 -0
  181. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  182. package/dist/shared/types/intentCheckpoint.js +10 -0
  183. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  184. package/dist/shared/types/sessionConfig.d.ts +60 -0
  185. package/dist/shared/types/sessionConfig.d.ts.map +1 -1
  186. package/dist/shared/types/sessionConfig.js +13 -0
  187. package/dist/shared/types/sessionConfig.js.map +1 -1
  188. package/package.json +3 -2
@@ -1,6 +1,6 @@
1
1
  import { type RemediationState } from "../state/store.js";
2
2
  import { type RemediationBlock } from "../state/types.js";
3
- import type { SessionConfig, HostConcurrencyLimit, WaveSchedule, QuotaStateEntry, ResolvedProviderName, DispatchCapacityPoolSummary, HostModelRosterEntry, CapacityPool } from "audit-tools/shared";
3
+ import type { SessionConfig, HostConcurrencyLimit, WaveSchedule, QuotaStateEntry, ResolvedProviderName, DispatchCapacityPoolSummary, HostModelRosterEntry, CapacityPool, ProviderSlot, RollingDispatchResult } from "audit-tools/shared";
4
4
  import { type DispatchModelHint, type DispatchPhase, type ImplementWorkerResult, type RemediationDispatchPlan, type RemediationDispatchQuota } from "./types.js";
5
5
  import { resolveHostActiveSubagentLimit } from "../quota/index.js";
6
6
  export { resolveHostActiveSubagentLimit };
@@ -220,6 +220,15 @@ export interface AcceptNodeWorktreeParams {
220
220
  * tests on a minimal temp repo), or an explicit list to force specific commands.
221
221
  */
222
222
  targetedCommands?: string[];
223
+ /**
224
+ * The node's own `targeted_commands` (the auditor/finding-specified verification),
225
+ * run IN ADDITION to the derived commands — filtered to the build-free subset and
226
+ * deduped against the derive. The derive gives correct-paths-by-construction; these
227
+ * add the fix-specific regression checks the derive misses when a fix touches no test
228
+ * (task_7d35176d). Omit / `[]` → derive-only (the prior behaviour). Ignored when
229
+ * `targetedCommands` is an explicit override (the lifecycle unit-test path).
230
+ */
231
+ additionalVerifyCommands?: string[];
223
232
  /**
224
233
  * Accept-time write-scope inputs (OBL-DS-06). When present, the write-scope
225
234
  * gate runs HERE — after the verify, BEFORE the cherry-pick — so an out-of-scope
@@ -289,6 +298,63 @@ export declare function nodeAcceptOutcomePath(artifactsDir: string, runId: strin
289
298
  export declare function recordNodeAcceptOutcome(artifactsDir: string, runId: string, blockId: string, result: AcceptNodeWorktreeResult): Promise<void>;
290
299
  /** Load a node's recorded accept outcome, or null when none was written. */
291
300
  export declare function loadNodeAcceptOutcome(artifactsDir: string, runId: string, blockId: string): Promise<AcceptNodeWorktreeResult | null>;
301
+ /**
302
+ * The per-node worktree worker an in-process driver launches: it edits within the
303
+ * node's isolated worktree (cwd-confined), writes its result file, and returns the
304
+ * transport outcome. `makeProviderNodeDispatcher` is the live implementation; tests
305
+ * inject a stub. Structurally identical to `nextStep`'s `ProgrammaticNodeDispatcher`.
306
+ */
307
+ export type WorktreeNodeWorker = (args: {
308
+ block: RemediationBlock;
309
+ slot: ProviderSlot;
310
+ worktreeRoot: string;
311
+ resultPath: string;
312
+ }) => Promise<RollingDispatchResult<{
313
+ block_id: string;
314
+ }>>;
315
+ /** One node's worktree-lifecycle result: the worker transport outcome + the accept lifecycle. */
316
+ export interface NodeWorktreeExecution {
317
+ /** Worker transport outcome the rolling engine consumes (success/error/rate_limited/timeout). */
318
+ result: RollingDispatchResult<{
319
+ block_id: string;
320
+ }>;
321
+ /** Tool-owned accept outcome (commit→verify→merge), already persisted via recordNodeAcceptOutcome. */
322
+ accept: AcceptNodeWorktreeResult;
323
+ }
324
+ /**
325
+ * Run ONE node's full in-process lifecycle in an isolated worktree — shared by BOTH
326
+ * in-process callers (the reactive `driveRollingImplementDispatch` engine and the
327
+ * A-8 hybrid executor) so they create / commit / verify / merge identically:
328
+ *
329
+ * reset + create the node's worktree → link node_modules → seed declared targets →
330
+ * launch the worker (`dispatchNode`) → `acceptNodeWorktree` (tool-commit, rebase,
331
+ * verify, write-scope gate, cherry-pick) → persist the accept outcome.
332
+ *
333
+ * Claim ownership is the CALLER's concern (the reactive engine claims through the
334
+ * shared registry; the hybrid executor is handed a coordinator-minted claim), so
335
+ * this fn neither claims nor releases — it returns the worker transport result AND
336
+ * the accept lifecycle outcome and lets the caller record `nodeOutcomes` / release.
337
+ * Any thrown error degrades to a dropped worktree + a persisted `error` accept
338
+ * outcome, never an unhandled rejection into the engine.
339
+ */
340
+ export declare function executeNodeInWorktree(args: {
341
+ block: RemediationBlock;
342
+ slot: ProviderSlot;
343
+ root: string;
344
+ artifactsDir: string;
345
+ runId: string;
346
+ resultPath: string;
347
+ /** Untracked declared targets to seed into the worktree (the node's write set or write∪read). */
348
+ seedPaths: string[];
349
+ /** Every block's declared write scope, for the accept-time write-scope gate (OBL-DS-06). */
350
+ allBlockScopes: Array<{
351
+ block_id: string;
352
+ write_paths: string[];
353
+ }>;
354
+ /** The node's own targeted_commands, run IN ADDITION to the derived verify (task_7d35176d). */
355
+ additionalVerifyCommands?: string[];
356
+ dispatchNode: WorktreeNodeWorker;
357
+ }): Promise<NodeWorktreeExecution>;
292
358
  export interface DispatchOptions {
293
359
  root: string;
294
360
  artifactsDir: string;
@@ -350,6 +416,14 @@ export declare function isBuildFreeVerifyCommand(cmd: string): boolean;
350
416
  * the testable core of {@link deriveVerifyCommandsFromBranch}. */
351
417
  export declare function verifyCommandsForEdits(editedFiles: Iterable<string>): string[];
352
418
  export declare function deriveVerifyCommandsFromBranch(root: string, branch: string): string[];
419
+ /**
420
+ * A node's own `targeted_commands` for the per-node verify (task_7d35176d) — the union
421
+ * of the block's `targeted_commands` and its findings' `targeted_commands` (the
422
+ * auditor-specified, fix-specific verification). `acceptNodeWorktree` runs these IN
423
+ * ADDITION to the derived touched-test commands (build-free subset, deduped), so a
424
+ * fix-specific regression check is honoured even when the fix touches no test file.
425
+ */
426
+ export declare function targetedCommandsForBlock(state: RemediationState, blockId: string): string[];
353
427
  /**
354
428
  * Best-effort: repo-relative test files that reference any of `sourceFiles` (by
355
429
  * module basename). Pulling them into a block's access lets the worker that
@@ -1 +1 @@
1
- {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/dispatch.ts"],"names":[],"mappings":"AAOA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,eAAe,EAEf,oBAAoB,EACpB,2BAA2B,EAE3B,oBAAoB,EACpB,YAAY,EACb,MAAM,oBAAoB,CAAC;AA6B5B,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAElB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;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";
4
4
  import { OwnershipRegistry } from "../dispatch/ownershipRegistry.js";
5
5
  import { routeAmendmentRequest } from "../dispatch/amendmentClaim.js";
6
6
  import { toBlockId, fromBlockId } from "../contractPipeline/idRegistry.js";
7
+ import { readContractArtifact } from "../contractPipeline/artifactStore.js";
8
+ import { verifyPairingForFinding } from "../contractPipeline/changeClassification.js";
7
9
  import { spawnSync } from "node:child_process";
8
10
  import { StateStore } from "../state/store.js";
9
11
  import { REMEDIATION_STEP, isClarificationCategory, } from "../state/types.js";
10
- import { resolveWindowsShimSpawnCommand } from "audit-tools/shared";
12
+ import { resolveWindowsShimSpawnCommand, probeQuotaSource } from "audit-tools/shared";
11
13
  import { findingLead, renderFindingBadgeBody } from "audit-tools/shared";
12
- import { AGENT_FEEDBACK_FILENAME, readJsonFile, readOptionalJsonFile, writeJsonFile, writeTextFile, withFsRetry, formatValidationIssues, detectRepoConventions, formatRepoConventions, toPromptPathToken, estimateTokensFromBytes, buildQuotaSource, severityRank, findingNeedsVerificationBeforeFix, compareTier, mostCapableTier, normalizeRepoPath, hasConfiguredOpenAiCompatible, } from "audit-tools/shared";
14
+ import { AGENT_FEEDBACK_FILENAME, readJsonFile, readOptionalJsonFile, writeJsonFile, writeTextFile, withFsRetry, formatValidationIssues, detectRepoConventions, formatRepoConventions, toPromptPathToken, estimateTokensFromBytes, buildQuotaSource, severityRank, findingNeedsVerificationBeforeFix, compareTier, mostCapableTier, normalizeRepoPath, buildSourcePools, buildHostModelPools, } from "audit-tools/shared";
13
15
  import { validateImplementWorkerResult } from "../validation/artifacts.js";
14
16
  import { REMEDIATION_DISPATCH_PLAN_CONTRACT_VERSION, REMEDIATION_DISPATCH_QUOTA_CONTRACT_VERSION, REMEDIATION_WORKER_RESULT_CONTRACT_VERSION, } from "./types.js";
15
17
  import { classifyFindingRisk, specIndicatesNoChange, hasExecutableEvidence, dependencyVerifiedComplete, } from "./stepUtils.js";
@@ -142,7 +144,7 @@ export async function scheduleWave(input) {
142
144
  // absent handshake. A rank's opaque `model_id` keys that pool's quota.
143
145
  const pools = await Promise.all((roster ?? [null]).map(async (entry) => {
144
146
  const poolKey = buildProviderModelKey(providerName, entry?.model_id ?? quotaModelKeySegment);
145
- const quotaSourceSnapshot = await quotaSource.queryCurrentUsage(poolKey).catch(() => null);
147
+ const probe = await probeQuotaSource(quotaSource, poolKey).catch(() => ({ snapshot: null, status: "degraded" }));
146
148
  return {
147
149
  id: poolKey,
148
150
  providerName,
@@ -156,7 +158,8 @@ export async function scheduleWave(input) {
156
158
  output_tokens: entry.output_tokens,
157
159
  }
158
160
  : hostCapabilityLimits,
159
- quotaSourceSnapshot,
161
+ quotaSourceSnapshot: probe.snapshot,
162
+ ...(probe.status === "degraded" ? { quotaSignalDegraded: true } : {}),
160
163
  };
161
164
  }));
162
165
  const capacity = computeDispatchCapacity({
@@ -209,45 +212,34 @@ export async function buildConfirmedPools(input) {
209
212
  halfLifeHours: sessionConfig.quota
210
213
  ?.empirical_half_life_hours,
211
214
  });
212
- const primaryPools = await Promise.all((roster ?? [null]).map(async (entry) => {
213
- const poolKey = buildProviderModelKey(providerName, entry?.model_id ?? quotaModelKeySegment);
214
- const quotaSourceSnapshot = await quotaSource.queryCurrentUsage(poolKey).catch(() => null);
215
- return {
216
- id: poolKey,
217
- providerName,
218
- hostModel,
219
- ...(entry ? { rank: entry.rank } : {}),
220
- hostConcurrencyLimit: hostLimit,
221
- quotaStateEntry: quotaEntries[poolKey] ?? null,
215
+ // Host-model pools via the shared host-pool-from-roster core (identical shape across
216
+ // audit + remediate). The per-tool part is just the key + the roster/capability limits.
217
+ const primaryPools = await buildHostModelPools({
218
+ providerName,
219
+ hostModel,
220
+ hostConcurrencyLimit: hostLimit,
221
+ quotaSource,
222
+ quotaEntries,
223
+ roster,
224
+ resolve: (entry) => ({
225
+ poolKey: buildProviderModelKey(providerName, entry?.model_id ?? quotaModelKeySegment),
222
226
  discoveredLimits: entry
223
227
  ? { context_tokens: entry.context_tokens, output_tokens: entry.output_tokens }
224
228
  : hostCapabilityLimits,
225
- quotaSourceSnapshot,
226
- };
227
- }));
228
- // A configured openai-compatible endpoint (NIM/vLLM/…) is a real, always-available
229
- // API pool surface it as a SECOND CapacityPool alongside the primary so the
230
- // scheduler's proactive cross-pool spill (INV-QD-14, selectProvider) can route a
231
- // node here when the primary pool is quota-degraded. Only when it isn't already
232
- // the primary provider (no duplicate pool key). It's an independent API pool, so
233
- // hostConcurrencyLimit is null (it doesn't draw on the host subagent budget) and
234
- // it has no proactive quota source / capability handshake (discoveredLimits null;
235
- // concurrency is governed by learned 429/RPM state).
236
- if (providerName !== "openai-compatible" &&
237
- hasConfiguredOpenAiCompatible(sessionConfig.openai_compatible)) {
238
- const apiModel = sessionConfig.openai_compatible?.model ?? null;
239
- const apiPoolKey = buildProviderModelKey("openai-compatible", apiModel);
240
- const apiSnapshot = await quotaSource.queryCurrentUsage(apiPoolKey).catch(() => null);
241
- primaryPools.push({
242
- id: apiPoolKey,
243
- providerName: "openai-compatible",
244
- hostModel: apiModel,
245
- hostConcurrencyLimit: null,
246
- quotaStateEntry: quotaEntries[apiPoolKey] ?? null,
247
- discoveredLimits: null,
248
- quotaSourceSnapshot: apiSnapshot,
249
- });
250
- }
229
+ }),
230
+ });
231
+ // Every configured dispatchable backend source (any non-IDE source: NIM/vLLM API,
232
+ // a CLI pool, ) becomes a CapacityPool alongside the primary, so the scheduler's
233
+ // proactive cross-pool spill (INV-QD-14) and the A-8 coordinator can route work to
234
+ // them. Single-sourced in shared (`buildSourcePools`) so audit and remediate surface
235
+ // the IDENTICAL pool shapes the spill topology can't drift.
236
+ const sourcePools = await buildSourcePools({
237
+ sessionConfig,
238
+ primaryProviderName: providerName,
239
+ quotaSource,
240
+ quotaEntries,
241
+ });
242
+ primaryPools.push(...sourcePools);
251
243
  return primaryPools;
252
244
  }
253
245
  export function buildDispatchQuota(runId, phase, schedule, quotaStateEntry) {
@@ -743,7 +735,7 @@ export function ensureWorktreeNodeModules(mainRoot, worktreeRoot) {
743
735
  * caller persists via `mergeImplementResults`.
744
736
  */
745
737
  export function acceptNodeWorktree(params) {
746
- const { root, runId, blockId, worktreeRoot: wt, branch, workerOutcome, targetedCommands } = params;
738
+ const { root, runId, blockId, worktreeRoot: wt, branch, workerOutcome, targetedCommands, additionalVerifyCommands } = params;
747
739
  let verifyPassed = false;
748
740
  let merged = false;
749
741
  if (workerOutcome !== "success") {
@@ -778,10 +770,16 @@ export function acceptNodeWorktree(params) {
778
770
  // Verify commands: when the host omits them (real rolling drivers), DERIVE them
779
771
  // from the just-committed branch's touched test files — correct paths/runner by
780
772
  // construction, only this node's own tests, never the whole suite. An explicit
781
- // list (or `[]` to skip) overrides; both used by lifecycle unit tests.
782
- const verifyCommands = targetedCommands === undefined
773
+ // list (or `[]` to skip) overrides; both used by lifecycle unit tests. task_7d35176d:
774
+ // run the derive AND the node's own build-free `targeted_commands` (deduped) — the
775
+ // auditor's fix-specific regression checks the derive misses when a fix touches no
776
+ // test. `additionalVerifyCommands` is ignored on the explicit-override path.
777
+ const baseCommands = targetedCommands === undefined
783
778
  ? deriveVerifyCommandsFromBranch(root, branch)
784
779
  : targetedCommands;
780
+ const verifyCommands = targetedCommands === undefined
781
+ ? [...new Set([...baseCommands, ...buildFreeVerifyCommands(additionalVerifyCommands)])]
782
+ : baseCommands;
785
783
  const verify = verifyCommands.length > 0
786
784
  ? verifyNodeInWorktree(wt, verifyCommands)
787
785
  : { passed: true, output: "" };
@@ -871,6 +869,68 @@ export async function loadNodeAcceptOutcome(artifactsDir, runId, blockId) {
871
869
  ...(raw.diagnostic !== undefined ? { diagnostic: raw.diagnostic } : {}),
872
870
  };
873
871
  }
872
+ /**
873
+ * Run ONE node's full in-process lifecycle in an isolated worktree — shared by BOTH
874
+ * in-process callers (the reactive `driveRollingImplementDispatch` engine and the
875
+ * A-8 hybrid executor) so they create / commit / verify / merge identically:
876
+ *
877
+ * reset + create the node's worktree → link node_modules → seed declared targets →
878
+ * launch the worker (`dispatchNode`) → `acceptNodeWorktree` (tool-commit, rebase,
879
+ * verify, write-scope gate, cherry-pick) → persist the accept outcome.
880
+ *
881
+ * Claim ownership is the CALLER's concern (the reactive engine claims through the
882
+ * shared registry; the hybrid executor is handed a coordinator-minted claim), so
883
+ * this fn neither claims nor releases — it returns the worker transport result AND
884
+ * the accept lifecycle outcome and lets the caller record `nodeOutcomes` / release.
885
+ * Any thrown error degrades to a dropped worktree + a persisted `error` accept
886
+ * outcome, never an unhandled rejection into the engine.
887
+ */
888
+ export async function executeNodeInWorktree(args) {
889
+ const { block, slot, root, artifactsDir, runId, resultPath, seedPaths, allBlockScopes, additionalVerifyCommands, dispatchNode } = args;
890
+ const branch = worktreeBranchForBlock(block.block_id, runId);
891
+ const wt = worktreePath(root, block.block_id, runId);
892
+ try {
893
+ // Idempotent reset of any worktree dir AND leftover branch from a prior attempt
894
+ // (a `rate_limited` re-queue re-enters for the same block with its branch still
895
+ // present), then create this node's isolated worktree, link the main checkout's
896
+ // node_modules (gitignored → absent in a fresh worktree) so verify can run, and
897
+ // seed untracked declared targets a committed-files-only worktree can't see.
898
+ resetNodeWorktreeAndBranch(root, wt, branch);
899
+ createWorktree(root, wt, branch);
900
+ ensureWorktreeNodeModules(root, wt);
901
+ seedUntrackedDeclaredPaths(root, wt, seedPaths);
902
+ const result = await dispatchNode({ block, slot, worktreeRoot: wt, resultPath });
903
+ // Shared post-worker lifecycle. Verify commands are DERIVED from the node's
904
+ // actually-touched tests inside acceptNodeWorktree (post-commit) — omit them so a
905
+ // host-authored path can't mis-verify. The write-scope gate adjudicates the node's
906
+ // ACTUAL git edits against every block's declared scope.
907
+ const accept = acceptNodeWorktree({
908
+ root,
909
+ runId,
910
+ blockId: block.block_id,
911
+ worktreeRoot: wt,
912
+ branch,
913
+ workerOutcome: result.outcome,
914
+ additionalVerifyCommands,
915
+ scope: { allBlockScopes },
916
+ });
917
+ await recordNodeAcceptOutcome(artifactsDir, runId, block.block_id, accept);
918
+ return { result, accept };
919
+ }
920
+ catch (err) {
921
+ removeWorktree(root, wt);
922
+ const accept = { outcome: "error", verifyPassed: false, merged: false };
923
+ await recordNodeAcceptOutcome(artifactsDir, runId, block.block_id, accept);
924
+ return {
925
+ result: {
926
+ packet: { id: block.block_id, payload: { block_id: block.block_id }, estimatedTokens: 0, complexity: 0.5 },
927
+ outcome: "error",
928
+ error: err,
929
+ },
930
+ accept,
931
+ };
932
+ }
933
+ }
874
934
  /** Read the promoted DAG-node overlay fields off a Finding (all optional). */
875
935
  function nodeFieldsOf(finding) {
876
936
  return finding;
@@ -987,6 +1047,25 @@ export function deriveVerifyCommandsFromBranch(root, branch) {
987
1047
  return [];
988
1048
  return verifyCommandsForEdits(edited.files);
989
1049
  }
1050
+ /**
1051
+ * A node's own `targeted_commands` for the per-node verify (task_7d35176d) — the union
1052
+ * of the block's `targeted_commands` and its findings' `targeted_commands` (the
1053
+ * auditor-specified, fix-specific verification). `acceptNodeWorktree` runs these IN
1054
+ * ADDITION to the derived touched-test commands (build-free subset, deduped), so a
1055
+ * fix-specific regression check is honoured even when the fix touches no test file.
1056
+ */
1057
+ export function targetedCommandsForBlock(state, blockId) {
1058
+ const block = state.plan?.blocks?.find((b) => b.block_id === blockId);
1059
+ if (!block)
1060
+ return [];
1061
+ const out = [...(block.targeted_commands ?? [])];
1062
+ for (const fid of block.items) {
1063
+ const finding = state.plan?.findings?.find((f) => f.id === fid);
1064
+ for (const c of finding?.targeted_commands ?? [])
1065
+ out.push(c);
1066
+ }
1067
+ return [...new Set(out)];
1068
+ }
990
1069
  function markStarted(item) {
991
1070
  item.started_at ??= new Date().toISOString();
992
1071
  delete item.completed_at;
@@ -2152,6 +2231,21 @@ export function detectOverlappingEdits(editedByBlock) {
2152
2231
  // Deterministic ordering so the diagnostic + tests are stable.
2153
2232
  return overlaps.sort((a, b) => a.path.localeCompare(b.path));
2154
2233
  }
2234
+ /**
2235
+ * The contract-pipeline obligation ids a finding covers — the union of its
2236
+ * `contract_obligation_ids` (satisfied) and `verification_obligation_ids`
2237
+ * (verified). Empty for audit-findings intake (no contract overlay), so the DC-5
2238
+ * verify gate is inert there.
2239
+ */
2240
+ function obligationIdsForFinding(state, findingId) {
2241
+ const finding = state.plan?.findings.find((f) => f.id === findingId);
2242
+ if (!finding)
2243
+ return [];
2244
+ return [
2245
+ ...(finding.contract_obligation_ids ?? []),
2246
+ ...(finding.verification_obligation_ids ?? []),
2247
+ ];
2248
+ }
2155
2249
  export async function mergeImplementResults(options, runId) {
2156
2250
  const plan = await readJsonFile(dispatchPlanPath(options.artifactsDir, runId, "implement"));
2157
2251
  if (plan.contract_version !== REMEDIATION_DISPATCH_PLAN_CONTRACT_VERSION ||
@@ -2190,6 +2284,14 @@ async function mergeImplementResultsIntoState(options, runId, plan, state) {
2190
2284
  throw new Error("Cannot merge implement results without items.");
2191
2285
  }
2192
2286
  const dir = runDir(options.artifactsDir, runId, "implement");
2287
+ // DC-5 verify gate: load the obligation_ledger + test_validator_plan once so a
2288
+ // resolved finding that covers a behavior-CHANGE obligation can be re-blocked
2289
+ // when its test specs are only one polarity (a positive without a scoped
2290
+ // negative, or a negative-only set). Absent for non-contract-pipeline runs
2291
+ // (audit-findings intake), where the gate is inert. Read defensively: the
2292
+ // payloads are the validated artifact bodies, or `undefined` when missing.
2293
+ const obligationLedgerPayload = (await readContractArtifact(options.artifactsDir, "obligation_ledger"))?.payload;
2294
+ const testValidatorPlanPayload = (await readContractArtifact(options.artifactsDir, "test_validator_plan"))?.payload;
2193
2295
  const plannedBlockIds = new Set(plan.items.map((item) => item.block_id).filter((id) => typeof id === "string"));
2194
2296
  const itemsToMerge = [...plan.items];
2195
2297
  for (const block of state.plan?.blocks ?? []) {
@@ -2360,6 +2462,15 @@ async function mergeImplementResultsIntoState(options, runId, plan, state) {
2360
2462
  // The worker's explicit `resolved_no_change` is a no-change signal in its
2361
2463
  // own right; the spec heuristic is the fallback for a plain `resolved`.
2362
2464
  const isNoChange = itemResult.status === "resolved_no_change" || specIndicatesNoChange(spec);
2465
+ // DC-5 verify gate: an actual-change closure for a finding that covers a
2466
+ // behavior-CHANGE obligation must have a paired positive+scoped-negative
2467
+ // test spec; only-one-polarity (or an unscoped repo-wide negative) is
2468
+ // blocked, never silently resolved. The same single-source pairing/scoping
2469
+ // evaluation the test-plan derivation gate uses. A no-change closure makes
2470
+ // no edits, so it is exempt (the closure path above already proves it).
2471
+ const pairingBlockReason = isNoChange
2472
+ ? null
2473
+ : verifyPairingForFinding(obligationIdsForFinding(state, itemResult.finding_id), obligationLedgerPayload, testValidatorPlanPayload);
2363
2474
  if (isNoChange && !hasExecutableEvidence(itemResult.evidence)) {
2364
2475
  // No-prose closure: a "verified-already-satisfied" (no-change) claim must
2365
2476
  // be backed by an executable assertion (a test/build/check command +
@@ -2371,6 +2482,11 @@ async function mergeImplementResultsIntoState(options, runId, plan, state) {
2371
2482
  "verified-already-satisfied requires an executable regression test proving " +
2372
2483
  "the behavior (a test/build/check command + result in evidence), not prose.";
2373
2484
  }
2485
+ else if (pairingBlockReason) {
2486
+ stateItem.status = "blocked";
2487
+ markTerminal(stateItem);
2488
+ stateItem.failure_reason = pairingBlockReason;
2489
+ }
2374
2490
  else {
2375
2491
  stateItem.status = isNoChange ? "resolved_no_change" : "resolved";
2376
2492
  markTerminal(stateItem);