Repository navigation
Conversation
未登录的 GitHub API 每小时只有 60 次额度,用尽后 kernel install 直接失败并只提示 「请求受限,请稍后再试」,用户没有任何补救手段。 - 请求受限(403/429)时改为解析公开网页:/releases 取标签(最多 3 页), /releases/expanded_assets/<tag> 取该版本的资源列表,形状与 API 一致后再走原有的 selectRelease 选择逻辑 - 网页请求单独使用 text/html Accept,否则 github.com 返回 406 - 支持 GH_TOKEN / GITHUB_TOKEN,认证后额度提升到 5000 次/小时 - 限流错误带上额度恢复时间,不再是一句「请稍后再试」 实测:API 返回 403 时,网页通道解析出 3 个可用版本,Windows x64 正确选中 chromium-v146.0.7680.177.5 / cloakbrowser-windows-x64.zip。
这条测试从 PR #7 起在 windows-latest 上一直失败,但代码本身没问题: Windows 内核走 zip 分发,tar + .app 相对链接只服务 macOS。 - 保留 .app 相对链接的用例:加能力探测,本机建不出可穿越的目录符号链接时 带原因跳过(Windows 无开发者模式是 EPERM,有权限时 Node 也建出文件型链接)。 - 越界链接必须被拒的安全用例:改用直接写 tar 头构造成员,不再依赖 fs.symlinkSync —— 于是这条安全断言在每个平台都真跑,不再被跳过掩盖。
Contributor
Author
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.
问题
main分支的 WDH runtime 在windows-latest一直失败:这个红灯从 PR #7(
02b90e0runtime: match kernel releases per platform and keep app symlinks)起就存在,不是新引入的回归,也不影响产品代码:matchAsset/downloadGithub),extractKernel的 tar 分支只服务 macOS/Linux 的.app结构。fs.symlinkSync('MacOS', ...)造「相对目录符号链接」:EPERMrealpath失败改动
只动测试,不碰产品代码:
relativeDirLink:真建一次并穿过去读,建不出来或穿不过去时带原因
skip(跳过信息里写明平台与错误码)。2+linkpath)构造成员,不再依赖
fs.symlinkSync。于是这条安全断言在每个平台都真跑,不会被跳过掩盖;顺手补了
absup绝对路径变体。验证
本地 Windows(无符号链接特权):
npm run build通过(11638 个文件校验,browser binaries: none)。Linux 上这条跳过用例会正常执行,符号链接保留逻辑仍被覆盖。
影响
合并后
main的 windows-latest 变绿,解除发版阻塞。