Repository navigation
test(ci): 消除鉴权与沙盒集成测试时序竞态 - #3675
Merged
Merged
Conversation
- sandbox 以占位并断开请求的 endpoint 替代关闭端口,避免端口复用后误入发送路径 - 仅过滤已知 GET / 探测,保留其它请求的精确断言 - auth wait 在首个 pending 响应发送前显式刷新 claim,移除 request 事件竞态 Co-Authored-By: Claude Code <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
November 20, 2026 17:12
Owner
Author
|
首跑 CI 已全绿:19/19 check-run 均为 success,且全部挂在 head |
This was referenced Nov 20, 2026
This was referenced Nov 20, 2026
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 885b8fb…a0b04a957(4 个提交),同批合入的还有 #3671 #3672 #3665,失败不一定由本 PR 引起。
|
|
🚀 Released in v3.59.25 |
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.
Fixes #3673
问题与根因
bun-test (3/4)的两个进程级集成用例在 runner 高负载下间歇失败:sandbox-send-route-host关闭假 daemon 端口后,其它分片进程可能复用该端口并回答路由检查,使本应 fail-closed 的用例进入发送路径;共享 mock 还会把GET /探测流量计入精确请求数组。auth-request用通用request事件刷新 claim,与子进程轮询和响应出队缺少明确同步点。本地基线压力复跑未复现 CI 失败:auth-request 20 轮 940/940,sandbox 12 轮 96/96。因此本 PR 以消除竞态机制和 CI 多轮稳定为验收,不把本地绿当作已复现修复。
修改
仅修改两个测试 fixture,不改产品代码、不新增 skip/todo、不放宽退出码或行为断言:
server.close(),确保 daemon 路由检查无法成功,其它进程不能复用该端口。GET /探测;其它请求仍全部进入精确数组断言。pending响应选定后、发送前显式刷新 claim,保证下一次轮询读取到新值,移除通用 request 事件回调竞态。影响面
仅测试基础设施:
auth-request与sandbox-send-route-host的 mock server / 状态同步。src/cli/auth-request.ts、src/core/sandbox-send-route.ts、src/core/lark-tool-binding.ts及产品行为均未改,未发现需要改变 #3656 阻断定性的产品缺陷。本地验证
CI 验收
以
bun-test四分片多轮稳定为准;每轮结果会回填到本 PR。通过前不请求合入,也不以此改动去重跑 #3656 的失败 SHA。🤖 Generated with Claude Code