From 0ab3e888d5b8d0a8f7444c967c7dc35596c24e15 Mon Sep 17 00:00:00 2001 From: deseltrus <101901449+deseltrus@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:36:58 +0100 Subject: [PATCH] feat(auto): check verification class compliance before milestone completion (#2623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The completing-milestone dispatch gate checks structural prerequisites (slice summaries exist, implementation artifacts present) but does not check whether planned verification classes were addressed in validation. Add a check: if verification_operational is non-empty and not "none", verify the validation output documents operational compliance. If not addressed, stop progression with a warning directing the user to re-run validation with verification class awareness. Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: TÂCHES --- src/resources/extensions/gsd/auto-dispatch.ts | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/auto-dispatch.ts b/src/resources/extensions/gsd/auto-dispatch.ts index 638564b0e..18f7aac26 100644 --- a/src/resources/extensions/gsd/auto-dispatch.ts +++ b/src/resources/extensions/gsd/auto-dispatch.ts @@ -13,7 +13,7 @@ import type { GSDState } from "./types.js"; import type { GSDPreferences } from "./preferences.js"; import type { UatType } from "./files.js"; import { loadFile, extractUatType, loadActiveOverrides } from "./files.js"; -import { isDbAvailable, getMilestoneSlices, getPendingGates, markAllGatesOmitted } from "./gsd-db.js"; +import { isDbAvailable, getMilestoneSlices, getPendingGates, markAllGatesOmitted, getMilestone } from "./gsd-db.js"; import { extractVerdict, isAcceptableUatVerdict } from "./verdict-parser.js"; import { @@ -647,6 +647,33 @@ export const DISPATCH_RULES: DispatchRule[] = [ }; } + // Verification class compliance: if operational verification was planned, + // ensure the validation output documents it before allowing completion. + try { + if (isDbAvailable()) { + const milestone = getMilestone(mid); + if (milestone?.verification_operational && + milestone.verification_operational.toLowerCase() !== "none") { + const validationPath = resolveMilestoneFile(basePath, mid, "VALIDATION"); + if (validationPath) { + const validationContent = await loadFile(validationPath); + if (validationContent) { + const hasOperationalCheck = + validationContent.includes("Operational") && + (validationContent.includes("MET") || validationContent.includes("N/A")); + if (!hasOperationalCheck) { + return { + action: "stop" as const, + reason: `Milestone ${mid} has planned operational verification ("${milestone.verification_operational.substring(0, 100)}") but the validation output does not address it. Re-run validation with verification class awareness, or update the validation to document operational compliance.`, + level: "warning" as const, + }; + } + } + } + } + } + } catch { /* fall through — don't block on DB errors */ } + return { action: "dispatch", unitType: "complete-milestone",