first commit

This commit is contained in:
baozaotumao2025
2026-07-18 21:00:26 +08:00
commit 14722be770
105 changed files with 25004 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# ADR-003:分层架构与设计模式
## 状态
已接受
## 采用模式
- Application Factory`create_app`
- Strategy`ModelProvider`
- Factory`ProviderFactory`
- Repository:数据库访问
- Service Layer:能力探测、测试计划、执行、报告
- Dependency InjectionFastAPI Depends
- GatewayDatasetGateway
`ProviderFactory` 复用同一数据库会话读取持久化的 `target`/`judge` 配置;缺少对应记录时才读取 `Settings` 中的环境变量。连接检查和后台运行走同一工厂;能力探测只作为运行内部阶段,避免配置与执行分叉。
## 边界
不引入复杂领域事件、CQRS、事件溯源或微服务。当前规模下这些会增加维护成本,不能直接提升核心测试能力。