Commit Graph

17 Commits

Author SHA1 Message Date
3bad64026b 🧪 test: reduce BDD undefined steps from 52 to 1
- Add missing JWT secret rotation step definitions

- Implement JWT retention policy step implementations

- Fix step pattern matching for Godog compatibility

- Add proper godog.ErrPending for unimplemented steps

- Resolve argument mismatch in step definitions

Reduces undefined steps by 98% (52 → 1)

All JWT secret rotation scenarios now have step definitions

Remaining undefined step is response validation pattern issue
2026-04-09 17:40:51 +02:00
c1e628f339 📝 docs: update comprehensive documentation and project infrastructure
Documentation Updates:
- Enhanced AGENTS.md with user authentication details
- Updated README.md with authentication API documentation
- Added CONTRIBUTING.md guidelines for BDD testing
- Version management guide improvements
- Local CI/CD testing documentation

Project Infrastructure:
- Updated .gitignore for new file patterns
- Enhanced git hooks documentation
- YAML linting configuration
- Script improvements and organization
- Configuration management updates

API Enhancements:
- Greet service integration with authentication
- Server middleware for JWT validation
- Telemetry improvements
- Version management utilities

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 00:26:15 +02:00
10f25c23e0 🤖 feat: enhance CI/CD workflow with Swagger caching and badge automation
CI/CD Improvements:
- Added Swagger Docs caching with actions/cache@v5
- Dependency-based cache invalidation
- GNU tar compatibility for Gitea runners
- Template-based Dockerfile generation
- Automated coverage badge updates
- Version bump automation

Workflow Features:
- Multi-stage build with caching
- BDD and unit test coverage tracking
- Separate badges for BDD vs unit tests
- Cross-platform compatibility
- Automatic badge updates on main branch

Files Modified:
- .gitea/workflows/ci-cd.yaml - Main workflow with caching
- scripts/ci-update-coverage-badge.sh - Badge automation
- scripts/ci-version-bump.sh - Version management
- scripts/update-all-badges.sh - Comprehensive badge updates

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 00:25:59 +02:00
e2adb3bc9f 🐳 feat: implement Docker multi-stage build with caching optimization
Added Docker build infrastructure:
- Multi-stage build (builder, cache, production)
- Dependency hashing for cache invalidation
- GNU tar support for cache compatibility
- Production and development Dockerfiles
- Docker Compose for local development

Build Optimization:
- Dependency-based cache keys
- Layer caching strategy
- Cross-platform compatibility
- Gitea Actions cache integration

Files Added:
- docker/Dockerfile.build - Build environment
- docker/Dockerfile.prod - Production image
- docker/Dockerfile.prod.template - Template-based generation
- docker-compose.yml - Development setup
- scripts/calculate-deps-hash.sh - Cache key calculation
- scripts/test-docker-cache.sh - Cache testing

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 00:25:53 +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
370fbdf72f 🐛 fix: resolve CI workflow issues
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Successful in 54s
Go CI/CD Pipeline / Arcodange Workflow Validation (push) Failing after 6m15s
Go CI/CD Pipeline / Lint and Format (pull_request) Successful in 2m22s
Go CI/CD Pipeline / Arcodange Workflow Validation (pull_request) Failing after 2m34s
Go CI/CD Pipeline / Build and Test (pull_request) Successful in 4m35s
Go CI/CD Pipeline / Version Management (pull_request) Has been skipped
Go CI/CD Pipeline / Build and Test (push) Successful in 12m7s
Go CI/CD Pipeline / Version Management (push) Has been cancelled
Fix three critical CI issues:

1. SWAG TOOL: Install swag before go generate

   - Adds 'Install swag' step to build-test job

   - Prevents 'command not found' errors

   - Ensures swagger docs can be generated

2. GO VET REDUNDANCY: Remove duplicate go vet

   - Removes go vet from lint-format job

   - Keeps go vet only in build-test job

   - Reduces CI execution time

3. WORKFLOW VALIDATION: Fix yamllint path

   - Updates validate-workflow.sh to use absolute paths

   - Fixes .yamllint.yaml file not found error

   - Makes path resolution more robust

These fixes address the root causes of:

- Job 350 failure (missing swag)

- Redundant validation (duplicate go vet)

