Commit Graph

27 Commits

Author SHA1 Message Date
25a20d4380 📝 docs: add ADR 0025 documenting BDD scenario isolation strategies
- Document 5 considered options for BDD test isolation
- Analyze pros/cons of each approach (transaction rollback, clear tables, schema-per-scenario, database-per-feature, combined)
- Explain Gherkin Background behavior and implications
- Detail critical limitation: PostgreSQL schemas don't isolate in-memory state
- Recommend enhanced multi-layer isolation strategy
- Document cache key prefix/suffix approach for future cache integration
- Add schema and cache key naming conventions
- Reject explicit Background setup approach as error-prone and unscalable

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-11 07:57:46 +02:00
0aedf829de feat: implement schema-per-scenario isolation for BDD tests
All checks were successful
CI/CD Pipeline / Build Docker Cache (push) Successful in 14s
CI/CD Pipeline / CI Pipeline (push) Successful in 3m52s
- Add BDD_SCHEMA_ISOLATION env var to enable schema-per-scenario mode
- Generate unique schema names using SHA256 hash of feature+scenario
- Implement SetupScenarioSchema() and TeardownScenarioSchema() methods
- Handle search_path configuration for schema isolation
- Use CASCADE drop to clean up all scenario-created DB objects
- Add isSchemaIsolationEnabled() helper to suite.go
- Update cleanup flow: skip table clearing when schema isolation is active
- Add ADR 0025 documenting isolation strategies and decision rationale

Activation: Set BDD_SCHEMA_ISOLATION=true to enable
Debug: Set BDD_ENABLE_CLEANUP_LOGS=true for verbose isolation logging

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-10 22:46:02 +02:00
02bbfdb111 📝 docs: add ADR 0024 for BDD test organization and isolation strategy
Updates .gitignore to ignore feature-specific config files

Aligns test organization with Godog best practices and community standards
2026-04-09 22:45:40 +02:00
1da6789e1b 📝 docs: add ADR-0023 for config hot reloading strategy
Adds Architecture Decision Record 0023 proposing selective hot reloading
for configuration changes. The ADR analyzes different approaches and
recommends implementing hot reloading only for safe parameters like
logging level, feature flags, and telemetry settings while requiring
restart for critical parameters like server settings and credentials.

The ADR includes:
- Problem statement and decision drivers
- Analysis of 4 different approaches
- Detailed implementation strategy
- Safety considerations and error handling
- Migration plan and future enhancements

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 19:11:37 +02:00
8dcfeea814 📝 docs: add ADR-0022 for rate limiting and cache strategy
- Create comprehensive ADR-0022 covering multi-phase implementation
- Phase 1: In-memory cache with go-cache library
- Phase 2: Redis-compatible cache with Dragonfly/KeyDB
- Phase 3: Rate limiting with ulule/limiter/v3
- Add detailed technical specifications and implementation plans
- Update ADR README with new entries
- Addresses performance and security requirements

Related to Issue #13: Implement Rate Limiting and Caching Strategy
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 16:45:14 +02:00
8caefff43e 🔧 chore: implement JWT configuration with TTL and retention policy
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 9s
CI/CD Pipeline / CI Pipeline (push) Failing after 4m19s
- Add JWTConfig struct with TTL and SecretRetention fields
- Configure default values: TTL=1h, RetentionFactor=2.0, MaxRetention=72h, CleanupInterval=1h
- Add environment variable support (DLC_AUTH_JWT_*)
- Implement getter methods for JWT configuration
- Add comprehensive unit tests for default and custom values
- Update logging to include JWT configuration values
- Fix BDD step implementation issues (duplicate methods, unused imports)
- All BDD tests passing with new JWT configuration

Implements JWT secret retention policy as defined in ADR-0021
Closes #42
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 16:36:46 +02:00
31af8bed07 📝 docs: update existing ADRs with user authentication references
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 23s
CI/CD Pipeline / CI Pipeline (push) Failing after 4m54s
Updated existing Architecture Decision Records:
- Added user authentication references to ADR-0008 (BDD Testing)
- Updated ADR-0016 (CI/CD Pipeline) with authentication workflow
- Enhanced ADR-0017 (Trunk-based Development) with BDD integration
- Added security considerations to multiple ADRs
- Updated cross-references throughout documentation

Removed deprecated files:
- docker-compose.cicd-test.yml (replaced by docker-compose.yml)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 00:26:33 +02:00
69e7c44eb2 📝 docs: add comprehensive user management ADR and technical documentation
Added ADR-0018 for User Management and Authentication System with:
- Non-persisted admin user with master password authentication
- JWT-based authentication with bcrypt password hashing
- PostgreSQL database schema and GORM integration
- Admin-assisted password reset workflow
- Comprehensive security considerations

