bug(doeff-openrouter): unit tests call removed doeff.default_handlers — migrate to run_program helper
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 1
Description
packages/doeff-openrouter/tests/unit の 2 file が、削除済みの doeff.default_handlers を呼ぶ旧世代の検体。proboscis/agora-redesign#467 で test_structured_llm.py を名指し + 理由つきで外した(test_effect_handlers.py は収集は通るので載っているが赤)。
症状(2026-09-19 実測)
$ uv run pytest -q -m 'not e2e' packages/doeff-openrouter/tests
4 failed, 2 passed, 1 deselected, 4 errors
| file | 状態 | 出所 |
|---|---|---|
tests/unit/test_structured_llm.py |
収集で落ちる(proboscis/agora-redesign#467 で除外) | :12 from doeff import EffectGenerator, default_handlers, do, run / :30 _HANDLERS = tuple(default_handlers()) が module 直下 |
tests/unit/test_effect_handlers.py |
収集は通るが実走で赤 | :30 の import は通るが :42 :218 で run(..., handlers=default_handlers()) |
tests/e2e/test_openrouter_integration.py |
errors(既定の走行は -m 'not e2e' で外れる) |
— |
test_structured_llm.py は旧 run(program, handlers=..., env=...) 時代の書き方で、29 箇所が is_ok() / .value を使う。
参考: 直し方の型は隣にある
packages/doeff-openai/tests/_runner.py が同じ移行の run_program helper を既に持っており、packages/doeff-openai/tests/unit/conftest.py がそれを unit へ渡している。openrouter も同じ形へ寄せられる見込み(packages/doeff-openrouter/tests/conftest.py は既に在る)。
やること
_runner.run_program相当へ 2 file を移行(is_ok()/.valueを現行の結果型へ)doeff_adr_wiring_excludeからpackages/doeff-openrouter/tests/unit/test_structured_llm.pyの行を消す- e2e の 4 errors も同じ移行で消えるか確かめ、消えないなら別途名乗る
Acceptance Criteria
uv run pytest -q -m 'not e2e' packages/doeff-openrouter/testsが緑doeff_adr_wiring_excludeから該当行が消え、既定の走行がtest_structured_llm.pyを集めるmake lintclean
関連: proboscis/agora-redesign#467(card acp:kanban-issue:ki-ba058de03685)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/doeff-openai/tests/_runner.py and tests/unit/conftest.py, then compare packages/doeff-openrouter/tests/conftest.py with the two named unit files. Run uv run pytest -q -m 'not e2e' packages/doeff-openrouter/tests and inspect the current result type and exclusion entry. Done means the suite is green, test_structured_llm.py is collected by default, e2e failures are accounted for, and make lint is clean.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100