[BREAKING][misc] refactor: remove unused APIs and drop unused runtime dependencies - #328
Merged
Conversation
… dependencies Delete unused public types and single-caller wrappers, and stop shipping runtime libraries the base install no longer imports. JSON envelopes still emit schema_version: 1.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 65 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 65 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
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.
What
MessageResult,GraderInitRequest/GraderInitResponse, and theRolloutDriverABC (HttpRolloutDriverremains the concrete driver).Trajectory.has_multimodal_content,ListColumn.plain,Console.spinner,OutputContext.schema_version,resolve_workspace_directory_from_cwd, Harbor pre-v0.3 constructor shims,write_scaffoldkwargs).rollout/utils/messages.py,harbor/bundling.py, eval/train path-validation and next-steps helpers, template recipe boilerplate, platform HTTP/download setup).requests,platformdirs,toml,tqdm(GitHub fetches use urllib; cache paths are stdlib; rubric progress uses Rich).osmosis_ai.packagingis importable without Harbor extras.schema_version: 1.Why
These symbols and wrappers had no remaining production callers, and the four libraries were only imported to support that unused surface or a one-line helper. Removing them shrinks the published API and the base install without changing CLI JSON output or supported rollout flows. Pre-v0.3 Harbor constructor kwargs now fail as ordinary unexpected-keyword
TypeErrors instead of a custom migration error.Migration: stop importing
MessageResult,GraderInitRequest,GraderInitResponse, andRolloutDriver. UseOperationResultfor CLI messages,HttpRolloutDriverfor eval-facing runs, andresolve_workspace_directory()for workspace lookup.How to Test
uv run ruff check . && uv run ruff format --check .uv run pyright osmosis_ai/uv run --no-editable pyright --verifytypes osmosis_ai --ignoreexternaluv run pytest tests/unit/cli/output tests/unit/rollout/test_driver.py tests/unit/rollout/test_http_driver.py tests/unit/rollout/test_harbor_backend.py tests/unit/rollout/test_trajectory_atif.py tests/unit/rollout/integrations/test_strands_messages.py tests/unit/platform/cli/test_eval_config.py tests/unit/platform/cli/test_training_config.py tests/unit/platform/cli/test_workspace_directory_contract.py tests/unit/platform/cli/test_workspace_directory_setup.py tests/unit/platform/cli/test_workspace_repo.py tests/unit/templates tests/unit/test_public_api_imports.py tests/unit/test_rubric_engine.py tests/unit/evalrg -n 'MessageResult|GraderInitRequest|class RolloutDriver' osmosis_ai/ tests/— no matchesChecklist
[module] type: descriptionformat(labels are derived from it automatically — no need to add them by hand)
ruff check .andruff format --check .passpyright osmosis_ai/passespytestpasses (new tests added if applicable)Summary by cubic
Removes unused public APIs and drops unused runtime dependencies (
requests,platformdirs,toml,tqdm) from the base install; CLI JSON output still emitsschema_version: 1.Migration
MessageResultis gone — useOperationResultfor CLI messages.GraderInitRequestandGraderInitResponseare removed.RolloutDriverABC is removed — useHttpRolloutDriverdirectly.resolve_workspace_directory_from_cwdis gone — useresolve_workspace_directory().HarborBackendconstructor kwargs now raise a normal unexpected-keywordTypeError.Refactors
tqdm.httpxwith guarded redirects; template downloads useurllibwith encoded refs.osmosis_ai.packagingis importable without theharborextra.litellmre-export layer.Written for commit f05f47e. Summary will update on new commits.