Skip to content

fix(vision-workshop): compare canonical paths in the camera bridge entry guard (1.5.14) - #4

Merged
lx-1997 merged 1 commit into
mainfrom
qoder/camera-ai-1.5.14
Dec 4, 2026
Merged

lx-1997 merged 1 commit into
mainfrom
qoder/camera-ai-1.5.14

Conversation

@lx-1997

@lx-1997 lx-1997 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

概要

  • 修复相机桥接入口判断的路径比较缺陷:此前把原生 realpath 解析出的启动路径与模块 URL 直接做字符串比较。宿主经 Windows 8.3 短文件名或与磁盘写法不同的大小写启动时(RDK Studio 1.7.0 在 Windows 上把插件导入到 C:\Users\RUNNER~1\...),两者不等,桥接进程以状态 0 静默退出、不提供任何工具。现优先使用 import.meta.main,回退路径只比较规范化后的路径。
  • 新增回归测试:以大小写不同的绝对路径启动桥接必须返回握手响应;sameModulePath 对短文件名、符号链接与大小写的比较。
  • 打包版本升至 1.5.14,入库 studio.zip(98 个文件,SHA-256 66c59670…)。

证据

  • Windows CI 诊断(rdk-plugins debug/win-entry,已删除):导入后相机 MCP 子进程 status 0、无输出;路径为 C:\Users\RUNNER~1\AppData\Local\Temp\...。
  • macOS 复现:用大小写不同的绝对路径启动 1.5.13 的桥接,输出 0 字节;同一启动方式下 1.5.14 返回 serverInfo.version。

验证

  • bridge.test.mjs 32/32;换回旧实现时新增测试失败。
  • 打包产物:vision_plugin_version、serverInfo.version、plugin.json.version 均为 1.5.14;未配置连接时 2 个诊断工具,已配置时 56 个工具无重名。
  • typecheck、Python 回归、运维脚本检查、build、doctor、无数据库启动冒烟、无头浏览器端到端冒烟通过;tools+plugins、vision-workshop 与全量服务端回归见下方评论。

…try guard (1.5.14)

The guard compared the natively resolved launch path with the module URL as plain
strings. When a host launched the bridge through a Windows 8.3 short name or with
another letter case than the on-disk path (RDK Studio 1.7.0 on Windows imports the
plugin under C:\Users\RUNNER~1\...), the two differed and the server exited silently
without listing any tools. Prefer import.meta.main and otherwise compare canonical
paths; add regression tests for the cased launch path and the comparison helper.
@lx-1997
lx-1997 merged commit 39c823c into main Dec 4, 2026
1 check failed
lx-1997 added a commit to D-Robotics/rdk-plugins that referenced this pull request Dec 4, 2026
插件目录与 dist 包同步到 d-obs main(D-Robotics/d-obs#4)构建的 1.5.14(98 个文件,SHA-256 66c59670…),marketplace.json、Qoder 清单与 README 同步版本。

修复相机桥接入口判断在 Windows 短文件名或大小写不同路径下静默退出(RDK Studio 1.7.0 在 Windows 上导入后相机 MCP 无输出);恢复未配置连接时的版本查询与连接诊断工具;移除 1.3.0 时代遗留且已失效的 mcp/course-server.mjs、mcp/entrypoint.mjs 与三份过时测试;冒烟测试随 16 个课程工具与 ISP 图像调试实验室界面更新;CI 的 Windows 导入器验证改用 Studio 1.7.0 安装包(1.5.8 已下架)。

验证:macOS 与 Windows 双平台 CI 全部通过(包校验、两套 MCP、课堂界面渲染、Windows 上 Studio 1.7.0 正式导入器与 MCP 加载);macOS 上另经真实 Studio 1.7.0 导入器验证。
@lx-1997
lx-1997 deleted the qoder/camera-ai-1.5.14 branch December 4, 2026 07:58
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