refactor(v1.3.1): Phase 3 报告横幅、评分逻辑收敛与成本闭环 #35
No reviewers
Labels
No Label
priority:P0
priority:P1
priority:P2
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: solahqb/AgentEvalTool#35
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "refactor/v1.3.1-phase3-code-quality"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
v1.3.1 执行计划 Phase 3(代码质量),基于 v1.3.0 PR #27-#32 审查结论。
3.1 报告渲染 Go/No-Go 横幅
3.2 LLM 规则共享逻辑收敛
rules/scored_llm.py:call_scored_llm(直连 OpenAI 兼容端点)+parse_scored_content(0-10 clamp)llm_score/fluency删除各自的_call_llm/_parse_score副本,改调共享模块3.3 成本跟踪闭环重构
chat_with_usage/embed_with_usage:按次返回用量,并发规则下不做总量差值(避免竞态)EvalRule.llm_usage累加器 +_record_llm_usage;llm_score / fluency / safety(幻觉检测)/ semantic 全部接入_usage_by_purpose(judge/generator/embedding/moderation,按 RULE_PURPOSE),写入RunSummary.eval_usage_by_purposecost_tracking重构:get_pricing(data/model_pricing.json 覆盖 → DEFAULT_PRICING)+build_eval_cost_sectioneval_cost分岗位成本段,Markdown 导出渲染成本表计划偏差说明
原计划提到 Turn 维度成本函数,但 tutu-api 通道不返回被评侧用量、Turn token 字段从未填充,故删除
aggregate_token_usage/calculate_turn_cost/calculate_case_cost/calculate_run_cost死代码,成本口径改为评测自身 LLM 消耗(经 ModelGateway 统计)。Test plan
pytest tests/unit/707 passed(基线 699 + 新增 8)ruff check backend/全绿