Repository navigation
test(sandbox): wrapper shebang 定长读补真正的回归守卫 - #2620
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 30, 2026 15:13
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 54b28df…887309883(7 个提交),同批合入的还有 #2543 #2622 #2582 #2607 #2618 #2625,失败不一定由本 PR 引起。
|
This was referenced Oct 30, 2026
|
🚀 Released in v3.56.0 |
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.
改了什么
#2548 评审里留下的 P3 follow-up:
defaultWrapperFsIo().readHead()的「只定长读 256 字节」没有真正的回归守卫。原来的用例只断言返回值(长度 256、带
#!/bin/sh头)。但把实现改回「整文件读进内存再subarray(0, 256)」时,返回值完全一样,用例照样全绿。也就是说,日后有人退回整文件读,CI 不会发现,而 wrapper 是大 ELF 时会产生数十到上百 MB 的内存尖峰。改法采纳评审给的判据:用
/proc/thread-self/io的rchar(本线程read()累计字节)量这次调用实际读了多少,32 MB 文件上要求少于 512 KiB。读不到这个文件的平台(非 Linux)只保留返回值断言,跳过字节数检查。只改了
test/sandbox-wrapper-launch.test.ts,没有产品代码改动。测试
test/sandbox-wrapper-launch.test.ts9/9 通过;test-hygiene通过。readHead改回readFileSync(p).subarray(0, 256)AssertionError: expected 33554555 to be less than 524288,变红;Received: 33554588,变红;影响面
仅测试文件。
🤖 Generated with Claude Code