Repository navigation
test(models): restore AnyLLM module bindings after each test - #6108
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Approved after static review and an independent second review. The AnyLLM fixture restores both module bindings for absent and preexisting imports. Deferred Unix-only imports preserve portable test collection, and the app-server fixture uses the current Python executable with the launcher’s actual argument/cwd behavior. No new actionable findings. Windows CI is not fully repaired: hosted Windows 3.13 logs show the existing selector-event-loop subprocess and Windows file-URI failures, now exposed after collection succeeds.
Hosted check snapshot: {"SKIPPED": 2, "SUCCESS": 17, "FAILURE": 2}. Both Windows test jobs fail on existing selector-loop subprocess and Windows file-URI issues; the other 17 checks passed. Static review only; no candidate code or local tests were executed.
There was a problem hiding this comment.
Approved the incremental Windows fixes after static review and an independent second review. Absolute paths are recognized before URL parsing, platform-aware file-URI decoding preserves drive letters and escaped characters, and remote file authorities remain rejected. The Windows-only model test configuration uses a subprocess-capable Proactor loop through the installed pytest-asyncio hook. Reviewed path/URI regression coverage; no new actionable findings.
Hosted checks completed: 19 passed, 2 skipped, including both Windows test versions and the Windows packaged-contract check. No candidate code or local tests were executed.
There was a problem hiding this comment.
Approved the current commit after two independent static reviews. The fixture now registers both module bindings even when initially absent, removes the temporary sentinels before import, and restores either the prior module or absence on teardown. The regression covers both initial states. Reviewed the current single-file diff against the updated target branch; no actionable findings.
Hosted checks completed: 19 passed, two skipped; none failed or pending. Static review only; no candidate code or local tests executed.
Summary
The AnyLLM tests have been importing the adapter against a temporary provider. On a worker that has yet to import the adapter, teardown has been leaving the temporary module in
sys.modulesand on the parent package. Later tests on that worker can pick up the stub. Register both bindings withmonkeypatchbefore the import so teardown restores the worker's original state.This PR is the first of three targeting
feat/simple-codex, followed by #6105 and #6106. After #6111, the target branch already handles Windows image paths, the native provider, and the filesystem test fixture. The diff here covers the AnyLLM fixture and its regression test.Test plan
cbbb009cwith a worker importing the adapter for the first time. Checked teardown with both a fresh import and a preexisting module. All 102 tests in the AnyLLM module passed.Checks
.agents/skills/code-change-verification/scripts/run.sh.