Commit Graph

3 Commits

Author SHA1 Message Date
hailin 747e4ae8ef refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination

This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
Developer 37c255bdc1 fix(admin-service): 修复TypeScript编译错误
- 修复 version.controller.ts 中 FileSize 使用 .bytes 替代 .value
- 修复测试文件中 AppVersion.create 缺少 isForceUpdate 参数
- 修复测试文件中使用正确的 Prisma Platform 枚举类型
- 修复 CreateVersionCommand 参数顺序错误

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 20:01:08 -08:00
Developer ce1f4ff9f9 test(admin-service): 添加完整的自动化测试框架
测试框架特性:
- Jest + TypeScript + ts-jest 配置
- 三层测试架构: 单元/集成/E2E
- 完整的 DDD 测试覆盖

单元测试 (test/unit/):
 Value Objects 测试 (4个文件)
  - version-code.vo.spec.ts: 版本号验证和比较
  - version-name.vo.spec.ts: 语义化版本格式
  - file-size.vo.spec.ts: 文件大小验证和格式化
  - file-sha256.vo.spec.ts: SHA256哈希验证

 Entity 测试
  - app-version.entity.spec.ts: 实体创建、业务方法、查询方法

 Mapper 测试
  - app-version.mapper.spec.ts: 领域-持久化转换

集成测试 (test/integration/):
 Repository 测试
  - app-version.repository.spec.ts: CRUD操作、查询方法

 Handler 测试
  - create-version.handler.spec.ts: 命令处理器测试

E2E 测试 (test/e2e/):
 Controller 测试
  - version.controller.spec.ts: API端点、输入验证、错误处理

测试工具和配置:
- Makefile: make test, test-unit, test-integration, test-e2e, test-cov
- Docker测试: Dockerfile.test + docker-compose.test.yml
- WSL2测试: run-wsl-tests.ps1 + test-in-wsl.sh
- 测试环境: .env.test
- package.json: Jest配置 + 测试脚本

文档:
- TEST_GUIDE.md: 详细测试指南
- TESTING_SUMMARY.md: 测试总结

测试统计:
- 9个测试文件
- ~100个测试用例
- 覆盖Value Objects/Entities/Mappers/Repositories/Handlers/Controllers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 18:15:59 -08:00