From 5affaaf7346b8ca4fe2f996aff792ffb743135a0 Mon Sep 17 00:00:00 2001 From: Tibsfox Date: Mon, 6 Apr 2026 19:52:55 -0700 Subject: [PATCH] fix(gsd): allow milestone completion when validation skipped by preference The completing-milestone dispatch guard blocked completion when operational verification was planned but the validation was intentionally skipped by a budget profile preference. The guard now detects skip-by-preference markers in the validation content and allows completion to proceed. Closes #3399 Closes #3344 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/auto-dispatch.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/auto-dispatch.ts b/src/resources/extensions/gsd/auto-dispatch.ts index ccc3921e6..6c738df9e 100644 --- a/src/resources/extensions/gsd/auto-dispatch.ts +++ b/src/resources/extensions/gsd/auto-dispatch.ts @@ -693,6 +693,10 @@ export const DISPATCH_RULES: DispatchRule[] = [ if (validationPath) { const validationContent = await loadFile(validationPath); if (validationContent) { + // Allow completion when validation was intentionally skipped by + // preference/budget profile (#3399, #3344). + const skippedByPreference = /skip(?:ped)?[\s\-]+(?:by|per|due to)\s+(?:preference|budget|profile)/i.test(validationContent); + // Accept either the structured template format (table with MET/N/A/SATISFIED) // or prose evidence patterns the validation agent may emit. const structuredMatch = @@ -700,7 +704,7 @@ export const DISPATCH_RULES: DispatchRule[] = [ (validationContent.includes("MET") || validationContent.includes("N/A") || validationContent.includes("SATISFIED")); const proseMatch = /[Oo]perational[\s\S]{0,500}?(?:✅|pass|verified|confirmed|met|complete|true|yes|addressed|covered|satisfied|partially|n\/a|not[\s-]+applicable)/i.test(validationContent); - const hasOperationalCheck = structuredMatch || proseMatch; + const hasOperationalCheck = skippedByPreference || structuredMatch || proseMatch; if (!hasOperationalCheck) { return { action: "stop" as const,