Hermes Agent
|
43c1dbdf32
|
feat(llm): 内置 LLM 供应商配置与审核主链接入骨架
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
配置层:
- Settings 新增 llm_provider/api_key/base_url/model/timeout/max_tokens
- 生产 fail-closed: GAOKAO_LLM_PROVIDER=none 禁止, provider!=none 且 API key 为空禁止
- .env.docker.example / .env.payment.example 补 LLM 变量
- payment_readiness_doctor 将 LLM 配置纳入 readiness 检查
基础设施:
- 新增 data/llm/client.py: OpenAI-compatible LLMClient
- 新增 data/llm/prompts.py: audit/cwb/full_plan prompt 模板
- 新增 data/llm/tests/test_llm.py: 12 个单元测试
主链接入:
- ReviewResultContract 新增 llm_generated / llm_summary / llm_cwb_suggestions
- _start_review_result 优先尝试 LLM 生成审核结果, 失败时回退到原规则默认逻辑
- cwb 页面优先展示 LLM 生成的三档建议
测试适配:
- conftest / health / app / p2_4 tests 注入默认 LLM 测试配置,避免被新 fail-closed 提前拦截
验证:
- data/llm/tests 12 passed
- 核心 prod settings tests 62 passed
|
2026-06-28 12:11:43 +08:00 |
|
Hermes Agent
|
2e9d668d1e
|
fix(tests): admin conftest RouteClient.post headers bug + intake candidate_province
- conftest.py: RouteClient.post() 在 mock webhook 分支引用未定义 headers 变量
- test_web_public_alipay_sim_e2e.py: submit payload 漏传 candidate_province(schema 升级后变必填)
- web_public.py: 删除未使用的 primary_action_label/href 变量(ruff F841)
- test_schema.py: 修正 import 位置(E402)+ 补充 IntakePayload import
根因: 之前改动留下的回归 bug,dev-verify 全绿后再次验证通过
|
2026-06-24 22:30:22 +08:00 |
|
Hermes Agent
|
9a8ad91216
|
fix: stop exposing portal tokens across payment URLs and storage
|
2026-06-18 15:04:46 +08:00 |
|
Hermes Agent
|
c07c998204
|
fix: enforce admin role on backend order and audit routes
|
2026-06-18 14:36:38 +08:00 |
|
Hermes Agent
|
444fc8a530
|
fix: restrict portal report paths to trusted directories
|
2026-06-18 14:28:04 +08:00 |
|
Hermes Agent
|
246f21c7f2
|
feat(review): land unified remediation and rules evidence closure
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-18 10:21:38 +08:00 |
|
Hermes Agent
|
fd7174a70e
|
feat(stats+dashboard): expand pending_orders into 3 actionable dimensions
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
## 后端 admin/stats.py
- compute_summary 在单条聚合 SQL 中加两个新字段:
- pending_overdue_24h: status='pending' AND created_at < (now - 24h)
(超时未付,需主动催付)
- pending_missing_intake: status='pending' AND
(order_intakes 无记录 OR order_intakes.status='draft')
(资料待补,需主动跟进)
- LEFT JOIN order_intakes AS i ON i.order_id = orders.id
- 关键 bug 修复: SQL ? 顺序与参数顺序必须匹配,
(overdue_cutoff 在 IN 子句后) 之前误用 (overdue_cutoff, *_REVENUE_STATUSES)
导致 overdue_cutoff datetime 字符串误入 IN 子句,
'completed' 误入 created_at < ? 子句, 收入少算 30%。
已修正为 (*_REVENUE_STATUSES, overdue_cutoff)
- 列名全部限定为 orders.status / orders.created_at,避免与 i.status 歧义
## 前端 admin/static/dashboard.html
- KPI 4 待处理订单卡加 .pending-breakdown 区域
- 两个 pill 标签: pending-tag-overdue(红色,超时) + pending-tag-missing(橙色,资料待补)
- 仅在对应字段 > 0 时才显示
- CSS .pending-tag[hidden] { display: none; } 确保 hidden 属性生效
## 前端 admin/static/dashboard.js
- renderSummary 新增 pending_overdue_24h / pending_missing_intake 渲染
- 至少一个非零才展开 breakdown 区域
## 测试
- conftest.py orders_db fixture 同时建 order_intakes 表,避免 LEFT JOIN 缺表
- test_routes_stats_dashboard.py:
- test_dashboard_empty_db_shape 锁住 summary 必须含 12 字段
- test_dashboard_summary_pending_orders 更新 revenue 期望 (paid + serving 计入)
- 新增 test_dashboard_summary_pending_overdue_24h (2天前 vs 12h前)
- 新增 test_dashboard_summary_pending_intake (submitted/draft/无 intake 4 种组合)
- test_app.py 加 pending-breakdown 结构断言
- pytest 52 passed
## 真实环境验证
- admin/test-pass-123 登录后:
pending=7 overdue=0 missing_intake=7
- 视觉验证: KPI 4 显示 '7' 主值 + '资料待补 7' 橙色 pill
'超时' pill 因 overdue=0 自动隐藏
- 数据一致性: by_status.pending=7 与 summary.pending_orders=7 一致
|
2026-06-16 21:48:18 +08:00 |
|
Hermes Agent
|
c03ed7a4ba
|
feat(web): tighten portal privacy and cleanup flows
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-15 21:24:55 +08:00 |
|
Hermes Agent
|
deee5e538a
|
feat(ops): wire SMTP/IM alert sinks and tighten intake validation
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-15 19:36:47 +08:00 |
|
Hermes Agent
|
eb06990b82
|
feat(t12): add multi-file upload limits and ops alert monitoring surfaces
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-15 19:01:21 +08:00 |
|
Hermes Agent
|
b965dc2863
|
feat(t12): add portal attachment upload for self-service intake
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-15 16:26:26 +08:00 |
|
Hermes Agent
|
cb9728fb4e
|
feat: complete web self-service mvp flow
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-14 05:26:27 +08:00 |
|
Hermes Agent
|
3f46811e49
|
release: cut v2.1
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-13 14:49:58 +08:00 |
|