Repository navigation
fix(ci): retry the transient all-green macOS E2E shard death once (#11131) - #11134
qwen-code-dev-bot wants to merge 7 commits into
Conversation
…1131) Run 33982750226 failed the macOS shard 1/2 leg at 'Run E2E tests' with zero vitest FAIL lines — the all-green-under-host-pressure signature the sandbox:none leg already retries (#10572) — while shard 2/2 of the same run passed, and the identical shard file set passes locally under the same command. The macOS leg carried no retry, so one transient death fails the lane. Give it the same bounded retry: the shard command moves into a run_shard() invoked once and, behind a budget gate, a second time. The gate subtracts a 60-minute reserve (over one shard-time even on this slowest leg) from the job's 21600s budget — stated explicitly as timeout-minutes: 360 — and refuses the retry past 18000s elapsed, where the first attempt is hung rather than unlucky and GitHub would cancel the retry at the timeout line. The job start epoch is recorded before setup, as on Linux. e2e-shard-retry.test.js executes the macOS step under bash -e with npx stubbed and the clock pinned (green path, transient-then-green, both-red, and the 18000s/18001s boundary); e2e-workflow.test.js pins the epoch step, the retry shape, the budget operand, and the red-on-red semantics, mirroring the Linux pins.
Autofix E2E Report — Issue #11131Issue
DiagnosisEvidence gathered (no GitHub credentials are available in this environment, so the run log itself could not be fetched; the macOS leg also cannot be executed locally — this is the CI-/platform-specific surrogate path):
FixThe macOS leg gets the same bounded retry the maintainers built for
Coverage witnesses (
Mutation probes (each applied, tests run, then reverted): Remaining riskIf the failure was not the transient class (e.g., a macOS-only crash that kills the vitest main process before any Verification
中文说明Autofix E2E 报告 — Issue #11131问题
诊断收集到的证据(本环境没有 GitHub 凭据,无法拉取运行日志;本地也无法执行 macOS 分支——这是按规则走的 CI/平台特异的替代验证路径):
修复为 macOS 分支加上与维护者为
覆盖见证(
变异探针(每次注入后运行测试,随后还原):macOS 重试的 残余风险如果本次失败并非瞬时类别(例如某种 macOS 特有的崩溃,在打印任何 验证
🧠 Handled by Qwen Code · model/模型 |
|
🔀 Base updated: red check(s) [Test (ubuntu-latest, Node 22.x)] pass on current main — merged current main via update-branch; CI will re-run. 中文说明🔀 已更新 base:红色检查 [Test (ubuntu-latest, Node 22.x)] 在当前 main 上通过 —— 已通过 update-branch 合入当前 main,CI 将重新运行。 |
|
🤖 AutoFix ran out of time before finishing (timeout (7200000ms)) (attempt 1/10) — it will retry on the next scan.
See the Qwen Autofix agent step logs for model/tool output. 中文说明🤖 AutoFix 在完成前耗尽了时间(timeout (7200000ms))(第 1/10 次尝试)—— 将在下次扫描时重试。 Run log: https://github.com/QwenLM/qwen-code/actions/runs/34004134257 🧠 Handled by Qwen Code · model/模型 |
|
🤖 AutoFix updated a stale base — the fix did not pass verification, but this PR was behind What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. 中文说明🤖 AutoFix 更新了一个过期的 base —— 修复未通过验证,但本 PR 落后于 Run log: https://github.com/QwenLM/qwen-code/actions/runs/34011247704 🧠 Handled by Qwen Code · model/模型 |
|
🤖 AutoFix ran out of time before finishing (timeout (7200000ms)) (attempt 3/10) — it will retry on the next scan.
See the Qwen Autofix agent step logs for model/tool output. 中文说明🤖 AutoFix 在完成前耗尽了时间(timeout (7200000ms))(第 3/10 次尝试)—— 将在下次扫描时重试。 Run log: https://github.com/QwenLM/qwen-code/actions/runs/34021761297 🧠 Handled by Qwen Code · model/模型 |
|
🤖 AutoFix stopped: this counting window now contains 3 agent time-budget exhaustions (pushed rounds in between included; this round itself may have failed differently). That is 3 full agent runs that pushed nothing. A human should split or reduce the PR (or raise the agent time budget AND its step backstop together), then comment What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. 中文说明🤖 AutoFix 已停止:当前计数窗口内已累计 3 次时间预算耗尽(含其间推送过的轮次;本轮本身可能以别的方式失败)。即 3 次完整 agent 运行没有推送任何内容。应由人工拆分或缩减该 PR(或同时提高 agent 时间预算与其步骤兜底),然后评论 Run log: https://github.com/QwenLM/qwen-code/actions/runs/34028870816 🧠 Handled by Qwen Code · model/模型 |
|
⏸️ AutoFix paused: this PR reached its automatic round cap (10/10) and the loop will not manage it further — new feedback and base conflicts stay unhandled. Comment 中文说明⏸️ AutoFix 已暂停:本 PR 达到自动轮次上限(10/10),循环不再管理——新反馈与 base 冲突将无人处理。评论 |
|
Closing — the premise does not hold: the job log cited in triage shows the macOS shard died with a named FAIL plus AssertionError, not an all-green death, and macOS is already exempt from unhandled-error fatality in integration-tests/vitest.config.ts. The real root cause (the 90s waitForTelemetryEvent poll in context-compress-interactive.test.ts) is still on main; a fix should target that instead. This also now conflicts with the post-pnpm e2e.yml. |
What this PR does
The macOS E2E leg gains the same single, budget-gated retry the Linux
sandbox:noneleg already carries (#10572): the shard command moves into arun_shard()shell function that runs once and, only after a failure, a second time. The retry is gated on remaining job budget — the job now statestimeout-minutes: 360(GitHub's default, made explicit) and the gate refuses a retry past 18000s elapsed (21600s minus a 60-minute reserve for one shard-time) — and aRecord job start epochstep runs before setup so the gate sees install/unpack spend. The retry's semantics are witnessed by executing the step's script underbash -ewithnpxstubbed and the clock pinned (green path, transient-then-green, both-red, and the 18000s/18001s boundary), and its shape is pinned alongside the existing Linux pins in the workflow test suite.Why it's needed
Run 33982750226 failed
E2E Test - macOS - shard 1/2at theRun E2E testsstep with zero vitestFAILlines — every test apparently green, yet the step red — while shard 2/2 of the same run passed (#11131). That is the exact signature of the transient shared-host-pressure class thesandbox:noneleg died to three times before its retry landed: no failing test to fix, sibling shard green, green on re-run. The identical shard-1/2 file set also passes locally under the leg's own command (33 passed | 5 skipped files, 220 passed | 19 skipped tests). Because the macOS leg had no retry, one transient death fails the whole lane and opens a per-commit CI-failure issue. A deterministic failure still fails both attempts and keeps the leg red, so real regressions are not absorbed.Reviewer Test Plan
How to verify
Confirm the retry fires once and only once, and that real failures stay red. The focused suites execute the workflow step itself under
bash -ewith the runner stubbed and the clock pinned:npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/e2e-shard-retry.test.js scripts/tests/e2e-workflow.test.js— expect 48 passed, covering the macOS green path (one attempt, no retry noise), a transient-then-green shard (retried once, step green), a both-attempts-red shard (step stays red), and the budget gate admitting exactly 18000s and refusing 18001s, plus the YAML pins (epoch step before install and unconditional, single end-anchored retry,timeout-minutes: 360, nocontinue-on-error, default shell). The mutation probes were run and reverted during development: breaking the macOS||retry turned exactly the 8 macOS witnesses red, shifting the gate by one second turned the boundary witness red, and removing the epoch step or mis-stating the budget each turned their pin red. On CI, the macOS leg should show a::warning::plus a second attempt only when the first attempt fails, and never more than two attempts.Evidence (Before & After)
N/A — CI-only change, no user-visible surface. Before: the macOS leg ran its shard command once, so a transient all-green death failed the lane (run 33982750226). After: the leg retries once behind the 18000s budget gate and only stays red when both attempts fail.
Tested on
Environment (optional)
The bash-driven workflow-step tests run under
bash -ewith the shard runner stubbed; the file is excluded from Windows lanes byscripts/tests/vitest.config.ts. A surrogate run of the exact macOS shard-1/2 file set (the leg's own vitest command and env, real model) was executed on Linux for the diagnosis: green.Risk & Scope
FAILlines rather than the transient class, both attempts will fail and the issue will recur with the same signature, at which point the log must be read directly. No test code, parallelism, or memory settings were changed, as no evidence points to a specific code-level defect.timeout-minutes: 360states GitHub's existing default; job behavior is unchanged on the green path.Linked Issues
Fixes #11131
中文说明
本 PR 做了什么
macOS E2E 分支获得了与 Linux
sandbox:none分支相同的一次性、带预算门控的重试(#10572):分片命令移入run_shard()shell 函数,先运行一次,仅在失败后再运行第二次。重试受剩余作业预算门控——作业现在显式声明timeout-minutes: 360(即 GitHub 默认值),门控在超过 18000 秒(21600 秒减去一个分片时长的 60 分钟余量)时拒绝重试——并且在安装之前记录Record job start epoch步骤,使门控能看到安装/解包耗时。重试的语义通过在bash -e下执行该步骤脚本(打桩npx、固定时钟)来见证(绿色路径、先死后绿、两次皆红、18000/18001 秒边界),其形状则与既有 Linux 固定一并固定在工作流测试套件中。为什么需要
运行 33982750226 中,
E2E Test - macOS - shard 1/2在Run E2E tests步骤失败,且日志中没有一行 vitestFAIL——所有测试似乎都通过,步骤却是红色——而同一运行的 shard 2/2 通过(#11131)。这正是sandbox:none分支在获得重试之前三次死掉的瞬时共享主机压力类别的签名:没有可修复的失败测试、兄弟分片绿色、重跑即绿。完全相同的 shard 1/2 文件集合在本地用该分支自己的命令运行也通过(33 通过 | 5 跳过个文件,220 通过 | 19 跳过个测试)。由于 macOS 分支没有重试,一次瞬时死亡就会使整条分支变红并按提交开出 CI 故障 issue。确定性失败仍会让两次尝试都失败并保持红色,因此真实回归不会被吞掉。评审者测试计划
如何验证
确认重试恰好触发一次,且真实失败保持红色。聚焦的测试套件在
bash -e下执行工作流步骤本身(打桩运行器、固定时钟):npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/e2e-shard-retry.test.js scripts/tests/e2e-workflow.test.js——预期 48 通过,覆盖 macOS 绿色路径(一次尝试、无重试噪音)、先死后绿的分片(重试一次、步骤转绿)、两次皆红的分片(步骤保持红色),以及预算门控恰好放行 18000 秒、拒绝 18001 秒,外加 YAML 固定(epoch 步骤在安装之前且无条件、单个锚定末尾的重试、timeout-minutes: 360、无continue-on-error、默认 shell)。开发过程中运行并还原了变异探针:破坏 macOS 的||重试使恰好 8 个 macOS 见证变红,将门控移动一秒使边界见证变红,删除 epoch 步骤或错报预算分别使其固定测试变红。在 CI 上,macOS 分支应仅在第一次尝试失败时显示一条::warning::加第二次尝试,且绝不超过两次尝试。前后对比证据
N/A —— 仅 CI 变更,无用户可见界面。变更前:macOS 分支的分片命令只运行一次,一次瞬时的"全绿死亡"就会使分支变红(运行 33982750226)。变更后:分支在 18000 秒预算门控之后重试一次,只有两次尝试都失败才保持红色。
测试平台
环境(可选)
bash 驱动的工作流步骤测试在
bash -e下运行并打桩分片运行器;该文件按scripts/tests/vitest.config.ts在 Windows 车道上被排除。诊断时在 Linux 上用该分支自己的 vitest 命令与环境(真实模型)执行了与 macOS shard 1/2 完全相同的文件集合的替代运行:绿色。风险与范围
FAIL行的确定性 macOS 特有崩溃而非瞬时类别,两次尝试都会失败,问题将以相同签名复发,届时必须直接读取日志。未改动任何测试代码、并行度或内存设置,因为没有证据指向具体的代码级缺陷。timeout-minutes: 360只是显式声明 GitHub 既有的默认值;绿色路径上的作业行为不变。关联 Issue
Fixes #11131