fix(ci): 把 live-e2e 的 runner.temp 移出 job 级 env,修掉全分支 startup failure - #3432
Merged
Conversation
.github/workflows/live-e2e.yml 自 #3325 落地起就从未跑起来过一次:它在 job 级 env 里写了 `LIVE_BACKEND_DIR: ${{ runner.temp }}/live-backend`,而 `runner` 上下文在 job 级 env 求值时尚不存在(GitHub 的 contexts availability 表在此处只允许 github / inputs / matrix / needs / secrets / strategy / vars)。这不是某个 step 失败,而是**整份 workflow 文件校验不 通过**,于是 GitHub 无法解析 `on:` 就先判定文件非法,对每一次 push 都记 一条 0 job / 0s 的 startup failure —— 包括 gh-readonly-queue/* 合并队列 分支,把每个 PR 和每次 main push 的 checks 列表都染红一格。 两个由此推出的事实: 1. `continue-on-error: true` 救不了它。那是 job 级属性,而这里根本没有 任何 job 被创建,红色出在 workflow 启动阶段。 2. 该 lane 从未真正冒烟测试过任何东西。按 `pull_request` 事件过滤,这个 workflow 的历史 run 数是 **0**;它声明的 push 触发器压根不存在,所有 182 个 run 编号全是 push 上的 startup failure 噪声。 修法保持最小:job 级 env 只留三个字面量;`LIVE_BACKEND_DIR` 下沉到唯一 消费它的 "Start ObjectStack backend" step 的 step 级 env —— 那里读 `runner` 是合法的。cache 的 `path:`/`key:` 与 artifact 上传的 `path:` 本 就在 `with:` 里,一直合法,未动。同时在 job 级 env 上方留下一段告警注释, 避免下一个人把它挪回去。 验证(actionlint v1.7.7,方向在跑之前先行预测): - origin/main 原文件 → `live-e2e.yml:61:29: context "runner" is not allowed here` (exit 1) - 本次修改后 → 无告警 (exit 0) - 对 .github/workflows/*.yml 全量跑 → exit 0,说明 live-e2e.yml 是仓库 里唯一一份校验不过的 workflow,与 issue 观察到的"只有这一格红"吻合。 纯 CI bug 修复、不触及任何已发布包,按 AGENTS.md:151 不需要 changeset。 Fixes #3425 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
推送后实测:该 lane 历史第一个真实 runrun 31069352699(event
从
但用例本身有 2 条真红 —— 已独立立单,本 PR 不夹带修复
这不是本 PR 引入的 —— 它是这条 lane 从来没跑过、因而一直没人看见的既有问题,正好印证 issue #3425 里那句「真故障若混进该 lane 将不可见」。按 Prime Directive #10 已独立立单:#3434(未指派,交 PM 三方定夺是收窄 spec 定位器,还是修渲染侧重复 本 PR 的范围仅限 workflow 启动故障,文件围栏 Generated by Claude Code |
yinlianghui
marked this pull request as ready for review
August 6, 2026 03:52
This was referenced Aug 6, 2026
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 #3425
根因
.github/workflows/live-e2e.yml第 61 行,在 job 级env:里读了runner上下文:job 级
env:求值时runner上下文尚不存在。actionlint v1.7.7 对 origin/main 原文件的判定(exit 1):关键在于:这是整份 workflow 文件校验失败,而不是某个 step 失败。GitHub 还没能解析
on:就先判定文件非法,于是对每一次 push 都记一条 0 job / 0s 的 startup failure —— 包括gh-readonly-queue/*合并队列分支,把每个 PR 和每次 main push 的 checks 列表都染红一格。两个推论
continue-on-error: true救不了它。 那是 job 级属性,而这里根本没有任何 job 被创建,红色出在 workflow 启动阶段。pull_request事件过滤,这个 workflow 的历史 run 数是 0;它从未声明过 push 触发器,所有 182 个 run 编号全部是 push 上的 startup failure 噪声。换句话说,它一次都没有真正冒烟测试过「console x 真后端」—— 这比「红噪声」本身更值得记一笔。改动
env:只保留三个字面量常量。LIVE_BACKEND_DIR下沉到唯一消费它的Start ObjectStack backendstep 的 step 级env:—— 该处读runner是合法的。path:/key:与 artifact 上传的path:本就写在with:里、一直合法,未动。env:上方补了一段告警注释,写明此处为什么不能出现runner.*,避免下一个人挪回去。验证(方向在运行前先行预测)
runner上下文错误,exit 1.github/workflows/*.ymlpush 事件的预期方向值得说清楚: 修好后本分支的「0 红」不是靠 job 跑绿拿到的,而是靠这条 run 不再存在 —— 文件合法后 GitHub 能正确解析
on:,而其中并没有push:。实测本分支 push 后 live-e2e 的 run 数为0(对比:修复前每个分支每次 push 都会多出一条 startup failure)。真正会产出 job 的,是本 PR 的pull_request事件 run。纯 CI bug 修复、不触及任何已发布包,按 AGENTS.md:151 不需要 changeset。
Generated by Claude Code