Skip to content

test(host): 重试 Windows 代理验收的临时目录清理 - #11718

Merged
dashhuang merged 1 commit into
mainfrom
cindy/host-windows-proxy-cleanup
Nov 20, 2026
Merged

dashhuang merged 1 commit into
mainfrom
cindy/host-windows-proxy-cleanup

Conversation

@dashhuang

Copy link
Copy Markdown
Member

这次改了什么

摘要

#11629 的最终提交 5f71023567 在 Windows CI 上通过了 Chromium 代理助手的五组断言,随后删除验收临时目录时遇到 LevelDB 文件占用,报出 EBUSY。首次作业因此没有执行系统代理对照。单独重跑这个作业一次后,五组断言和 72 项后台服务与 Electron 的代理结果对照均通过。 首次作业 重跑结果

apps/host/scripts/chromium-proxy-worker.e2e.mjs 的清理现在使用 Node.js 同步删除的有界退避。对于可重试的文件系统错误,最多重试八次,等待间隔每次增加 250 毫秒。持续占用会在重试用尽后让验收失败。

变更类型

  • test 测试维护

范围

UI 变化

  • 引用的设计规范:不涉及。

怎么验证的

自动验证

  • 在 macOS 用 Node 22.22.3、Electron 42.11.12 执行 node --import tsx --import ./src/loaders/register-raw.mjs scripts/chromium-proxy-worker.e2e.mjs。五组真实进程断言和目录清理全通过。五组共约 19 秒,其中 20 次真实启动约 14 秒。
  • node --check apps/host/scripts/chromium-proxy-worker.e2e.mjs、node scripts/check-test-hygiene.mjs 和 node scripts/check-dco.mjs 通过。
  • 在同一版 Node 上向嵌套的临时 LevelDB 路径注入合成 EBUSY。旧参数立即失败,新参数在短暂占用解除后删完文件,持续占用在八次重试后仍报 EBUSY。

未执行的验证

本机的实跑环境是 macOS,Windows 文件句柄释放和实际系统代理对照由本 PR 的 Windows CI 验证。

风险

风险分类

  • 跨平台差异

影响与回滚

辅助进程的主进程退出断言通过后,Windows 仍可能暂时持有验收目录中的文件句柄。首次失败距断言通过约 21 毫秒,持有句柄的具体进程未核实。临时占用会增加清理耗时,持续占用仍会让作业失败。回滚这个提交即可恢复之前的清理参数。

提交前检查

  • 完整 diff 已核对。
  • 提交含 DCO 签名。
  • 已核对本机结果及待 CI 验证的 Windows 范围。

Windows CI completed all five helper assertions, then failed to unlink a LevelDB file while removing the orphan-test profile. Allow eight bounded retries for transient filesystem errors while deleting this test directory. The process-exit assertions and the remaining proxy comparison are unchanged, and a persistent cleanup error still fails the job.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
(cherry picked from commit d5d399a1a7f848bc5005ab71224c243bfd58f2ec)
@dashhuang
dashhuang requested a review from a team as a code owner November 20, 2026 09:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T09:39:34.773428Z 47fa27b PR opened
🔒 Security Review ✅ Completed 2026-11-20T09:41:14.163964Z 47fa27b PR opened
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] 本次改动范围明确,未发现阻止合并的问题。

Summary

为 Chromium 代理助手验收的临时目录清理增加有限重试。

  • The Chromium proxy acceptance script retries temporary-folder cleanup when files stay busy.

本次仅做静态审查,未运行测试。

Reviews (1) · Last reviewed commit: "test(host): retry proxy acceptance clean..." · Reviewed by Greptile

@dashhuang
dashhuang merged commit cb2cc1b into main Nov 20, 2026
39 checks passed
@dashhuang
dashhuang deleted the cindy/host-windows-proxy-cleanup branch November 20, 2026 10:20
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.

3 participants