Hermes Agent
6d0feeb090
build: prove pdf runtime and strict remediation gates
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 17:40:12 +08:00
Hermes Agent
2d26d96eaa
fix: reduce portal and share exposure surfaces
2026-06-18 16:12:22 +08:00
Hermes Agent
ede9ffedd7
fix: align audit and payment failure contracts with real behavior
2026-06-18 16:00:57 +08:00
Hermes Agent
2da926bb5e
fix: tighten audit exposure and consent data handling
2026-06-18 15:36:24 +08:00
Hermes Agent
a82c5b3cca
fix: align retention cleanup across notifications logs and share telemetry
2026-06-18 15:20:16 +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
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
a57522b11e
feat(cli): delegate channel/delivery/retention/backup to gaokao-cli (phase 3 batch 3)
...
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
Round 3 of the unified gaokao-cli rollout. Adds four more passthrough
markers so the unified entry point can drive the remaining ops scripts
without bringing new data models into data/.
- data/cli_compat_delivery_dispatch.py: runpy shim for
scripts/gaokao-delivery-dispatch.py (DispatchDeliveryEvents).
- data/cli_compat_delivery_watchdog.py: runpy shim for
scripts/gaokao-delivery-watchdog.py (WatchdogDeliveryEvents).
- data/cli_compat_retention_cleanup.py: runpy shim for
scripts/gaokao-retention-cleanup.py (OrderRetentionCleanup).
- data/cli_compat_channel_fallback.py: forwarder for
data.channel_sync.monitor.main (CheckChannelHealth /
ManualTemplate).
- data/cli_compat_backup.py: subprocess wrapper that dispatches
scripts/backup_snapshot.sh and scripts/backup_verify.sh.
- data/rules/cli.py main(): routes gaokao-cli {channel, delivery
{dispatch,watchdog}, retention, backup {snapshot,verify}} to the
shims; rejects unknown subcommands with a structured error.
- docs/CLI_API_MAPPING.md §2.1: now lists 12 top-level commands with
their real subcommands and fallback paths.
- tests/test_cli_doctor_phase3.py: +6 tests covering channel
delegation, delivery dispatch / unknown-subcommand, retention
routing, backup shell routing, and backup unknown-subcommand
rejection.
Verification:
- focused: 12 passed
- dev-verify full gate: all checks passed (ruff / mypy / coverage /
pytest / benchmark)
2026-06-17 22:18:57 +08:00
Hermes
77cde03f1d
feat(cli): delegate share/payment-doctor to gaokao-cli (phase 3 batch 2)
...
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
Builds on 7d31d75 (order delegation + doctor self-check). The unified
gaokao-cli now also wraps the legacy shortlink and payment-doctor
scripts through thin runpy-based compat shims.
- data/cli_compat_gaokao_shortlink.py: loads scripts/gaokao-shortlink
via runpy.run_path; preserves argv routing for native subcommands
(create/list/resolve/revoke/...).
- data/cli_compat_payment_doctor.py: loads scripts/payment_provider_doctor.py;
strips the leading 'doctor' marker (the legacy script takes no args)
and rejects unrecognised tokens so silent flag drops are surfaced.
- data/rules/cli.py main(): routes gaokao-cli {share,payment} <...>
to the compat shims; gaokao-cli order remains delegated to
data.orders.cli.
- docs/CLI_API_MAPPING.md §2.1: records the actually-shipped command
surface (rules / majors / majors school-* / audit / order / share /
payment doctor / doctor) so the design doc matches runtime.
- tests/test_cli_doctor_phase3.py: covers share delegation, payment
doctor rejection, and the passthrough help flow.
Verification:
- focused: 6 passed
- dev-verify full gate: all checks passed (ruff / mypy / coverage / pytest / benchmark)
2026-06-17 19:16:44 +08:00
Hermes
7d31d75145
feat(cli): add order delegation + doctor self-check (phase 3)
...
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
docs-only + cli: extend scripts/gaokao-cli with two thin wrappers
without changing data/rules, data/majors_catalog, or rules/_truth.
- gaokao-cli order <subcommand> delegates argv to data.orders.cli.main
with the 'order' prefix stripped, so callers can use the unified
command face without changing the existing orders parser.
- gaokao-cli doctor <json?> returns a single self-check payload that
reuses RuleLoader + MajorsCatalogLoader (no new dependencies, no
gaokato/ scaffolding). Truth-root or catalog-root failures degrade
gracefully with structured {error, ok=false} sections instead of
raising.
- tests/test_cli_doctor_phase3.py covers: help text, order delegation
to list subcommand, doctor ok-path, doctor failure-path.
Also re-aligns docs/ACTIVE_EXECUTION_BOARD_2026-06-17.md (new) +
docs/CURRENT_STATE.md (single execution口径) + rules/majors source-
of-truth index files so design-phase numbering no longer drifts from
execution-phase numbering. Pre-existing 2026-06-16 optimization board
and 2026-06-17 phase2 plan are demoted to historical snapshots.
P0_P1_P2 remediation plan §4 historical cards get a red warning
banner so they are not re-read as current pending.
Verification:
- focused: 4 passed
- dev-verify: 770 passed, 1 failed
(alipay_sim E2E failure pre-existed this commit; caused by an
uncommitted upstream edit in admin/routes/web_public.py that
rewires payment_return -> /portal/{token}/payment-success while
the E2E still asserts /portal/{token}/status; out of scope for
this commit and intentionally not touched.)
2026-06-17 18:05:16 +08:00
Hermes Agent
edc5b11230
feat(audit): validate majors in structured audit 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-17 16:02:31 +08:00
Hermes Agent
6b1157fe19
feat(majors): add school catalog skeleton and verification
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-17 12:46:04 +08:00
Hermes Agent
36ad58a253
feat(majors): add phase2 national catalog mvp
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-17 12:06:46 +08:00
Hermes Agent
8a61b8fe4a
fix(rules): close phase15 verify and legacy checker migration
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-17 09:01:43 +08:00
Hermes Agent
ae4835eeab
feat(rules): add phase1 truth source loader and rules cli
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-16 18:14:41 +08:00
Hermes Agent
9d239fe2c3
feat(t12): harden public checkout and add admin manual order page
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-16 12:16:45 +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
bf7cce90f9
feat(ops): add admin ops alert audit and watchdog alert sink
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 18:17:30 +08:00
Hermes Agent
4026b8f55f
feat(t12): productize portal status and structured intake 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-15 17:13:05 +08:00
Hermes Agent
70504064c3
fix(quality): lock P2-2 single-DAO truth and P2-6 historical snapshot headers
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 14:18:25 +08:00
Hermes Agent
ac2d6d1c44
fix(quality): tighten P1-4/P1-6/P1-8 regressions for db scoping and backup verify
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 13:52:56 +08:00
Hermes Agent
355431461c
fix(delivery): split validated vs delivered lifecycle to remove sent overreach
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 13:21:42 +08:00
Hermes Agent
7fabc23715
fix(t12): close payment delivery and governance remediation
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 11:39:31 +08:00
Hermes Agent
3158bb839c
fix(payments): close refund domain loop on order side
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 09:21:45 +08:00
Hermes Agent
7fe4ddcbc4
feat: harden T12 backup and portal workflows
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 23:12:18 +08:00
Hermes Agent
9bb066f69c
fix(payments): make webhook payment/order update atomic
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 22:22:05 +08:00
Hermes Agent
8787600eee
feat: add retention cleanup workflow
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 20:55:06 +08:00
Hermes Agent
e24107c517
feat: add delivery watchdog and crowd quality summary
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 20:47:25 +08:00
Hermes Agent
9d1a6a11b0
feat: harden delivery and deletion workflows
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 20:37:39 +08:00
Hermes Agent
fe11e429b9
feat: add local alipay provider acceptance path
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 20:21:46 +08:00
Hermes Agent
ccf93c0b15
feat: add delivery status tracking and crowd quality levels
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 19:34:43 +08:00
Hermes Agent
4b0390a255
feat: move delivery notification into dao transitions
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 17:35:37 +08:00
Hermes Agent
08148fe282
feat: add consent gating and dev verify
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 13:02:03 +08:00
Hermes Agent
85605716b7
feat: add alipay simulation verification
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 07:48:17 +08:00
Hermes Agent
e7706e3b11
chore: harden real payment onboarding gate
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 06:50:21 +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
ca480ebf84
chore(quality): close T5.5 coverage gate
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 22:31:40 +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
coder
1ce861166f
feat(crowd-db): T2.5 扎堆检测单元测试 (覆盖率 93% ≥80%)
...
PRD 用例: 高风险识别 / 替代方案 / 跨省份 / 异常处理
- 新增 20 个 test_use_case_* 用例锚定 PRD 4 项要求
- 显式覆盖 freq=4 高风险完整字段、alt score 0-100、广东 vs 湖南跨省隔离
- 11 个异常处理用例覆盖 name=None/非 dict 元素/frequency 异常/loader 抛错
根因加固: detector 主循环加入 3 层防御
- isinstance(rec, dict) 防止 TypeError
- isinstance(rec_name, str) 防止 AttributeError on .strip()
- try/except frequency 防止 ValueError
- _normalize_entry 对 truthy 非 str school 走 str() 兜底
质量门禁
- crowd_detector.py 覆盖率 93% (101 stmts / 7 missed 仅 __main__ 块)
- test_crowd_detector 55/55 passed
- data/crowd_db/ 全量 125/125
- ruff check data/crowd_db/ All checks passed
- 仓库全量 249 passed (排除既有 orders/masking 失败)
Refs: docs/IMPLEMENTATION_PLAN_v2.md T2.5
2026-06-12 16:46:42 +08:00
coder
9168a10d75
feat(orders): T4.2 DAO 数据访问层 (CRUD + 事务 + 加密 + 状态机)
...
- data/orders/dao.py (530 lines): OrdersDAO class
* CRUD: create / get / get_by_external_id / find_by_phone / list / count / stats_by_status / update / delete
* 事务: transaction() 上下文 + 嵌套深度计数(外层事务中内层不重复 commit)
* 加密透明化: API 入口 Order dataclass 走明文 PII,DAO 内部 to_db_row/from_db_row 转换
* 状态机守护: transition_status() 单事务内 UPDATE orders + INSERT order_status_history
+ 时间戳联动 (paid_at/started_at/delivered_at/completed_at COALESCE 保留首次值)
* 幂等 upsert_by_external_id: 4 种 action 与 data/channel_sync/dao_extension 对齐
* 防御: update() 显式拒绝 status 字段; _row_factory_ctx() 不污染外部 row_factory
* 异常: OrderNotFound(LookupError) / DuplicateOrder(ValueError)
- data/orders/tests/test_dao.py (51 cases): 加密透明化、状态机合法/非法路径、
事务回滚、upsert 4 种 action、状态历史时间线、row_factory 隔离、删除 cascade、
与 dao_extension 的契约对齐
- data/orders/__init__.py: 导出 OrdersDAO / UpsertResult / StatusChange /
OrderNotFound / DuplicateOrder
- 验证: data/orders/tests/ 163/163, data/ 386/386, ruff 0 warning, py_compile clean
2026-06-12 16:36:51 +08:00
coder
ef4bb46295
docs(orders): T4.2 DAO 文档 + 实施记录 + CHANGELOG
...
- data/orders/README.md: 增加 DAO API 一览表 + 加密透明化边界表
- docs/plans/T4-2-orders-dao.md: 实施记录 (设计原则 / DoD / 验证 / 风险)
- CHANGELOG.md: T4.2 条目(51 用例 / 163 总 / 386 data 全绿)
2026-06-12 16:36:32 +08:00
Hermes Agent
6af6e0156b
feat(crowd-db): T2.4 扎堆报告生成器 + 端到端渲染验证
...
- data/crowd_db/risk_report.py: build_crowd_risks 把 RiskFinding 转
模板所需 crowd_risks 字典;高/中/低三色 emoji(🔴 /🟡 /🟢 );
group_by_risk / format_risk_summary / render_risk_table 辅助能力;
LoaderLike Protocol 避免对 CrowdDBLoader 强依赖
- data/crowd_db/tests/test_risk_report.py: 22 用例覆盖三色 emoji、
模板字段、alternatives 重映射、防御 fallback、空方案、不存在
省份、自定义 loader 注入
- scripts/verify_t2_4_e2e.py: 用真实湖南 575 分数据 + audit_report.html
模板渲染一遍,6/6 集成断言通过
- CHANGELOG: T2.4 记录
验证:data/crowd_db/tests/ 105/105、仓库全量 392/392、ruff All checks
passed、validate_template.py PASS
2026-06-12 16:35:20 +08:00
Hermes Agent
e18abedb4f
feat(orders): T11.2 敏感字段展示脱敏工具 + to_dict 三态策略
...
- 新增 data/orders/masking.py (141 行):
- mask_phone: 11 位 → 138****1234;支持 +86/86 国家码剥离、空格/横杠分隔符
- mask_id_card: 18 位 → 430102********1234(保留前 6 行政区划 + 末 4);15 位老版兼容;13-14 位非标准也走前 6 后 4 遮罩
- mask_name: 1 字原样 / 2 字 张* / 3 字 张*丰 / 4+ 字 张**;非中日韩字符全遮
- mask_sensitive_dict: 一键遮罩订单字典中所有已知 PII 字段,不动 _enc/_hash 索引/密文
- 默认安全:None/空串/非字符串均不抛错,统一返回 None/''
- 扩展 Order.to_dict(decrypt_sensitive) 三态策略:
- True : 完整明文(权限内接口使用,如后台人工核对)
- False : 完全移除明文(对外公开统计/审计日志)
- 'mask' : 部分遮罩(默认,推荐;列表/详情直接可用)
- 未知字符串策略值回退为 mask(防误传 plaintext 导致明文泄露)
- 新增 data/orders/tests/test_masking.py (246 行,32 个 pytest 用例):
- 覆盖各 mask 函数边界(标准/带 +86/短串/非法输入)
- 覆盖 Order.to_dict 三态与默认 mask 的串联通路
- 验证:
- data/orders/tests 全套 112 用例通过(原 80 + 新增 32)
- 全仓 344/344 通过
- ruff check 0 warning / ruff format --check 已规范
- 与 T4.1 落盘加密的关系:crypto 负责'落盘形态'(密文+hash),
masking 负责'展示形态'(部分遮罩),两者正交互补。
2026-06-12 16:26:57 +08:00
Hermes Agent
bdd361e50f
docs(orders): T11.2 展示脱敏文档 + 字段分类表更新
...
- data/orders/README.md 新增 T11.2 段:展示脱敏三态策略示例代码
- 文件结构表新增 masking.py / test_masking.py
- 字段分类表:强/弱敏感 PII 增加'展示遮罩'列
- DoD 勾选'展示脱敏'项
- 版本号 v1.0 → v1.1
代码改动见下个 feat commit(分离便于回滚/review)。
2026-06-12 16:26:32 +08:00
Hermes Agent
00e596ab10
feat(crowd-db): add provenance query and validation
2026-06-12 16:25:05 +08:00
Hermes Agent
a11480cf10
feat(orders): add encrypted sqlite order model
2026-06-12 15:24:20 +08:00
hermes-coder
29f3f4d362
feat(share): T7.1 短链接生成 (base62 + SQLite 映射表)
...
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
- data/share/short_link.py (657 行):ShortLinkService 核心模块
- base62 编解码 + secrets.choice 加密随机短码
- SQLite WAL 模式持久化,share_links 表 + 3 索引
- 访问控制:permission (read/comment/edit/admin) + sha256 密码 + expires_at + revoked
- 完整 CRUD: create/get/resolve/revoke/list_by_*/get_stats/purge_expired
- route_short_link() 路由辅助供 Flask/FastAPI 等挂载 /s/<code>
- data/share/tests/test_short_link.py (447 行):25 个 pytest 用例覆盖全部 API
- scripts/gaokao-shortlink (271 行):CLI 入口 (create/resolve/revoke/list/stats/purge)
2026-06-12 15:20:10 +08:00
Hermes Agent
55bf84610b
feat(crowd_db): T2.3 扎堆检测算法
...
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
- 新增 detect_crowd_risk(plan, user_score, province) 入口
- 遍历方案每条志愿,匹配该分数段内 crowd_db 记录
- 风险等级:frequency >=4 high / 2-3 medium / 1 low / 0 跳过
- 院校模糊匹配(互相包含),专业可选
- 支持 dict / CrowdRecommendation / tuple / list 多种 plan 形态
- 支持注入 loader 便于测试,结果按 frequency 降序
- 20 个单元测试覆盖各分支(136/136 全套通过)
2026-06-12 11:00:03 +08:00