2f61ad7f1a
- 项目级 skill: .claude/skills/code-review/ (398行SKILL.md + 参考文件) - 自动触发: AI修改.py/.cbl/.cpy/.lark后自动review - CLAUDE.md: 定义触发规则、review流程、严重级别 - .code-review.yaml: tier=standard, 高风险模块配置 效果: clone即用, 每次代码变更后自动审查, 防止低质量代码入库 Co-Authored-By: Claude <noreply@anthropic.com>
1008 B
1008 B
Order Module — Manual Review Checklist
State Machine
- All order states defined and documented
- Valid transitions enforced (no impossible state changes)
- Terminal states properly handled (no further mutations)
- State change audit log exists
Concurrent Deduction
- Inventory deduction uses optimistic lock (version number) or pessimistic lock (SELECT FOR UPDATE)
- No race condition between check and deduction (not SELECT → check → UPDATE)
- Oversell prevention verified
Timeout Cancellation
- Unpaid order timeout mechanism (scheduled job, delayed queue, or TTL)
- Cancellation releases held inventory
- Cancellation releases held coupons/promotions
- Timeout is configurable, not hardcoded
Distributed Transaction
- Cross-service operations (order + inventory + payment) have compensation logic
- Saga pattern or eventual consistency defined
- Failure recovery documented (what happens if order succeeds but payment fails)