Skip to content

transition: don't treat the 'GO / NO-GO' heading as a NO-GO verdict#195

Open
selimdev00 wants to merge 1 commit into
LarsCowe:mainfrom
selimdev00:fix/preflight-nogo-heading
Open

transition: don't treat the 'GO / NO-GO' heading as a NO-GO verdict#195
selimdev00 wants to merge 1 commit into
LarsCowe:mainfrom
selimdev00:fix/preflight-nogo-heading

Conversation

@selimdev00

Copy link
Copy Markdown

Problem

validateReadiness flags a readiness report as NO-GO with a bare substring test:

if (/NO[-\s]?GO/i.test(content)) { /* E1: blocks the transition */ }

But the conventional readiness report heading is "GO / NO-GO Decision" - which literally contains NO-GO. (bmalph itself classifies a readiness artifact by exactly that heading: specs-index.ts matches /^##\s+GO\s*\/\s*NO-GO/m.) So a perfectly GO-ready report is flagged E1 and bmalph implement is blocked unless you pass --force. Prose like "this isn't a no-go" trips it too.

Fix

Match a NO-GO verdict but skip the GO / NO-GO label, via a negative lookbehind for the leading GO /:

const NO_GO_VERDICT_PATTERN = /(?<!GO\s*\/\s*)\bNO[-\s]?GO\b/i;
  • ## GO / NO-GO Decision + Decision: GO -> not flagged (was: wrongly flagged)
  • ## GO / NO-GO Decision + Decision: NO-GO -> still flagged
  • Status: NO-GO / NO GO / No-Go / NOGO -> still flagged (existing tests unchanged)

Node/V8 supports variable-length lookbehind, so this needs no engine flags.

Tests

Added cases for the GO-ready report with the heading (no issue), a NO-GO verdict alongside the heading (still E1), and the compact GO/NO-GO label. All existing validateReadiness tests still pass (49 total in the file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant