Commit Graph

3 Commits

Author SHA1 Message Date
chiguyong 6b90fb5cd6 refactor: unify Redis connection pool across all modules
- Create app/core/redis.py with global get_redis() singleton
- Replace 4 independent Redis connections:
  - cache.py: use get_redis() instead of own aioredis.from_url
  - dispatcher.py: use get_redis() instead of own connection
  - health_checker.py: use get_redis() instead of per-check connection
  - rate_limit.py: RedisRateLimitBackend uses get_redis() instead of own connection
- Replace main.py readiness endpoint to use get_redis()
- Add close_redis() in FastAPI lifespan shutdown
- Remove unused aioredis imports from health_checker.py and main.py
2026-06-04 14:21:14 +08:00
chiguyong 0a39ce6ef1 fix: 审计问题修复第二轮
安全:
- H2: CORS生产环境localhost警告验证器
- M12: JWT_SECRET已有≥32字符验证(确认)

代码质量:
- H4: 11处Any类型替换为具体联合类型
- H5: 4个模型测试文件(47个测试),模型覆盖率32%→64%
- M11: Alembic迁移脚本(6个缺失表),修复迁移链分支

测试: 717 passed
2026-05-26 07:34:07 +08:00
chiguyong 9e63915f42 feat: 完成系统真实化改造 + Mock清除 + 文档编写
- 实现 Onboarding 后端 API(6个端点完整对接)
- 接入百炼 DashScope LLM(qwen3-coder-plus 真实引用检测)
- 修复知识库 MockEmbedder(自动检测 API Key 切换真实 Embedder)
- 内容生成对接 RAG 知识库检索
- 清除前端 onboarding 硬编码假数据(改为错误提示+重试)
- 移除模拟加载延迟(setTimeout)
- Pipeline dry-run 模式添加生产环境告警
- 添加操作流程文档和后续待办事项文档
- 更新 .gitignore 排除测试产物和临时文件
2026-05-23 21:35:10 +08:00