Summary
Replace the custom runtime endpoint feature-flag implementation with an OpenFeature-based implementation.
Rationale
Pull request #286 introduces local environment-variable feature flags and router registration helpers. OpenFeature can provide a standard feature-flag API and allow future provider integration without changing endpoint registration logic.
Affected areas
src/trustyai_service/service/config/feature_flags.py
src/trustyai_service/service/config/registry.py
src/trustyai_service/main.py
- Feature-flag and application integration tests under
tests/service/config/ and tests/test_app_integration.py
Required changes
- Evaluate OpenFeature support for the Python service and select a supported provider strategy.
- Replace direct reads from the current
ENDPOINTS mapping with OpenFeature flag evaluation.
- Preserve the existing group-level and per-metric endpoint gating behavior.
- Preserve documented environment-based configuration where required, or document the migration path.
- Update unit and integration tests for the OpenFeature implementation.
- Remove the superseded custom feature-flag code after the migration.
Acceptance criteria
- Endpoint registration uses OpenFeature evaluation.
- Fairness, drift, and explainer endpoint gating retains the current intended behavior.
- Tests cover default values, configuration overrides or provider values, group-level gating, and per-metric gating.
- The custom feature-flag implementation is removed or reduced to a documented compatibility layer.
Backlinks
Summary
Replace the custom runtime endpoint feature-flag implementation with an OpenFeature-based implementation.
Rationale
Pull request #286 introduces local environment-variable feature flags and router registration helpers. OpenFeature can provide a standard feature-flag API and allow future provider integration without changing endpoint registration logic.
Affected areas
src/trustyai_service/service/config/feature_flags.pysrc/trustyai_service/service/config/registry.pysrc/trustyai_service/main.pytests/service/config/andtests/test_app_integration.pyRequired changes
ENDPOINTSmapping with OpenFeature flag evaluation.Acceptance criteria
Backlinks