Repository navigation
test(remote-control): add reconnect failure diagnostics to tunnel scenario - #4605
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
… as already landed MoonshotAI#4434's CSP already allows data: and blob: media fetches, MoonshotAI#4517's [workspace] require_trust section and its store short-circuit are in the tree with both locale docs, and MoonshotAI#4605's tunnel scenario already reports httpCapabilities and asserts the reconnected response. Ledger: closed 28 -> 32, remaining 67.
Requirement or Bug
remote-control.test.ts的 "reconnects the tunnel pair after the relay drops it" 用例在 GitHub CI 高负载分片上出现过 30 秒整体超时(run 41394309765,shard 4),重跑即通过;m0-dev 单用例 20 次、整文件 5 次均稳定通过,判定为时序/负载敏感的 flaky。失败时几乎没有定位线索:scenario 把客户端 stderr 全部丢弃,且重连后的响应等待是无超时的nextJsonMessage。本 PR 只补充测试可观测性,让下一次失败自带诊断,不改任何产品行为。Bug Reproduction Steps
N/A(测试基建改动;flaky 背景见上节与 handoff 记录)
Root Cause
N/A
Code Changes
核心思路:把"挂死且零信息"的失败形态改成"有界等待 + 失败时完整现场",全部改动在
packages/remote-control/test/remote-control.test.ts:三处配合后,若 CI 再次出现同类失败,日志会直接显示卡在哪一步、客户端视角的断连/重连/消息错误过程,便于确诊是丢帧、等错连接还是环境缓慢。未采用"加大 waitFor/超时预算"的掩盖式修法:若响应真的不来,等更久照样失败。
Behavior Changes and Affected Users
nextJsonMessage等待上限scenario.logs(仅目标用例失败时输出)受影响模块与测试覆盖:仅
packages/remote-control/test/remote-control.test.ts。验证结论:本地整文件 51/51 通过;tsc --noEmit通过;oxlint 与注释检查无新增告警。未验证项:真实 CI 高负载下的失败形态改善只有等下次(不再)失败才能确认,这是本改动的预期用途而非遗漏。本地验证命令
corepack pnpm vitest run test/remote-control.test.ts:51/51 通过corepack pnpm exec tsc --noEmit:通过oxlint(改动文件):0 warnings / 0 errorsnode scripts/check-no-comments.mjs:OKChecklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.