Skip to content

fix(ci): 修复 main Desktop CI 剩余失败 - #2450

Merged
1lck merged 5 commits into
mainfrom
fix/main-desktop-ci-failures
Nov 27, 2026
Merged

1lck merged 5 commits into
mainfrom
fix/main-desktop-ci-failures

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

关联 Issue / Linked issue

PR 类型 / Type

  • feat:新功能或用户可见的改进
  • fix:缺陷修复
  • docs:文档、Agent Note、Skill 等规则文件
  • release:稳定版发布准备

改动说明 / What changes

背景 / Why

#2448 合入后,main 的 Desktop CI 仍有两类失败:test-runtime-bundle-immutability.mjs 的自测 fixture 没跟上验证脚本新增的 devcontainer 安装包工作流;TestSafeModeRunsNoGitUntilTrusted 在测试直接取消信任后可能断言上一帧受信状态的 Commit 窗口,在 Linux 与 Windows main CI 均失败。

改动 / Changes

  • scripts/desktop/verify/test-runtime-bundle-immutability.mjs:自测 fixture 的安装包工作流清单补上 desktop/internal/workbench/remote_devcontainer_form_test.go / TestRemoteDevcontainerConfigurationLeavesInstalledPackageUnchanged。
  • desktop/internal/workbench/workspace_trust_test.go:测试直接调用 applyProjectTrust 后显式触发窗口重绘,再断言 Commit 窗口当前帧;失败输出区分安全模式说明是否显示与变更文件是否仍显示。
  • shared/platform-feature-matrix/features/workspace-trust.json:说明该改动只提高既有安全模式验证的确定性,不改变能力状态。

不在本 PR 范围内 / Out of scope


类型专属:fix

复现与根因

  • 复现步骤、实际结果、期望结果:在包含 cc46ec0bf 但未包含本修复的 main 上运行 node --test scripts/desktop/verify/test-runtime-bundle-immutability.mjs,fixture 因缺少 devcontainer 工作流条目失败;在 main 或本修复前运行 ./scripts/desktop/desktop-go.sh test ./internal/workbench -run '^TestSafeModeRunsNoGitUntilTrusted$' -count=30,本地修复前 30 次中 4 次失败,输出 the Commit window still lists the changes of an untrusted project。期望:两类测试稳定通过。
  • 根因(引入该行为的提交或 PR,用 git log -S 或 git blame 查):cc46ec0bf / feat(remote): 自动识别容器环境并提供 Dev Container 基础配置表单 #2438 给验证脚本新增 devcontainer 安装包工作流要求时未同步 self-test fixture;TestSafeModeRunsNoGitUntilTrusted 直接调用 applyProjectTrust,没有经过会触发重绘的窗口输入,异步任务是否碰巧触发重绘决定了断言读到当前帧还是上一帧。
  • 影响平台:GitHub Actions Format and script tests、Linux、Windows;macOS 使用同一测试代码。没有用户可观察产品行为变化。

检查项

  • 已有回归测试覆盖并能复现修复前失败、修复后通过;测试路径与修复前的失败输出:scripts/desktop/verify/test-runtime-bundle-immutability.mjs 的 requires each listed workflow to keep its installed-package test;desktop/internal/workbench/workspace_trust_test.go 修复前输出 after withdrawn trust safe mode shown false, change shown true
  • [N/A] 无法自动化时,已写明手动复现与验证步骤:已自动化。
  • 已搜索被修改函数、类型、契约字段的全部调用方(含另一平台、插件、SDK、脚本和按字符串分发的调用)
  • 已检查另一平台是否有同类缺陷(有则本 PR 一并修复,或已提交 Issue):runtime bundle 清单同一脚本覆盖 macOS 与 Windows;安全模式测试在 Linux 与 Windows main CI 均复现,同一修复覆盖两端。
  • 只改了修复所需的代码,没有夹带重构;修复过程中发现的其他问题已提交 Issue:无新增问题单。
  • [N/A] 修复改变了行为约束或容易复发,已在 .agents/notes/implemented/bug-fix/ 记录:只修复测试同步和 fixture 清单,不改变行为约束。

范围检查 / Scope checks

功能矩阵 / Feature matrix

  • 已更新 shared/platform-feature-matrix/features/workspace-trust.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持 pending
  • 已运行 node scripts/platform-feature-matrix/generate-platform-feature-matrix.mjs --check;改了平台实现路径的,还运行了 ./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD
  • 没有提交 .artifacts/ 下生成的矩阵视图

