proboscis / proboscis/doeff

bug(doeff-openrouter): unit tests call removed doeff.default_handlers — migrate to run_program helper

Open
#613 0 comments 0 reactions 0 assignees View on GitHub

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 :218run(..., 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 は既に在る)。

やること

  1. _runner.run_program 相当へ 2 file を移行(is_ok() / .value を現行の結果型へ)
  2. doeff_adr_wiring_exclude から packages/doeff-openrouter/tests/unit/test_structured_llm.py の行を消す
  3. e2e の 4 errors も同じ移行で消えるか確かめ、消えないなら別途名乗る

Acceptance Criteria

  1. uv run pytest -q -m 'not e2e' packages/doeff-openrouter/tests が緑
  2. doeff_adr_wiring_exclude から該当行が消え、既定の走行が test_structured_llm.py を集める
  3. make lint clean

関連: proboscis/agora-redesign#467(card acp:kanban-issue:ki-ba058de03685)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.