xiaowei
|
02eef1024d
|
feat(Rust): zhiyi-consolidate 整合引擎 — DBSCAN + 衰减回归 + 质量回溯
Rust sidecar (232行): 纯 std + serde + clap,无 async
- DBSCAN 聚类: cosine_sim + 邻居扩展 (20簇/132噪点)
- 衰减回归: 按类别线性拟合,clamp(0.005, 0.05)
- 质量回溯: 信息密度检测
- 输出: stdout JSON,stderr 日志
Go consolidate 客户端: exec Rust 二进制,提取 JSON
server.go: 注册 /api/v1/admin/consolidate
验证:
- Go→Rust consolidate?mode=full → 200 OK ✅
- 923 distilled, 535 vectors, 20 clusters, 132 noise
|
2026-05-28 18:08:06 +08:00 |
|
xiaowei
|
6667d42e14
|
feat(M1): Go API 服务器骨架 + Auth 中间件 + /health 端点
M1.3: Go HTTP 服务器 (net/http, /health, Auth middleware)
M1.4: Protobuf IPC 定义 (Go↔Rust Consolidation 服务)
验收:
- /health → 200 {"status":"ok","service":"zhiyid","version":"0.1.0"}
- 无 X-API-Key → 401
- 正确 Key → 200
- 错误 Key → 401
文件:
- go/cmd/zhiyid/main.go (127 行, 优雅关闭)
- go/internal/api/server.go (31 行, 路由注册)
- go/internal/api/middleware/auth.go (38 行, X-API-Key)
- go/internal/api/routes/health.go (24 行)
- go/proto/consolidate.proto (72 行, 4 RPC)
|
2026-05-28 17:16:52 +08:00 |
|