[codex] Isolate auth redirect URI test imports#7944
Conversation
kodjima33
left a comment
There was a problem hiding this comment.
Test-only stabilization (import isolation / stubs); zero product risk, CI not failing.
Stub optional JWT and multipart import surfaces so auth redirect URI tests collect in lightweight Windows backend environments. Restore the real utils package path and fill required Redis auth helpers when earlier tests leave lightweight package stubs in sys.modules.
836e23f to
5486ea1
Compare
|
Closing this as superseded by #7983. #7983 includes the same Windows/lightweight-backend import isolation for |
|
Hey @tianmind-studio 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
Summary
jwt/jwt.algorithms.RSAAlgorithmimport surfaces intest_auth_redirect_uri.pyso the auth redirect tests collect in lightweight Windows backend environments.python_multipartstub while importingrouters.auth, matching FastAPI's import-timeFormroute check without requiring the full multipart dependency for this test.utilspackage path and ensure the Redis auth helper names exist when another stub-heavy test leaves lightweight package modules insys.modules.Root cause
test_auth_redirect_uri.pyexercises redirect URI validation and auth-code binding, but importingrouters.authalso imports optional Apple JWT helpers and builds FastAPIFormendpoints. In this Windows lightweight backend venv, standalone collection failed before any assertions ran:After the JWT stub, FastAPI's route construction also required
python-multipart. Running aftertest_action_item_date_validation.pyexposed a separate order dependency where that test leavesutils/database.redis_dbstubs that do not satisfyrouters.authimports.Refresh
mainat9ed12aea07.5486ea1a08.Status
Superseded by #7983, which includes this Windows/lightweight-backend import isolation for
backend/tests/unit/test_auth_redirect_uri.pyplus the higher-priority PKCE auth-code fix for #7692. Closing this PR to keep the maintainer queue focused on #7983.Validation
python -m pytest backend\tests\unit\test_auth_redirect_uri.py --collect-only -q --tb=short-> 46 tests collectedpython -m pytest backend\tests\unit\test_auth_redirect_uri.py -q --tb=short-> 43 passed, 3 skippedpython -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_auth_redirect_uri.py -q --tb=short-> 69 passed, 3 skippedpython -m pytest backend\tests\unit\test_auth_redirect_uri.py backend\tests\unit\test_action_item_date_validation.py -q --tb=short-> 69 passed, 3 skippedpython -m py_compile backend\tests\unit\test_auth_redirect_uri.pypython -m black --line-length 120 --skip-string-normalization --check backend\tests\unit\test_auth_redirect_uri.pygit diff --check origin/main...HEADscripts/pre-commit