fix(api.auth): pass ctx.env_file to AuthSettings#51
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3b105c2 to
789da40
Compare
|
Claude finished @olivermeyer's task in 2m 19s —— View job Code Review Complete ✓Reviewing PR #51: fix(api.auth): pass ctx.env_file to AuthSettings SummaryThis PR correctly implements env file support for Review Findings✅ ApprovalsCode Quality
Testing
Documentation
Security & Performance
Commit Message
💡 Suggestions (Optional Improvements)1. Docstring EnhancementConsider expanding the docstring to clarify the precedence order: Location: Current: """Auth settings whose env prefix and env files are derived from the active FoundryContext.
The effective prefix is ``{FoundryContext.env_prefix}AUTH_`` and the env files are
``FoundryContext.env_file``, both resolved at instantiation time via
:func:`aignostics_foundry_core.foundry.get_context`.
Both ``internal_org_id`` and ``auth0_role_claim`` are required — they must be
provided via environment variables or ``.env`` files (no defaults).
"""Suggestion: Add a note about precedence: """Auth settings whose env prefix and env files are derived from the active FoundryContext.
The effective prefix is ``{FoundryContext.env_prefix}AUTH_`` and the env files are
``FoundryContext.env_file``, both resolved at instantiation time via
:func:`aignostics_foundry_core.foundry.get_context`.
Both ``internal_org_id`` and ``auth0_role_claim`` are required — they must be
provided via environment variables or ``.env`` files (no defaults).
Note:
Environment variables take precedence over values in ``.env`` files
(standard pydantic-settings behavior).
"""Why: Makes the configuration precedence explicit for users. ConclusionRecommendation: ✅ Approve and merge This is a clean, well-tested implementation that adds env file support to
The optional docstring suggestion is a minor enhancement that can be addressed in a follow-up if desired, but is not blocking. Note: I cannot run |
Codecov Report✅ All modified and coverable lines are covered by tests.
|
|



Passing the context's
env_fileto theAuthSettingsso it can use env files.