Skip to content

merge dev into stage#81

Merged
aditya-arcot merged 8 commits intostagefrom
dev
Mar 6, 2026
Merged

merge dev into stage#81
aditya-arcot merged 8 commits intostagefrom
dev

Conversation

@aditya-arcot
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges dev into stage. It primarily refactors the server backend by extracting common database query logic from core/security.py, services/auth.py, and services/admin.py into dedicated service modules (services/user.py, services/access_request.py, services/token.py). It also renames many test functions to shorter names, extracts shared test helpers into utility modules, and updates the client-side dependency @hey-api/openapi-ts to ^0.94.0 with its regenerated files. Additionally, the Zod locale configuration is added to the client entrypoint.

Changes:

  • Extracted reusable DB query functions into three new service modules (services/user.py, services/access_request.py, services/token.py) and added corresponding tests for these services
  • Replaced inline SQL queries in core/security.py, services/auth.py, and services/admin.py with calls to the new service modules; added hash_secret/verify_secret wrappers in core/security.py
  • Renamed test functions across the codebase to shorter scenario-based names, extracted shared test helpers into utilities.py files, and updated the client (@hey-api/openapi-ts to ^0.94.0, added Zod locale configuration)

Reviewed changes

Copilot reviewed 82 out of 87 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
server/app/services/user.py New service module with user DB query functions
server/app/services/access_request.py New service module with access request DB query functions
server/app/services/token.py New service module with token DB query and expiry functions
server/app/core/security.py Delegates DB queries to new service modules; adds hash_secret/verify_secret wrappers
server/app/services/auth.py Replaces inline SQL with new service function calls
server/app/services/admin.py Delegates to new service modules; incorrectly imports create_registration_token from auth
server/app/tests/core/security/test_verify_secret.py New tests for verify_secret; contains a bug in the exception path test
server/app/tests/core/security/utilities.py Extracted create_access_request helper
server/app/tests/core/utilities.py Extracted get_admin helper
server/app/tests/services/utilities.py Extracted get_admin_user_public helper
server/app/tests/api/utilities.py Added get_admin helper, moved login_admin
server/app/tests/services/admin/test_update_access_request_status.py Removed old tests, added new ones; test_update_access_request_not_pending has inconsistent naming
Various test_*.py files Renamed test functions to shorter names throughout
client/src/main.tsx Added Zod locale configuration
client/package.json Updated @hey-api/openapi-ts to ^0.94.0, @types/node to ^25.3.5
client/src/api/generated/ Auto-generated client files updated for new package version
server/app/models/database/access_request.py Consolidated duplicate SQLAlchemy imports
Files not reviewed (1)
  • client/package-lock.json: Language not supported

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@aditya-arcot aditya-arcot merged commit 9a3b1cb into stage Mar 6, 2026
3 checks passed
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.

2 participants