Skip to content

fix(ci): restore workspace installs and isolate Windows process tests - #94

Merged
starsstreaming merged 4 commits into
mainfrom
codex/fix-ci-validation
Oct 12, 2026
Merged

starsstreaming merged 4 commits into
mainfrom
codex/fix-ci-validation

Conversation

@starsstreaming

@starsstreaming starsstreaming commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

主分支 CI 在 Ubuntu 的 npm ci 阶段因 Windows 专用工作区声明触发 EBADPLATFORM,Windows 的快捷方式测试则仅报告被截断的 PowerShell CLIXML。此前同一提交的不同检查还出现 DSH 活动目录替换竞态和 Windows 子进程超时。

本次让源码工作区支持跨平台依赖安装,并由聚合打包器给正式产物保留 os: ["win32"];Desktop 测试统一使用现有长路径临时目录运行器,并串行执行测试文件。快捷方式调用禁用进度输出、使用文本格式和有界缓冲,优先报告实际进程错误码。DSH 监视器在用户事务期间停止读取活动清单,避免初始化逻辑在原子目录替换中重建目标目录。

验证:

  • 新增回归先失败后通过:busy 期间不读活动状态、空闲后恢复读取、48 KiB 子进程输出、ENOBUFS 诊断及源码/发布产物平台契约。
  • 本地 npm test:409 项,399 通过、10 项按既有条件跳过,零失败。
  • npm run typecheck、npm run build、npm audit --audit-level=high、JavaScript/PowerShell 语法检查与 git diff --check 均通过。
  • 独立只读审查未发现阻止合并的问题;四个 GitHub CI 组合通过后合并。

失败基线:https://github.com/starsstreaming/beautiCode/actions/runs/38132448422 。设计及回滚边界记录在 docs/adr/0008-ci-workspace-and-windows-test-isolation.md。本次不修改 CLI 功能、包版本,不发布 npm,也不操作本机宿主配置。

Summary by CodeRabbit

  • 功能与兼容性
    • 桌面应用源码工作区现在可在 Linux 和 Windows 上安装;正式打包产物仍仅支持 Windows,非 Windows 平台仍无法执行 Windows 安装命令。
  • 问题修复
    • 用户应用操作进行中时,状态监视会跳过本次读取,避免与写入事务冲突。
    • 优化快捷方式安装失败时的错误反馈,并改善大量 PowerShell 输出时的处理。
  • 测试与文档
    • 桌面测试改为串行运行,并使用长路径临时目录;新增相关回归测试及 CI、平台支持和回滚说明。

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T08:24:01.468298Z 44352db New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2f40ea34-ce9d-4dcb-9ba4-9b5366b8ae02

📥 Commits

Reviewing files that changed from the base of the PR and between 4d8b7c0 and 44352db.


📒 Files selected for processing (7)
  • docs/adr/0008-ci-workspace-and-windows-test-isolation.md
  • packages/adapter-codex/test/codex-lifecycle.test.js
  • packages/adapter-workbuddy/test/wb-runner-log.test.js
  • packages/beauticode-desktop/src/quick-shortcuts.mjs
  • packages/beauticode-desktop/test/all.test.mjs
  • packages/beauticode-desktop/test/quick-shortcuts.test.mjs
  • packages/beauticode-desktop/test/route.test.mjs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: be34e719-7855-45c9-87db-3eceb2584cff

📥 Commits

Reviewing files that changed from the base of the PR and between a71ff56 and 4d8b7c0.


⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json

📒 Files selected for processing (10)
  • docs/adr/0008-ci-workspace-and-windows-test-isolation.md
  • packages/adapter-dsh/src/session.ts
  • packages/adapter-dsh/test/watch-serialization.test.js
  • packages/beauticode-desktop/README.md
  • packages/beauticode-desktop/package.json
  • packages/beauticode-desktop/src/quick-shortcuts.mjs
  • packages/beauticode-desktop/test/contract.test.mjs
  • packages/beauticode-desktop/test/pack.test.mjs
  • packages/beauticode-desktop/test/quick-shortcuts.test.mjs
  • scripts/pack-desktop-aggregate.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

桌面源码包现在支持跨平台安装,聚合打包器为分发包设置 Windows 平台限制。快捷方式安装调整 PowerShell 输出及失败处理。DSH 监视器在用户应用操作期间跳过状态和活动清单读取。

Changes

桌面平台与快捷方式

层 / 文件 摘要
桌面平台契约与打包验证
packages/beauticode-desktop/package.json, scripts/pack-desktop-aggregate.mjs, packages/beauticode-desktop/test/contract.test.mjs, packages/beauticode-desktop/test/pack.test.mjs, packages/beauticode-desktop/README.md, docs/adr/0008-ci-workspace-and-windows-test-isolation.md
源码清单移除 win32 限制,聚合包清单设置 os: ["win32"]。测试分别验证源码清单和打包清单。README 与 ADR 记录平台契约及 CI、测试隔离相关决策。
快捷方式进程输出与错误处理
packages/beauticode-desktop/src/quick-shortcuts.mjs, packages/beauticode-desktop/test/quick-shortcuts.test.mjs
PowerShell 调用静默进度输出、使用文本格式,并将缓冲上限提高至 64 KiB。失败时抛出带 code 属性的 shortcut-create-failed 错误。Windows 测试覆盖大体积 stderr 和 ENOBUFS。

DSH 监视器忙碌状态隔离

层 / 文件 摘要
监视器忙碌检查与序列化测试
packages/adapter-dsh/src/session.ts, packages/adapter-dsh/test/watch-serialization.test.js
watchOnce 在 userBusy 时提前返回,不读取状态或活动清单。测试也验证非忙碌状态下两项数据各读取一次。

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix


Merge Risk: ⚪ Minimal · up to 4d8b7

No actionable issue remains from this review; the change is mergeable after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 7 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题准确概括了主要变更:恢复跨平台工作区安装,并隔离 Windows 进程测试。内容具体、简洁,与变更集直接相关。
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 7 files. (3 skipped: 3 unsupported.)


✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d8b7c096d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fead3bf96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const shortcutPath = path.join(programsDir, `beautiCode ${NAMES[host]} (背景).lnk`);
// WScript shortcut persistence can reject Unicode filenames on an English Windows image.
// Use a private ASCII alias for COM reads/writes; the filesystem publishes the unchanged display name without overwrite.
const temporaryPath = path.join(programsDir, `.beauticode-${randomUUID()}.lnk`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the entire COM alias path ASCII

When %APPDATA% or the Windows profile directory contains non-ASCII characters, joining the ASCII basename to programsDir still produces a non-ASCII full path. The new fixture in quick-shortcuts.test.mjs models COM failure for any non-ASCII character in FullName, so in that same environment CreateShortcut($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 👍 / 👎.

@starsstreaming
starsstreaming merged commit 35730da into main Oct 12, 2026
8 of 9 checks passed
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