feat: remove functionality to skip auth checks when AUTO_LOGIN is enabled, fix frontend tests, fix backend Lint and tests#9674
feat: remove functionality to skip auth checks when AUTO_LOGIN is enabled, fix frontend tests, fix backend Lint and tests#9674jordanrfrazier wants to merge 121 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ogabrielluiz
left a comment
There was a problem hiding this comment.
LGTM but should probably wait to merge
4f3bb7e to
ebd1eea
Compare
⚡️ Codeflash found optimizations for this PR📄 41% (0.41x) speedup for
|
⚡️ Codeflash found optimizations for this PR📄 2,736% (27.36x) speedup for
|
⚡️ Codeflash found optimizations for this PR📄 2,283% (22.83x) speedup for
|
⚡️ Codeflash found optimizations for this PR📄 47% (0.47x) speedup for
|
|




This pull request makes several important changes to authentication logic, configuration, and test infrastructure, focusing on simplifying the auto-login mechanism, improving security, and cleaning up related code. The changes remove deprecated flags, clarify the use of the
AUTO_LOGINsetting, update related tests, and improve task management during application shutdown.Authentication and Auto-Login Simplification:
skip_auth_auto_loginflag and associated logic, makingAUTO_LOGINthe sole switch for auto-login behavior. All fallback authentication now depends onAUTO_LOGIN, and related warning messages have been updated for clarity. [1] [2] [3] [4] [5] [6] [7] [8]AUTO_LOGINtoFalsefor improved security in production environments.AuthSettingsclass with aclear_superuser_credentialsflag and logic to securely clear superuser credentials from memory. The validator logic for superuser credentials was updated accordingly. [1] [2]Testing and Test Infrastructure:
AUTO_LOGINbehavior, including skipping tests that require auto-login and adjusting expected error messages. [1] [2] [3] [4]use_noop_sessionfixture to ensure all database operations use a NoopSession, even if services are already initialized, by patching relevant service settings.Application Lifecycle and Task Management:
sync_flows_from_fs_taskand the newmcp_init_task, logging any exceptions that occur during cleanup. [1] [2] [3]Code Quality and Type Annotations:
exclude_branch_conditionallymethod for better clarity and type safety.Build and Dependency Management:
Makefileto installblockbusterandasgi_lifespanbefore running unit tests, ensuring all dependencies are present.