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.
Per-package isolated Postgres schema with migrations. Local benchmark: 12.87s sequential → 4.51s parallel = 2.85x. ADR-0025 status to Implemented. CI uses BDD_SCHEMA_ISOLATION=true.
Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
- Add swag fmt to git pre-commit hook and CI/CD pipeline
- Create comprehensive CONTRIBUTING.md guide with AI section
- Update ADR-0013 with swag fmt documentation
- Fix swagger generation to include all endpoints
- Improve local testing scripts and workflows
- Update Dockerfile for better swagger handling
- Fix CI/CD workflow file references
- Add ADR-0012 documenting the decision to format only staged Go files
- Update ADR README.md with new entry
- Document rationale, alternatives, and verification results
- Include future considerations for monitoring and CI/CD integration
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Added /api/v2/greet POST endpoint with JSON request/response
- Implemented ServiceV2 with Hello my friend <name>! greeting format
- Added api.v2_enabled feature flag (default: false)
- Extended BDD tests to cover v2 scenarios
- Maintained full backward compatibility with v1 API
- Added DLC_API_V2_ENABLED environment variable support
- Created ADR 0010-api-v2-feature-flag.md
- Updated configuration system to support API versioning
Implement comprehensive BDD testing framework using Godog:
- Added feature files for greet and health endpoints
- Created test server that runs on port 9191
- Implemented step definitions using Godog's exact patterns
- Fixed undefined step warnings by following Godog conventions
- All tests passing with proper response validation
- Maintained black box testing principles
Key files:
- pkg/bdd/steps/steps.go - Step definitions using StepContext struct
- pkg/bdd/testserver/ - Test server implementation
- features/*.feature - BDD feature files
- pkg/bdd/README.md - Documentation for proper step patterns
The implementation follows Godog's exact pattern suggestions to avoid
undefined step warnings and provides comprehensive API testing.