test(desktop): edge-real 信封解包兼容 ok/OK 双大小写(修 8 项既存失败) - #2177
Merged
Conversation
Co-authored-by: Cursor <cursor@vectorcontrol.tech>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
背景
round-31 全量复跑暴露 desktop
edge-real.test.ts(真实 Edge 二进制 E2E)8/27 既存失败,且已在 clean master 复现(非 #2176 引入)。根因
测试本地助手
unwrapEdgeResponse只匹配大写code === 'OK',而 EdgewriteSuccess实际写小写"ok"(handlers_settings.go:59)。解包失败 → 断言拿到整个信封而非data,items不是数组。生产客户端edgeClient.ts:152早已同时接受ok/OK两种大小写。变更
unwrapEdgeResponse:接受code === 'OK' || code === 'ok'(与生产客户端对齐),注释同步说明。fetchHealth兼容块的内联镜像同样改用unwrapEdgeResponse。验证
edge-real.test.ts单文件两次独立运行:27/27 全绿(修复前 8 failed / 19 passed)。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全绿。未验证 / 备注
App.v4.test.tsx超时 flake 为独立问题,未在本 PR 处理(超范围),可下一轮单独加固。