feat(auto): check verification class compliance before milestone completion (#2623)
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) <noreply@anthropic.com> Co-authored-by: TÂCHES <afromanguy@me.com>
This commit is contained in:
parent
9c81efa9f2
commit
0ab3e888d5
1 changed files with 28 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue