Files
group_xinghuo_jinrong/docs/memory/2026-09-13.md
T
zhanghongyu_0626 5c18164d34 fix(trade): close CT-001 P0/P1/L1 and align customer-trade E2E
Dev login no longer honors injected roles; self-service simulate/convert
blocks R4 disclosure grades like the UI and chat already do. Reuse of a
convert idempotency key with a different body returns 409. CT6 redeem qty
is derived from T+2 lots instead of a fixed 35000; CT7-05 and CT10-07
assertions follow. Update project memory and v1.1 post-fix test artifacts.
2026-09-13 20:04:41 +08:00

34 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-09-13 · 客户线交易收口(CT-001 缺陷修复)
> 对照初稿:[TEST-LOG-2026-09-13-CT-001](tests/2026-09-13-customer-trade-e2e/TEST-LOG-2026-09-13-CT-001.md)(v1.0 仍为「只报告」快照)。**本日代码改动未更新 TEST-LOG 计数**,需复跑后归档 v1.1。
## 做了什么
| 项 | 职责 | 改动要点 |
| --- | --- | --- |
| P0 鉴权 | `app/gateway/jwt_service.py` | `infer_roles()` 不再信任 body `roles`;仅 `DEFAULT_ROLES_BY_ACTOR` |
| P1 适当性 | `app/service/suitability.py` · `trade_gateway.py` · `convert_service.py` | `simulate_self_service_blocked()`:揭示/网点办理档在**自助 simulate/convert 受理**视同阻断 |
| L1 幂等 | `app/service/convert/errors.py` · `convert_service.py` | 同 `client_request_id`、不同四元组 → **409 `IDEMPOTENCY_CONFLICT`** |
| CT6 脚本 | `scripts/dev/customer_trade_e2e_smoke.py` | `derive_redeem_qty()`;`CT10-07` 无赎回 SKIP |
| T1 部分 | `scripts/demo/run_demo_smoke.ps1` | 登录改 `/api/auth/login`(v1 业务步骤仍可能 404) |
## 验证(本地 · 未含全量 CT 复跑)
```text
pytest tests/test_wave0_auth.py tests/test_trade_gateway.py tests/test_convert_accept.py # 会话内 55+ passed
pytest tests/test_convert_accept.py::test_accept_same_client_request_id_different_body_raises_conflict # 409 用例
```
## 仍开放
- **CT-001 复跑**:`python scripts/dev/customer_trade_e2e_smoke.py` · `node scripts/e2e/12-customer-trade.mjs`
- **B1**:`core_holding` vs 批次和基线不一致(CT1 INFO,非本轮引入)
- **T1**:`11-cross-role.mjs` **`C1.6`**(仓库外)· `run_demo_smoke.ps1` 除登录外仍依赖 `/api/v1/*`
- **CT11 Redis 降级对照轮**:未执行
- **git**:`merger` 工作区大量未 commit(客户线 + 本收口)
## 记忆同步
- `MEMORY.md` §0 第四轮状态
- `TODO.md` §第四轮上报 · §T1