Commit Graph

79 Commits

Author SHA1 Message Date
Hermes Agent
bfe6ad16a7 feat(t12): add portal notification audit page and richer intake summary
Some checks failed
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:20:00 +08:00
Hermes Agent
4026b8f55f feat(t12): productize portal status and structured intake flow
Some checks failed
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
d24901b88e feat(t12): expand structured intake wizard and status summary
Some checks failed
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:08:25 +08:00
Hermes Agent
b965dc2863 feat(t12): add portal attachment upload for self-service intake
Some checks failed
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
4215e8fb64 docs(state): refresh remaining remediation scope after P2/X closure
Some checks failed
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 15:28:30 +08:00
Hermes Agent
94200960b2 docs(design): tighten X-02/X-03/X-05/X-08 design docs and add CROWD_DB_DATA_QUALITY
Some checks failed
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 15:14:27 +08:00
Hermes Agent
5a57ec4705 feat(quality): make dev-verify a stable one-shot entrypoint
Some checks failed
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:23:27 +08:00
Hermes Agent
70504064c3 fix(quality): lock P2-2 single-DAO truth and P2-6 historical snapshot headers
Some checks failed
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
Some checks failed
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
Some checks failed
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
1179710991 docs(state): refresh CURRENT_STATE after P1 remediation
Some checks failed
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 12:46:52 +08:00
Hermes Agent
243d1b9427 fix(quality): unify coverage gate across CI, dev-verify, and codecov
Some checks failed
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 12:45:06 +08:00
Hermes Agent
7fabc23715 fix(t12): close payment delivery and governance remediation
Some checks failed
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
Some checks failed
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
98b50893e2 feat: auto-queue submitted portal orders
Some checks failed
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:15:05 +08:00
Hermes Agent
7fe4ddcbc4 feat: harden T12 backup and portal workflows
Some checks failed
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
Some checks failed
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
44b3c0be45 docs(remediation): add prioritized P0/P1/P2 plan from 2026-06-14 system review
Some checks failed
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:00:08 +08:00
Hermes Agent
8787600eee feat: add retention cleanup workflow
Some checks failed
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
Some checks failed
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
Some checks failed
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
Some checks failed
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
b53e791aff feat: add payment return portal redirect
Some checks failed
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:40:02 +08:00
Hermes Agent
a97cfb2058 docs: add service terms and deletion sop
Some checks failed
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:38:30 +08:00
Hermes Agent
2f4eabf681 ops: add backup verification script
Some checks failed
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:36:57 +08:00
Hermes Agent
ccf93c0b15 feat: add delivery status tracking and crowd quality levels
Some checks failed
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
a16fa07ba5 docs: sync historical snapshots and crowd db quality
Some checks failed
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:46:34 +08:00
Hermes Agent
4b0390a255 feat: move delivery notification into dao transitions
Some checks failed
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
Some checks failed
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
a128fcda0d feat: tighten portal delivery gating and add compliance baselines
Some checks failed
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 10:44:04 +08:00
Hermes Agent
d0ff5b5fe7 feat: gate serving on submitted intake 2026-06-14 10:38:04 +08:00
Hermes Agent
3e88d00f9a docs(exec): add current execution board for only-active issues
Some checks failed
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 10:23:04 +08:00
Hermes Agent
cc1b674b9a docs(review): keep only active remediation items and sync truth sources
Some checks failed
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 10:19:02 +08:00
Hermes Agent
93fa527f64 docs(review): reconcile completed-stage issues from 2026-06-13 alignment review
Some checks failed
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 10:12:03 +08:00
Hermes Agent
8ae25245cf test: add alipay sim user e2e flow
Some checks failed
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 09:56:14 +08:00
Hermes Agent
85605716b7 feat: add alipay simulation verification
Some checks failed
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
Some checks failed
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
Some checks failed
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
eba52bea6e docs(reports): add 2026-06-13 planning review artifacts 2026-06-13 22:44:53 +08:00
Hermes Agent
ca480ebf84 chore(quality): close T5.5 coverage gate
Some checks failed
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
9510fd16ec chore(release): finalize T5.5 coverage gate artifacts
Some checks failed
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 16:25:54 +08:00
Hermes Agent
3f46811e49 release: cut v2.1
Some checks failed
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
v2.1
2026-06-13 14:49:58 +08:00
Hermes Agent
eb4f3e1e96 docs(channel-sync): add T8 truth docs and status 2026-06-12 18:00:05 +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