🐛 fix(bdd): shouldEnableV2 wrongly matched ~@v2 as @v2 substring + new gate regression scenario #57

Merged
arcodange merged 1 commits from fix/should-enable-v2-tag-parsing into main 2026-05-05 10:38:09 +02:00
Owner

Pre-existing latent bug surfaced by the new @v2-gate BDD scenario from PR #56 follow-up. The GODOG_TAGS substring check matched negation ~@v2 as positive inclusion → greet v1 sub-test ran with v2_enabled=true silently. Fix: proper clause parsing. Adds the @v2-gate scenario as regression test.

Pre-existing latent bug surfaced by the new @v2-gate BDD scenario from PR #56 follow-up. The GODOG_TAGS substring check matched negation ~@v2 as positive inclusion → greet v1 sub-test ran with v2_enabled=true silently. Fix: proper clause parsing. Adds the @v2-gate scenario as regression test.
arcodange added 1 commit 2026-05-05 10:38:01 +02:00
🐛 fix(bdd): shouldEnableV2 wrongly matched ~@v2 as @v2 substring
All checks were successful
CI/CD Pipeline / Build Docker Cache (push) Successful in 10s
CI/CD Pipeline / CI Pipeline (push) Successful in 6m46s
CI/CD Pipeline / Trigger Docker Push (push) Has been skipped
61837b7385
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.
arcodange merged commit 3b4b40c1cf into main 2026-05-05 10:38:09 +02:00
arcodange deleted branch fix/should-enable-v2-tag-parsing 2026-05-05 10:38:10 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange/dance-lessons-coach#57