Skip to content

fix(ci): map RUNNER_ENVIRONMENT at step level in release integration jobs (#10604) - #10613

Closed
qwen-code-dev-bot wants to merge 2 commits into
mainfrom
autofix/issue-10604
Closed

fix(ci): map RUNNER_ENVIRONMENT at step level in release integration jobs (#10604)#10613
qwen-code-dev-bot wants to merge 2 commits into
mainfrom
autofix/issue-10604

Conversation

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

What this PR does

Moves the RUNNER_ENVIRONMENT variable in the release workflow from job-level env: to step-level env: 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-level env: of the two release integration jobs to let integration-tests/vitest.config.ts apply the ECS shared-pool limits (one fork per shard, exempted pressure-flake unhandled errors). But the runner context is not available in job-level env: — GitHub only exposes github, inputs, matrix, needs, secrets, strategy, and vars there. The result was twofold: actionlint rejects the expression, which is what failed the Qwen Code CI Test job on main at 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-level env: does have the runner context, which is how e2e.yml, qwen-autofix.yml, and repo-hygiene.yml already map the same variable.

Reviewer Test Plan

How to verify

  1. Confirm the pre-fix failure: on the parent commit, node scripts/lint.js --actionlint exits 1 with context "runner" is not allowed here at the two release.yml integration jobs; on this branch it exits 0.
  2. Confirm the mapping still reaches the tests: each of the four integration test steps (Run CLI Integration Tests, Run Interactive Integration Tests, and their Docker counterparts) carries RUNNER_ENVIRONMENT: '${{ runner.environment }}' in its step env:, and neither job has it at job level anymore. integration-tests/vitest.config.ts reads this at config import time, so every vitest invocation in those jobs sees the real runner environment.
  3. Run 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 the passes the runner environment to integration test configuration test 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:32 and release.yml:470:32 with context "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

OS Status
🍏 macOS ⚠️
🪟 Windows ⚠️
🐧 Linux

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

  • Main risk or tradeoff: none significant — the step-level placement is byte-identical in intent to the existing e2e.yml pattern and only adds the variable where it is read.
  • Not validated / out of scope: yamllint could not run on this runner (no pip3); actionlint parses the same YAML and passes, and CI runs yamllint. The pre-existing prettier 3.6.1 drift on main (CI's write-mode prettier step silently reformats ~41 files but never fails) is a separate concern and not touched here.
  • Breaking changes / migration notes: none.

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 在那里只暴露 githubinputsmatrixneedssecretsstrategyvars。后果有两个:actionlint 拒绝该表达式,这正是 #10604Qwen Code CI 的 Test 任务在 c480330 上于任何单元测试运行之前失败的原因;即使忽略 lint 失败,该表达式在运行时也会展开为空字符串,悄悄禁用了本次改动本想启用的 ECS 限制。步骤级 env: 拥有 runner 上下文,e2e.ymlqwen-autofix.ymlrepo-hygiene.yml 映射同一变量用的正是这种方式。

审阅者测试计划

如何验证

  1. 确认修复前的失败:在父提交上运行 node scripts/lint.js --actionlint,会以 context "runner" is not allowed hererelease.yml 的两个集成任务处退出码 1;在本分支上退出码为 0。
  2. 确认映射仍然能传到测试:四个集成测试步骤(Run CLI Integration TestsRun Interactive Integration Tests 及其 Docker 对应步骤)各自的步骤 env: 中都带有 RUNNER_ENVIRONMENT: '${{ runner.environment }}',且两个任务的任务级不再包含该变量。integration-tests/vitest.config.ts 在配置导入时读取它,因此这些任务中的每次 vitest 调用都能看到真实的 runner 环境。
  3. 运行 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:32release.yml:470:32context "runner" is not allowed here,导致主分支 CI 在运行任何测试之前失败。修改后:actionlint 退出码 0,变量在其被读取处可用。

测试环境

系统 状态
🍏 macOS ⚠️ 未测试
🪟 Windows ⚠️ 未测试
🐧 Linux ✅ 已测试

环境(可选)

自托管 Linux runner,Node v22.23.2,仅使用仓库自带工具链。无需运行 CLI 或沙箱 —— 改动仅限于一个工作流文件及其钉固测试。

风险与范围

  • 主要风险或权衡:几乎没有 —— 步骤级写法与 e2e.yml 既有模式在意图上完全一致,只是把变量加到它被读取的地方。
  • 未验证 / 超出范围:本 runner 上无法运行 yamllint(没有 pip3);actionlint 会解析相同的 YAML 且已通过,CI 会运行 yamllint。main 上既有的 prettier 3.6.1 格式漂移(CI 的 prettier 步骤为写入模式,会静默重排约 41 个文件但从不失败)是另一个问题,本 PR 不处理。
  • 破坏性变更 / 迁移说明:无。

关联 Issue

Fixes #10604

…jobs (#10604)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator Author

Autofix report for #10604 — Main CI failed: Qwen Code CI on c480330

Root cause

The Test (ubuntu-latest, Node 22.x) job of Qwen Code CI failed on main at the Run actionlint step, before any unit test ran. Reproduced locally against c480330 with the exact CI linter (actionlint 1.7.12):

.github/workflows/release.yml:404:32: context "runner" is not allowed here. available contexts are "github", "inputs", "matrix", "needs", "secrets", "strategy", "vars" [expression]
.github/workflows/release.yml:470:32: context "runner" is not allowed here. ... [expression]

Both lines were added by eaf3045c36 ci: apply ECS integration limits to release (#10592), merged ~2.5 hours before the failing run. They placed RUNNER_ENVIRONMENT: '${{ runner.environment }}' in the job-level env: of the integration_none and integration_docker jobs in release.yml. The runner context is not available in job-level env: — besides failing actionlint, the expression would expand to an empty string at runtime, so integration-tests/vitest.config.ts (process.env['RUNNER_ENVIRONMENT'] === 'self-hosted') would never apply the ECS integration limits the change was meant to enable.

Fix

Moved the variable to step-level env: on exactly the four steps that start a vitest run reading it — Run CLI Integration Tests, Run Interactive Integration Tests, Run CLI Docker Integration Tests, Run Interactive Docker Integration Tests — matching the established pattern already used by e2e.yml, qwen-autofix.yml, and repo-hygiene.yml, and removed the two invalid job-level entries. The workflow pin test in scripts/tests/release-workflow.test.js was updated to require the step-level placement and to forbid the job-level placement (the exact regression).

Mutation probes (witness verification)

  • Removing the step env from Run CLI Integration Tests → the updated test fails (restored afterwards).
  • Re-adding RUNNER_ENVIRONMENT to the integration_none job-level env (the original bug shape) → the updated test fails (restored afterwards).
  • Final tree → the suite passes.

Verification

Commands actually run on this checkout (post-commit tree unless noted):

  • Reproduce failure: node scripts/lint.js --actionlint on pre-fix tree — failed (exit 1) with the two release.yml errors quoted above
  • node scripts/lint.js --actionlint (actionlint 1.7.12, CI-pinned) after fix — passed (exit 0), re-run on the final committed tree
  • bash .github/scripts/check-workflow-size.shpassed (release.yml 55,375 bytes, within 4,096 of its 53,022 baseline)
  • npx vitest run --config ./scripts/tests/vitest.config.ts release-workflow34 passed (release-workflow 29/29)
  • npm run test:scripts (full scripts suite) — 1,965+ passed; the only failures (5 across repeated full runs: upload-aliyun-oss-assets, no-config-object-create-config, vscode-companion-no-webui-config, verify-capture, qwen-autofix-workflow) all pass when run in isolation (e.g. qwen-autofix-workflow 229/229) — load flakes on the shared runner, none related to release.yml
  • npm run buildpassed (rc=0)
  • npm run typecheckpassed (rc=0) (an initial failure was a race with a concurrently running build: TS6305 stale-dist errors; clean after the build completed)
  • npm run lintpassed (rc=0) (an initial failure was caused by a qwen-dist-backup-* directory left behind by a crashed flaky test in my own full test:scripts run; removed that residue and re-ran green)
  • npx prettier --check on the two changed files — passed
  • node --test on all 22 CI HELPER_TESTS files — 495 passed, 0 failed
  • Pre-test CI checks reproduced green: check:lockfile, check:desktop-isolation, check:tui-dep-direction, audit:runtime:critical, check-i18n, generate:settings-schema + staleness check, generate:notices + staleness check, sensitive-keywords lint
  • Not run locally: yamllint (no pip3 on this runner — environment limitation; actionlint parses the same YAML structure and passes, and the added block mirrors existing step-level env: blocks in the file) and shellcheck (no xz to extract the pinned binary — no shell script is touched by this change). CI runs both.
中文说明

针对 #10604 的自动修复报告 — 主分支 CI 失败:Qwen Code CI 于 c480330

根因

Qwen Code CITest (ubuntu-latest, Node 22.x) 任务在 main 分支上于 Run actionlint 步骤失败,尚未运行任何单元测试。在 c480330 上使用与 CI 完全一致的 linter(actionlint 1.7.12)本地复现:

.github/workflows/release.yml:404:32: context "runner" is not allowed here. available contexts are "github", "inputs", "matrix", "needs", "secrets", "strategy", "vars" [expression]
.github/workflows/release.yml:470:32: context "runner" is not allowed here. ... [expression]

这两行由 eaf3045c36 ci: apply ECS integration limits to release (#10592) 引入,该提交在失败运行前约 2.5 小时合入。它把 RUNNER_ENVIRONMENT: '${{ runner.environment }}' 放在了 release.ymlintegration_noneintegration_docker 两个任务的任务级 env: 里。runner 上下文在任务级 env: 中不可用 —— 除了让 actionlint 报错外,该表达式在运行时会展开为空字符串,导致 integration-tests/vitest.config.tsprocess.env['RUNNER_ENVIRONMENT'] === 'self-hosted')永远无法应用本次改动本想启用的 ECS 集成测试限制。

修复

将该变量移到步骤级 env:,且只加在真正启动读取它的 vitest 的四个步骤上 —— Run CLI Integration TestsRun Interactive Integration TestsRun CLI Docker Integration TestsRun Interactive Docker Integration Tests —— 与 e2e.ymlqwen-autofix.ymlrepo-hygiene.yml 中既有的写法保持一致,并删除了两处非法的任务级条目。scripts/tests/release-workflow.test.js 中的工作流钉固测试同步更新:要求步骤级写法,并禁止任务级写法(即本次回归的确切形态)。

变异探针(见证验证)

  • 删除 Run CLI Integration Tests 上的步骤级 env → 更新后的测试失败(随后已还原)。
  • RUNNER_ENVIRONMENT 重新加回 integration_none 的任务级 env(原始缺陷形态)→ 更新后的测试失败(随后已还原)。
  • 最终代码树 → 测试套件通过。

验证

在本次检出上实际执行的命令(除特别说明外均为提交后的代码树):

  • 复现失败:在修复前的代码树上运行 node scripts/lint.js --actionlint —— 失败(exit 1),报出上文引用的两处 release.yml 错误
  • 修复后运行 node scripts/lint.js --actionlint(actionlint 1.7.12,与 CI 锁定版本一致)—— 通过(exit 0),并在最终提交的代码树上再次运行
  • bash .github/scripts/check-workflow-size.sh —— 通过(release.yml 55,375 字节,与基线 53,022 相差在 4,096 以内)
  • npx vitest run --config ./scripts/tests/vitest.config.ts release-workflow —— 34 通过(release-workflow 29/29)
  • npm run test:scripts(完整 scripts 套件)—— 1,965+ 通过;仅有的失败(多次完整运行中共 5 个:upload-aliyun-oss-assetsno-config-object-create-configvscode-companion-no-webui-configverify-captureqwen-autofix-workflow)在单独运行时全部通过(例如 qwen-autofix-workflow 229/229)—— 属于共享 runner 高负载下的不稳定用例,均与 release.yml 无关
  • npm run build —— 通过(rc=0)
  • npm run typecheck —— 通过(rc=0)(首次失败是与正在并发运行的 build 竞态导致的 TS6305 dist 过期错误;build 完成后重跑即通过)
  • npm run lint —— 通过(rc=0)(首次失败是由我本人完整运行 test:scripts 时某个崩溃的不稳定用例遗留的 qwen-dist-backup-* 目录引起;删除该残留后重跑通过)
  • 对两个改动文件运行 npx prettier --check —— 通过
  • 对全部 22 个 CI HELPER_TESTS 文件运行 node --test —— 495 通过,0 失败
  • 复现的测试前 CI 检查均为绿色:check:lockfilecheck:desktop-isolationcheck:tui-dep-directionaudit:runtime:criticalcheck-i18ngenerate:settings-schema 及新鲜度检查、generate:notices 及新鲜度检查、敏感词 lint
  • 本地未运行:yamllint(该 runner 无 pip3 —— 环境限制;actionlint 会解析相同的 YAML 结构且已通过,新增块也与文件中既有的步骤级 env: 块完全同构)与 shellcheck(缺少 xz,无法解压锁定版本的二进制 —— 本次改动未涉及任何 shell 脚本)。两者均会在 CI 中运行。

🧠 Handled by Qwen Code · model/模型 qwen3.8-max

@github-actions github-actions Bot added the review/self-reported The linked issue was opened by the PR author (self-reported) label Aug 31, 2026
@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Qwen Triage finishedview run. See the stage comments in this thread for the result.

Qwen Triage 已完成 —— 查看运行。结果见本线程中的各阶段评论。

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 CI Test (ubuntu-latest, Node 22.x) job failing at the actionlint step on c4803303fe5c (context "runner" is not allowed here at release.yml:404:32 / :470:32). #10598 already removed both job-level RUNNER_ENVIRONMENT entries, mapped the variable at step level on all four integration test steps, and updated the pin test accordingly. On 88a136317a3b that job is green again — verified via the check-runs API.
  • This PR already conflicts with main (mergeStateStatus: DIRTY): both branches edit the same hunks in release.yml and scripts/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 分钟)。

  • 目标分支上问题已不存在。 #10604Qwen Code CITest (ubuntu-latest, Node 22.x) 任务在 c4803303fe5c 上于 actionlint 步骤失败(release.yml:404:32 / :470:32context "runner" is not allowed here)。#10598 已删除两处任务级 RUNNER_ENVIRONMENT,改在四个集成测试步骤上映射该变量,并同步更新了钉固测试。在 88a136317a3b 上该任务已恢复绿色(经 check-runs API 核实)。
  • 本 PR 已与 main 冲突mergeStateStatus: DIRTY):两个分支修改了 release.ymlscripts/tests/release-workflow.test.js 中的相同区块。
  • rebase 后仅剩的差异: 四处步骤级映射上方的说明性 YAML 注释,以及一份措辞不同的钉固测试。本 PR 想恢复的行为已由 #10598 的测试钉固。

确定性查重没有自动捕获此情况,因为 #10604 仍处于打开状态——#10598 修复时没有引用它。

建议:作为 #10598 的重复关闭。如果希望保留那些说明性注释,请 rebase 到 main 并把本 PR 精简到只剩这部分差异。

(另注:88a136317a3bRelease 流水线的 Quality Checks 变红与本改动无关——是 supervisor-process.test.tsMessageList.dom.test.tsx 两个单元测试套件在共享 runner 上 flake;该任务中 test:scripts 未及运行。)

Qwen Code · qwen3.8-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator Author

🐑 Merge conflict with main detected — dispatched the autofix loop to resolve it. / 检测到与 main 的合并冲突,已触发 autofix 处理。

@qwen-code-dev-bot

qwen-code-dev-bot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

AutoFix round 2 finishedview run. See this round's report below.

中文说明

AutoFix 第 2 轮已完成 —— 查看运行。本轮报告见下方。

…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.
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator Author

🤖 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 resolution

Feedback classification

  • [rv:5064042883] CHANGES_REQUESTED (automated reviewer): "This PR lost a race — the fix already landed on main via fix(ci): make the Release workflow dispatchable #10598; recommend closing as superseded, or rebase and reduce to the explanatory-comments delta."
    • Verdict: confirmed. Verified against live git history, not taken on faith:
      • 88a136317a fix(ci): scope release runner context to steps (#10598) is present on origin/main (fetched fresh this round).
      • Its content is behaviorally identical to this PR: removes both job-level RUNNER_ENVIRONMENT entries and maps the variable at step level on all four integration test steps, plus a pin test asserting job-level env is absent and step-level env is present.
      • This branch's merge base is c4803303fe, which predates fix(ci): make the Release workflow dispatchable #10598, and both branches edit the same hunks in release.yml and scripts/tests/release-workflow.test.js — confirming the reported conflict (mergeStateStatus: DIRTY).
    • Note on reproduction policy: this finding is a supersession/duplication claim, not a claim that this PR's behavior is wrong, so the reproduce-before-fix test requirement does not apply; it was verified via the authoritative source (git history of the merge target).

Action taken

  1. Merged origin/main into the branch (conflict resolution was requested for this round). Conflicts appeared only in the two expected files.
  2. .github/workflows/release.yml — resolved toward main for behavior: main's step-level RUNNER_ENVIRONMENT mappings are kept byte-for-byte. This branch's only surviving content is the four 3-line explanatory YAML comments above the step-level mappings, which is exactly the reduced form the review explicitly sanctioned ("If the explanatory comments are wanted, rebase onto main and reduce this PR to just that delta"). The comments were re-verified as factually accurate before keeping them: integration-tests/vitest.config.ts reads RUNNER_ENVIRONMENT (line 14) and implements precisely the stated behavior (caps self-hosted shards at one fork via minForks/maxForks, and exempts them from unhandled-error fatality via dangerouslyIgnoreUnhandledErrors). They are compatible with the repo's yamllint config (comments rule satisfied; comments-indentation disabled).
  3. scripts/tests/release-workflow.test.js — resolved toward main: adopted fix(ci): make the Release workflow dispatchable #10598's merged pin test verbatim. Both wordings pin the same invariants (no job-level RUNNER_ENVIRONMENT; step-level mapping on each integration test step); re-wording an already-merged test would grow the diff with zero new coverage, against Simplicity First. The net diff of this file vs main is now zero.
  4. Net diff of the whole branch vs origin/main after the merge: 12 added lines (the four comments) in release.yml, nothing else.

Mutation probe

This 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 env: block from the Run CLI Integration Tests step made release lane runner routing > passes the runner environment to integration test configuration FAIL (1 failed | 28 passed); restoring it returned the suite to green (29 passed). Probe restored before commit.

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:

  • Close as superseded if the comments are not wanted — nothing on this branch is load-bearing beyond them; or
  • Merge if the explanatory comments above the step-level mappings are considered worth keeping (they document the non-obvious consumer of RUNNER_ENVIRONMENT at the exact spot where the original Main CI failed: Qwen Code CI on c4803303fe5c #10604 bug — a job-level mapping that silently expands to empty and fails actionlint — originated).

Verification

Every command below was actually run this round, in the merged working tree, before the commit:

  • git fetch origin main + git log origin/main — confirmed 88a136317a (fix(ci): make the Release workflow dispatchable #10598) present on the merge target
  • git merge origin/main — conflicts only in release.yml and release-workflow.test.js, as predicted by the review
  • npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/release-workflow.test.js29 passed
  • Mutation probe (remove one step-level mapping → re-run) — pin test failed as expected; restored → 29 passed
  • npm run buildpassed (exit 0)
  • npm run typecheckpassed (exit 0)
  • npm run lintpassed (exit 0)
  • node scripts/lint.js --actionlint / node scripts/lint.js --yamllintnot runnable in this environment: neither actionlint nor yamllint is installed on this runner (the wrapper prints actionlint: not found / xargs: yamllint: No such file or directory). Surrogate evidence instead: the pin test parses release.yml successfully (valid YAML), the step-level mapping placement is byte-identical to fix(ci): make the Release workflow dispatchable #10598 whose actionlint check is verified green by the review, and these same four comment blocks already passed this PR's own earlier CI runs (no failed checks reported for this PR). The workflow's independent CI remains the final gate for this check.
  • npm run generate:settings-schema — not required (no settings source touched)
  • Integration tests after npm run bundle — not applicable: the touched behavior is CI workflow YAML, exercised by CI itself and by the pin test, not by the bundled CLI harness
  • Commit: 643d3b5ac8 (merge, parents f6f91b3bc8 + be5f00eb80), working tree clean
中文说明

处理评审总结 — PR #10613(issue #10604),含冲突解决的一轮

反馈分类

  • [rv:5064042883] CHANGES_REQUESTED(自动评审器):"这个 PR 来晚了一步——修复已通过 fix(ci): make the Release workflow dispatchable #10598 合入 main;建议作为重复关闭,或者 rebase 后精简到仅剩说明性注释的差异。"
    • 结论:属实。 依据实时 git 历史核实,而非凭说法采信:
      • 88a136317a fix(ci): scope release runner context to steps (#10598) 确实存在于 origin/main(本轮已重新 fetch)。
      • 其内容与本 PR 在行为上完全一致:删除两处任务级 RUNNER_ENVIRONMENT,改在四个集成测试步骤上映射该变量,并附带钉固测试(断言任务级 env 不存在、步骤级 env 存在)。
      • 本分支的 merge base 是 c4803303fe,早于 fix(ci): make the Release workflow dispatchable #10598;两个分支修改了 release.ymlscripts/tests/release-workflow.test.js 中的相同区块——证实了所报告的冲突(mergeStateStatus: DIRTY)。
    • 关于复现策略的说明:该发现是"被抢先/重复"的论断,并非"本 PR 行为有错"的论断,因此不适用"先写失败测试再修"的复现要求;已通过对合并目标分支的 git 历史(权威来源)进行核实。

采取的行动

  1. origin/main 合并进本分支(本轮要求解决冲突)。冲突只出现在预期的两个文件中。
  2. .github/workflows/release.yml — 行为上向 main 靠拢解决:逐字节保留 main 的步骤级 RUNNER_ENVIRONMENT 映射。本分支唯一留存的内容是四处步骤级映射上方的 3 行说明性 YAML 注释,这正是评审明确认可的精简形态("如果希望保留那些说明性注释,请 rebase 到 main 并把本 PR 精简到只剩这部分差异")。保留前已重新核实注释内容属实:integration-tests/vitest.config.ts 第 14 行读取 RUNNER_ENVIRONMENT,且实现的正是注释所述行为(通过 minForks/maxForks 把自托管 runner 上的每个分片限为一个 fork,并通过 dangerouslyIgnoreUnhandledErrors 豁免其 unhandled-error 致命化)。注释与仓库的 yamllint 配置兼容(满足 comments 规则;comments-indentation 已禁用)。
  3. scripts/tests/release-workflow.test.js — 向 main 靠拢解决:原样采用 fix(ci): make the Release workflow dispatchable #10598 已合入的钉固测试。两种措辞钉固的是同一组不变量(无任务级 RUNNER_ENVIRONMENT;每个集成测试步骤上有步骤级映射);改写一个已合入的测试只会增加 diff 而没有任何新覆盖,违背 Simplicity First。该文件相对 main 的净差异现在为零。
  4. 合并后整个分支相对 origin/main 的净差异:release.yml 中新增 12 行(四处注释),别无其他。

变异探针

本轮没有新增任何守护逻辑或行为(仅注释),因此不需要新的见证测试;留存下来的 #10598 钉固测试即为该行为的见证。为证明该见证在当前树中确实有效,仍运行了变异探针:临时删除 Run CLI Integration Tests 步骤的步骤级 env: 块后,release lane runner routing > passes the runner environment to integration test configuration 如预期失败(1 failed | 28 passed);恢复后测试套件恢复全绿(29 passed)。探针在提交前已还原。

留给维护者的开放问题(此处不做决定)

评审的首要建议——作为 #10598 的重复关闭本 PR——是本工作流无权执行的操作(无 GitHub 写权限),也是应由维护者做出的决定。分支现已无冲突且精简到仅剩注释差异,两种结局都只需一步:

验证

以下每条命令都是本轮在合并后的工作树中、提交之前实际运行过的:

  • git fetch origin main + git log origin/main — 确认 88a136317afix(ci): make the Release workflow dispatchable #10598)存在于合并目标分支
  • git merge origin/main — 冲突仅出现在 release.ymlrelease-workflow.test.js,与评审预测一致
  • npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/release-workflow.test.js29 通过
  • 变异探针(删除一处步骤级映射后重跑)— 钉固测试如预期失败;恢复后 — 29 通过
  • npm run build通过(exit 0)
  • npm run typecheck通过(exit 0)
  • npm run lint通过(exit 0)
  • node scripts/lint.js --actionlint / node scripts/lint.js --yamllint本环境无法运行:该 runner 上未安装 actionlintyamllint(wrapper 输出 actionlint: not found / xargs: yamllint: No such file or directory)。替代证据:钉固测试成功解析 release.yml(YAML 合法);步骤级映射的位置与 fix(ci): make the Release workflow dispatchable #10598 逐字节一致,而评审已核实 fix(ci): make the Release workflow dispatchable #10598 的 actionlint 检查为绿色;且这四处注释在本 PR 自己更早的 CI 运行中已经通过(本 PR 无失败检查记录)。该检查以工作流的独立 CI 为最终门槛。
  • npm run generate:settings-schema — 无需运行(未触碰 settings 源文件)
  • npm run bundle 后的集成测试 — 不适用:本次触碰的行为是 CI 工作流 YAML,由 CI 本身与钉固测试行使,而非打包后的 CLI 测试框架
  • 提交:643d3b5ac8(merge,双亲为 f6f91b3bc8 + be5f00eb80),工作树干净

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/模型 qwen3.8-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator Author

🐑 Merge conflict with main detected — dispatched the autofix loop to resolve it. / 检测到与 main 的合并冲突,已触发 autofix 处理。

@yiliang114

Copy link
Copy Markdown
Collaborator

Closing: superseded by #10598, which already moved RUNNER_ENVIRONMENT to step-level scope in release.yml and is merged on main. The linked issue #10604 was closed as fixed by #10598; this PR only adds comments on top of the same change.

@yiliang114 yiliang114 closed this Aug 31, 2026
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator Author

🤖 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 triage

The round's feedback contained no actionable points: no reviews, no inline
comments, no issue-level comments, no failed checks, and no still-red checks.
Diff growth this window was negative (source -6 / test -20 vs budget 400/400),
so no growth audit applied.

Conflict resolution (--conflict true)

Merged origin/main (tip 1e695c34ff) into autofix/issue-10604.
Both conflicts were in .github/workflows/release.yml, caused by main's
#10605 (6608cd3b3d), which replaced the two separate steps
Run CLI Docker Integration Tests and Run Interactive Docker Integration Tests with a single Run Docker Integration Tests step that coordinates
sandbox image builds and docker daemon access via flock on shared
self-hosted hosts.

Resolution, understanding both sides rather than taking one:

  • Kept main's consolidated step intact (its build/docker locking, image
    reuse, BUILD_SANDBOX_FLAGS, and the Set up Docker self-hosted skip are
    all preserved).
  • Carried this PR's intent forward: the explanatory comment above the
    RUNNER_ENVIRONMENT mapping (why the variable is mapped — it feeds
    integration-tests/vitest.config.ts, which caps each shared-pool shard at
    one fork and exempts pressure-flake unhandled errors) now sits above the
    mapping inside the consolidated step's env block. The same comment on the
    two non-Docker steps (Run CLI Integration Tests, Run Interactive Integration Tests) auto-merged cleanly. The comment count dropped from
    four to three because main merged two steps into one.

The merged tree's delta vs origin/main is exactly those three 3-line YAML
comments (9 insertions, 0 deletions). No other file carries any branch-local
change.

Dispositions

  • Acted: 1 (base-conflict resolution requested by the workflow invocation)
  • Declined: 0; Deferred: 0; Escalated: 0

Mutation probes

None applicable: this round added no code guards or branches — only a merge
commit whose sole branch-local content is YAML comments. The structure the
comments annotate is pinned by the existing
scripts/tests/release-workflow.test.js (from main), which this round
re-ran green (see Verification).

Verification

All commands run on the merged tree before committing:

  • npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/release-workflow.test.js — passed (30/30 tests; parses release.yml as YAML and pins the consolidated Docker step, the step-level RUNNER_ENVIRONMENT mappings for integration_none (2 steps) and integration_docker (1 step), and the shared-pool coordination script)
  • npm run build — passed (exit 0)
  • npm run typecheck — passed (exit 0)
  • npm run lint — passed (exit 0)
  • npm run generate:settings-schema — ran to confirm the merged settingsSchema.ts/settings.schema.json pair (both inherited from main) is consistent; produced no working-tree changes
  • Integration tests after npm run bundle: not run — the touched content is CI workflow YAML, which local integration runs do not exercise; the release workflow itself is its only execution path. No TS package code was touched by this round.
  • Commit: 53d2c59845 chore(ci): merge main, keep consolidated Docker test step from #10605 (#10604) (merge commit, parents 643d3b5ac8 + 1e695c34ff); pre-commit hook passed; working tree clean afterward.
中文说明

Autofix 本轮总结 — PR #10613(issue #10604

反馈分类

本轮反馈中没有需要处理的条目:没有评审意见、没有行内评论、没有
issue 级评论、没有失败的检查,也没有持续失败的检查。本统计窗口内的
diff 增长为负值(源码 -6 / 测试 -20,预算 400/400),因此无需进行
增长审计。

冲突解决(--conflict true

已将 origin/main(最新提交 1e695c34ff)合并进
autofix/issue-10604。两处冲突都位于
.github/workflows/release.yml,起因是 main 上的 #10605
6608cd3b3d):它把原本分开的 Run CLI Docker Integration Tests
Run Interactive Docker Integration Tests 两个步骤替换为单一的
Run Docker Integration Tests 步骤,在共享自托管机器上通过 flock
协调沙箱镜像构建与 docker 守护进程的访问。

解决方式是在理解双方意图后合并,而不是盲目取某一边:

  • 完整保留 main 的合并后步骤(其构建/ docker 锁机制、镜像复用、
    BUILD_SANDBOX_FLAGS 以及 Set up Docker 对自托管机器的跳过条件
    全部保留)。
  • 延续本 PR 的意图RUNNER_ENVIRONMENT 映射上方的解释性注释
    (说明为何映射该变量——它供
    integration-tests/vitest.config.ts 使用,将共享池每个分片限制为
    单个 fork,并豁免资源压力导致的 unhandled error 误报)被移入合并后
    步骤的 env 块、位于该映射上方。两个非 Docker 步骤
    Run CLI Integration TestsRun Interactive Integration Tests
    上的相同注释已自动合并成功。注释数量从 4 条变为 3 条,因为 main
    把两个步骤合并成了一个。

合并后的工作树相对 origin/main 的差异恰好是这三条各 3 行的 YAML
注释(9 行新增、0 行删除),其他文件没有任何分支本地改动。

处理结果

  • 已处理:1 项(工作流调用所要求的 base 冲突解决)
  • 拒绝:0;延期:0;升级人工:0

变异探针

本轮不适用:没有新增任何代码守卫或分支——唯一的分支本地内容是 YAML
注释,整个提交是一个合并提交。注释所描述的结构由 main 带来的现有测试
scripts/tests/release-workflow.test.js 固定,本轮已重新运行并通过
(见下文验证)。

验证

以下命令均在合并后的工作树上、提交之前实际执行:

  • npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/release-workflow.test.js — 通过(30/30 个测试;该测试将 release.yml 解析为 YAML,并固定合并后的 Docker 步骤、integration_none(2 个步骤)与 integration_docker(1 个步骤)的步骤级 RUNNER_ENVIRONMENT 映射,以及共享池协调脚本)
  • npm run build — 通过(退出码 0)
  • npm run typecheck — 通过(退出码 0)
  • npm run lint — 通过(退出码 0)
  • npm run generate:settings-schema — 已执行,用于确认合并后继承自 main 的 settingsSchema.ts/settings.schema.json 配对一致;未产生任何工作树改动
  • npm run bundle 之后的集成测试:未运行——本轮涉及的内容是 CI 工作流 YAML,本地集成测试无法覆盖它,其唯一执行路径是 release 工作流本身;本轮未改动任何 TS 包代码。
  • 提交:53d2c59845 chore(ci): merge main, keep consolidated Docker test step from #10605 (#10604)(合并提交,父提交为 643d3b5ac8 + 1e695c34ff);pre-commit 钩子通过;提交后工作树干净。

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/模型 qwen3.8-max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/self-reported The linked issue was opened by the PR author (self-reported)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Main CI failed: Qwen Code CI on c4803303fe5c

3 participants