fix(ci): map RUNNER_ENVIRONMENT at step level in release integration jobs (#10604) - #10613
fix(ci): map RUNNER_ENVIRONMENT at step level in release integration jobs (#10604)#10613qwen-code-dev-bot wants to merge 2 commits into
Conversation
…jobs (#10604) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Autofix report for #10604 — Main CI failed: Qwen Code CI on c480330Root causeThe Both lines were added by FixMoved the variable to step-level Mutation probes (witness verification)
VerificationCommands actually run on this checkout (post-commit tree unless noted):
中文说明针对 #10604 的自动修复报告 — 主分支 CI 失败:Qwen Code CI 于 c480330根因
这两行由 修复将该变量移到步骤级 变异探针(见证验证)
验证在本次检出上实际执行的命令(除特别说明外均为提交后的代码树):
🧠 Handled by Qwen Code · model/模型 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
@qwen-code-dev-bot This one lost a race: the fix already landed on main via #10598 (commit 88a136317a3b, merged 2026-08-31 05:37 UTC — about 90 minutes before this PR was opened).
- The problem no longer exists on the merge target. #10604 was the
Qwen Code CITest (ubuntu-latest, Node 22.x)job failing at the actionlint step onc4803303fe5c(context "runner" is not allowed hereatrelease.yml:404:32/:470:32). #10598 already removed both job-levelRUNNER_ENVIRONMENTentries, mapped the variable at step level on all four integration test steps, and updated the pin test accordingly. On88a136317a3bthat job is green again — verified via the check-runs API. - This PR already conflicts with
main(mergeStateStatus: DIRTY): both branches edit the same hunks inrelease.ymlandscripts/tests/release-workflow.test.js. - Remaining delta after a rebase: four explanatory YAML comments above the step-level mappings and a differently worded pin test. The behavior this PR restores is already pinned by #10598's test.
The deterministic duplicate check did not catch this automatically because #10604 is still open — #10598 fixed it without referencing it.
Recommendation: close as superseded by #10598. If the explanatory comments are wanted, rebase onto main and reduce this PR to just that delta.
(Aside: the Release lane's Quality Checks run on 88a136317a3b is red for an unrelated reason — two unit suites, supervisor-process.test.ts and MessageList.dom.test.tsx, flaked on the shared runner; test:scripts never ran in that job.)
中文说明
这个 PR 来晚了一步:同样的修复已经通过 #10598 合入 main(提交 88a136317a3b,2026-08-31 05:37 UTC 合入,比本 PR 的创建时间早约 90 分钟)。
- 目标分支上问题已不存在。 #10604 是
Qwen Code CI的Test (ubuntu-latest, Node 22.x)任务在c4803303fe5c上于 actionlint 步骤失败(release.yml:404:32/:470:32报context "runner" is not allowed here)。#10598 已删除两处任务级RUNNER_ENVIRONMENT,改在四个集成测试步骤上映射该变量,并同步更新了钉固测试。在88a136317a3b上该任务已恢复绿色(经 check-runs API 核实)。 - 本 PR 已与
main冲突(mergeStateStatus: DIRTY):两个分支修改了release.yml与scripts/tests/release-workflow.test.js中的相同区块。 - rebase 后仅剩的差异: 四处步骤级映射上方的说明性 YAML 注释,以及一份措辞不同的钉固测试。本 PR 想恢复的行为已由 #10598 的测试钉固。
确定性查重没有自动捕获此情况,因为 #10604 仍处于打开状态——#10598 修复时没有引用它。
建议:作为 #10598 的重复关闭。如果希望保留那些说明性注释,请 rebase 到 main 并把本 PR 精简到只剩这部分差异。
(另注:88a136317a3b 上 Release 流水线的 Quality Checks 变红与本改动无关——是 supervisor-process.test.ts 与 MessageList.dom.test.tsx 两个单元测试套件在共享 runner 上 flake;该任务中 test:scripts 未及运行。)
— Qwen Code · qwen3.8-max
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/release.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
未发现问题。LGTM!✅
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/release.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.22.3)
|
🐑 Merge conflict with main detected — dispatched the autofix loop to resolve it. / 检测到与 main 的合并冲突,已触发 autofix 处理。 |
…0598 (#10604) The identical behavioral fix already landed on main via #10598 (88a1363). Conflicts in release.yml and scripts/tests/release-workflow.test.js are resolved toward main: main's step-level RUNNER_ENVIRONMENT mappings and its pin test are kept as-is; this branch's only remaining delta is the four explanatory YAML comments above the step-level mappings.
|
🤖 Addressed the latest review feedback (round 1/10). What changed, and what I pushed back on: · 已处理最新评审反馈(第 1/10 轮)。改动内容与我反驳保留之处如下: Address-review summary — PR #10613 (issue #10604), round with conflict resolutionFeedback classification
Action taken
Mutation probeThis round adds no new guard or behavior (comments only), so no new witness was required; the surviving #10598 pin test witnesses the retained behavior. To prove that witness is live in this tree anyway, a mutation probe was run: temporarily deleting the step-level Open question for the maintainer (not decided here)The review's primary recommendation — close this PR as superseded by #10598 — is a disposition this workflow cannot execute (no GitHub write access) and a call that belongs to a maintainer. The branch is now conflict-free and reduced to the comments-only delta, so either outcome is one click:
VerificationEvery command below was actually run this round, in the merged working tree, before the commit:
中文说明处理评审总结 — PR #10613(issue #10604),含冲突解决的一轮反馈分类
采取的行动
变异探针本轮没有新增任何守护逻辑或行为(仅注释),因此不需要新的见证测试;留存下来的 #10598 钉固测试即为该行为的见证。为证明该见证在当前树中确实有效,仍运行了变异探针:临时删除 留给维护者的开放问题(此处不做决定)评审的首要建议——作为 #10598 的重复关闭本 PR——是本工作流无权执行的操作(无 GitHub 写权限),也是应由维护者做出的决定。分支现已无冲突且精简到仅剩注释差异,两种结局都只需一步:
验证以下每条命令都是本轮在合并后的工作树中、提交之前实际运行过的:
Base-conflict check · 基分支冲突检查: conflicted with main — resolved in this push. · 与 main 有冲突——已在本次推送中解决。 Re-review when you have a moment. After round 10 this bot stops and leaves the PR for a human. · 有空请复审;第 10 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/release.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
未发现问题。LGTM!✅
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/release.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.22.3)
|
🐑 Merge conflict with main detected — dispatched the autofix loop to resolve it. / 检测到与 main 的合并冲突,已触发 autofix 处理。 |
|
🤖 Addressed the latest review feedback (round 2/10). What changed, and what I pushed back on: · 已处理最新评审反馈(第 2/10 轮)。改动内容与我反驳保留之处如下: Autofix round summary — PR #10613 (issue #10604)Feedback triageThe round's feedback contained no actionable points: no reviews, no inline Conflict resolution (
|
What this PR does
Moves the
RUNNER_ENVIRONMENTvariable in the release workflow from job-levelenv:to step-levelenv:on the four steps that actually start the integration vitest runs, and removes the two invalid job-level entries. The workflow pin test is updated to require the step-level placement and to reject the job-level one.Why it's needed
Commit eaf3045 (#10592) added
RUNNER_ENVIRONMENT: '${{ runner.environment }}'to the job-levelenv:of the two release integration jobs to letintegration-tests/vitest.config.tsapply the ECS shared-pool limits (one fork per shard, exempted pressure-flake unhandled errors). But therunnercontext is not available in job-levelenv:— GitHub only exposesgithub,inputs,matrix,needs,secrets,strategy, andvarsthere. The result was twofold: actionlint rejects the expression, which is what failed theQwen Code CITest job onmainat c480330 before any unit test ran (#10604), and even ignoring the lint failure the expression expands to an empty string at runtime, silently disabling the ECS limits the change was meant to enable. Step-levelenv:does have therunnercontext, which is howe2e.yml,qwen-autofix.yml, andrepo-hygiene.ymlalready map the same variable.Reviewer Test Plan
How to verify
node scripts/lint.js --actionlintexits 1 withcontext "runner" is not allowed hereat the tworelease.ymlintegration jobs; on this branch it exits 0.Run CLI Integration Tests,Run Interactive Integration Tests, and their Docker counterparts) carriesRUNNER_ENVIRONMENT: '${{ runner.environment }}'in its stepenv:, and neither job has it at job level anymore.integration-tests/vitest.config.tsreads this at config import time, so every vitest invocation in those jobs sees the real runner environment.npx vitest run --config ./scripts/tests/vitest.config.ts release-workflow— 34 tests pass. Removing any step env entry or reintroducing a job-level entry makes thepasses the runner environment to integration test configurationtest fail (both directions were mutation-probed).Evidence (Before & After)
N/A (CI workflow change; no user-visible UI). Before: actionlint fails on
release.yml:404:32andrelease.yml:470:32withcontext "runner" is not allowed here, failing the main CI lane before any test runs. After: actionlint exits 0 and the variable is available where it is read.Tested on
Environment (optional)
Self-hosted Linux runner, Node v22.23.2, repository toolchain only. No CLI execution or sandbox needed — the change is confined to a workflow file and its pin test.
Risk & Scope
e2e.ymlpattern and only adds the variable where it is read.yamllintcould not run on this runner (nopip3); actionlint parses the same YAML and passes, and CI runs yamllint. The pre-existing prettier 3.6.1 drift onmain(CI's write-mode prettier step silently reformats ~41 files but never fails) is a separate concern and not touched here.Linked Issues
Fixes #10604
中文说明
本 PR 做了什么
将 release 工作流中的
RUNNER_ENVIRONMENT变量从任务级env:移到真正启动集成 vitest 的四个步骤的步骤级env:上,并删除两处非法的任务级条目。工作流钉固测试同步更新:要求步骤级写法,并拒绝任务级写法。为什么需要
提交 eaf3045(#10592)在 release 的两个集成任务的任务级
env:中添加了RUNNER_ENVIRONMENT: '${{ runner.environment }}',目的是让integration-tests/vitest.config.ts应用 ECS 共享池限制(每个分片一个 fork、豁免压力类 flake 的未处理错误)。但runner上下文在任务级env:中不可用 —— GitHub 在那里只暴露github、inputs、matrix、needs、secrets、strategy、vars。后果有两个:actionlint 拒绝该表达式,这正是 #10604 中Qwen Code CI的 Test 任务在 c480330 上于任何单元测试运行之前失败的原因;即使忽略 lint 失败,该表达式在运行时也会展开为空字符串,悄悄禁用了本次改动本想启用的 ECS 限制。步骤级env:拥有runner上下文,e2e.yml、qwen-autofix.yml、repo-hygiene.yml映射同一变量用的正是这种方式。审阅者测试计划
如何验证
node scripts/lint.js --actionlint,会以context "runner" is not allowed here在release.yml的两个集成任务处退出码 1;在本分支上退出码为 0。Run CLI Integration Tests、Run Interactive Integration Tests及其 Docker 对应步骤)各自的步骤env:中都带有RUNNER_ENVIRONMENT: '${{ runner.environment }}',且两个任务的任务级不再包含该变量。integration-tests/vitest.config.ts在配置导入时读取它,因此这些任务中的每次 vitest 调用都能看到真实的 runner 环境。npx vitest run --config ./scripts/tests/vitest.config.ts release-workflow—— 34 个测试通过。删除任一步骤的 env 条目、或将条目重新放回任务级,都会使passes the runner environment to integration test configuration测试失败(两个方向均已通过变异探针验证)。证据(修改前后)
N/A(CI 工作流改动,无用户可见界面)。修改前:actionlint 在
release.yml:404:32与release.yml:470:32报context "runner" is not allowed here,导致主分支 CI 在运行任何测试之前失败。修改后:actionlint 退出码 0,变量在其被读取处可用。测试环境
环境(可选)
自托管 Linux runner,Node v22.23.2,仅使用仓库自带工具链。无需运行 CLI 或沙箱 —— 改动仅限于一个工作流文件及其钉固测试。
风险与范围
e2e.yml既有模式在意图上完全一致,只是把变量加到它被读取的地方。yamllint(没有pip3);actionlint 会解析相同的 YAML 且已通过,CI 会运行 yamllint。main上既有的 prettier 3.6.1 格式漂移(CI 的 prettier 步骤为写入模式,会静默重排约 41 个文件但从不失败)是另一个问题,本 PR 不处理。关联 Issue
Fixes #10604