- Workflow validation failures (wrong paths)

Tested locally and ready for CI.
2026-04-06 12:53:43 +02:00
7c6075e836 🤖 feat: simplify CI/CD structure and add Docker workflow
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Failing after 1m45s
Go CI/CD Pipeline / Arcodange Workflow Validation (push) Failing after 5m39s
Go CI/CD Pipeline / Build and Test (push) Failing after 7m9s
Go CI/CD Pipeline / Version Management (push) Has been skipped
- Rename ci-cd.yaml to go-ci-cd.yaml for clarity
- Add dockerimage.yaml workflow for Docker builds
- Create Dockerfile for production deployment
- Add comprehensive CI/CD documentation
- Create contributor-quickstart.sh for easy validation
- Update all scripts to handle both workflow files
- Fix event triggers to run on all relevant pushes
- Remove redundant YAML syntax validation
- Improve workflow validation for Arcodange conventions

BREAKING CHANGE: ci-cd.yaml renamed to go-ci-cd.yaml
See scripts/cicd/README.md for complete documentation.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-06 11:02:36 +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
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
00e796c608 Enhance build system and logging configuration
- Add scripts/build.sh to compile binaries into bin/ directory

- Move all zerolog setup logic from cmd/server/main.go to pkg/config

- Add log level configuration support (trace, debug, info, warn, error, fatal, panic)

- Simplify cmd/server/main.go from 57 to 27 lines (53% reduction)

- Update .gitignore to use bin/ directory instead of individual files

- Document build process and bin directory in AGENTS.md

- Maintain backward compatibility with all existing functionality
2026-04-04 13:24:33 +02:00
Mistral Vibe
36f0b79b90 Add OpenTelemetry instrumentation with middleware-only approach 2026-04-04 12:19:48 +02:00
Gabriel Radureau
f986711974 Add readiness endpoint for graceful shutdown coordination
Implement readiness endpoint (/api/ready) that returns:
- {"ready":true} (HTTP 200) during normal operation
- {"ready":false} (HTTP 503) during graceful shutdown

Key changes:
- Added readiness context to control readiness state
- Modified server.NewServer() to accept readiness context
- Implemented handleReadiness() with context-aware logic
- Updated cmd/server/main.go to manage readiness state
- Readiness set to false when shutdown signal received
- Updated test script to validate readiness behavior
- Added comprehensive documentation for readiness endpoint

This allows Kubernetes/service meshes to stop routing traffic
to the pod during graceful shutdown while allowing existing
requests to complete. Health endpoint continues to return
happy status during shutdown for proper orchestration.
2026-04-03 19:53:14 +02:00
Gabriel Radureau
7c5e61c386 Implement comprehensive graceful shutdown with JSON logging
- Added signal.NotifyContext for modern signal handling in cmd/server/main.go
- Implemented BaseContext for proper context propagation to HTTP handlers
- Added readiness drain delay before shutdown for graceful degradation
- Fixed PID detection in start-server.sh to target actual server process
- Added Logging.JSON configuration option with DLC_LOGGING_JSON environment variable
- Created comprehensive test script that validates entire server lifecycle
- Updated documentation with JSON logging configuration examples
- All shutdown logs now appear correctly in JSON format
- Server terminates gracefully on SIGTERM with proper log flushing

The graceful shutdown implementation follows VictoriaMetrics best practices:
1. Catches termination signals (SIGTERM, SIGINT)
2. Stops accepting new requests but allows ongoing requests to complete
3. Waits for active requests to finish within configured timeout
4. Releases resources and performs cleanup
5. Logs all shutdown steps for observability

Test script validates:
- Server startup and API functionality
- Graceful shutdown sequence
- JSON log format validation
- Complete log sequence verification
- Proper signal handling and context propagation

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-03 19:23:23 +02:00
Gabriel Radureau
736ec9c996 Add server control script and improve logging
\n- Add scripts/start-server.sh for easy server management\n- Add DLC_NO_COLOR environment variable support for clean logs\n- Update server.go to handle color/no-color logging\n- Add server.log and server.pid to .gitignore\n- Update README.md and AGENTS.md with server control documentation\n- Test all server control functions (start, stop, restart, status, logs, test)
2026-04-03 16:06:00 +02:00