Skip to content

test: cover measurement decider AI path and rule-based branches - #37

Open
Anai-Guo wants to merge 1 commit into
mainfrom
chore/auto-maint-2026-10-07
Open

Anai-Guo wants to merge 1 commit into
mainfrom
chore/auto-maint-2026-10-07

Conversation

@Anai-Guo

@Anai-Guo Anai-Guo commented Oct 7, 2026

Copy link
Copy Markdown
Owner

自动维护改动

类型:维护(测试覆盖,roadmap 优先级 2)
改动:新增 tests/test_decider.py(22 个用例):用 stub router 覆盖 decide_measurement 的 LLM 路径(prompt 组装、markdown 围栏剥离、文献提示、无效 JSON 回退、无凭据直接走规则),并参数化覆盖 _rule_based_decision 全部分支与优先级。orchestrator/decider.py 覆盖率 59% → 100%。无源码改动。
测试:通过(本地全量 462 passed / 1 skipped;ruff check + format 全过)
参考:无

本 PR 由每日维护任务生成,请人工 review 后再合并。

🤖 Generated with Claude Code

decider.py sat at 59% coverage: decide_measurement's LLM path (prompt
assembly, markdown-fence stripping, literature hint, invalid-JSON
fallback, credential gate) and most rule-based branches were untested.
Add tests/test_decider.py with a stub router so no network or API key is
needed; the module is now fully covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant