[codex] Isolate sync decode test imports on Windows#7948
Merged
kodjima33 merged 2 commits intoJun 17, 2026
Merged
Conversation
kodjima33
approved these changes
Jun 16, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Test-only stabilization (import isolation / stubs); zero product risk, CI not failing.
ba3b45b to
76cbab4
Compare
76cbab4 to
40d5ba0
Compare
kodjima33
approved these changes
Jun 17, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Test-only stabilization (sync decode test imports), CI green
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
python_multipartstub while importingrouters.syncin the PCM and Opus decode unit tests, so lightweight Windows backend envs can collect the tests without the full multipart package installed.routers.syncimport surface, even when earlier-collected tests left partial modules insys.modules.Root cause
These decode tests exercise pure PCM/Opus WAL conversion helpers, but importing
routers.syncalso builds FastAPI routes and imports optional service helpers. In this Windows lightweight backend venv, standalone collection failed on FastAPI's multipart package check. In collection-order runs after stub-heavy tests, partialopuslib,database.conversations,utils.cloud_tasks, andutils.other.endpointsmodules could block collection before the decode assertions ran.A later local stacked Windows collect scan found two remaining same-process cases after the first pass: prior tests could leave
models.conversation_enums.ConversationSourcewithout theomi/limitlessmembers, or leaveutils.executorswithout the full import surface used byrouters.sync. This PR now fills those stubs before importingrouters.sync.Before this change:
python -m pytest backend\tests\unit\test_sync_pcm_decode.py --collect-only -q --tb=short->RuntimeError: Form data requires "python-multipart" to be installed.python -m pytest backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short->RuntimeError: Form data requires "python-multipart" to be installed.python -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short --continue-on-collection-errors-> import failures from partial sync dependencies.Current status
mainat1a5824403b68ce47c3b0909577cadc1242ba0d3f8c31bedb161584d24ff93530717abeba17825a0bLint Checkrun27684277856completed successfully on this headValidation
D:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest backend\tests\unit\test_realtime_integrations_usage_tracking.py backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short --continue-on-collection-errorsD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py -q --tb=shortD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest backend\tests\unit\test_sync_opus_decode.py backend\tests\unit\test_sync_pcm_decode.py -q --tb=shortD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py -q --tb=shortD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_opus_decode.py backend\tests\unit\test_sync_pcm_decode.py -q --tb=shortD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m py_compile backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.pyD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m black --line-length 120 --skip-string-normalization --check backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.pygit diff --check origin/main...HEADscripts/pre-commitwith the backend Windows venv and local Dart SDK onPATHStacked Windows collect check
On a local-only integration branch containing the open Windows collect-isolation PR heads,
D:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest backend\tests\unit --collect-only -q --tb=short --continue-on-collection-errorsnow exits 0 with 4206 tests collected.