Repository navigation
fix(ci): restore workspace installs and isolate Windows process tests #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4d8b7c0
fix(ci): restore workspace installs and isolate Windows process tests
starsstreaming 09a32fe
test(ci): use native lifecycle fixtures and expose shortcut failure d…
starsstreaming 7fead3b
fix(ci): persist Unicode shortcuts through an owned ASCII alias
starsstreaming 44352db
fix(ci): normalize platform fixtures and clean terminated shortcut pr…
starsstreaming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # 源码工作区的平台验证与 Windows 测试隔离 | ||
|
|
||
| 日期:2026-10-12。状态:实施。 | ||
|
|
||
| ## 问题与证据 | ||
|
|
||
| 主分支 [CI 38132448422](https://github.com/starsstreaming/beautiCode/actions/runs/38132448422) | ||
| 在 Ubuntu 安装阶段因 `beauticode-desktop` 工作区的 `os: win32` 声明退出, | ||
| Windows 两个 Node 版本均在快捷方式测试中只报告被截断的 CLIXML 进度输出。 | ||
| 此前同一提交的 PR 检查还出现 DSH 目录替换竞态和多项 Windows 子进程超时。 | ||
|
|
||
| ## 决策 | ||
|
|
||
| - 源码工作区允许在 CI 的 Linux、Windows 上安装;聚合打包器负责写入正式产物的 | ||
| `os: ["win32"]`,保留用户安装契约。源码及产物契约分别验证,避免使用 `--force` | ||
| 绕过 npm 对平台及引擎的检查。 | ||
| - Desktop 测试采用现有长路径临时目录运行器,并串行执行测试文件,避免多个 | ||
| PowerShell、复制 Node 校验和快捷启动用例同时争用 hosted runner 的资源。 | ||
| 原有用例与超时边界保留,不通过跳过测试或无边界重试变绿。 | ||
| - 快捷方式进程禁用 PowerShell 进度输出,明确文本格式,保留有界输出缓冲; | ||
| 优先报告 ENOBUFS、ETIMEDOUT 等真实进程错误码,不让 CLIXML 掩盖失败原因。 | ||
| 对正常启动后的非零退出保留有界、移除路径与 URL 的诊断文本。 | ||
| 完整诊断进一步定位到 Windows 英文镜像中 WScript 无法保存中文 `.lnk` 名称; | ||
| COM 只操作私有 ASCII 临时别名,再由 .NET 文件 API 以不覆盖方式发布原中文名称。 | ||
| 读取既有快捷方式也通过该别名进行,始终保留原有归属校验及 finally 清理。 | ||
| 父进程另行清理本次 UUID 别名,覆盖超时或输出超限终止 PowerShell 后其 finally | ||
| 无法执行的情形;清理失败保留原操作与清理错误码,避免静默遗留开始菜单项。 | ||
| - DSH 写事务持有 busy 状态时,监视器不得读取活动清单。该读取会初始化 | ||
| `active` 目录,可能在目录原子替换的中间阶段重新创建目标目录。已有读任务 | ||
| 仍由事务入口等待完成,后续 tick 则在入口处退出。 | ||
|
|
||
| ## 验证与回滚 | ||
|
|
||
| 回归覆盖 busy 期间零读取、空闲后恢复读取、48 KiB 子进程诊断输出及错误码、 | ||
| 源码与发布产物的不同平台契约,并保留真实 Windows 快捷方式端到端验证。 | ||
| Linux 夹具统一采用本机绝对路径;日志失败夹具使用真实空字符,不把 Windows | ||
| 非法文件名误当成跨平台非法文件名。Unicode 持久化回归以受限 COM 夹具执行真实 | ||
| PowerShell 和 .NET 文件发布,核验最终中文名称及临时文件清理。 | ||
| Windows 注册表夹具显式使用 `path.win32` 归一化,避免 Linux 把反斜杠当作文件名字符。 | ||
| 合并前要求四个操作系统/Node 组合均通过 CI;变更没有数据迁移,可回退本提交。 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import assert from "node:assert/strict"; | ||
| import os from "node:os"; | ||
| import path from "node:path"; | ||
| import test from "node:test"; | ||
| import { DshSession } from "../dist/index.js"; | ||
|
|
||
| test("watch ticks never open active state while a user transaction owns it", async () => { | ||
| const session = new DshSession({ dataRoot: path.join(os.tmpdir(), "unused-dsh-watch-test"), bundledGallery: false }); | ||
| let statusReads = 0, manifestReads = 0; | ||
| // Hold the domain transaction's busy state deterministically, without relying on filesystem timing. | ||
| session.host = { status: async () => { | ||
| statusReads++; | ||
| return { connectedClients: 0, current: { generation: 0, media: "clear" } }; | ||
| } }; | ||
| session.store.readActiveManifest = async () => { manifestReads++; return { generation: 0, background: null }; }; | ||
| session.userBusy = true; | ||
| await session.watchOnce(); | ||
| assert.equal(statusReads, 0); | ||
| assert.equal(manifestReads, 0); | ||
| session.userBusy = false; | ||
| await session.watchOnce(); | ||
| assert.equal(statusReads, 1); | ||
| assert.equal(manifestReads, 1); | ||
| }); |
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
%APPDATA%or the Windows profile directory contains non-ASCII characters, joining the ASCII basename toprogramsDirstill produces a non-ASCII full path. The new fixture inquick-shortcuts.test.mjsmodels COM failure for any non-ASCII character inFullName, so in that same environmentCreateShortcut($temporaryPath)still fails and the shortcut cannot be created or inspected. Use a guaranteed ASCII/short path for the alias's entire path, not only its basename.Useful? React with 👍 / 👎.