Files
freedakgmail 93a469061d
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
CI / security-scan (push) Has been cancelled
初始提交:边缘AI算力机统一AI通讯层
2026-08-03 07:44:05 +08:00

60 lines
3.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Edge AI Gateway — 开发进度
> 最后更新:2026-08-03
## MVP 进度
### 已完成
- [x] M1-001:项目骨架(Go module、目录结构、Makefile、Dockerfile
- [x] M1-002:配置系统(YAML 加载、环境变量覆盖、校验、默认值)
- [x] M1-003:结构化日志(JSON 日志、脱敏、级别过滤、prompt_logging 策略)
- [x] M1-004HTTP 服务器与路由(中间件链:RequestID → Auth → BodyLimit → Logging → Recovery
- [x] M1-005POST /v1/chat/completions 处理器(流式+非流式、调度集成)
- [x] M1-006GET /v1/models 处理器
- [x] M1-007:会话管理接口(POST/GET/DELETE /v1/sessions
- [x] M1-008:统一错误码与错误响应(15 个错误码,统一 JSON 格式)
- [x] M1-009API Key 认证(SQLite 存储、SHA-256 哈希、权限校验)
- [x] M1-010:上下文组装器(summary_and_recent / recent_only / full 策略)
- [x] M1-011Token 估算器(CJK + 非CJK 启发式、KV cache 估算)
- [x] M1-012:会话存储(SQLite、消息追加、TTL)
- [x] M1-013:上下文策略管理(safety_margin、context_window 裁剪)
- [x] M1-014:任务状态机(6 状态、合法转换、取消传播 channel)
- [x] M1-015:优先级队列与调度器(P0-P4 优先级、FIFO 同级、堆实现)
- [x] M1-016:任务状态存储(SQLite 持久化、恢复未完成任务)
- [x] M1-017:分层超时管理(queue/first_token/inference/total 四层超时)
- [x] M1-018:取消传播(客户端断开 → context cancel → 推理停止)
- [x] M1-019SSE 流式输出(OpenAI 兼容格式、chunk/done
- [x] M1-020:模型适配器框架(ModelAdapter 接口、Registry
- [x] M1-021Ollama 适配器(/api/chat 流式+非流式、/api/tags 模型列表)
- [x] M1-022:逻辑模型映射(Resolve、List、Update 热重载)
- [x] M1-023Prometheus 指标(计数器、仪表、直方图桶)
- [x] M1-025:健康检查与就绪检查(/health、/ready 含适配器探测)
- [x] INF-001:测试框架(testutil 包)
- [x] INF-002CI/CD 流水线配置(GitHub Actions: lint → test → build → security scan
- [x] INF-003:测试数据与环境(docker-compose.test.yaml、config.test.yaml
- [x] M1-024GPU 指标采集(nvidia-smi 解析、周期采集、利用率/显存/功耗)
- [x] M1-026:端到端集成测试(18 用例:health/ready/metrics/auth/chat/session/bodylimit/concurrent
- [x] M1-028:性能基准测试(8 用例:延迟/并发/吞吐/内存/取消/SSE)
- [x] M1-029:安全测试(12 用例:auth bypass/SQL注入/prompt注入/路径穿越/敏感信息泄露)
- [x] M1-030:稳定性与混沌测试(7 用例:快速断连/并发负载/非法状态转换/双重取消/客户端取消/持续负载/畸形JSON)
- [x] M1-031:兼容性测试(8 用例:OpenAI API 格式/SSE格式/错误格式/REST约定/curl兼容)
- [x] M1-027:部署与文档(README、Docker Compose、Prometheus 配置、CI/CD
## 测试状态
- config: 8 tests PASS (91.1% coverage)
- context: 5 tests PASS (67.9% coverage)
- observability: 5 tests PASS (32.4% coverage)
- resource: 7 tests PASS
- scheduler: 4 tests PASS (87.0% coverage)
- task: 6 tests PASS (43.0% coverage)
- 编译: OK
- 服务器启动: OK (/health 200, /v1/models 401, /metrics 200)
- 集成测试: 18 用例 PASS
- 性能测试: 8 用例 PASS
- 安全测试: 12 用例 PASS
- 混沌测试: 7 用例 PASS
- 兼容性测试: 8 用例 PASS
- 全部测试: PASS
## MVP 状态:✅ 全部完成