Files
X-Financial/document/development/2026-07-17/dev-logs/bugs/knowledge-global-storage-tenant-isolation.md
caoxiaozhu 787bc3a481 feat(platform): close AI expense value loop
Add tenant-safe value, telemetry, connector, commercial, and production-readiness foundations.
2026-07-17 14:14:08 +08:00

9 lines
1.4 KiB
Markdown
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.
## 修复记录
- 12:45修复知识文件、元数据与 LightRAG/Qdrant 全局共享导致的跨租户串读和覆盖风险。
- Git 提交检查:已执行 `git fetch --all --prune``git status -sb``git log HEAD..@{u}``git log @{u}..HEAD`upstream 无新提交,本地 `main` ahead 17包含 `242d68c3``28b834ed``4940ebc4``ee88a36b``11275e4b``653eda05` 等既有审批、AI、迁移与鉴权提交本次未改写或合并这些提交。
- 修改:新增 tenant/platform 存储作用域,把文件、`.index.json``.lightrag`、运行时缓存和 Qdrant workspace 分区;旧全局制度无损复制到平台只读层;知识 API、同步、Orchestrator 查询和后台索引统一从认证用户或数据库 Agent Run 获取可信 tenant。
- 操作:按职责拆出 scope、index state 和 RAG scoring 小模块;删除知识文件工具中已废弃的弱 ONLYOFFICE token 代码;所有命令在 Docker 容器 `local-x-financial-linux``/app` 下运行,未提交、未推送、未删除旧知识资料。
- 验证:容器内租户隔离 6 项、既有知识回归 31 项和相关 Agent Run/鉴权 20 项通过;目标 Ruff 与 compileall 通过。
- 影响租户只能看到和操作自己的知识数据并可读取平台只读制度RAG 本地状态、缓存和向量 workspace 不再跨企业复用,缺 tenant 时统一 fail-closed。