Added ADR-0019 for BDD Feature Structure:
- Epic/User Story organization pattern
- Unified development workflow
- Source of truth hierarchy

Added ADR-0020 for Docker Build Strategy:
- Multi-stage build approach
- Cache optimization strategy
- Production vs development build differences

Added technical documentation:
- Complete user management system specification
- API endpoints and integration details
- Security architecture and best practices

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 00:25:35 +02:00
10c909581c 📝 docs: add comprehensive user management ADR and technical documentation\n\nAdded ADR-0018 for User Management and Authentication System with:\n- Non-persisted admin user with master password authentication\n- JWT-based authentication with bcrypt password hashing\n- PostgreSQL database schema and GORM integration\n- Admin-assisted password reset workflow\n- Comprehensive security considerations\n\nAdded ADR-0019 for BDD Feature Structure:\n- Epic/User Story organization pattern\n- Unified development workflow\n- Source of truth hierarchy\n\nAdded technical documentation:\n- Complete user management system specification\n- API endpoints and integration details\n- Security architecture and best practices\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Has been cancelled
2026-04-06 22:41:21 +02:00
c8b0dbd0a1 feat: automated version badge updates and CI/CD improvements
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Failing after 16m21s
2026-04-06 19:07:02 +02:00
183933b43e feat: integrate swag fmt and improve CI/CD workflows
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Successful in 4m51s
Docker Build and Publish / Version Bump (push) Successful in 4m54s
Docker Build and Publish / Build and Push Docker Image (push) Failing after 2m51s
Go CI/CD Pipeline / Build and Test (push) Successful in 9m47s
Go CI/CD Pipeline / Version Management (push) Successful in 12s
- 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
2026-04-06 15:36:55 +02:00
2497363a52 📝 docs: clarify testing approach and OpenAPI implementation in ADRs
- Update ADR 0009 to reflect actual hybrid testing status (BDD + docs only)
- Update ADR 0013 to clarify swaggo/swag choice over oapi-codegen
- Add implementation status sections showing  completed vs  deferred
- Explain pragmatic reasons for current approach
- Provide future migration path for SDK generation
- Maintain transparency about framework compatibility decisions

See updated ADRs for complete details on current testing architecture
and when/if we might need full hybrid approach with SDK generation.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-05 23:38:13 +02:00
b391534f2d 🤖 feat: implement trunk-based CI/CD with local testing
- Designed trunk-based development workflow with branch protection
- Added workflow validation job to prevent main branch breaks
- Integrated act (GitHub Actions runner) for local Gitea workflow testing
- Created unified CI/CD script interface (scripts/cicd.sh)
- Added YAML lint configuration with practical limits (400 chars)
- Organized all CI/CD scripts under scripts/cicd/ directory
- Confirmed Gitea/GitHub Actions compatibility via local testing
- Updated ADR 0017 with implementation details and test results
- Enhanced documentation with local development workflow

See ADR-0017 for complete trunk-based development workflow documentation.
See ADR-0016 for CI/CD pipeline design.
2026-04-05 23:07:32 +02:00
4d0c3a748e 🤖 feat: implement Cobra CLI with subcommands
- Add new CLI structure in cmd/cli/
- Implement version, server, and greet commands
- Update build script to compile new CLI binary
- Add Cobra dependency to go.mod
- Update ADR 0015 to reflect implementation status
- Update README and AGENTS.md with CLI usage
- Maintain backward compatibility with existing binaries

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-05 11:34:00 +02:00
a5344d6ed8 📝 docs: add comprehensive version management and CLI documentation 2026-04-05 11:28:11 +02:00
3e8c50d80a 📝 docs: comprehensive Swagger documentation skill with hierarchical tagging 2026-04-05 10:37:48 +02:00
737e95f65f 📝 docs: rename agent changelog for clarity
- Rename CHANGELOG.md to AGENT_CHANGELOG.md
- Better reflects purpose as agent contribution tracker
- Distinguishes from software changelog files
- Update all references in ADR and documentation
- Maintain consistency with AGENTS.md naming

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-05 00:50:33 +02:00
b279a31f88 feat: implement OpenAPI/Swagger documentation with swaggo/swag
📝 docs: add comprehensive API documentation
📦 dependencies: add swaggo/swag to go.mod
🔧 chore: add go:generate directive for documentation

