Your Name
|
e9523ea7a3
|
fix: 修复验证报告SEC-001和SEC-003安全问题
SEC-001: 移除硬编码"123456"测试码
- 修改DefaultSMSVerifier.Verify返回错误,强制要求配置真实SMS服务
- 添加ErrSMSServiceNotConfigured错误定义
- 更新相关测试使用mock SMS verifier
SEC-003: 添加IP欺骗防护
- AuthConfig添加TrustedProxies配置项
- getClientIP添加可信代理验证参数
- 仅在请求来自可信代理时信任X-Forwarded-For头
- 添加isTrustedProxy和containsCIDR辅助函数
架构重构:
- 创建internal/adapter包,包含存储适配器
- 创建internal/outbox包,包含OutboxProcessorRunner
- 创建internal/compensation包,包含补偿执行器
- main.go从891行减少到349行
TDD方法:
- 为每个修复编写测试用例
- 测试通过后再提交代码
|
2026-04-09 20:28:23 +08:00 |
|
Your Name
|
cdb3a453bb
|
docs: 更新项目文档,添加测试验证规范和经验总结
新增内容:
1. CLAUDE.md - 添加测试验证规范
- 数据库连接配置
- 测试运行命令
- 性能基准参考值
- 覆盖率目标
- 常见问题与解决方案
2. project_experience_summary.md - 添加测试验证经验
- 集成测试环境配置
- 测试覆盖率要求
- 性能基准测试
- E2E测试常见问题
- 数据库表验证步骤
- 中间件鲁棒性验证
|
2026-04-09 14:32:36 +08:00 |
|
Your Name
|
e21021c88c
|
docs: add testing strategy and coverage report
- docs/testing_strategy_v1.md: comprehensive testing strategy
- Test pyramid definition (Unit/Integration/E2E)
- File naming conventions
- Mock interface guidelines
- Coverage requirements
- Test execution commands
- Common issues solutions
- reports/test_coverage_report_2026-04-08.md: current coverage status
- Module-by-module breakdown
- Coverage达标情况
- Mock implementations inventory
- Next action items
- CLAUDE.md: update test specifications
- Add audit store mock signature
- Detailed coverage targets per module
- Test naming conventions
|
2026-04-08 10:08:33 +08:00 |
|