Skip to content

feat(fnos): 升级引擎 0.15、接入 JEV 并修复资源生命周期 - #245

Merged
luoshuai990529 merged 10 commits into
fnos/developfrom
codex/fnos-main-backports
Oct 20, 2026
Merged

luoshuai990529 merged 10 commits into
fnos/developfrom
codex/fnos-main-backports

Conversation

@luoshuai990529

@luoshuai990529 luoshuai990529 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

改动范围

关联问题:#239(fnOS 入库资源清理、EMFILE、文件句柄上限与安全重试)。

相关修复回迁:#206(文档抽取 JSON Schema 校验)、#217(Excel 数值解析)、#214(Embedding 地址与密钥继承提示)。

  • 引擎升级与数据兼容:将 zleap-sag 从 0.13.0 升至 0.15.0,保留现有处理流水线和迁移标记;兼容旧知识、向量、引用、断点及增量导入,完善安装/升级向导的数据影响提示。
  • JEV 配置与探测:新增独立的完整服务 URL、API Key、模型、评分超时和失败策略配置,支持保存前探测及显式启用;失败时按配置报错或回退到粗排。
  • JEV 检索与结果展示:贯通 REST/SSE 搜索、Agent 工具、MCP 和既有 compare API,保留原生评分顺序;事件展示与 Agent 引用只投影每个分块原生排名第一的事件并沿用其真实分数,避免其他事件套用分块最高分;搜索与问答界面展示已评分、未评分候选及降级状态。评分前限制可见文档范围,返回前重新检查删除状态;请求预算覆盖配置等待和多源检索,代理不会再以固定 60 秒截断合法预算。
  • 资源释放与故障诊断:补齐引擎半初始化、启动失败、重复取消、流式断连、空闲 worker 回收和停服时的资源清理,等待已接管的清理完成后再返回;保留原错误及安全重试语义,提高 Python 文件句柄软上限并提供轻量 FD 采样脚本。文档失败日志保留脱敏诊断,避免原始异常链泄露凭据、上游正文和私有路径。
  • PDF / Office 正文阅读:REST、MCP 阅读二进制文档时返回已保存的解析正文;MCP 同步限制删除中或删除失败文档的可见性。
  • 长 Markdown 预览:原始文本模式按块渲染,降低长文本布局开销,保留全文内容及顺序。
  • 新建会话导航:新建会话后切换页面再返回时保留空白草稿,避免重新选中旧会话。
  • Embedding 配置提示:明确 URL、API Key 的继承来源和配置状态,保持既有保存与继承行为。
  • MinerU 配置修复:空或无关的持久化配置不再将环境中配置的服务商错误覆盖为 302,保留历史 URL 的兼容处理。

影响功能范围

  • 默认检索策略仍为 vector;保存 JEV 连接不会自动启用评分,JEV Key 不继承 LLM/Embedding Key。JEV 仅在满足能力要求的存储后端开放。
  • 已完成 0.13 引擎迁移的知识库保留现有知识、模型配置和会话;尚未迁移的旧知识库继续遵循原有迁移规则,安装向导明确提示数据影响。
  • 保持 fnOS Native FPK、UDS gateway、包用户权限、租户隔离、NAS ACL 和持久化目录契约。

测试覆盖情况

  • CI 3/3 通过:检查结果。后端 Ruff 和完整 pytest 933 passed / 1 skipped;前端类型检查、ESLint、548 项单测及生产构建通过;发布安全检查通过。后端跳过项为未启用的专用 PostgreSQL E2E。
  • 回归覆盖真实 0.13 SQLite/Lance 两租户数据升级、JEV 鉴权/预算/降级/可见性、REST 事件分数与 Agent 引用、主事件缺失/删除及同名事件、连续取消后的真实 FD 与子进程释放,以及文档失败日志脱敏和原异常保留。
  • fnOS x86 真机完成覆盖安装、全新安装,以及 PDF/Excel/长 Markdown、JEV 配置与检索、多账号隔离、NAS 导入/更新/暂停恢复/撤权/删除、移动 iframe 适配;原知识、模型配置和会话已恢复。
  • 验证边界:真机包尚未包含日志脱敏及 JEV 主事件投影补修,这两条路径由自动化回归验证;有限 FD 采样不代表生产长期负载结论,移动端为桌面浏览器响应式模拟。

Backport-of: ce8e985

Also hide deleting and delete-failed documents from MCP reads, matching the existing REST visibility barrier.
Backport-of: 52c9457 (provider normalization only)

Do not infer a 302 override from empty or unrelated persisted model settings.
Backport-of: 52ca53a

Keep Next router paths logical and prefix history URLs with /app/sag; cover remounts and older runs.
Backport-of: 8b89fa2

Adapt the hints to the existing fnOS settings model and preserve its full-save and credential behavior.
Backport-of: 725cd7b

Reuse the fnOS splitter and verify literal text, exact character preservation and preview switching.
…tdown

Integrate PR #240 through ebda24e4 and close the remaining engine teardown cancellation gaps. Preserve original errors and safe retry behavior, set the inherited nofile limit, and verify real FD/socket cleanup across startup, tools, fanout owners, proxies and shutdown. Refs #239.
Keep the existing ingest/extract pipeline, data directory and one-time migration marker. Add real two-tenant SQLite/Lance upgrade fixtures and verify numeric spreadsheets, checkpoints, citations, incremental writes and deletion. Treat SDK internal markers as vendor data during native package validation.
Add independent endpoint-bound credentials, draft probing, capabilities and configuration without changing vector defaults. Preserve native scoring through REST, SSE, Agent and MCP; scope evidence before scoring, recheck returned evidence and diagnostics, bound deadlines, drain cancellation and update configuration after fanouts finish. Backport-of: 76974bc (#238), adapted to the fnOS pipeline and tenant lifecycle.
Pin main e0d6756 and fnos/develop 9951014; record costs, equivalent implementations, deferred features and verification.

Defer the upstream hierarchical outline after reproducing incorrect repeated-heading paths.
@luoshuai990529
luoshuai990529 force-pushed the codex/fnos-main-backports branch from 898942f to 5f74662 Compare October 20, 2026 04:06
@luoshuai990529
luoshuai990529 marked this pull request as ready for review October 20, 2026 05:47
@luoshuai990529
luoshuai990529 merged commit 5840650 into fnos/develop Oct 20, 2026
3 checks passed
@luoshuai990529
luoshuai990529 deleted the codex/fnos-main-backports branch October 20, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant