Skip to content

feat(tf-config): implement configuration profiles with environment overrides#12

Merged
EdouardZemb merged 1 commit intomainfrom
feature/story-0-2-config-profiles
Feb 5, 2026
Merged

feat(tf-config): implement configuration profiles with environment overrides#12
EdouardZemb merged 1 commit intomainfrom
feature/story-0-2-config-profiles

Conversation

@EdouardZemb
Copy link
Owner

Summary

Implements Story 0-2: "Définir et sélectionner des profils de configuration"

Adds a profile system allowing environment-specific configuration overrides (dev, staging, prod). Profiles use a partial override pattern where only specified fields replace base config values.

Changes

Core Implementation:

  • ProfileOverride struct with optional fields for selective overrides
  • Profile application logic merging overrides into base config
  • Redact trait for safe logging of sensitive fields (tokens, passwords, API keys)
  • Specific error types for profile validation

Tests:

  • Unit tests (profile_unit_tests.rs) - 688 lines
  • Integration tests (profile_tests.rs) - 554 lines
  • 7 test fixtures for valid/invalid configurations

Documentation:

  • Updated README.md with profile usage examples
  • ATDD checklist for story validation

Testing

  • Unit tests added (profile override, merging, redaction)
  • Integration tests added (file loading, validation)
  • All tests pass locally (cargo test -p tf-config)

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests pass locally
  • Documentation updated
  • No breaking changes

Related

Story: 0-2 "Définir et sélectionner des profils de configuration"


🤖 Generated with Claude Code

…errides

Add profile system allowing environment-specific configuration overrides
(dev, staging, prod). Profiles use partial override pattern - only
specified fields replace base config values.

Key features:
- ProfileOverride struct with optional fields for selective overrides
- Profile application logic merging overrides into base config
- Security: automatic redaction of sensitive fields (tokens, passwords)
  in Debug output via Redact trait
- Comprehensive validation with specific error types

Includes test fixtures and integration/unit tests covering:
- Profile loading and validation
- Override merging behavior
- Invalid configuration detection
- Redaction verification

Story: 0-2 "Définir et sélectionner des profils de configuration"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@EdouardZemb EdouardZemb merged commit e2c0200 into main Feb 5, 2026
1 check passed
@EdouardZemb EdouardZemb deleted the feature/story-0-2-config-profiles branch February 5, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant