Your Name
cdb3a453bb
docs: 更新项目文档,添加测试验证规范和经验总结
...
新增内容:
1. CLAUDE.md - 添加测试验证规范
- 数据库连接配置
- 测试运行命令
- 性能基准参考值
- 覆盖率目标
- 常见问题与解决方案
2. project_experience_summary.md - 添加测试验证经验
- 集成测试环境配置
- 测试覆盖率要求
- 性能基准测试
- E2E测试常见问题
- 数据库表验证步骤
- 中间件鲁棒性验证
2026-04-09 14:32:36 +08:00
Your Name
85dac3ad44
fix: 修复 TimeoutMiddleware 并发问题并更新测试文档
...
问题修复:
- 修复 TimeoutMiddleware 死锁问题(嵌套锁调用)
- 修复竞态条件(responseSent 标志确保只发送一次响应)
- 基准测试超时从 5ms 改为 100ms 避免 race 检测不稳定
文档更新:
- 添加中间件并发测试要点(testing_strategy_v1.md)
- 添加 TimeoutMiddleware 并发安全经验(project_experience_summary.md)
- 更新测试覆盖率报告
- 新建项目状态报告
2026-04-08 18:20:40 +08:00
Your Name
4349666ccb
docs: enhance testing strategy to v1.2 with industry best practices
...
Based on expert review, key improvements:
1. Standardize testing pyramid to 3 layers (Unit/Integration/E2E)
- Remove non-standard "Component" layer
- Add target percentages per industry standards
2. Add test utilities infrastructure
- testutil/factory/ - Test data factories
- testutil/mock/ - Unified mock library
- testutil/assert/ - Custom assertions
3. Add missing build tags
- //go:build slow for performance tests
- //go:build e2e for E2E tests
4. Add performance regression testing guidelines
5. Fix flaky test handling
- Proper use of context timeout
- Skip flaky tests in local dev, run in CI
6. Update references to Google Testing Blog and Atlassian Testing Guide
Coverage targets remain aligned with industry:
- Unit: 70-80%
- Integration: 15-20%
- E2E: 5-10%
2026-04-08 10:23:13 +08:00
Your Name
698759b665
docs: refine testing strategy based on code review
...
Changes:
- docs/testing_strategy_v1.md v1.1:
- Clarify test pyramid with build tags (unit/integration/e2e)
- Add Middleware to priority module list
- Add coverage run discrepancy warning (individual vs ./...)
- Update action items to reflect completed work
- Add race detector usage guidelines
- Add test cleanup patterns
- reports/test_coverage_report_2026-04-08.md:
- Clarify coverage run discrepancy (individual vs ./...)
- Add dual columns: individual run vs combined run
- Update status to ✅ all key modules passing
- Add week-over-week trending
- Remove incorrect "emergency" status
2026-04-08 10:15:45 +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
Your Name
6af341ac86
docs: 更新生产就绪度状态报告
2026-04-07 18:01:34 +08:00
Your Name
4bbd609ceb
fix: 修复C-04/C-05/C-06/C-07架构级问题
...
C-06: DBSettlementStore.GetWithdrawableBalance 使用AccountRepository真实查询余额
C-05: DBEarningStore 使用新建的UsageRepository实现ListRecords/GetBillingSummary
C-04: 供应商ID从cfg.Server.DefaultSupplierID配置读取
C-07: PDF链接从cfg.Server.StatementBaseURL配置读取
新增:
- internal/repository/usage.go: 用量记录仓储
2026-04-07 17:24:26 +08:00