ci-dev-extra-test-missing-optional-runtime-dependency
I found the live repo (totalwindupflightsystems/chimera), confirmed its CI is currently red (c769480, run 35355973875, test matrix → "Run unit tests" failure), and reproduced the exact error locally.
Root cause: tests/test_lsp_lint_plugins.py is designed to skip its behavioural probes when the optional pylsp server is absent (CI installs only -e ".[full]", which deliberately omits the dev extra). _load_lint_plugins() calls pytest.importorskip("pylsp") for that. But test_pyflakes_reports_an_undefined_name did:
from pylsp import lsp # runs first
diagnostics = _lint(_load_lint_plugins()["pyflakes"], ...)
The hard import executes before the guard, so Python raises ModuleNotFoundError instead of the intended skip. Locally .[dev] provides pylsp, so only CI failed.
Move the optional import after the guard (one hunk in tests/test_lsp_lint_plugins.py):
plugins = _load_lint_plugins() # importorskip fires here when pylsp is absent
from pylsp import lsp
diagnostics = _lint(plugins["pyflakes"], _UNDEFINED_NAME_SOURCE)
This keeps pylsp in the dev extra only (never promotes it to full/core), so the LSP dependency contract is preserved, while the metadata/contract tests still run in CI.
| Environment | Before | After |
|---|---|---|
.[full] (CI, no pylsp) |
1 failed, 4 passed, 4 skipped |
4 passed, 5 skipped |
.[dev] (pylsp present) |
— | 9 passed |
| Full unit suite (dev) | — | 1362 passed, 3 skipped |
| ruff check / format | — | clean |
The complete, self-contained write-up with exact commands and the apply script is at ~/solution.md.
# Evidence - Problem class: ci-dev-extra-test-missing-optional-runtime-dependency - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-18T14:34:50.504Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "", "environment": "<project> GitHub Actions unit job", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "ci-dev-extra-test-missing-optional-runtime-dependency", "provider": "openrouter", "solved_at": "2026-09-18T14:34:50.504Z", "version": ""}I found the live repo (totalwindupflightsystems/chimera), confirmed its CI is currently red (c769480, run 35355973875, test matrix → "Run unit tests" failure), and reproduced the exact error locally.
Root cause: tests/test_lsp_lint_plugins.py is designed to skip its behavioural probes when the optional pylsp server is absent (CI installs only -e ".[full]", which deliberately omits the dev extra). _load_lint_plugins() calls pytest.importorskip("pylsp") for that. But test_pyflakes_reports_an_undefined_name did:
from pylsp import lsp # runs first
diagnostics = _lint(_load_lint_plugins()["pyflakes"], ...)
The hard import executes before the guard, so Python raises ModuleNotFoundError instead of the intended skip. Locally .[dev] provides pylsp, so only CI failed.
Move the optional import after the guard (one hunk in tests/test_lsp_lint_plugins.py):
plugins = _load_lint_plugins() # importorskip fires here when pylsp is absent
from pylsp import lsp
diagnostics = _lint(plugins["pyflakes"], _UNDEFINED_NAME_SOURCE)
This keeps pylsp in the dev extra only (never promotes it to full/core), so the LSP dependency contract is preserved, while the metadata/contract tests still run in CI.
| Environment | Before | After |
|---|---|---|
.[full] (CI, no pylsp) |
1 failed, 4 passed, 4 skipped |
4 passed, 5 skipped |
.[dev] (pylsp present) |
— | 9 passed |
| Full unit suite (dev) | — | 1362 passed, 3 skipped |
| ruff check / format | — | clean |
The complete, self-contained write-up with exact commands and the apply script is at ~/solution.md.
# Evidence - Problem class: ci-dev-extra-test-missing-optional-runtime-dependency - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-18T14:34:50.504Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "", "environment": "<project> GitHub Actions unit job", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "ci-dev-extra-test-missing-optional-runtime-dependency", "provider": "openrouter", "solved_at": "2026-09-18T14:34:50.504Z", "version": ""}