- Add comprehensive API documentation using swaggo/swag
- Embed OpenAPI spec in binary using go:embed
- Add Swagger UI at /swagger/
- Document all endpoints, models, and validation rules
- Add go:generate directive for easy regeneration
- Update README, AGENTS, CHANGELOG with documentation
- Finalize ADR 0013 with implementation details
- Gitignore generated docs directory

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-05 00:45:40 +02:00
15fcb265bd 📝 docs: comprehensive OpenAPI ADR with explicit trade-offs analysis
- Add detailed trade-offs analysis section
- Explicitly state what we gain and give up
- Define critical vs nice-to-have requirements
- Add cost-benefit analysis
- Document decision justification
- Provide migration path forward
- Include final trade-off summary table
- Update revision history with requirements analysis

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-04 22:52:41 +02:00
c737c79191 📝 docs: add gRPC adoption strategy ADR
- Document hybrid REST/gRPC approach (ADR-0014)
- Define phased implementation strategy
- Establish future triggers for gRPC adoption
- Update ADR README with new entry
- Maintain REST as primary protocol for now

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-04 21:57:40 +02:00
9336178d73 📝 docs: add ADR for staged-only Git hooks formatting
- 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>
2026-04-04 21:36:57 +02:00
d3b6d190d1 feat: implement input validation for API v2
- Added go-playground/validator dependency

- Created pkg/validation/ package with custom validator wrapper

- Implemented request validation for v2 greet endpoint

- Added structured validation error responses

- Extended BDD tests to cover validation scenarios

- Updated AGENTS.md with v2 API documentation

- Created ADR 0011-validation-library-selection.md

- Simplified server handler creation code

- Updated CHANGELOG with implementation details
2026-04-04 21:08:13 +02:00
875eb09fb7 feat: implement API v2 with feature flag control
- 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
2026-04-04 20:39:46 +02:00
d29d7a221a 📝 docs: add agent configuration ADR and compact CHANGELOG
- Add adr/0010-agent-configuration-relationship.md with complete agent config
- Update CHANGELOG.md to be compact and iterative (last 5 entries only)
- Fix documentation links to reference valid Mistral Vibe resources
- Document workflow constraints and decision making process

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-04 20:03:30 +02:00
85b6cf82ee 🧪 feat: complete BDD implementation with comprehensive documentation
Finalize BDD testing framework with:
- Unified step definitions using StepContext struct
- Proper server verification in theServerIsRunning step
- Robust JSON response handling with escaping and newline trimming
- Updated documentation reflecting current implementation
- Test validation script to ensure test quality
- All tests passing with proper black box testing

Key files updated:
- pkg/bdd/steps/steps.go: Unified step definitions
- pkg/bdd/testserver/client.go: Robust response validation
- pkg/bdd/README.md: Godog pattern guide
- doc/BDD_GUIDE.md: Updated usage guide
- adr/0008-bdd-testing.md: Updated ADR with current approach
- scripts/run-bdd-tests.sh: Test validation script

The BDD framework is now production-ready with comprehensive
documentation and proper testing practices.
2026-04-04 17:59:35 +02:00
0daaf9bf96 feat: implement BDD testing with Godog
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.
2026-04-04 17:43:57 +02:00
95596b5e12 📝 docs: consolidate documentation and add comprehensive ADRs\n\n## Summary\nMajor documentation restructuring to improve clarity, reduce redundancy,
and preserve complete architectural context for AI/developer reference.\n\n## Changes\n\n### Documentation Consolidation 🗂️\n- Simplified README.md by ~100 lines (25% reduction)\n- Removed redundant sections (project structure, configuration, API docs)\n- Added strategic cross-references between README.md and AGENTS.md\n- README.md now focused on user onboarding and basic usage\n- AGENTS.md maintained as complete technical reference\n\n### Architecture Decision Records \n- Added comprehensive ADR directory with 9 decision records:\n  * 0001-go-1.26.1-standard.md\n  * 0002-chi-router.md\n  * 0003-zerolog-logging.md (enhanced with Zap analysis)\n  * 0004-interface-based-design.md\n  * 0005-graceful-shutdown.md\n  * 0006-configuration-management.md\n  * 0007-opentelemetry-integration.md\n  * 0008-bdd-testing.md\n  * 0009-hybrid-testing-approach.md\n- Added adr/README.md with guidelines and template\n- Enhanced Zerolog ADR with detailed performance benchmarking vs Zap\n\n### Content Organization 📝\n- README.md: User-focused guide with quick start and basic examples\n- AGENTS.md: Developer/AI-focused complete technical reference\n- ADR directory: Architectural decision history and rationale\n\n## Impact\n-  Better user onboarding experience\n-  Preserved complete technical context for AI agents\n-  Reduced maintenance burden through consolidation\n-  Improved discoverability of advanced documentation\n-  Established ADR process for future decisions\n\n## Related\n- Resolves documentation redundancy issues\n- Prepares for BDD implementation with clear context\n- Supports future Swagger integration decisions\n- Maintains project history for new contributors\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-04 15:48:27 +02:00