feat(core): AuthService facade wrapping auth_manager.py#655
Merged
Conversation
Phase 7.1: class-based AuthService implementing the Protocol from modules/core/protocols.py. Delegates to existing auth_manager functions (Strangler Fig) and to UserService/RoleService/WorkspaceService for user/role/workspace lookups. Migrates startup.py event handlers to use auth_service instead of importing _member_role_cache directly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shikhalev
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 7.1 (#642): class-based
AuthServicefacade implementing the Protocol frommodules/core/protocols.py.modules/core/auth_service.py—AuthServiceclass with all 11 Protocol methods, delegating to existingauth_managerfunctions (Strangler Fig) and toUserService/RoleService/WorkspaceServicefor user/role/workspace lookupsmodules/core/startup.py— event handlers migrated fromfrom auth_manager import _member_role_cachetofrom modules.core.auth_service import auth_servicetests/unit/test_auth_service.py— Protocol compliance tests (all methods + signatures), TypedDict converter tests, singleton export testFastAPI dependencies (
require_permission,get_current_user, etc.) stay inauth_manager.py— they are not part of the Protocol.Closes #642
Test plan
pytest tests/ -v)🤖 Generated with Claude Code