diff --git a/src/resources/extensions/gsd/auto-dispatch.ts b/src/resources/extensions/gsd/auto-dispatch.ts index 942c98714..b0fa44e82 100644 --- a/src/resources/extensions/gsd/auto-dispatch.ts +++ b/src/resources/extensions/gsd/auto-dispatch.ts @@ -174,9 +174,9 @@ export function incrementUatCount(basePath: string, mid: string, sid: string): n * @see https://github.com/gsd-build/gsd-2/issues/2931 */ export function isVerificationNotApplicable(value: string): boolean { - const v = (value ?? "").toLowerCase().trim(); + const v = (value ?? "").toLowerCase().trim().replace(/[.\s]+$/, ""); if (!v || v === "none") return true; - return /^(?:none[\s._-]*(?:required|needed|planned)?|n\/?a|not[\s._-]+(?:applicable|required|needed)|no[\s._-]+operational[\s\S]*)$/i.test(v); + return /^(?:none[\s._-]*(?:required|needed|planned)?|n\/?a|not[\s._-]+(?:applicable|required|needed|provided)|no[\s._-]+operational[\s\S]*)$/i.test(v); } // ─── Rules ──────────────────────────────────────────────────────────────── diff --git a/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts b/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts index a9ae8d83a..3a17a5488 100644 --- a/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts +++ b/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts @@ -80,3 +80,18 @@ test("isVerificationNotApplicable: 'Verify API response times under load' requir test("isVerificationNotApplicable: 'Monitor error rates for 24h' requires verification", () => { assert.equal(isVerificationNotApplicable("Monitor error rates for 24h"), false); }); + +// Regression: #3634 — "Not provided." default from plan-milestone +test("isVerificationNotApplicable: 'Not provided.' is not applicable (#3634)", () => { + assert.equal(isVerificationNotApplicable("Not provided."), true); +}); + +test("isVerificationNotApplicable: 'Not provided' (no period) is not applicable (#3634)", () => { + assert.equal(isVerificationNotApplicable("Not provided"), true); +}); + +test("isVerificationNotApplicable: trailing period does not defeat match (#3634)", () => { + assert.equal(isVerificationNotApplicable("None required."), true); + assert.equal(isVerificationNotApplicable("N/A."), true); + assert.equal(isVerificationNotApplicable("Not applicable."), true); +}); diff --git a/src/resources/extensions/gsd/tools/plan-milestone.ts b/src/resources/extensions/gsd/tools/plan-milestone.ts index e4f3f72dd..cc24aeb2a 100644 --- a/src/resources/extensions/gsd/tools/plan-milestone.ts +++ b/src/resources/extensions/gsd/tools/plan-milestone.ts @@ -48,13 +48,13 @@ export interface PlanMilestoneParams { keyRisks?: Array<{ risk: string; whyItMatters: string }>; /** @optional — defaults to [] when omitted */ proofStrategy?: Array<{ riskOrUnknown: string; retireIn: string; whatWillBeProven: string }>; - /** @optional — defaults to "Not provided." when omitted */ + /** @optional — defaults to "" when omitted */ verificationContract?: string; - /** @optional — defaults to "Not provided." when omitted */ + /** @optional — defaults to "" when omitted */ verificationIntegration?: string; - /** @optional — defaults to "Not provided." when omitted */ + /** @optional — defaults to "" when omitted */ verificationOperational?: string; - /** @optional — defaults to "Not provided." when omitted */ + /** @optional — defaults to "" when omitted */ verificationUat?: string; /** @optional — defaults to [] when omitted */ definitionOfDone?: string[]; @@ -168,10 +168,10 @@ function validateParams(params: PlanMilestoneParams): PlanMilestoneParams { successCriteria: params.successCriteria ? validateStringArray(params.successCriteria, "successCriteria") : [], keyRisks: params.keyRisks ? validateRiskEntries(params.keyRisks) : [], proofStrategy: params.proofStrategy ? validateProofStrategy(params.proofStrategy) : [], - verificationContract: params.verificationContract ?? "Not provided.", - verificationIntegration: params.verificationIntegration ?? "Not provided.", - verificationOperational: params.verificationOperational ?? "Not provided.", - verificationUat: params.verificationUat ?? "Not provided.", + verificationContract: params.verificationContract ?? "", + verificationIntegration: params.verificationIntegration ?? "", + verificationOperational: params.verificationOperational ?? "", + verificationUat: params.verificationUat ?? "", definitionOfDone: params.definitionOfDone ? validateStringArray(params.definitionOfDone, "definitionOfDone") : [], requirementCoverage: params.requirementCoverage ?? "Not provided.", boundaryMapMarkdown: params.boundaryMapMarkdown ?? "Not provided.",