[rollout] fix: restore lint and verifytypes on main - #295
Merged
Conversation
main's latest Tests run is failing on two independent checks, so every PR branched from it inherits both. `lint`: tests/unit/rollout/test_harbor_backend_v2.py does not satisfy `ruff format --check` under the pinned ruff 0.16.0. Reformatted, no behavior change. `typecheck-pyright`: `--verifytypes` reports `native_agent_kwargs` as "missing type annotation and could be inferred differently by type checkers". The attribute is assigned a conditional expression whose type pyright will not commit to across checkers; annotating it as `dict[str, Any] | None` restores a clean run. Verified against all four gates: ruff check, ruff format --check, pyright osmosis_ai/, and the --verifytypes filter CI applies.
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
tests/unit/rollout/test_harbor_backend_v2.pyso it satisfiesruff format --check.HarborBackendV2.native_agent_kwargsasdict[str, Any] | None.Why
mainis currently red. Its most recent Tests run fails on two independent checks, and every branch cut from it inherits both — including #294, whose two failures are entirely this, not anything that PR changed.lintfails becausetests/unit/rollout/test_harbor_backend_v2.pydoes not satisfyruff format --checkunder the pinned ruff 0.16.0. Reproducible locally with the same version:git show main:tests/unit/rollout/test_harbor_backend_v2.py > /tmp/t.py && ruff format --check /tmp/t.pyreports one file would be reformatted. The fix is the formatter's own output; no behavior changes.typecheck-pyrightfails on the--verifytypesstep, which reportsnative_agent_kwargsas "missing type annotation and could be inferred differently by type checkers". The attribute is assigned a conditional expression, and pyright will not commit to a type other checkers are guaranteed to agree on. Annotating it explicitly restores a clean run and does not change the value.Both fixes are also present in #291, which is part of a larger stack that is not merging yet. Pulling them out lets
maingo green now rather than waiting on that review.How to Test
uv run ruff check . && uv run ruff format --check .uv run pyright osmosis_ai/— 0 errors.uv run --no-editable pyright --verifytypes osmosis_ai --ignoreexternal, filtered the way.github/workflows/tests.ymlfilters it (skipping theagent_adapter,convert_sample_to_trajectory, andharness_agentbaselines), reports no remaining errors.uv run pytest— 2019 passed.Checklist
[module] type: descriptionformatenhancement,bug,breaking)ruff check .andruff format --check .passpyright osmosis_ai/passespytestpasses (new tests added if applicable)Summary by cubic
Restore CI by fixing
ruffformatting andpyright --verifytypesfailures on main. Reformatstests/unit/rollout/test_harbor_backend_v2.pyand annotatesHarborBackendV2.native_agent_kwargsasdict[str, Any] | None, with no behavior changes.Written for commit fa2dc94. Summary will update on new commits.