fix(runtime): satisfy ty in runtime tests#529
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR introduces type stubs for box configuration, async compute management, and exception types, along with test refactoring to add null-safety assertions and remove type-ignore comments. Five new/updated files define configuration contracts and improve test reliability. ChangesBox Configuration and Async Compute APIs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
tydue to staletype: ignorecomments and nullableawait_argsaccess in mocked async calls. The runtime provider code also imports the optionalboxddependency, whichtycould not resolve in the default test environment.type: ignoredirectives, added explicit non-None assertions before accessingawait_args.args/await_args.kwargs, and added minimal localboxdstub files sotycan resolve the optional runtime dependency during static analysis.Change Type (select all that apply)
Scope (select all touched areas)
Linked Issue/PR
User-Visible / Behavior Changes
None.
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: NoneVerification
Environment
Steps to Test
uv run pre-commit run --all-filestyno longer reports unusedtype: ignorecomments in the runtime test base filetyno longer reports nullableawait_argsaccess or unresolvedboxdimports in the runtime provider/test pathsExpected Behavior
Actual Behavior
boxdstubs for static analysis.Evidence (attach at least one)
Human Verification (required)
await_argsaccess and no longer rely on unusedtype: ignorecomments. Verifiedtycan resolve the optionalboxdimport path via local stubs.await_argsis read. Checked that the minimal stub surface covers the imported runtime symbols used by static analysis.boxdinstallation, since this PR is focused on static-analysis/test-path cleanup.Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
tests/unit/runtime/test_base.pytests/unit/runtime/test_boxd_provider.pytests/unit/runtime/test_cli_shell_logs.pyboxd/__init__.pyiboxd/aio.pyiboxd/errors.pyiboxdimports require additional stubbed symbols for static analysis.Risks and Mitigations
boxdstubs may need expansion if additional optional SDK symbols are imported later.tyin the runtime provider/tests.Checklist
uv run pytest)uv run pre-commit run --all-files)Summary by CodeRabbit
New Features
NotFoundErrorexception type.Tests