Skip to content

test(desktop): edge-real 信封解包兼容 ok/OK 双大小写(修 8 项既存失败) - #2177

Merged
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-32
Sep 1, 2026
Merged

test(desktop): edge-real 信封解包兼容 ok/OK 双大小写(修 8 项既存失败)#2177
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-32

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

背景

round-31 全量复跑暴露 desktop edge-real.test.ts(真实 Edge 二进制 E2E)8/27 既存失败,且已在 clean master 复现(非 #2176 引入)。

根因

测试本地助手 unwrapEdgeResponse 只匹配大写 code === 'OK',而 Edge writeSuccess 实际写小写 "ok"handlers_settings.go:59)。解包失败 → 断言拿到整个信封而非 dataitems 不是数组。生产客户端 edgeClient.ts:152 早已同时接受 ok/OK 两种大小写。

变更

  • unwrapEdgeResponse:接受 code === 'OK' || code === 'ok'(与生产客户端对齐),注释同步说明。
  • fetchHealth 兼容块的内联镜像同样改用 unwrapEdgeResponse

验证

  • edge-real.test.ts 单文件两次独立运行:27/27 全绿(修复前 8 failed / 19 passed)。
  • desktop 全量:5053 passed | 1 failed,唯一失败 App.v4.test.tsx 单文件重跑 14/14 通过 → 并行负载下的超时 flake(与 round-31 workbench sidebar 同型),与本改动无关。
  • tsc --noEmit(desktop)通过;verify-doc-ssot / ci-gates / i18n-deadkeys / openapi-contract / migration-idempotency + git diff --check 全绿。

未验证 / 备注

  • 纯测试文件改动,无生产代码 / hub / edge 源码变化,不需重建二进制。
  • App.v4.test.tsx 超时 flake 为独立问题,未在本 PR 处理(超范围),可下一轮单独加固。

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: cc6b5194-6f43-43cf-8a6c-2d46426e96c8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@DeliciousBuding
DeliciousBuding merged commit a70464e into master Sep 1, 2026
41 checks passed
@DeliciousBuding
DeliciousBuding deleted the chore/cleanup-round-32 branch September 1, 2026 12:11
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