插件归属 / Plugin ownership

  • 已在仓库根目录运行 develop-lithe 第三节“插件归属与宿主零依赖”的自查命令,结果为空(rg 无命中,退出码 1)
  • 新增或修改的测试只使用测试内联的合成插件、Core 契约 fixture 或插件市场索引快照;没有读取具体插件的插件包、仓库检出、构建产物或清单,没有使用真实插件 ID,没有“缺少插件时跳过”的测试
  • 没有为具体插件提供的能力新建或更新宿主功能矩阵条目;宿主条目的证据和验证动作不引用插件的测试、插件包或插件仓库
  • 插件文案没有写进 shared/i18n/;插件的构建步骤、资源路径和补丁没有写进 docs/ci-builds.md、Agent Note 或 Skill
  • [N/A] 修改了通用扩展点、可能影响已发布插件的,已在受影响插件的仓库运行它的测试,插件仓库与结果:未修改通用扩展点。

UI 验证 / UI evidence

N/A:没有布局、控件、样式、文案、菜单、弹窗或可见交互状态变化;本 PR 只修正测试读取当前帧的方式。

统一日志系统 / Structured logging

N/A:没有新增或改动产品日志。

界面文案 / i18n

N/A:没有用户可见文案变化。

逻辑归属 / Logic placement

N/A:只同步测试 fixture 和测试重绘等待,没有新增产品业务逻辑。

性能与内存 / Performance and memory

N/A:不影响产品运行时性能、内存、启动或资源生命周期。

设置 / Settings

N/A:没有新增或修改设置项、设置页、对话框选项或有标题的功能区。

插件契约 / Plugin contract

N/A:没有修改插件契约、能力版本、插件函数协议、宿主方法或宿主通知。

发行包与资源 / Bundle and resources

  • 运行时不向已安装的 app bundle 或 Windows 安装目录写入;新增的资源路径已说明生命周期、所有权和可写位置,并运行 ./scripts/desktop/verify/verify-runtime-bundle-immutability.sh
  • [N/A] 新增或修改宿主自身的下载、解压、生成或缓存资源的,已在 docs/ci-builds.md“独立工作树的本地编译”一节写清路径、归属、生命周期和能否跨工作树复制:没有新增资源路径。

无用代码与重构 / Dead code and refactoring

  • 本次改动导致变成无用的代码已在本 PR 删除
  • 本次之前就存在的无用代码或可重构之处,已提交带 refactor 标签的 Issue,没有在本 PR 顺手处理:无新增发现。

验证 / Verification

命令或操作 平台 结果
node --test scripts/desktop/verify/test-runtime-bundle-immutability.mjs Linux x64 5/5 通过
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh Linux x64 通过
./scripts/desktop/desktop-go.sh test ./internal/workbench -run '^TestSafeModeRunsNoGitUntilTrusted$' -count=30 Linux x64 修复前 4 次失败;修复后 30/30 通过
./scripts/desktop/desktop-go.sh test ./internal/workbench -run '^TestSafeModeRunsNoGitUntilTrusted$' -race -count=1 Linux x64 通过
./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --package ./internal/workbench -- --filter '^TestSafeModeRunsNoGitUntilTrusted$' Linux x64 通过;报告 .artifacts/test-stability/index.html
./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/main Linux x64 退出码 0;Go 静态覆盖不可用,已人工检查重绘唤醒与有界等待
node scripts/platform-feature-matrix/generate-platform-feature-matrix.mjs --check Linux x64 通过(226 项)
./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD Linux x64 通过
git diff --check origin/main...HEAD Linux x64 通过

未能执行的检查和原因: macOS 与 Windows 原生测试未在当前 Linux 机器执行,依赖 PR CI;安全模式失败已在 main 的 Linux 与 Windows CI 日志中复现。

提交前确认 / Final checks

  • 分支已合并最新 main;目标分支为 main
  • 本地验证通过后保持 ready
  • 没有无关改动,没有提交 .build/、target/、dist/、.artifacts/ 等产物,没有凭据、个人路径和未脱敏的日志或截图

Link to Devin session: https://app.devin.ai/sessions/4bae78985a41400ea2add7215d20a4ac
Open in Devin Desktop: https://app.devin.ai/desktop/session/4bae78985a41400ea2add7215d20a4ac?variant=devin
Requested by: @1lck

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@ghfind-review ghfind-review Bot added the review: no-score ghfind author score missing (not zero) label Nov 26, 2026
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 26, 2026 14:46
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix(ci): 修复 release Core 缓存后的 Desktop CI 失败 fix(ci): 补齐 runtime bundle 自测的安装包工作流 Nov 26, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix(ci): 补齐 runtime bundle 自测的安装包工作流 fix(ci): 修复 main Desktop CI 剩余失败 Nov 26, 2026
@1lck
1lck merged commit 72f2317 into main Nov 27, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: no-score ghfind author score missing (not zero)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Desktop CI 在 release Core 缓存改造后全线失败并阻塞合并门禁

1 participant