Skip to content

fix(ci): Midscene 报告发布时清掉已关闭 PR 的报告,master 只留两次 - #2627

Merged
deepcoldy merged 3 commits into
masterfrom
fix/midscene-pages-prune
Oct 31, 2026
Merged

deepcoldy merged 3 commits into
masterfrom
fix/midscene-pages-prune

Conversation

@deepcoldy

@deepcoldy deepcoldy commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

问题

Midscene 报告(https://deepcoldy.github.io/botmux-midscene/<key>/)10-30 一度全部 404。gh-pages 上文件已推上去,但 deepcoldy.github.io 的 Pages 构建从 10-30 13:16Z 起连续 Page build failed:botmux-midscene/ 攒到 11.2 GB / 3.5 万个文件,其中 50 个已合入或关闭 PR 的 pr-* 报告(约 10.2 GB)从不清,单个报告 300–600 MB;发布脚本此前只给 master-run-* 留最近 5 个。失败与站点膨胀同期发生,但后续实测表明没有清晰的 1 GB 阈值(见下「实测」),所以保留策略按观察到的风险做、不按文档阈值写。

改动

  • scripts/publish-gh-pages.sh:新增可选的 PAGES_OPEN_PRS(空格分隔的 open PR 号)。设了就删掉同级目录里不在列表中的 pr-<号>;本次发布的目标目录、非 pr-<数字> 的目录(manual、各 lane、master-run)不动。不设时行为不变。
  • midscene-e2e.yml 发布步骤:用 gh pr list --state open 取 open PR 传进去(job 加 pull-requests: read);列失败只打 warning、这轮不清。master-run-* 保留数 5 → 2。
  • 代码注释按复审意见修正:曾写过一版「GitHub Pages stops building past 1 GB」,与实测不符(见下),已改为事实表述(~11 GB / 35k 文件、构建连续失败数小时),不写任何尺寸阈值;报告大小口径统一为 300–600 MB。

已做的一次性清理 + 后续时间线

  • 10-30 18:09Z 在 deepcoldy.github.io 的 gh-pages 上直接提交一次(无父提交,和脚本一致):删掉 50 个已合入或关闭 PR 的报告和较旧的 master-run-41032174026,botmux-midscene/ 只剩 clis-lane、manual、sandbox-lane、master-run-41061703065,约 0.6 GB。
  • 清理提交本身(7ea8292,610 MiB)触发的两次构建(18:09/18:12Z)仍然 errored——所以不是「树小下来立刻恢复」。
  • 18:27Z 起 Pages 构建自行恢复并连续成功:0f04183/b887514(871 MiB)、2eeeaa8(1087.5 MiB / 4959 文件)、e61ba3f(22:47Z,1391.1 MiB / 6224 文件)均 built,报告链接 200。

实测(修正早先的错误结论)

  • 1.09 GB 和 1.39 GB 的树都构建成功;失败集中在站点 ~9.7–10.4 GB / 3 万多文件那一档(但 10.16 GB 的 dffb1de 10:30Z 又成功过一次)。真实边界既不是 1 GB,也不像单一尺寸阈值——可能与文件数、对象库或当时 Pages 后端状态有关,未最终定性。
  • 尽管如此清理仍然值得:10 GB → 0.8 GB 后 clone/发布明显更快;本 PR 把保留从「无限攒 pr-*」改成「只留 open PR + master 留 2 份」,防止再涨回 10 GB 量级。按当前站点实测合入后稳态约 0.84 GB;P3 followup:保留可改为按 du -s 字节预算而非固定个数(2×600 MB 报告会回到 1.5 GB)。
  • 另一个记录级 P3:gh pr list --limit 1000 隐含 open PR 不超过 1000,当前 32 个。

验证

  • test/publish-gh-pages.test.ts 新增两条:清掉非 open PR 的报告但保留 open 的、目标目录和其他目录;空列表等于没有 open PR。改动前这两条都红,改动后 6/6 绿。
  • bash -n 通过,workflow YAML 能正常解析(6 jobs);bun test test/publish-gh-pages.test.ts test/midscene-e2e-workflow.test.ts 15/15 绿。假 gh 探针覆盖 list 正常/空列表/取号失败三条路径,变异 5 枪咬红(含两侧空格的子串匹配守卫)。
  • workflow 运行时行为合入后由下一次 master Midscene 发布验证(脚本未上线不生效)。

对老用户

只影响 deepcoldy.github.io 上的报告保留策略,不碰 botmux 运行时。已关闭 PR 的报告链接会 404(原始数据仍在对应 Actions run 的 artifact 里)。

🤖 Generated with Claude Code

GitHub Pages 站点超过 1 GB 后构建失败,10-30 21:16 起新发布的报告全部 404。
botmux-midscene/ 下攒了 50 个已合入或关闭 PR 的报告(共 10 GB),master-run
每次 300–400 MB 又保留 5 份。发布时按当前 open 的 PR 清掉其余 pr-<号> 目录
(列 PR 失败时这一轮不清),master-run 只留最近 2 次。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@deepcoldy
deepcoldy merged commit 2244e50 into master Oct 31, 2026
14 checks passed
deepcoldy pushed a commit that referenced this pull request Oct 31, 2026
同步最新 master(#2624 sandboxPaths 只读层拒绝覆盖启动器挂载点根目录与
/run、#2633 herdr 中止强杀子进程、#2634 runtime-sweep ENOTDIR、
#2623 codex-app 软链 HOME 用例、#2627 Midscene 报告清理,共 5 提交)。

与本 PR 6 文件自动合并零冲突:#2624 在 bot-default-oncall 路由新增的
sandboxPathsReadOnlyRoot 字段与本 PR advice 字段并列;其 sandboxPaths
保存校验测试与本 PR advice 用例分区不重叠。本 PR 的 sharedSandbox* 建议
链与 sandboxCapable/localSandboxApplies 判定逐行确认未受影响。

Co-Authored-By: Claude Code <[email protected]>
@github-actions

Copy link
Copy Markdown

@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。

这次运行覆盖 378fb04…ebf9695be(3 个提交),同批合入的还有 #2634 #2637,失败不一定由本 PR 引起。

用例 跑道 状态 失败信息
Claude basic bot flow feishu-core-claude failed waitFor timeout: Based on the screenshot, the middle column displays a welcome message "欢迎加入群组" (Welcome to the group) and system notifications about group creation and settings, rather than a list o…
Kimi basic bot flow feishu-core-clis failed waitFor timeout: Based on the screenshot, in the main content area (right panel), there is a stream card from "Kimi" located above the text bubble containing "ACK-e2e-kimi-1793466100212". This card c…
Gemini basic bot flow feishu-core-clis failed waitFor timeout: Based on the screenshot, the main content area displays a topic conversation. I am examining the messages from "Gemini".
Claude group reply mode new-topic starts a session per topic feishu-core-group-modes failed Failed to continue: The page remains completely blank after multiple wait attempts and a reload. Unable to find any UI elements including the "Topics" filter tab to click on.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

🚀 Released in v3.56.0

deepcoldy pushed a commit that referenced this pull request Nov 11, 2026
Pages 只保留最近两次 master 运行的报告(#2627),run summary 和失败评论里的
链接再合入几次就 404,读者不知道该去哪看。现在 summary 和失败评论会在 Pages
链接旁注明报告会被清理,并指向本次运行的 botmux-midscene-site artifact(保留
7 天,和发布到 Pages 的是同一份站点)。README 里「保留最新五次」也改成了实际
的两次。

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant