Repository navigation
Conversation
解决的问题: 1. desktop-ci 的 pnpm test 在 windows-latest 上失败:scripts/android-runtime/tests/android-apk-resources.test.js 用内联 Python 脚本导入 PIL,runner 没有 Pillow,报 ModuleNotFoundError,job 在 pnpm build 之前中止。 怎么解决: 1. 在 pnpm test 之前加一步 python -m pip install pillow。
解决的问题: 1. 官方 Session fork 读取祖先会话溢出的工具结果时,鉴权拿 realpath 得到的原生路径去继承到的工具文本里做子串匹配。Windows 的溢出提示把 file_path 写进 JSON,反斜杠被转义成两个字符,匹配必然失败,报「该工具结果不属于当前会话可读取的内容。」;Linux 的分隔符不经 JSON 转义,所以只有 Windows 复现(desktop-ci #48 的两个 fork 用例)。 怎么解决: 1. 归属记录额外写入保存时的 locator;鉴权对 realpath 路径与 locator 各取原生、正斜杠、JSON 转义三种写法,任一在继承文本中出现即通过。 2. 仍然要求同一次工具调用的 callId 命中、且文本出现在继承事件里,不放宽可见范围;顺带覆盖 8.3 短名被 realpath 展开导致 locator 与 path 不一致的情况。 验证: - 在 Windows 上按溢出提示的实际拼装方式验证:旧判定 false,新判定 true;换成同目录另一个文件仍为 false。 - POSIX 下三种写法彼此相同,行为不变。
解决的问题: 1. native-author-docs 把示例 .js/.html 的磁盘正文与卡片 JSON 内嵌正文直接比较;Windows 检出(core.autocrlf=true)把前者变成 CRLF,后者仍是 LF,断言必失败。 2. windows-installation-integrity 断言被破坏沙箱的崩溃码恰好是 0x80000003;runner 镜像与 Chromium 版本不同会变成 0xC0000005,用例与实现无关地失败。 3. mobile-editor-layout 浏览器用例直接启动 Electron 探针,Windows CI 上偶发 spawn EBUSY(镜像文件被杀软或残留句柄占用),布局断言根本没跑到。 怎么解决: 1. 示例正文比较前归一化 CRLF,并给 packages/examples/native-author/** 加 text eol=lf,避免重新检出又变回 CRLF。 2. 断言改为「异常退出且没有产出结果」,不再绑定具体 NTSTATUS;code === 1 的诊断路径保持原样。 3. 启动失败且错误码为 EBUSY/ETXTBSY/EPERM 时退避重试两次(1s、2s),其他错误照旧上抛。 验证: - 用真实 git 复现检出行为:无该属性时 character.js 检出为 CRLF,加属性后为 LF(core.autocrlf=true)。 - 本机没有 Windows 依赖,受影响的桌面/浏览器用例未本地复跑,由 desktop-ci 运行验证。
解决的问题: 1. side-panel-motion 在 desktop-ci 上确定性失败:runner 的操作系统可能报告 prefers-reduced-motion: reduce,titlebar.css 在 reduce 下把 grid 过渡设为 none,probe 等不到动画。probe 只在最后显式模拟 reduce,默认路径没有固定偏好。 2. 浏览器测试在 Windows CI 上偶发 spawn EBUSY:刚安装的 Electron 镜像被杀软或残留句柄锁住;上一轮只给 mobile-editor-layout 加了内联重试,这次同一个错误换到了 chat-bottom-control-layout。 怎么解决: 1. side-panel-motion.probe 在页面加载后、第一次点击前用 DevTools Emulation 固定 prefers-reduced-motion: no-preference;减少动效用例仍显式切成 reduce。 2. vitest 的 browser 项目加 retry: 2,覆盖所有浏览器探针的启动锁;mobile-editor-layout 的内联重试保留,恢复更快。
解决的问题: 1. 固定动效偏好后,用例继续跑到宽度断言:GitHub Windows runner 的屏幕只有 1024 宽,窗口被宿主限制,useSidePanelLayout 按 min-width 把侧栏压到 325(期望 328),确定性失败。 怎么解决: 1. 用 DevTools Emulation.setDeviceMetricsOverride 显式模拟 1400/960 视口,布局不再依赖宿主屏幕;resize 用例同步覆盖 960/1400。
KuramiWan
added a commit
to KuramiWan/ElecKoi
that referenced
this pull request
Oct 18, 2026
并入上游 PR eleckoi#16(b04d614)的 5 个提交:Pillow、工具结果 fork 鉴权、 CRLF 比对、浏览器重试与视口/动效模拟、安装完整性退出码。 理由:0.2.13 基线在 windows-latest 上本来就红这 7 条;不并它,本 PR 的 Windows CI 无法反映错误处理改动的真实结果。等 eleckoi#16 落到上游后这些提交是 no-op。 验:真机(CAMEL-PC,Node 24.20.0)上 unit / ui / host / tooling 与关键 integration 用例共 258 文件 / 1907 用例全过;闸测试在 CRLF 检出下 8/8。
This was referenced Oct 18, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Desktop Change(桌面端改动)
What changed(改了什么)
修复当前 main 上桌面 CI 的红。
desktop-ci的pnpm test在 windows-latest 上自 10-08(PR #13)之后就没有绿过;本 PR 覆盖 Pillow、三处基线失败、一处 Windows 产品缺陷,以及浏览器探针的三处 CI 环境问题。五个提交:
b2340f8Pillow:scripts/android-runtime/tests/android-apk-resources.test.js用内联 Python 导入 PIL,runner 没有 Pillow;在pnpm test前加python -m pip install pillow。0926e77产品修复:fork 继承工具结果的读取鉴权。官方 Session fork 读取祖先会话溢出的工具结果时,鉴权拿 realpath 得到的原生路径去继承到的工具文本里做子串匹配;Windows 的溢出提示把file_path写进 JSON,反斜杠被转义成两个字符,匹配必然失败(报「该工具结果不属于当前会话可读取的内容」)。现在归属记录额外写入保存时的locator,鉴权对 realpath 路径与 locator 各取原生、正斜杠、JSON 转义三种写法,任一命中即通过;仍然要求同一次工具调用的callId命中且文本出现在继承事件里,不放宽可见范围。ef8bce7三处测试环境失败:native-author-docs:示例正文与卡片 JSON 内嵌正文比较前归一化 CRLF,并给packages/examples/native-author/**加text eol=lf(Windows 检出core.autocrlf会把前者变成 CRLF)。windows-installation-integrity:断言改为「异常退出且没有产出结果」,不再绑定具体 NTSTATUS(runner 镜像与 Chromium 版本会给出0xC0000005而不是0x80000003)。mobile-editor-layout:Electron 启动遇到EBUSY/ETXTBSY/EPERM时退避重试两次(1s、2s),其他错误照旧上抛。6ae3166浏览器探针的两处 CI 环境问题:side-panel-motion:runner 的操作系统可能报告prefers-reduced-motion: reduce,shell 的 grid 过渡在 reduce 下是none,probe 等不到动画。probe 现在在页面加载后、第一次点击前用 DevTools Emulation 固定no-preference,减少动效用例仍显式切reduce。spawn EBUSY(刚安装的 Electron 镜像被杀软/句柄锁住):vitest 的browser项目加retry: 2,覆盖所有探针;mobile-editor-layout的内联重试保留,恢复更快。b04d614side-panel-motion 的模拟视口:GitHub Windows runner 的屏幕只有 1024 宽,窗口被宿主限制,useSidePanelLayout按 min-width 把侧栏压到 325(期望 328)。probe 用Emulation.setDeviceMetricsOverride显式模拟 1400/960 视口,布局不再依赖宿主屏幕。Architecture route(架构归属)
host / modules / platform / i18n(无新增 Main 文件)contracts / foundation(无新增 Shared 文件)@eleckoi/dsh-runtime;Host/Client 插件使用同版本公开合同,上游包仍是同一个精确版本批次(无版本变化)@eleckoi/dsh-product-data独占,跨模块依赖只使用对方index.ts公开面(产品改动在dsh-client-roleplayHost 插件内部)Data and compatibility(数据与兼容)
产品兼容说明:工具结果归属记录新增
locator字段。旧记录没有这个字段——POSIX 不受影响(原生路径就是 JSON 安全形式),Windows 上修复前写下的旧记录在跨 fork 读取时仍可能失败;修复后写下的新记录带 locator。回滚与影响面
pnpm build即可;没有数据迁移,产品数据库与 Session 日志都不动。Verification(验证)
Windows 本机复跑(维护者机器):
tests/integration/tool-result-recovery.test.js:24/24 passed(修复前 desktop-ci 上 2 个 fork 用例失败)。tests/integration/native-author-docs.test.ts:把packages/examples/native-author的 10 个文本文件转成 CRLF 模拟 Windows 检出后,2/2 passed;临时去掉归一化后复现 CI 的原断言expected { type: 'script', … } to match object { enabled: false, … }。side-panel-motion.probe.cjs:node --check通过;vitest.config.ts用 vite 加载确认 8 个 project、browser的retry为 2。CI:由本 PR 的
desktop-ci执行全量。本机 Electron 44 GUI 启动即崩(0xC0000005,官方 dist 同样),浏览器与安装完整性用例无法本地复跑,由 CI 验证。Review scope(审查范围)
.github/workflows/desktop-ci.ymlpackages/client/features/dsh-client-roleplay/src/host/tool-result-store.mjs.gitattributestests/integration/native-author-docs.test.tsapps/desktop/tests/windows-installation-integrity.test.jsapps/web/tests/browser/mobile-editor-layout-browser.test.jsapps/web/tests/browser/side-panel-motion.probe.cjsvitest.config.ts