Pre-existing latent bug surfaced by the new @v2-gate scenario in greet.feature (added in PR #56 follow-up): shouldEnableV2 used strings.Contains(tags, "@v2") which matched the negation tag `~@v2` as a positive inclusion. Result: the greet "v1" sub-test, intended to run with v2_enabled=false, was actually starting the test server with v2_enabled=true. The @v2-gate scenario asserting "v2 disabled → 404" got 200 instead. Fix: parse the GODOG_TAGS expression by splitting on `&&` / `||` / whitespace, then check each clause for exact `@v2` match (positive inclusion only). The negation `~@v2` no longer matches. The new BDD scenario is the regression test — without the fix, it fails with status 200 instead of 404. With the fix, both greet "v1" (v2 disabled) and "v2" (v2 enabled) sub-tests pass cleanly. Verifier verdict: APPROVE. Race-clean. Full BDD suite green.
24 KiB
24 KiB