You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR intentionally introduces minor Python style/type/test-marker issues so we can verify the improved OpenCode review prompt catches them. It should be closed after verification.
Thanks for the context. I reviewed tests/opencode_review_test.py against AGENTS.md, tests/conftest.py, and the pyproject.toml ruff/mypy/pytest configuration. Since this PR is explicitly for testing the review prompt, here are the concrete issues I see:
Issues
File won't be collected by pytest pyproject.toml sets python_files = ["test_*.py"], so opencode_review_test.py is excluded from the default test discovery. If the intent is for this to be a real test, rename it to test_opencode_review.py.
Missing from __future__ import annotations
The project convention (and ruff rule FA / future-annotations = true) requires this import at the top of Python files.
Unused import import typing is unused and will be flagged by F401.
Missing pytest marker
The project marks unit tests with @pytest.mark.unit. test_compute_total should have this marker to match the existing test suite.
Type annotations compute_total and fetch_with_timeout lack type hints. While mypy's test override relaxes disallow_untyped_defs, the project guidelines say type hints are required and existing tests follow this.
Async function name is misleading fetch_with_timeout does not actually apply any timeout. Consider renaming it (e.g., fetch) or adding a real timeout parameter and using anyio/asyncio.timeout.
No test coverage for the async helper fetch_with_timeout is defined but never exercised by a test.
Manual loop instead of built-in compute_total could be simplified to return sum(items); the current manual loop is fine but less idiomatic.
Since the PR description says this file should be deleted after verification, these are all expected/acceptable for a one-off review test, but points 1–5 would block a real PR.
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
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.
This PR intentionally introduces minor Python style/type/test-marker issues so we can verify the improved OpenCode review prompt catches them. It should be closed after verification.