Skip to content

Chore/2505 standardize user context#2766

Draft
settler-av wants to merge 4 commits intoIBM:mainfrom
settler-av:chore/2505-standardize-user-context
Draft

Chore/2505 standardize user context#2766
settler-av wants to merge 4 commits intoIBM:mainfrom
settler-av:chore/2505-standardize-user-context

Conversation

@settler-av
Copy link
Contributor

🔗 Related Issue

Closes #2505


📝 Summary

Standardizes user context dependency naming across endpoints by renaming _user to current_user_ctx for consistency and clarity.

🏷️ Type of Change

  • Bug fix
  • Feature / Enhancement
  • Documentation
  • Refactor
  • Chore (deps, CI, tooling)
  • Other (describe below)

🧪 Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage ≥ 80% make coverage

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • Tests added/updated for changes
  • Documentation updated (if applicable)
  • No secrets or credentials committed

@settler-av settler-av force-pushed the chore/2505-standardize-user-context branch from 4a5be81 to eb82f76 Compare February 8, 2026 12:04
Adnan Vahora added 2 commits February 8, 2026 12:07
…across endpoints

Signed-off-by: Adnan Vahora <adnan.vahora1@motorolasolutions.com>
… files

Signed-off-by: Adnan Vahora <adnan.vahora1@motorolasolutions.com>
@settler-av settler-av force-pushed the chore/2505-standardize-user-context branch from eb82f76 to 6bb69c2 Compare February 8, 2026 12:08
@settler-av settler-av marked this pull request as draft February 8, 2026 12:16
Adnan Vahora added 2 commits February 8, 2026 12:36
…iple modules

Signed-off-by: Adnan Vahora <adnan.vahora1@motorolasolutions.com>
Signed-off-by: Adnan Vahora <adnan.vahora1@motorolasolutions.com>
@settler-av settler-av marked this pull request as ready for review February 8, 2026 13:48
@crivetimihai crivetimihai self-assigned this Feb 9, 2026
@crivetimihai crivetimihai added this to the Release 1.0.0-RC1 milestone Feb 9, 2026
@crivetimihai
Copy link
Member

Thanks for tackling the naming standardization, @settler-av! The intent is good — consistent naming makes the codebase more readable. However, I have a concern about the current scope:

The PR renames _usercurrent_user_ctx in 4 files, but misses 3 files that still use _user (cancellation_router.py, llmchat_router.py, tokens.py), and doesn't touch the ~240 places that use user=Depends(...). The net effect is going from 2 naming patterns to 3, which makes things less consistent rather than more.

Additionally, the _ = current_user_ctx lines added in ~18 functions to suppress unused-variable warnings add boilerplate — the original _user prefix already conveyed "intentionally unused" by Python convention, more concisely.

Could you either:

  1. Expand the scope to cover all user dependency injection points (including the user=Depends(...) pattern), or
  2. If this is intended as a phased rollout, document the plan and create follow-up issues for the remaining files?

@settler-av
Copy link
Contributor Author

Thanks for the review.

I’ve updated only the files listed under #2505 (Phase 1). I’ll incorporate changes in the remaining three files mentioned here, along with the required dependency injection points.

I’ll push new commits to this PR once those updates are done.

@settler-av settler-av marked this pull request as draft February 12, 2026 09:29
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.

[CHORE]: Standardize user context parameter naming (_user vs current_user_ctx)

2 participants