chore: auto release commit (2026-07-14 11:56:45)
All checks were successful
技能自动化发布 / release (push) Successful in 5s
All checks were successful
技能自动化发布 / release (push) Successful in 5s
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 两类样例文件
|
||||
## 样例文件
|
||||
|
||||
### 1. `test_service_contract.py.sample`
|
||||
|
||||
@@ -22,7 +22,17 @@
|
||||
- 需要验证:**成功路径**、**参数/校验错误**、**adapter 异常被转换为业务可读错误**。
|
||||
- 需要用 **`FakeAdapter`**(见 `tests/adapter_test_utils.py`)或自建 **stub** 替代 ERP、TMS、WMS、船司、报关、LLM、RPA 等,**不**发真实 HTTP、**不**开真实浏览器。
|
||||
|
||||
### 2. `test_golden_cases.py.sample`
|
||||
### 2. `test_sync_contract.py.sample`
|
||||
|
||||
**适合:** 外源 → 本地库的同步 / refresh / collect 能力。
|
||||
|
||||
至少应覆盖:首次插入、第二次幂等、更新、失效数据处理、不可信空结果保护 vs 完整空快照失效、遗漏 `snapshot_complete` 立即失败、部分写入后故障注入与回滚(`fail_after_writes`)、统计字段 `inserted/updated/unchanged/removed`、同步路径不调用 CSV/Excel 导出器。`snapshot_complete` 为调用方**必须显式传入**的 keyword-only 参数(无默认值),禁止默认把结果当成完整快照,也禁止靠条数猜测完整性。使用通用表名(如 `business_key`),不要写具体平台业务名。
|
||||
|
||||
### 3. `test_action_core_contract.py.sample`
|
||||
|
||||
**适合:** 校验「单业务内核、多入口」——task/CLI/兼容命令调用同一 domain service;不按 toolbar/cron/agent 来源改变业务结果。
|
||||
|
||||
### 4. `test_golden_cases.py.sample`
|
||||
|
||||
**适合:**
|
||||
|
||||
@@ -103,6 +113,8 @@
|
||||
| 用途 | 示例文件名 |
|
||||
|------|------------|
|
||||
| Service 契约 | `tests/test_service_contract.py` |
|
||||
| 同步契约 | `tests/test_sync_contract.py` |
|
||||
| 单内核多入口 | `tests/test_action_core_contract.py` |
|
||||
| Golden / fixture 回归 | `tests/test_golden_cases.py` |
|
||||
| 领域规则 | `tests/test_<domain>_rules.py` |
|
||||
| 校验逻辑 | `tests/test_<domain>_validation.py` |
|
||||
|
||||
Reference in New Issue
Block a user