codec: add adversarial coverage for optional codec edge paths#184
codec: add adversarial coverage for optional codec edge paths#184
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cf989e27f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pythonPath, | ||
| [ | ||
| '-c', | ||
| `import importlib.util, sys; sys.exit(0 if importlib.util.find_spec(${JSON.stringify(moduleId)}) else 1)`, |
There was a problem hiding this comment.
Verify optional modules by importing them
The dependency guard uses importlib.util.find_spec(...), which only checks whether a module is discoverable on disk, not whether it can actually be imported. In environments where optional deps are partially installed or have missing native libraries (common for torch/scipy wheels), find_spec returns success, the test runs, and then the fixture raises a fallback "... is not available" error that fails these assertions. Switching this probe to an actual import <module> check would keep these tests correctly skipped when the dependency is present but unusable.
Useful? React with 👍 / 👎.
Summary
TYWRAP_TORCH_ALLOW_COPY=0Testing
Closes #48