This directory contains GitHub Actions workflows and Dependabot configuration for automated validation and dependency management.
Triggers:
- Push to main/master (config/, scripts/, docs/ changes)
- Pull requests to main/master
- Manual dispatch (workflow_dispatch)
Stages:
-
YAML Syntax Validation
- Runs yamllint with custom rules (.yamllint.yaml)
- Validates YAML can be parsed with Python yaml module
- Fast fail on syntax errors
-
Pydantic Schema Validation
- Runs
scripts/validate-config-schema.py - Strong typing validation (provider types, status values)
- URL format validation
- Port range validation (1-65535)
- Cross-configuration consistency:
- Provider references exist
- Fallback chains valid
- Model references correct
- Load balancing weights sum to 1.0
- Runs
-
Secret Scanning
- Uses detect-secrets to find credentials
- Compares against baseline (.secrets.baseline)
- Fails on new unreviewed secrets
- Scans config/, scripts/, docs/ directories
-
Documentation Sync Check
- Validates active providers documented in architecture.md
- Ensures all 8 required Serena memories present:
- 01-architecture.md
- 02-provider-registry.md
- 03-routing-config.md
- 04-model-mappings.md
- 05-integration-guide.md
- 06-troubleshooting-patterns.md
- 07-operational-runbooks.md
- 08-testing-patterns.md
-
Generated Config Verification
- Runs
scripts/check-generated-configs.sh - Ensures AUTO-GENERATED markers present
- Prevents manual edits to generated files
- Runs
-
Integration Tests (Optional)
- Dry-run provider health checks
- Full tests require active providers
- Can be triggered manually with input flag
Usage:
# Automatically runs on push/PR
# Manual trigger with integration tests:
gh workflow run validate-config.yml -f run_integration_tests=trueTriggers:
- Pull request events (opened, synchronize, reopened, edited)
Additional Checks:
-
PR Metadata Validation
- Conventional commit format for PR title:
feat(routing): add fallback for Ollama modelsfix(config): correct vLLM port mappingdocs(security): update master key setup
- PR description presence (warning only)
- Conventional commit format for PR title:
-
Configuration Change Analysis
- Detects changed config files
- Shows line additions/deletions
- Identifies breaking changes:
- status: disabled
- base_url changes
- removed/deprecated fields
- Provides migration checklist
-
Security Impact Assessment
- Flags security-sensitive file changes:
- security, auth, cors files
- rate limiting configs
- master/salt key settings
- .env files
- Reminds of security review requirements
- Flags security-sensitive file changes:
-
Performance Impact Check
- Identifies performance-related changes:
- routing configuration
- cache settings
- timeout/retry values
- Suggests performance testing
- Identifies performance-related changes:
-
Changelog Check
- Reminds to update CHANGELOG.md (warning only)
- Only for PRs to main/master
Usage:
PR validation runs automatically. Ensure:
- PR title follows conventional commit format
- Breaking changes are documented
- Security changes reviewed
- Performance impact assessed
Ecosystems:
-
Python Dependencies (requirements.txt)
- Weekly updates (Mondays 09:00)
- Max 5 open PRs
- Ignores pydantic major version updates (manual review)
- Labels: dependencies, python
- Commit prefix:
chore(deps)
-
GitHub Actions
- Weekly updates (Mondays 09:00)
- Max 3 open PRs
- Labels: dependencies, github-actions
- Commit prefix:
chore(ci)
-
Pre-commit Hooks
- Monthly updates
- Max 2 open PRs
- Only tracks: pre-commit, yamllint, detect-secrets
- Labels: dependencies, pre-commit
- Commit prefix:
chore(hooks)
Usage:
Dependabot automatically creates PRs. Review and merge:
# List open Dependabot PRs
gh pr list --author app/dependabot
# Review specific PR
gh pr view <PR-number>
# Merge after validation passes
gh pr merge <PR-number> --squashPush/PR → validate-config.yml (6 stages)
↓
[YAML] → [Schema] → [Secrets] → [Docs] → [Generated] → [Integration]
↓
All Pass → ✅ Ready for merge
↓
Any Fail → ❌ Fix and retry
PR Opened → pr-validation.yml (5 checks)
↓
[Metadata] → [Config Diff] → [Security] → [Performance] → [Changelog]
↓
Warnings/Errors → Review and address
Run validation locally before pushing:
# Install pre-commit hooks (one-time setup)
pre-commit install
# Pre-commit runs automatically on git commit
git add .
git commit -m "feat(routing): add new provider"
# Manual pre-commit run
pre-commit run --all-files
# Individual validations
yamllint -c .yamllint.yaml config/
python3 scripts/validate-config-schema.py
detect-secrets scan --baseline .secrets.baseline
bash scripts/check-generated-configs.sh- YAML validation runs first (fast fail)
- Parallel jobs where possible
- Schema validation after syntax check
- Multiple validation layers
- Breaking change detection
- Security scanning on every commit
- Documentation sync enforced
- Serena memories completeness checked
- Configuration changes analyzed
- Secret scanning baseline
- Security-sensitive file detection
- No hardcoded credentials allowed
- Automated weekly updates
- Grouped by ecosystem
- Manual review for major versions
YAML Syntax Error:
# Check with yamllint locally
yamllint -c .yamllint.yaml config/providers.yaml
# Fix and retrySchema Validation Error:
# Run locally for detailed output
python3 scripts/validate-config-schema.py
# Common issues:
# - Invalid provider type (must be: ollama, llama_cpp, vllm, openai, anthropic, openai_compatible)
# - Invalid status (must be: active, disabled, pending_integration, template)
# - Malformed URL (must start with http:// or https://)
# - Invalid port range (must be 1-65535)
# - Load balancing weights don't sum to 1.0Secret Detected:
# Audit new secrets
detect-secrets audit .secrets.baseline
# If false positive, mark as safe and update baseline:
detect-secrets scan --baseline .secrets.baseline > .secrets.baseline.new
mv .secrets.baseline.new .secrets.baseline
git add .secrets.baselineDocumentation Out of Sync:
# Update docs/architecture.md with new provider information
# Ensure all 8 Serena memories present in .serena/memories/Generated Config Modified:
# Don't manually edit files with AUTO-GENERATED marker
# Regenerate instead:
python3 scripts/generate-litellm-config.py # When implemented in Phase 2To add a new workflow:
- Create
.github/workflows/<name>.yml - Define triggers (on:)
- Add jobs with meaningful names
- Use appropriate actions from marketplace
- Test with
actor manual trigger - Document in this README
Example structure:
name: My Workflow
on:
push:
branches: [main]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: My step
run: echo "Hello"- Review Dependabot PRs and merge
- Check for outdated GitHub Actions
- Validate workflow efficiency (execution times)
- Update baseline for secret scanning if needed
- Review and update validation rules
- Assess need for additional checks
- Performance optimization of CI/CD pipeline
- Update this documentation
- GitHub Actions Documentation
- Dependabot Configuration
- Pre-commit Framework
- detect-secrets
- yamllint
- Pydantic
Last Updated: 2025-10-20 Maintained By: AI Backend Unified Infrastructure Team