Skip to content

fix(ci): fail Java lanes before disk exhaustion - #16068

Merged
yiliang114 merged 9 commits into
mainfrom
codex/issue-16003-java-disk-floor
Nov 4, 2026
Merged

yiliang114 merged 9 commits into
mainfrom
codex/issue-16003-java-disk-floor

Conversation

@yiliang114

@yiliang114 yiliang114 commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Adds the existing disk-floor preflight to all six Java lanes that can be routed to the shared ECS pool, immediately after checkout and before Maven, container, broker, or Node setup. The preflight checks both the workspace and the runner temp filesystem, so a saturated host fails with a disk diagnostic before JUnit or the RocketMQ broker turns ENOSPC into misleading test errors.

It also adds a workflow meta-test that pins the gate to those six pool jobs, requires it immediately after checkout, and prevents it from being added silently to hosted-only jobs.

Why it's needed

The Java lanes currently have no reference to the existing disk-floor gate, even though the cited failures all ran on the shared ECS pool. In the affected runs, the broker reported its disk as full and JUnit could not create temporary directories; both surfaced as test failures rather than infrastructure failures. Failing before the heavy steps makes the first failure actionable and leaves the suite unstarted on a runner that cannot provide the required headroom.

Reviewer Test Plan

How to verify

Review the six Java pool lanes and confirm that each one checks disk space immediately after checkout and before any setup or suite step. The gate should be conditional on runner.environment == 'self-hosted', and hosted-only lanes should remain unchanged. A saturated self-hosted runner should fail with the existing Disk floor breached diagnostic naming the runner, directory, filesystem, free KiB and floor; a runner above the configured floor should proceed normally.

Evidence (Before & After)

N/A for UI. Before: the Java lanes had no disk-floor gate. After: every Java lane that can select the ECS pool has the same preflight used by the other self-hosted workflows.

Tested on

OS Status
🍏 macOS N/A
🪟 Windows N/A
🐧 Linux ✅

On Linux, against the current head: vitest run scripts/tests/sdk-java-workflow.test.js scripts/tests/hosted-process-ci.test.js → 211 passed / 211 (122 and 89 respectively), and prettier --check .github/workflows/sdk-java.yml scripts/tests/sdk-java-workflow.test.js → clean. No Java lane was executed locally; the gate's own behaviour was not re-measured here, and CI on this head is reported separately rather than assumed green.

Environment (optional)

N/A; this changes CI workflow wiring only.

Risk & Scope

  • Main risk or tradeoff: A host below the default 2 GiB / 100,000-inode floor will fail earlier and require a retry, which is the intended fail-fast behavior.
  • Not validated / out of scope: Reclaiming the ECS host, changing the broker's disk thresholds, and the separate hosted-vs-ECS pool accounting are outside this change. The 98% broker setting remains unverified against RocketMQ's warning threshold.
  • Breaking changes / migration notes: None for users. Hosted-only jobs are unchanged, and self-hosted Java jobs now fail before setup when the configured disk floor is breached.

Linked Issues

References #16003. This PR closes the Java-lane diagnostic gap; it does not claim to resolve the underlying runner reclaim or broker-threshold investigation.

中文说明

这个 PR 做了什么

把现有的磁盘空间下限预检接入所有六个可能路由到共享 ECS 池的 Java 车道,位置紧跟在 checkout 之后、Maven、容器、broker 或 Node 初始化之前。预检同时检查 workspace 与 runner 临时目录所在的文件系统,因此当主机磁盘接近耗尽时,会在 JUnit 或 RocketMQ broker 把 ENOSPC 变成误导性的测试错误之前,先给出磁盘诊断并失败。

同时增加一个 workflow 元测试,把这套门禁钉在上述六个池 job 上,要求它必须紧跟在 checkout 之后,并防止它被悄悄加到仅托管 runner 的 job 上。

为什么需要它

这些 Java 车道目前完全没有引用已有的磁盘下限门禁,而 issue 中列出的失败全部发生在共享 ECS 池上。受影响的运行里,broker 报告磁盘已满,JUnit 也无法创建临时目录;两者最终都表现为测试失败,而不是基础设施失败。在重步骤之前失败,可以让第一次失败就可行动,并避免在不具备足够余量的 runner 上启动整套测试。

评审者的测试计划

如何验证

检查六个 Java 池车道,确认每个都在 checkout 之后、任何初始化或测试步骤之前检查磁盘空间。门禁应只在 runner.environment == 'self-hosted' 时运行,仅托管 runner 的车道应保持不变。磁盘低于下限的自托管 runner 应以现有的 Disk floor breached 诊断失败,并在诊断中点名 runner、目录、文件系统、可用 KiB 与下限;高于配置下限的 runner 应正常继续。

证据(修改前与修改后)

UI 部分不适用。修改前:Java 车道没有磁盘下限门禁。修改后:每个可能选择 ECS 池的 Java 车道都接入了其他自托管 workflow 使用的同一套预检。

验证平台

OS 状态
🍏 macOS 不适用
🪟 Windows 不适用
🐧 Linux ✅

在 Linux 上针对当前 head:vitest run scripts/tests/sdk-java-workflow.test.js scripts/tests/hosted-process-ci.test.js → 211 passed / 211(分别为 122 与 89),prettier --check .github/workflows/sdk-java.yml scripts/tests/sdk-java-workflow.test.js → 通过。没有在本地执行任何 Java 车道,也没有重新测量门禁脚本本身的行为;本 head 的 CI 结论单独回报,不假定为绿。

环境(可选)

不适用;本改动只涉及 CI workflow 接线。

风险与范围

  • 主要风险或取舍:低于默认 2 GiB / 100,000 inode 下限的主机会更早失败并需要重试,这是预期的快速失败行为。
  • 未验证 / 范围之外:ECS 主机回收、broker 磁盘阈值调整,以及托管与 ECS 池的独立统计都不在本改动范围内。98% 的 broker 设置仍未对照 RocketMQ 的告警阈值验证。
  • 破坏性变更 / 迁移说明:对用户没有破坏性变更。仅托管 runner 的 job 不受影响;自托管 Java job 在配置的磁盘下限被突破时,会在初始化前失败。

关联 Issue

引用 #16003。本 PR 解决 Java 车道的诊断缺口;它不声称已经解决底层 runner 回收或 broker 阈值调查。

Review round 2 (18ec17a)

  • Every heavy lane now declares its own floor (DISK_FLOOR_MIN_FREE_KB: 8388608); flyway-migrations and the shared default stay as they were.
  • check-disk-floor.sh gains an opt-in used-percent ceiling (DISK_FLOOR_MAX_USED_PCT), because the CI runners run out of disk: the RocketMQ broker refuses writes and Java lanes cannot create temp directories #16003 refusal is a ratio: the broker reported 0.94 on a 952 GiB volume with tens of GiB free. Both broker lanes set it to 90.
  • The workflow meta-test fails closed: explicit hosted-only allowlist, gate required for every other job, total-count assertion, negative assertion on the hosted jobs, and per-lane floor/ceiling pins.
  • Verified locally: sdk-java-workflow 117 passed / 5 skipped; check-disk-floor 12 passed; the meta-test goes red when a gate is deleted, added to a hosted job, or a floor is removed.

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

qwen-code-review-bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Qwen Triage finished — view run. See the stage comments in this thread for the result.

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

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓

Problem: real and well-evidenced, not theoretical. #16003 is open and carries three dated runs across two pools, the broker's 50001 service not available … the broker's disk is full [CL: 0.94 CQ: 0.94 INDEX: 0.94] text, 17 × JUnit Failed to create default temp directory on the Java 17 leg, and named runners. The failure mode it targets — infrastructure exhaustion reading as product regressions — is exactly the kind worth failing fast on.

Direction: aligned. This extends the disk-floor gate that already exists at .github/scripts/check-disk-floor.sh (#10035) and is already wired into ci.yml, e2e.yml, tui-parity.yml, release.yml and release-managed-agent-reference.yml. Bringing the Java lanes onto the same preflight is consistency, not a new mechanism, and the issue explicitly asks for it ("Add a disk-space preflight to the EventTransport jobs"). No Claude Code CHANGELOG signal needed here — this is internal CI plumbing.

Size: not applicable — no core paths (packages/core/src/**, packages/*/src/{auth,providers,models,config,tools,services}/**) are touched. 65 added lines total: 30 workflow, 35 meta-test. Well under any threshold.

Approach: the shape is right. Reusing the existing script and its exact established call form (check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}") instead of writing a Java-specific preflight is the correct call, and adding a meta-test that pins the gated job set — and blocks silent additions to hosted-only jobs — is better than the bare wiring. AGENTS.md asks that meta-tests be updated alongside workflow edits, and this does that.

One scope question worth answering before the code review, not a blocker: the gate is if: runner.environment == 'self-hosted', so it is skipped on hosted legs. But problem #2 in #16003 was observed on the hosted ubuntu-latest / Java 17 leg (the 17 JUnit @TempDir failures and /tmp/junit-…: No space left on device). Is that half deliberately left to #15979's tmpdir routing — and if so, has it been confirmed that JUnit @TempDir creation actually goes through the path #15979 changed? The issue itself flags that as unconfirmed. Either an answer or a follow-up note in the PR would close the loop.

Risk: no elevated risk signals — neither changed file matches the revert-correlated high-risk paths.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓

**问题:**真实且证据充分,不是理论性加固。#16003 仍处于 open 状态,里面有跨两个 runner 池、三个不同日期的运行记录,broker 的 50001 service not available … the broker's disk is full [CL: 0.94 CQ: 0.94 INDEX: 0.94] 原文、Java 17 车道上 17 次 JUnit Failed to create default temp directory,以及具体的 runner 名字。它要解决的失败形态——基础设施资源耗尽却表现得像产品回归——正是值得快速失败的那一类。

**方向:**对齐。本 PR 扩展的是已经存在的磁盘下限门禁 .github/scripts/check-disk-floor.sh(#10035),该门禁已经接入 ci.yml、e2e.yml、tui-parity.yml、release.yml 与 release-managed-agent-reference.yml。把 Java 车道接到同一套预检上属于统一化,而不是引入新机制;issue 本身也明确提出了这个诉求("Add a disk-space preflight to the EventTransport jobs")。此处不需要 Claude Code CHANGELOG 信号——这是内部 CI 接线。

**规模:**不适用——没有触及核心路径(packages/core/src/**、packages/*/src/{auth,providers,models,config,tools,services}/**)。共新增 65 行:workflow 30 行、元测试 35 行,远低于任何阈值。

**方案:**整体形态是对的。复用现有脚本及其既有调用形式(check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"),而不是另写一套 Java 专用预检,是正确的取舍;同时补上元测试,把受门禁保护的 job 集合钉住、并阻止它被悄悄加到仅托管的 job 上,比只做接线更好。AGENTS.md 要求改动 workflow 时同步更新元测试,这一点做到了。

有一个范围问题希望在代码审查前先回答(不是阻塞项):门禁的条件是 if: runner.environment == 'self-hosted',因此在托管 runner 上会被跳过。但 #16003 里的第 2 个问题恰恰是在托管的 ubuntu-latest / Java 17 车道上观测到的(17 次 JUnit @TempDir 失败与 /tmp/junit-…: No space left on device)。这一半是有意交给 #15979 的 tmpdir 改造处理吗?如果是,是否已确认 JUnit @TempDir 的创建确实走 #15979 改过的那条路径?issue 自己也把这一点标为未确认。无论是给个答复还是在 PR 里补一条后续说明,都能把这个环闭上。

**风险:**无升级风险信号——两个改动文件都不匹配与回滚相关的高风险路径。

进入代码审查 🔍

— Qwen Code · qwen3.8-max-2026-09-02

Reviewed at 464fb5787654928cd2d7e392d4acca9d79eeffcf · re-run with @qwen-code /triage

@qwen-code-review-bot

qwen-code-review-bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Code review

My independent proposal from the title and motivation alone: wire the existing check-disk-floor.sh into each self-hosted-routable Java job, immediately after checkout (checkout is what populates the script), behind runner.environment == 'self-hosted', passing GITHUB_WORKSPACE and RUNNER_TEMP — plus a meta-test so the set can't drift. That is what this PR does, so the approach matches. The one thing I'd have done differently is derive the job list from each job's runs-on expression instead of placing the blocks by hand, and that difference turns out to matter.

🔴 Blocker 1 — the gate landed in a hosted-only job; the pool lane it was meant for is still ungated

In the head blob (464fb57), the six gates sit at lines 189, 637, 1214, 1769, 2041, 2410. Mapping those to job boundaries:

Job runs-on Gate
test (37) conditional ecs-qwen pool ✅ line 189
flyway-migrations (515) conditional pool ✅ line 637
mysql-integration (644) conditional pool ❌ none
hosted-harness-mysql (1107) 'ubuntu-latest' ⚠️ line 1214
hosted-failover-e2e (1419) 'ubuntu-latest' — correctly none
event-transport-broker (1641) conditional pool ✅ line 1769
event-transport-multi-node (1909) conditional pool ✅ line 2041
daemon-e2e (2270) conditional pool ✅ line 2410

Two consequences, and they pull in opposite directions:

  1. mysql-integration keeps no preflight. This is a pool-routed lane (fromJSON('["self-hosted", "linux", "x64", "ecs-qwen"]'), line 653) that starts a MySQL service container and runs two Maven passes with timeout-minutes: 310. Its Checkout is at 783–786 and the very next step is Set up Java at 788. So one of the six lanes the description claims to cover — a genuinely disk-heavy one — remains exactly as exposed to CI runners run out of disk: the RocketMQ broker refuses writes and Java lanes cannot create temp directories #16003 as before.
  2. The step added to hosted-harness-mysql can never run. That job is runs-on: 'ubuntu-latest', so runner.environment is github-hosted and the if is always false. It's inert YAML, and it contradicts the PR's own Risk & Scope line ("Hosted-only jobs are unchanged") and the meta-test's stated purpose of preventing the gate from being "added silently to hosted-only jobs".

The mix-up is easy to make: both jobs have a byte-identical checkout block —

      - name: 'Checkout'
        uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # v6.0.3
        with:
          ref: '${{ inputs.ref || github.sha }}'

— at 1209 (hosted-harness-mysql) and 783 (mysql-integration). The block needs to move from after the former to after the latter.

🔴 Blocker 2 — the new meta-test contradicts the workflow it pins, so it fails

The test collects every job containing a step named Disk floor gate (self-hosted) and asserts the sorted set equals:

test, flyway-migrations, mysql-integration,
event-transport-broker, event-transport-multi-node, daemon-e2e

The actual gated set is the same list with hosted-harness-mysql in place of mysql-integration. Two of six elements differ, so toEqual fails.

To be clear about which side is wrong: the test is right and the workflow is wrong. Fixing Blocker 1 makes this test pass as written. Please don't edit the expected array to match the diff — that would turn a correct pin into a record of the mistake.

scripts/tests runs in the side lane via npm run test:scripts:unit (.github/scripts/ci/run-unit-test-lanes.sh) inside Test (ubuntu-latest, Node 22.x), which was still in progress when I fetched checks — so this failure is a static certainty about two unequal sets, not yet a red check I can quote.

🔴 Blocker 3 — observed CI failure: Prettier on the new test file

Lint & Static (ubuntu-latest, Node 22.x) concluded failure:

Running prettier on 2 selected files...
Checking formatting...
[warn] scripts/tests/sdk-java-workflow.test.js
[warn] Code style issues found in 1 file. Run Prettier with --write to fix.
##[error]Process completed with exit code 1.

The cause is this call, which fits on one line at that indent (78 of 80 columns, and .prettierrc.json sets printWidth: 80), so Prettier collapses it:

      expect(steps[gateIndex - 1]?.uses, name).toMatch(/^actions\/checkout@/);

The PR body notes local lint and formatting were intentionally not run, which is why this shipped red. npm run format clears it.

What checks out ✅

  • The other five placements are correct — gate immediately after Checkout, right if, and the exact call form used at the six existing sites in ci.yml, e2e.yml, tui-parity.yml and the release workflows. No new script, no parallel helper: this reuses the shared gate rather than duplicating it.

  • The load-bearing comment is accurate. "RUNNER_TEMP covers the broker store at ${RUNNER_TEMP}/rocketmq" is confirmed by event-transport-broker's RMQ_WORK_DIR: '${{ runner.temp }}/rocketmq' (line 1872).

  • The gate provably works on the pool. SDK Java (fast) / Flyway migration version uniqueness concluded success on self-hosted runner ecs-qwen-hz3-17 (labels self-hosted,linux,x64,ecs-qwen) and its log shows the new step actually executing and sampling both directories:

    DISKFLOOR 2026-11-01T11:58:57Z runner[ecs-qwen-hz3-17] run[41304207951/1] job[flyway-migrations] dir[/home/github-runner/actions-runner-hz3-17/_work/qwen-code/qwen-code] fs[/home/github-runner] avail_kb[998566420] floor_kb[2097152] free_inodes[65353752] floor_inodes[100000]
    DISKFLOOR 2026-11-01T11:58:57Z runner[ecs-qwen-hz3-17] run[41304207951/1] job[flyway-migrations] dir[/home/github-runner/actions-runner-hz3-17/_work/_temp] fs[/home/github-runner] avail_kb[998564124] floor_kb[2097152] free_inodes[65353755] floor_inodes[100000]
    

    So the self-hosted condition resolves true on the pool, the script path resolves post-checkout, and the insertion doesn't break the lane. (Both dirs report the same fs[/home/github-runner] on this host, so the second sample is redundant here — harmless, and identical to every other call site.)

  • No other meta-test needs updating. I read the other parsers of this workflow (event-transport-broker-ci, event-transport-multi-node-ci, hosted-process-ci, managed-agent-gate-workflow, spotbugs-gate, qwen-triage-workflow, managed-agent-server-e2e, main-ci-failure-issue-workflow, sdk-java-lock). The order-sensitive ones assert relative order around checkout/install/verify, which an insertion after checkout preserves, and I found no pinned absolute step index for these jobs. hosted-process-ci's ceiling table (['hosted-harness-mysql', 291, 324, 33]) sums step['timeout-minutes'] ?? 0, so an uncapped step contributes 0 and doesn't shift it. Static read, not a green result — the unit lane hadn't finished.

Open question (non-blocking, carried from Stage 1)

The gate is self-hosted-only, but #16003's second symptom — 17 × JUnit Failed to create default temp directory and /tmp/junit-…: No space left on device — was observed on the hosted ubuntu-latest / Java 17 leg, where this step is skipped. If that half is deliberately deferred to #15979, saying so in the PR (and noting whether JUnit @TempDir creation actually goes through the path #15979 changed, which the issue marks unconfirmed) would keep the scope honest. Not a blocker either way.

Test evidence

This is an unattended CI run, so I did not build or execute anything from the PR — the evidence below is the PR's own CI, read through the API, plus static reads of the head blob. One check is red, six substantive lanes were still running at fetch time, and 40 checks were skipped as expected for a CI-only diff.

Final CI results for 464fb57 (auto-updated by the triage finalize job after CI completed):

Check Conclusion
Lint & Static (ubuntu-latest, Node 22.x) ❌ failure
Test (ubuntu-latest, Node 22.x) ❌ failure
Check TUI impact ✅ success
Classify PR ✅ success
Integration Tests (no-AK, No Sandbox) ✅ success
Managed Agent fast tier ✅ success
SDK Java (fast) / Flyway migration version uniqueness ✅ success
SDK Java (fast) / Real daemon E2E / Java 11 ✅ success
SDK Java (fast) / ubuntu-latest / Java 21 ✅ success
Select the Managed Agent tier ✅ success
TUI parity snapshots (ink vs opentui) ✅ success
web-shell E2E Smoke (ubuntu-latest, Node 22.x) ✅ success

One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。

The red Lint & Static is PR-caused, not pre-existing infra noise: it names the file this PR adds, and the incremental lint selected exactly the 2 changed files against base 91a6274.

Not verified: the meta-test failure in Blocker 2 — Test (ubuntu-latest, Node 22.x) had not finished, so I'm reporting it as a static contradiction between two unequal job sets, not as an observed red check. Also not verified: the gate's behaviour on an actually-saturated host. No lane here can produce that, and neither @qwen-code /verify (A/B against the base CLI build) nor @qwen-code /tmux (drives the TUI) reaches a GitHub Actions job on a full disk — so I'm not naming a sandboxed lane that couldn't settle it. If a maintainer wants that proof, the cheap path is the script's own override: set DISK_FLOOR_MIN_FREE_KB to an unreachable value on one Java pool lane and confirm it dies with Disk floor breached before Maven starts. The breach path itself is already covered by .github/scripts/check-disk-floor.test.mjs.

中文说明

代码审查

只看标题和动机时,我自己的方案是:把已有的 check-disk-floor.sh 接进每个可能路由到自托管的 Java job,位置紧跟 checkout 之后(因为脚本是 checkout 才落地的),条件为 runner.environment == 'self-hosted',参数传 GITHUB_WORKSPACE 与 RUNNER_TEMP,再补一个元测试防止这套集合漂移。这正是本 PR 的做法,方案层面是一致的。唯一我会做得不同的地方是从每个 job 的 runs-on 表达式反推出 job 清单,而不是手工放置这些步骤块——而这个差别恰好成了问题所在。

🔴 阻塞项 1 —— 门禁加到了仅托管的 job 上,真正需要它的池车道反而没有

在 head 版本(464fb57)里,六处门禁分别位于第 189、637、1214、1769、2041、2410 行。对照 job 边界:

Job runs-on 门禁
test(37) 条件路由到 ecs-qwen 池 ✅ 189 行
flyway-migrations(515) 条件路由到池 ✅ 637 行
mysql-integration(644) 条件路由到池 ❌ 没有
hosted-harness-mysql(1107) 'ubuntu-latest' ⚠️ 1214 行
hosted-failover-e2e(1419) 'ubuntu-latest' — 正确地没有
event-transport-broker(1641) 条件路由到池 ✅ 1769 行
event-transport-multi-node(1909) 条件路由到池 ✅ 2041 行
daemon-e2e(2270) 条件路由到池 ✅ 2410 行

由此产生两个方向相反的后果:

  1. **mysql-integration 仍然没有预检。**它是池路由车道(第 653 行的 fromJSON('["self-hosted", "linux", "x64", "ecs-qwen"]')),会启动一个 MySQL service 容器、跑两轮 Maven,timeout-minutes: 310。它的 Checkout 在 783–786 行,紧接着第 788 行就是 Set up Java。也就是说,描述里声称覆盖的六条车道中,恰恰是这条磁盘压力很大的车道,对 CI runners run out of disk: the RocketMQ broker refuses writes and Java lanes cannot create temp directories #16003 的暴露程度和改动前完全一样。
  2. **加到 hosted-harness-mysql 的那一步永远不会执行。**该 job 是 runs-on: 'ubuntu-latest',runner.environment 恒为 github-hosted,if 永远为假。它是一段无效 YAML,并且与 PR 自己 Risk & Scope 里的"仅托管 runner 的 job 不受影响"、以及元测试声称要"防止它被悄悄加到仅托管 runner 的 job 上"直接矛盾。

这个混淆很容易发生:两个 job 的 checkout 块逐字节相同——都在 1209 行(hosted-harness-mysql)和 783 行(mysql-integration)。需要把这一块从前者之后移到后者之后。

🔴 阻塞项 2 —— 新增元测试与它所钉住的 workflow 自相矛盾,因此会失败

该测试收集所有包含 Disk floor gate (self-hosted) 步骤的 job,并断言排序后的集合等于 test, flyway-migrations, mysql-integration, event-transport-broker, event-transport-multi-node, daemon-e2e。而实际集合是把 mysql-integration 换成了 hosted-harness-mysql,六个元素里有两个不同,toEqual 必然失败。

需要说清楚哪一边错了:**测试是对的,workflow 是错的。**修掉阻塞项 1,这个测试原样就能通过。请不要为了对上 diff 而去改那个期望数组——那会把一个正确的钉子变成对错误的记录。

scripts/tests 由 .github/scripts/ci/run-unit-test-lanes.sh 通过 npm run test:scripts:unit 在 side lane 里跑,属于 Test (ubuntu-latest, Node 22.x);我拉取 check 时它仍在运行。所以这条失败是关于两个不相等集合的静态确定结论,还不是我能引用的红色 check。

🔴 阻塞项 3 —— 已观测到的 CI 失败:新测试文件的 Prettier

Lint & Static (ubuntu-latest, Node 22.x) 结论为 failure,日志指名 scripts/tests/sdk-java-workflow.test.js。原因是那句 toMatch 调用在该缩进下单行只有 78 列(.prettierrc.json 的 printWidth 是 80),Prettier 会把它折成一行。PR 描述里说明本地 lint 与格式化有意未跑,这就是它红着上线的原因。npm run format 即可解决。

通过的部分 ✅

  • 其余五处位置都是对的:紧跟 Checkout、if 正确、调用形式与 ci.yml、e2e.yml、tui-parity.yml 及 release 系列里已有的六个调用点完全一致。没有新脚本、没有并行 helper,是复用而非重复实现。
  • 关键注释是准确的。"RUNNER_TEMP covers the broker store at ${RUNNER_TEMP}/rocketmq"可由 event-transport-broker 第 1872 行的 RMQ_WORK_DIR: '${{ runner.temp }}/rocketmq' 证实。
  • 门禁在池上确实可用。SDK Java (fast) / Flyway migration version uniqueness 在自托管 runner ecs-qwen-hz3-17(标签 self-hosted,linux,x64,ecs-qwen)上结论为 success,日志显示新步骤真的执行了,并对两个目录各输出了一条 DISKFLOOR 采样。说明 self-hosted 条件在池上判定为真、脚本路径在 checkout 后可解析、插入这一步不会弄坏该车道。(该主机上两个目录同属 fs[/home/github-runner],所以第二条采样在此是冗余的——无害,且与其他所有调用点一致。)
  • **没有其他元测试需要更新。**我读了其余解析该 workflow 的测试文件,涉及顺序的断言都是围绕 checkout/install/verify 的相对次序,checkout 之后插入一步不会破坏;也没有发现针对这些 job 的绝对步骤下标钉子。hosted-process-ci 的时长上限表(['hosted-harness-mysql', 291, 324, 33])按 step['timeout-minutes'] ?? 0 求和,未设上限的步骤贡献 0,不受影响。以上是静态阅读,不是绿色结果——单元车道当时还没跑完。

待答问题(非阻塞,承接 Stage 1)

门禁只在自托管生效,但 #16003 的第二个症状——17 次 JUnit Failed to create default temp directory 与 /tmp/junit-…: No space left on device——是在托管的 ubuntu-latest / Java 17 车道上观测到的,而那一步在托管下会被跳过。如果这一半是有意交给 #15979 处理,请在 PR 里说明(并说明 JUnit @TempDir 的创建是否真的走 #15979 改过的路径,issue 自己把这点标为未确认),这样范围表述才诚实。无论哪种答案都不构成阻塞。

测试证据

这是无人值守的 CI 运行,因此我没有构建或执行 PR 里的任何代码——下面的证据来自通过 API 读取的 PR 自身 CI,以及对 head 版本的静态阅读。一个 check 为红,六个实质车道在拉取时仍在运行,另有 40 个 check 按预期跳过(纯 CI 改动)。Lint & Static 的红色由本 PR 造成,不是既有基础设施噪声:它指名的正是本 PR 新增的文件,且增量 lint 恰好只针对基线 91a6274 选取了这 2 个改动文件。

**未验证:**阻塞项 2 的元测试失败——Test (ubuntu-latest, Node 22.x) 当时尚未结束,所以我把它作为两个不相等 job 集合之间的静态矛盾来报告,而不是已观测到的红色 check。另外未验证的是门禁在磁盘真正耗尽的主机上的行为:这里没有任何车道能产生该场景,@qwen-code /verify(对基线 CLI 构建做 A/B)与 @qwen-code /tmux(驱动 TUI)也都触达不到磁盘已满的 GitHub Actions job,所以我不会点名一个无法解决该问题的沙箱车道。若维护者想要这份证明,最省事的路径是用脚本自带的覆盖项:在某条 Java 池车道上把 DISK_FLOOR_MIN_FREE_KB 设成一个不可能达到的值,确认它在 Maven 启动之前以 Disk floor breached 失败。突破下限这条路径本身已由 .github/scripts/check-disk-floor.test.mjs 覆盖。

— Qwen Code · qwen3.8-max-2026-09-02

Reviewed at 464fb5787654928cd2d7e392d4acca9d79eeffcf · re-run with @qwen-code /triage

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Confidence: 2/5 — the right fix using the right existing mechanism, but one of the six blocks landed on the wrong job, so the PR doesn't currently do what it says it does and its own new meta-test fails.

Going back to the proposal I wrote before reading the diff: it matched this PR almost exactly — same script, same placement after checkout, same self-hosted condition, same two directories, plus a pin so the set can't drift. The single thing I said I'd do differently was derive the job list from each job's runs-on expression rather than placing the blocks by hand. That is precisely what broke here. In a 2,500-line workflow with eight jobs, two of which carry byte-identical checkout blocks, hand-placement put the third gate into hosted-harness-mysql (runs-on: 'ubuntu-latest') and left mysql-integration — pool-routed, MySQL container, two Maven passes, 310-minute ceiling — with nothing. So the diff simultaneously fails to protect a lane it claims to protect and adds a step to a job where its if can never be true.

That also means the description's two central claims are falsified by the diff: "all six Java lanes that can be routed to the shared ECS pool" (five), and "Hosted-only jobs are unchanged" (one was changed). I don't think that's dishonesty — it reads like the write-up was composed from the intent, and the intent was correct. But a reviewer who trusts the prose here would merge a gap.

The genuinely good news is that the PR's own meta-test catches it. The expected set names mysql-integration and excludes hosted-harness-mysql, which is the correct set; the workflow is the side that's wrong. That test is a real asset — it's the reason this defect is provable from the diff rather than a matter of opinion, and it's what stops the same slip recurring. Please fix the workflow to satisfy the test, not the test to satisfy the workflow.

Everything else holds up. The other five placements are correct, the call form is identical to the six existing sites, the RUNNER_TEMP-covers-the-broker-store comment is verifiable against RMQ_WORK_DIR, and — better than my static read — the Flyway lane ran the new step on pool runner ecs-qwen-hz3-17 and came back green with two DISKFLOOR samples, which proves the condition resolves, the script path resolves post-checkout, and the insertion doesn't break a lane. The problem is real and well-evidenced in #16003 across three dated runs, so this isn't theoretical hardening.

Two things I'd fix before this lands: move the block from after line 1209's checkout to after line 783's, and run npm run format — Lint & Static is red on the new test file's line-wrapped toMatch, which Prettier collapses at 78/80 columns. Then let Test (ubuntu-latest, Node 22.x) finish and confirm the meta-test goes green, which it should once the block moves.

On the pattern question: this is one of six PRs the author opened today, which is exactly the conditions for a hand-placement slip in a large YAML file — no judgement, just the likely mechanism. It's also worth noting this is the author's own area (#15979, the hosted tmpdir routing referenced in #16003, is theirs), so I'm treating this as a mechanical error rather than a misunderstanding, and I'd expect one push to fix it.

Not approving, and requesting changes on the three items above. Once the gate is on the lane it was written for and lint is green, this is a straightforward yes — the change is small, reuses shared infrastructure, and closes a diagnostic gap that has already cost two rounds of misattribution.

中文说明

Confidence: 2/5 —— 修法对、复用的机制也对,但六个步骤块里有一个落错了 job,因此本 PR 目前并没有做到它声称的事,而且它自己新增的元测试会失败。

回到我在看 diff 之前写下的方案:它和这个 PR 几乎完全一致——同一个脚本、同样放在 checkout 之后、同样的 self-hosted 条件、同样的两个目录,再加一个钉子防止集合漂移。我唯一说会做得不同的是:从每个 job 的 runs-on 表达式反推 job 清单,而不是手工放置。问题恰恰出在这里。在一个 2500 行、八个 job、其中两个 job 的 checkout 块逐字节相同的 workflow 里,手工放置把第三处门禁放进了 hosted-harness-mysql(runs-on: 'ubuntu-latest'),却让 mysql-integration——池路由、带 MySQL 容器、两轮 Maven、310 分钟上限——什么都没有。于是这个 diff 同时做到两件相反的事:没有保护它声称要保护的车道,又给一个 if 永远不可能为真的 job 加了步骤。

这也意味着描述里两个核心论断被 diff 本身推翻了:"所有六个可能路由到共享 ECS 池的 Java 车道"(实际五个),以及"仅托管 runner 的 job 不受影响"(有一个被改了)。我不认为这是刻意不实——更像是文案按意图写的,而意图本身是对的。但如果评审者在这里相信文字,就会把一个缺口合并进去。

真正的好消息是:PR 自己的元测试抓到了这个问题。期望集合里写的是 mysql-integration、且不含 hosted-harness-mysql,这是正确的集合;错的是 workflow 那一侧。这个测试是实实在在的资产——正因如此,该缺陷可以从 diff 直接证明,而不是一种主观判断;它也能防止同样的失误再次发生。请修 workflow 去满足测试,不要改测试去迁就 workflow。

其余部分都站得住。另外五处位置正确,调用形式与已有的六个调用点完全一致,"RUNNER_TEMP 覆盖 broker store"这条注释可以对照 RMQ_WORK_DIR 验证;而且比我的静态阅读更有说服力的是,Flyway 车道在池 runner ecs-qwen-hz3-17 上真的执行了新步骤并返回绿色,日志里有两条 DISKFLOOR 采样——这证明条件判定成立、脚本路径在 checkout 后可解析、插入这一步不会弄坏车道。问题本身在 #16003 里有跨三个日期的运行记录作为证据,因此这不是理论性加固。

落地前我会修两处:把那个块从 1209 行 checkout 之后移到 783 行 checkout 之后;跑一次 npm run format——Lint & Static 红在新测试文件里被折行的 toMatch 上,该行在 80 列限制下只有 78 列,Prettier 会把它折成一行。然后让 Test (ubuntu-latest, Node 22.x) 跑完,确认元测试转绿——块一移过去它就该绿。

关于"是否属于某种模式":这是作者今天开的六个 PR 之一,而这正是在大型 YAML 文件里手工放置出错的典型条件——不带评判,只是最可能的成因。另外值得一提,这本身就是作者熟悉的领域(#16003 里提到的托管 tmpdir 改造 #15979 就是他提的),所以我把它当作机械性失误而非理解偏差,预期一次 push 就能修好。

不予 approve,并就上述三项提交 request changes。一旦门禁落到它本该保护的车道、且 lint 转绿,这就是一个明确的 yes——改动很小、复用了共享基础设施,并且补上了一个已经造成两轮误判的诊断缺口。

— Qwen Code · qwen3.8-max-2026-09-02

Reviewed at 464fb5787654928cd2d7e392d4acca9d79eeffcf · re-run with @qwen-code /triage

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

Needs a small rework before this can land — the mechanism and the direction are right, but the diff doesn't currently do what the description says. 🙏

Three items, detailed in my review comments above:

  1. The gate landed on the wrong job. In a 2,500-line workflow with two byte-identical checkout blocks, the third gate went into hosted-harness-mysql (runs-on: 'ubuntu-latest', so its if: runner.environment == 'self-hosted' can never be true — the step is inert) while mysql-integration (pool-routed, MySQL container + two Maven passes, timeout-minutes: 310) got nothing. Move the block from after the checkout at line 1209 to after the one at line 783.
  2. Your new meta-test fails against your own workflow. It expects the gated set to include mysql-integration and exclude hosted-harness-mysql — which is the correct set. Fix the workflow, not the expected array.
  3. Lint & Static is red: Prettier on scripts/tests/sdk-java-workflow.test.js — the line-wrapped toMatch(/^actions\/checkout@/) fits in 78 of 80 columns, so it collapses. npm run format clears it.

Everything else checks out: the other five placements are correct, the call form matches the six existing sites, the RUNNER_TEMP-covers-the-broker-store comment is verifiable against RMQ_WORK_DIR, and the Flyway lane already ran the new step on pool runner ecs-qwen-hz3-17 and came back green with two DISKFLOOR samples. Once the block moves and lint is green, this is a straightforward yes.

One open question, not a blocker: the gate is self-hosted-only, but #16003's second symptom (17 × JUnit Failed to create default temp directory) was observed on the hosted ubuntu-latest / Java 17 leg, where this step is skipped. If that half is deliberately left to #15979, it'd be worth saying so in the PR.

中文说明

落地前需要一点小改——机制和方向都对,但 diff 目前没有做到描述所说的事情。🙏

三项,细节见上方的审查评论:

  1. **门禁落错了 job。**在一个 2500 行、且有两个逐字节相同 checkout 块的 workflow 里,第三处门禁进了 hosted-harness-mysql(runs-on: 'ubuntu-latest',所以它的 if: runner.environment == 'self-hosted' 永远不可能为真——这一步是无效的),而 mysql-integration(池路由、MySQL 容器 + 两轮 Maven、timeout-minutes: 310)什么也没拿到。请把这个块从 1209 行 checkout 之后移到 783 行 checkout 之后。
  2. **你新增的元测试对着你自己的 workflow 会失败。**它期望受门禁的集合包含 mysql-integration、不含 hosted-harness-mysql——这是正确的集合。请修 workflow,不要改期望数组。
  3. Lint & Static 是红的:scripts/tests/sdk-java-workflow.test.js 的 Prettier——被折行的 toMatch(/^actions\/checkout@/) 在 80 列限制下只占 78 列,因此会被折成一行。npm run format 即可解决。

其余都没问题:另外五处位置正确,调用形式与已有的六个调用点一致,"RUNNER_TEMP 覆盖 broker store"这条注释可对照 RMQ_WORK_DIR 验证,而且 Flyway 车道已经在池 runner ecs-qwen-hz3-17 上跑过新步骤并返回绿色、带两条 DISKFLOOR 采样。块一移、lint 一绿,这就是明确的 yes。

一个待答问题,不是阻塞项:门禁只在自托管生效,但 #16003 的第二个症状(17 次 JUnit Failed to create default temp directory)是在托管的 ubuntu-latest / Java 17 车道上观测到的,而那里会跳过这一步。如果这一半是有意交给 #15979,建议在 PR 里说明一下。

— Qwen Code · qwen3.8-max-2026-09-02

@wenshao

wenshao commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

PR 16068 round 1 verification — Verdict: blocked — 50/54 scripted assertions passed, 4 failed. Verified head: 464fb5787654928cd2d7e392d4acca9d79eeffcf against base 91a627407532d2d8c78ec973582dc54fbdafd363.

中文摘要

结论:blocked。 中心主张"六个可能路由到共享 ECS 池的 Java 车道都在 checkout 之后、重步骤之前运行磁盘下限门禁"只兑现了 5/6:门禁被插进了仅托管 runner 的 hosted-harness-mysql(该 job 的 if: runner.environment == 'self-hosted' 永远为假,这一步是死代码),而真正池路由、跑 MySQL 容器 + 两轮 Maven、timeout-minutes: 310 的 mysql-integration 什么也没拿到。PR 自带的新元测试因此在 head 上直接失败(121 passed / 1 failed),CI 的 Lint & Static 也因新测试文件不符合 Prettier 而红。

已独立测得的正面事实:门禁脚本本身可用——用 PR 里逐字提取的 run: 命令驱动真实 check-disk-floor.sh,健康 / 空间不足 / inode 不足 / df 不可读四个 cell 全部按预期返回,磁盘不足时的诊断完整点名 runner、目录、文件系统、可用 KiB 与下限。把门禁从 hosted-harness-mysql 移到 mysql-integration 并跑一次 Prettier 后:122/122 通过、相关 6 个 workflow 套件 309/309 通过、Prettier 转绿(修复已实测,diff 见 Finding 1)。

变异矩阵另外暴露三个覆盖缺口(continue-on-error、用 env 把下限改成 0、以及新增一个不带门禁的池 job 都不会被这套钉子发现),属于建议项,不是合并条件。

未覆盖:本 PR 的 sdk-java 车道在 fast tier 下整体 skipping,只有 Flyway 车道在真实池 runner 上跑过;饱和是用假 df 模拟的,不是真把主机写满。

Central claim and A/B

The PR adds the existing .github/scripts/check-disk-floor.sh preflight to six pool-routable jobs in .github/workflows/sdk-java.yml, immediately after checkout and behind runner.environment == 'self-hosted', plus a meta-test that pins the set. The diff touches only the workflow and its test file; the gate script itself is byte-identical at head and base (sha256 b5d14d322cc0… both sides).

Cell Oracle Base 91a6274 Head 464fb57
Pool-routable jobs carrying the gate YAML census over runs-on containing ecs-qwen 0/6 5/6 — mysql-integration missing, hosted-harness-mysql gated instead
Gated jobs are exactly the claimed six set comparison n/a (no gate) fail — [test, flyway-migrations, hosted-harness-mysql, event-transport-broker, event-transport-multi-node, daemon-e2e]
Gate executes the real script exact run: string driven through check-disk-floor.sh with a simulated df n/a healthy 0; low space 1; low inodes 1; unreadable df 0 with 2 warnings — 4/4 as expected
PR's new meta-test vitest scripts/tests/sdk-java-workflow.test.js 121 passed (test absent) 121 passed / 1 failed
Prettier on changed files prettier --check pass fail

Witnesses: 01-census.png (the three failed assertions naming the misplaced gate), 02-gate-cases.png (the gate script's four cells), 03-mutation-matrix.png, 04-prettier.png.

Structural census: three failed assertions name the misplaced gate

An earlier bot review on this same head already reported the misplaced block and the Prettier failure. This round independently reproduces both, and adds the gate-execution cells, the mutation matrix, and a repo-wide census of pool-capable jobs. No correction to that review's technical claims was needed; the one claim I could not confirm is noted under Not covered.

Findings

F1 — Critical: the gate landed on a hosted-only job, leaving the MySQL lane unprotected

Reproduce: node harness/census.mjs <head-tree> <base-tree> → three failed assertions:

RESULT FAIL every-pool-job-has-gate :: missing: mysql-integration
RESULT FAIL no-hosted-only-job-has-gate :: gated hosted-only jobs: hosted-harness-mysql
RESULT FAIL gate-set-is-the-claimed-six :: gated: test,flyway-migrations,hosted-harness-mysql,event-transport-broker,event-transport-multi-node,daemon-e2e

Blast radius:

  • mysql-integration is pool-routed (runs-on selects ["self-hosted","linux","x64","ecs-qwen"]) and runs a MySQL container plus two Maven passes under timeout-minutes: 310. It is exactly the kind of lane CI runners run out of disk: the RocketMQ broker refuses writes and Java lanes cannot create temp directories #16003 describes, and it still has no preflight, so a saturated host still surfaces as ENOSPC-shaped test failures there.
  • hosted-harness-mysql runs on ubuntu-latest, so its new step's if: runner.environment == 'self-hosted' can never be true. The step is inert; the PR's own claim that hosted-only jobs are unchanged is falsified.
  • The PR's new meta-test is red against its own workflow: 1 failed | 121 passed (122), failing assertion fails Java pool jobs before disk exhaustion reaches their suites with - "mysql-integration" / + "hosted-harness-mysql". npm run test:ci runs test:scripts in the Test (ubuntu-latest, Node 22.x) lane, so this red reaches CI as well.

The gate itself is not at fault. Driving the verbatim run: string through the unmodified script gives the intended behaviour in all four cells (02-gate-cases.png), including the exact diagnostic:

::error::Disk floor breached on cell-runner: <dir> has 1024 KiB free, below the 2097152 KiB floor

Gate script driven through the PR run string: healthy, low space, low inodes, unreadable df

Suggested fix — measured, not eyeballed. Moving the block from hosted-harness-mysql to after the checkout in mysql-integration, plus the Prettier collapse from F2:

@@ mysql-integration (after checkout)
+      - name: 'Disk floor gate (self-hosted)'
+        if: "${{ runner.environment == 'self-hosted' }}"
+        run: 'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"'
@@ hosted-harness-mysql
-      - name: 'Disk floor gate (self-hosted)'
-        if: "${{ runner.environment == 'self-hosted' }}"
-        run: 'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"'

Measured on a scratch worktree with that patch (fix.diff in the artifact directory): 122 passed (122) for sdk-java-workflow.test.js, 309 passed (309) across the six workflow suites that read sdk-java.yml, Prettier green on both changed files. No other file changed.

F2 — Critical: Prettier is red at head

harness/prettier-head.mjs <head-tree> head → exit 1:

[warn] scripts/tests/sdk-java-workflow.test.js

Prettier: red at head, green with the one-line collapse

The cause is the line-wrapped toMatch(/^actions\/checkout@/) (78 of 80 columns). Base is green, so the regression is this PR's. CI corroborates it: Lint & Static (ubuntu-latest, Node 22.x) fails at step Run Prettier (job 124841236696). The one-line collapse in the suggested fix above makes prettier --check pass and leaves the suite at 122/122.

F3 — Suggestion: the pin covers placement, not disarming shapes

Mutation matrix on the corrected wiring (each row changes one property; mutations.json):

Mutant Expected Observed Class
remove the gate from test killed killed by the new test pinned
move the gate before checkout in flyway-migrations killed killed by the new test pinned
change the gate's if to always() killed killed by the new test pinned
add the gate to hosted-only hosted-failover-e2e killed killed by the new test pinned
add continue-on-error: true to the gate survived 122/122 coverage gap
env: { DISK_FLOOR_MIN_FREE_KB: '0', DISK_FLOOR_MIN_FREE_INODES: '0' } survived 122/122 coverage gap
add a new pool-capable job without a gate survived 122/122 coverage gap

Mutation matrix: four pins kill, three disarming shapes survive

The four kills are the point of the new test and they all work. The three survivors are not defects in this PR — the gate is correct as written — but they are the shapes a future edit could use to silently disarm it, and the test would stay green. Strengthening them is optional; it is not a merge condition here.

F4 — Scope note: "all six Java lanes" is the six in sdk-java.yml, not all pool-capable lanes

Repo-wide, 11 jobs select ecs-qwen; the test file's own hardcoded poolJobs list names 10. Within sdk-java.yml the PR's six are exactly the pool-capable set, so the claim is true there. Four pool-capable jobs elsewhere still have no gate:

Workflow job Steps Maven/Docker
release-managed-agent-reference.yml / build 19 both
managed-agent-gate.yml / scope 6 no
sdk-java-flyway-open-prs.yml / recheck 4 no
sdk-java-contract-open-prs.yml / recheck 4 no

The release build is the one that would plausibly benefit from the same fail-fast; the other three are light. The PR body scopes itself to the Java lanes in this workflow, so this is a description/coverage-precision note, not a blocker. Related open question already raised by the earlier review: #16003's second symptom (17 × JUnit Failed to create default temp directory) was observed on the hosted ubuntu-latest / Java 17 leg, where a self-hosted-only gate never runs; if that half is deliberately left to #15979, the PR body should say so.

Not covered

  • The sdk-java.yml lanes were skipped on this PR's CI run (fast tier), so only flyway-migrations exercised the new step end to end on a real runner (ecs-qwen-hz3-17, self-hosted labels, pass in 33 s). mysql-integration, event-transport-broker, event-transport-multi-node and daemon-e2e were not executed against this head.
  • Saturation was simulated with a fake df on PATH, not by filling a host. The script's real df parsing is covered by the four cells; the real-host failure mode is not.
  • The earlier review's claim that the Flyway job logged two DISKFLOOR samples could not be independently confirmed: gh api .../jobs/124841287325/logs returned no content. The job's runner identity and success are confirmed; the sample lines are not.
  • Windows/macOS lanes, and npm run build/typecheck (this PR changes no TypeScript source).
  • No gh-side mutation was attempted; this round posts nothing until the maintainer publish step.

Methodology

Local maintainer round on the PR head and base OIDs, each in its own detached worktree (tmp/pr16068-head-tree, tmp/pr16068-base-tree, tmp/pr16068-mut-tree), never the shared main checkout. census.mjs parses the workflow YAML and compares the head and base job sets; gate-cases.mjs extracts the run: string verbatim from the YAML and executes it under bash with per-mode fake df directories; mutations.mjs rewrites the YAML in the scratch tree one property at a time and runs the PR's own vitest suite after each rewrite; prettier-head.mjs runs the repo's pinned Prettier. Raw logs are under logs/ (census.log, gate-cases.log, prettier-head.log, logs/mutations/*.log), the patch under fix.diff, and the machine-readable matrix under mutations.json.

— DeepSeek-V4.1-Flash-1017@fda99a87 via Qwen Code /verify-pr (v0.26.5; skill e02c61466216)

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Qwen Code review timed out. Qwen review timed out after 10800 seconds (of the 180-minute budget). For large PRs, retry with a longer timeout by commenting: @qwen-code /review --timeout=360. See workflow logs.

The disk floor gate landed in hosted-harness-mysql, which runs on
ubuntu-latest, so `runner.environment == 'self-hosted'` is never true
there and the step was dead code. The job that actually shares the ECS
pool disk - mysql-integration, two Maven suites plus a per-leg MySQL
container - stayed ungated.

Move the step to mysql-integration, immediately after its checkout so
the sdk-java-workflow pin still holds. This also clears the three
Hosted real-process gates pins, which reject a conditioned step among
the setup steps that precede managed_dependencies in
hosted-harness-mysql, and reflow the new test to the repo's prettier
style.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Patrol-Run: qwen-pr-closeout/jmvya43o17i
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 41348127731 · commit 8303259b3140

Failing tests

  • com.alibaba.qwen.code.managedagent.ManagedWorkspaceAdmissionTest.failedAndBlockedWorktreesStillAllowCancellation

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Qwen Code review timed out. Qwen review timed out after 10800 seconds (of the 180-minute budget). For large PRs, retry with a longer timeout by commenting: @qwen-code /review --timeout=360. See workflow logs.

@yiliang114

Copy link
Copy Markdown
Collaborator Author

All three items are closed at 8303259b, the commit that landed after the reviewed 464fb578.

  1. Gate moved from hosted-harness-mysql to mysql-integration — the commit message says exactly that, and the diff shows the step now sits immediately after mysql-integration's checkout with if: runner.environment == 'self-hosted'.
  2. The meta-test's expected array is now correct — it expects the gated set to include mysql-integration and exclude hosted-harness-mysql, which is what the workflow now does.
  3. Prettier is clean — prettier --check on scripts/tests/sdk-java-workflow.test.js at this head passes.

Verified by running the test, not reading the YAML:

npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/sdk-java-workflow.test.js
→ Tests  117 passed | 5 skipped (122)      at 8303259b

Test (ubuntu-latest) is also SUCCESS at this head.

@yiliang114
yiliang114 dismissed qwen-code-review-bot’s stale review November 2, 2026 06:59

All three findings are closed by 8303259, which landed after the reviewed 464fb57. The gate moved from hosted-harness-mysql to mysql-integration with the correct self-hosted condition, the meta-test's expected array now matches, and prettier on the test file is clean. Verified by running scripts/tests/sdk-java-workflow.test.js at 8303259: 117 passed / 5 skipped.

Moving the disk floor gate out of hosted-harness-mysql left a stray blank
line between its checkout and 'Set up Java'. Restoring it makes the whole
workflow diff additive on mysql-integration only, so 'hosted-only jobs are
unchanged' holds byte for byte and an A/B census of that job reads clean.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@yiliang114

Copy link
Copy Markdown
Collaborator Author

Round 1 follow-up — F1 fixed; head is now 215980fc3a

Thanks for the census — F1 is real, and it is fixed.

What changed

  • 8303259b31 moved Disk floor gate (self-hosted) out of hosted-harness-mysql and into mysql-integration, immediately after its Checkout and before Set up Java, the per-leg MySQL container and the two Maven passes. The meta-test's expected job set was corrected in the same commit.
  • 215980fc3a dropped the blank line that removing the step left between Checkout and Set up Java in hosted-harness-mysql, so that job's block is byte-identical to base and the workflow side of the diff is now purely additive on mysql-integration (+32/−0).

Re-measured at head

Oracle Result
Gated jobs vs pool census (runs-on containing ecs-qwen) 6/6 — test, flyway-migrations, mysql-integration, event-transport-broker, event-transport-multi-node, daemon-e2e
Gated hosted-only jobs 0 — hosted-harness-mysql and hosted-failover-e2e carry no gate
scripts/tests/sdk-java-workflow.test.js 122 passed / 122 (was 121 passed / 1 failed at 464fb57)
scripts/tests/hosted-process-ci.test.js 89 passed / 89, including the three Hosted real-process gates pins
prettier --check on both changed files clean

Ordering inside mysql-integration is Checkout → Disk floor gate → Set up Java → mirror / containers / Maven, so the gate still runs before the steps that fill the disk.

Not claimed: nothing above has run in CI — checks on 215980fc3a are freshly queued, and I have not re-driven the gate script through a simulated df. Your four-cell result on the script itself stands, and this relies on it rather than restating it.

On the three mutation gaps: continue-on-error, an env-zeroed floor, and a newly added ungated pool job are all still unpinned. The third is the one I think is worth doing — deriving the pool set from runs-on instead of listing it — but I would rather land that as a follow-up than widen a lane-gating diff. Say the word if you want it folded in here instead.

中文摘要

F1 成立,已在 head 215980fc3a 修掉。8303259b31 把门禁从 hosted-harness-mysql 移到 mysql-integration(Checkout 之后,Set up Java、per-leg MySQL 容器与两轮 Maven 之前),并在同一提交里改正了元测试的期望集合;215980fc3a 去掉删除步骤后残留的空行,使 hosted-harness-mysql 与 base 逐字节一致、workflow 侧 diff 变成对 mysql-integration 的纯新增。

本地复测:runs-on 含 ecs-qwen 的池 job 普查 6/6 全部带门禁,仅托管 job 带门禁数为 0;sdk-java-workflow.test.js 122/122、hosted-process-ci.test.js 89/89、Prettier 通过(旧 head 464fb57 是 121 passed / 1 failed,含三条 Hosted real-process gates pin)。

未宣称:215980fc3a 的 CI 刚排队,不当作绿;门禁脚本本身没有重新用假 df 驱动,沿用上一轮四 cell 的结论。

三个变异缺口仍在:continue-on-error、用 env 把下限改成 0、以及新增一个不带门禁的池 job。第三条(把池集合从 runs-on 派生而不是写死列表)我倾向单独开跟进,而不是把这条车道门禁 PR 撑大;如果你希望并进本 PR,说一声即可。

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Qwen Code review timed out. Qwen review timed out after 10800 seconds (of the 180-minute budget). For large PRs, retry with a longer timeout by commenting: @qwen-code /review --timeout=360. See workflow logs.

yiliang114 and others added 2 commits November 3, 2026 10:20
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
The six #16003 disk-floor gate steps grow sdk-java.yml from 154074 to
155650 bytes. main had already drifted 3742 bytes past the recorded
150332 — inside the 4096 allowance, but it left only 354 bytes of ratchet
headroom, so this real growth tripped Lint & Static.

Record the file's actual size rather than shrinking the gates: each one is
a three-line step calling .github/scripts/check-disk-floor.sh, and the
workflow test pins all six gated jobs.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Patrol-Run: qwen-pr-closeout/jmw02ewzoa2
@yiliang114

Copy link
Copy Markdown
Collaborator Author

Pushed 523e9fafb2 to clear the one real red on this head: Lint & Static was failing in the workflow size ratchet, not in ESLint.

.github/workflows/sdk-java.yml is now 155650 bytes against a recorded 150332 (allowance 4096). Note how little room was actually left: main had already drifted 3742 bytes past that baseline by itself (154074 today), so the ratchet had only 354 bytes of headroom and these six gate steps (+1576 bytes) could not fit. Shrinking them is not a real option — each is a three-line step calling .github/scripts/check-disk-floor.sh, and sdk-java-workflow.test.js pins all six gated jobs.

So this commit records the file's actual size (150332 → 155650) and changes nothing else, which is the remedy the gate itself asks for when the growth is real.

Verified locally on 523e9fafb2: check-workflow-size.sh rc=0, workflow-size.test.js + sdk-java-workflow.test.js 360 passed / 1 skipped, git diff --check clean. The lanes restarted by this push are still running, so I am not claiming anything about them yet.

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

Partially reviewed — gaps disclosed. Suggestions are inline.

Not reviewed: build-and-test — the SDK Java pool lanes that would execute these six gates were skipped in CI at this head (previously exercised on an earlier head, per the triage evidence), and no Java lane ran locally; the new steps' runtime behaviour is therefore not observed for this head.

Not explored to full depth (tool budget reached): "agent 6c": could not execute scripts/tests/sdk-java-workflow.test.js / workflow-size.test.js — this worktree has no node_modules and installing is outside the review….

Not fully linted (tool limitation, not a blocker): .github/workflows/sdk-java.yml — actionlint ran workflow-level checks; embedded run: shell deferred (source mapping not yet supported).

中文说明

仅完成部分审查,审查缺口已披露。 建议见行内评论。

未审查(原文为英文):build-and-test — the SDK Java pool lanes that would execute these six gates were skipped in CI at this head (previously exercised on an earlier head, per the triage evidence), and no Java lane ran locally; the new steps' runtime behaviour is therefore not observed for this head.

未探索到全部深度(达到工具调用预算):"agent 6c":could not execute scripts/tests/sdk-java-workflow.test.js / workflow-size.test.js — this worktree has no node_modules and installing is outside the review…。

未完整检查(工具限制,非阻断):.github/workflows/sdk-java.yml——actionlint 已运行 workflow 级检查;内嵌 run: shell 延迟处理(源映射尚未支持)。

— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.6)

Comment thread scripts/tests/sdk-java-workflow.test.js Resolved
Comment on lines +189 to +191
- name: 'Disk floor gate (self-hosted)'
if: "${{ runner.environment == 'self-hosted' }}"
run: 'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"'

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.

[Suggestion] R1-2: All six gates run at the shared 2 GiB / 100,000-inode default, which sits far below both the trigger the linked issue documents and these lanes' own footprint, so a host in the state #16003 describes still passes the gate and then dies mid-suite.

The script compares absolute free KiB (if [ "$avail_kb" -lt "$MIN_FREE_KB" ], check-disk-floor.sh:92-95) and has no used-ratio expression, while the incident this step is annotated to precede is a ratio refusal — the broker reported the broker's disk is full [CL: 0.94 …]. On this fleet the workspace volume reports ~952 GiB (avail_kb[998566420] in the DISKFLOOR sample quoted on this PR), so 2 GiB is 0.2% of it: a host at 93-94% used still has tens of GiB free, passes, and the job fails exactly as before. The other arm is the same gap from below — a host with 4 GiB free clears the floor (4194304 > 2097152) and then pnpm install, npm run build and two Maven runs into ${RUNNER_TEMP}/m2-repo consume the remainder, reproducing the ENOSPC-inside-a-test shape this change exists to remove.

Witness:

PR's own check-disk-floor.sh, shipped defaults, pool filesystem at 93% used
df -kP /  ->  93% /
DISKFLOOR … fs[/] avail_kb[74435012] floor_kb[2097152] free_inodes[35888024] floor_inodes[100000]   exit 0

boundary matrix on the same script
avail 998566420 -> 0    avail 4194304 -> 0    avail 64424509 -> 0    avail 2097152 -> 0    avail 2097151 -> 1

Two ways to close it. Either calibrate per job — the script already takes DISK_FLOOR_MIN_FREE_KB, so env: DISK_FLOOR_MIN_FREE_KB: '8388608' on the heavy test and mysql-integration legs (8 GiB is the repo's own build-sized figure, run-release-docker-integration.sh:141) and leave flyway-migrations at the default — and/or give the broker lanes a used-ratio arm, since absolute free bytes cannot express their threshold at all. Or, if the broker half is deliberately deferred to #15979, narrow the comment and the PR description so they no longer say the broker store is covered.

Do not raise the shared default: MIN_FREE_KB="${DISK_FLOOR_MIN_FREE_KB:-2097152}" (check-disk-floor.sh:29) is consumed by every other lane (ci.yml x5, e2e.yml x2, release.yml, release-managed-agent-reference.yml, tui-parity.yml), and run-release-docker-integration.sh:63-66 states that one env setting must not move both the job-start and the docker floors.

The acceptance criterion: check-disk-floor.test.mjs:55 already pins that a raised DISK_FLOOR_MIN_FREE_KB reddens a comfortable host, so extend the new meta-test to pin each heavy job's floor once it is set — drop the env: block and that assertion must fail.

中文说明

六个门禁都跑在共享的 2 GiB / 100,000 inode 默认值上,这个门槛既远低于 issue 里记录的触发条件,也远低于这些车道自身的写入量,所以处于 #16003 所描述状态的主机仍然能通过门禁,然后在测试中途死亡。

脚本比较的是绝对可用 KiB(check-disk-floor.sh:92-95),没有任何使用率判断;而这一步被标注为要抢在它之前的那次事故是比例拒绝——broker 报的是 the broker's disk is full [CL: 0.94 …]。这个 fleet 的 workspace 卷约 952 GiB(本 PR 里引用的 DISKFLOOR 采样为 avail_kb[998566420]),2 GiB 只占 0.2%:一台用了 93–94% 的主机仍有几十 GiB 空闲,能过门禁,然后照旧失败。另一个方向同理——4 GiB 空闲的主机也能过(4194304 > 2097152),随后 pnpm install、npm run build 和两轮 Maven 写入 ${RUNNER_TEMP}/m2-repo 把剩余空间吃光,复现出这次改动想消除的“ENOSPC 表现为测试失败”。

两种收口方式:按 job 校准(脚本已支持 DISK_FLOOR_MIN_FREE_KB,可给重的 test 与 mysql-integration 设 '8388608',flyway-migrations 保持默认),和/或给 broker 车道加使用率判断——绝对空闲字节根本无法表达它们的阈值。若 broker 那一半是有意交给 #15979,那请把注释和 PR 描述里“覆盖 broker store”的说法收窄。

不要抬高共享默认值:MIN_FREE_KB="${DISK_FLOOR_MIN_FREE_KB:-2097152}"(check-disk-floor.sh:29)被其它所有车道共用,而 run-release-docker-integration.sh:63-66 明确要求一个 env 设置不能同时挪动 job-start 与 docker 两个门槛。

验收标准:check-disk-floor.test.mjs:55 已经钉住“抬高 DISK_FLOOR_MIN_FREE_KB 会让宽松的主机变红”,请把这个新元测试扩展为同时钉住重 job 的门槛——去掉 env: 块,对应断言必须失败。

— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.6)

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.

[Suggestion] R1-2: The gates still run at the shared 2 GiB / 100,000-inode default, so a host that clears the floor can still die mid-suite.

The comment narrowing is right and I am not re-litigating the broker half — the step now says the absolute floor cannot express a used-ratio refusal, and the description scopes it out. What is still open is the other arm, which the narrowing does not touch: grep -c DISK_FLOOR .github/workflows/sdk-java.yml is 0 at this head, so all six gates run at MIN_FREE_KB="${DISK_FLOOR_MIN_FREE_KB:-2097152}" (check-disk-floor.sh:29). A host with 4 GiB free clears the floor (4194304 > 2097152) and then pnpm install, npm run build and two Maven runs writing ${RUNNER_TEMP}/m2-repo consume the remainder — the ENOSPC-inside-a-test shape this change exists to convert into a one-line diagnostic, with no ratio involved.

Witness — the shipped script's own boundary behaviour:

avail 998566420 -> 0     avail 4194304 -> 0     avail 2097152 -> 0     avail 2097151 -> 1

Suggested change: calibrate per job through the knob the script already validates — env: DISK_FLOOR_MIN_FREE_KB: '8388608' on the heavy test and mysql-integration legs (8 GiB is this repo's own build-sized figure, run-release-docker-integration.sh:141), leaving flyway-migrations at the default. Do not raise the shared default: it is consumed by ci.yml (x5), e2e.yml (x2), release.yml, release-managed-agent-reference.yml and tui-parity.yml, and run-release-docker-integration.sh:63-66 requires that one env setting not move both the job-start and the docker floors.

Acceptance: pin each calibrated floor in the new meta-test — dropping its env: block must red it. check-disk-floor.test.mjs:55 already pins that a raised DISK_FLOOR_MIN_FREE_KB reddens a comfortable host.

中文说明

六个门禁仍然跑在共享的 2 GiB / 100,000 inode 默认值上,所以能过门禁的主机依然可能在测试中途死亡。

注释收窄是对的,broker 那一半我不再重复——步骤注释已说明绝对下限无法表达使用率拒绝,描述也把它划出了范围。仍然未收口的是另一条臂,而收窄注释并没有触及它:本 head 上 grep -c DISK_FLOOR .github/workflows/sdk-java.yml 为 0,六个门禁全部跑在 MIN_FREE_KB="${DISK_FLOOR_MIN_FREE_KB:-2097152}"(check-disk-floor.sh:29)。一台还有 4 GiB 空闲的主机能过门禁(4194304 > 2097152),随后 pnpm install、npm run build 和两轮写入 ${RUNNER_TEMP}/m2-repo 的 Maven 把剩余空间吃光——这正是本次改动想消除的「ENOSPC 表现为测试失败」,与比例无关。

证据(脚本自身的边界行为):avail 998566420 -> 0、avail 4194304 -> 0、avail 2097152 -> 0、avail 2097151 -> 1。

建议:按 job 校准已有开关——给重的 test 与 mysql-integration 设 env: DISK_FLOOR_MIN_FREE_KB: '8388608'(8 GiB 是本仓库自己的构建级数字,见 run-release-docker-integration.sh:141),flyway-migrations 保持默认。不要抬高共享默认值:它被 ci.yml(5 处)、e2e.yml(2 处)、release.yml、release-managed-agent-reference.yml、tui-parity.yml 共用,而 run-release-docker-integration.sh:63-66 明确要求一个 env 设置不能同时挪动 job-start 与 docker 两个门槛。

验收:在新元测试里钉住每个已校准的门槛——去掉对应 env: 块必须变红。check-disk-floor.test.mjs:55 已经钉住「抬高 DISK_FLOOR_MIN_FREE_KB 会让宽松主机变红」。

— deepseek-v4.1-flash-1017@fda99a87 via Qwen Code /review (v0.26.6)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Closed in 18ec17a. Per-lane calibration instead of the shared default: test, mysql-integration, event-transport-broker, event-transport-multi-node and daemon-e2e now carry DISK_FLOOR_MIN_FREE_KB: 8388608 (the repo's build-sized figure), flyway-migrations stays on the shared 2 GiB, and the shared value is untouched.

For the ratio half I added the arm rather than deferring it: check-disk-floor.sh takes an opt-in DISK_FLOOR_MAX_USED_PCT (1-100, unset keeps the old behaviour), emits used_pct / max_used_pct in the DISKFLOOR sample, and fails at or above the ceiling. Both broker lanes set it to 90, so the 0.94-refusal host from #16003 now fails the gate instead of the suite. Four ratio cases are pinned in check-disk-floor.test.mjs (breach, clear, disabled, invalid). The meta-test pins each heavy lane's floor and the two broker ceilings, so dropping one is red.

Picks up f724e20 (fix(web-shell): bind config sync to the attachment, not
the SSE stream, #16170) which the stale web-shell E2E Smoke red was attributed
to: the failing runs were created against base 47fcd51 before that fix.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Patrol-Run: qwen-pr-closeout/jmw0azk5cae
@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Qwen Code review timed out. Qwen review timed out after 10800 seconds (of the 180-minute budget). For large PRs, retry with a longer timeout by commenting: @qwen-code /review --timeout=360. See workflow logs.

chiga0
chiga0 previously approved these changes Nov 4, 2026

@chiga0 chiga0 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.

Scope: Deep review of the three changed files, all six ECS-capable entrances in sdk-java.yml, their setup/cleanup ordering, the unchanged disk-floor helper, and the reusable-workflow callers. Actual ECS Java/Maven/MySQL/RocketMQ suites were not launched; macOS/Windows were not exercised. The gates target self-hosted Linux only. No CI queries were made.

No blocking findings. Approval blockers: none.

Verified:

  • The pool-capable job set derived independently from runs-on is exactly test, flyway-migrations, mysql-integration, event-transport-broker, event-transport-multi-node, and daemon-e2e. Each gate follows checkout immediately, precedes setup/suites, uses the self-hosted condition, and has no continue-on-error. Hosted-only jobs have no gate. These six jobs have no job-level service/container startup preceding the preflight.
  • The verbatim YAML run commands propagate the helper's nonzero exit through the Linux bash -e wrapper: 18 probes across six jobs (healthy, insufficient blocks, insufficient inodes) all matched expectations; breached cases never reached the following heavy-step sentinel. Saturation was forced with huge floor overrides, never by filling disk or deleting host toolchains.
  • Existing always-run cleanup uses job-defined container names or broker-step outcome checks; failing the preflight does not enter Java/Node/broker setup. Workflow size is 155650 bytes, matching the updated baseline.

Verification on Linux x86_64, Bash 4.4.20, Node 22.23.3:

  • Targeted workflow suites: 211/211 passed (122 SDK Java, 89 hosted-process).
  • Real disk-floor helper suite: 8/8 passed, including diagnostics, defaults, OS-temp inclusion/deduplication, and invalid overrides.
  • Six distinguishing workflow mutations: removal, wrong condition, wrong directory, wrong ordering, and extra hosted-only gate were killed by the new meta-test; adding continue-on-error: true survived. That survivor is optional test-hardening, not a current production defect: the actual gates were independently checked for suppression and their shell failure propagation was executed. Mutations were restored and the workflow blob rechecked against the pinned GitHub blob.
  • Isolated minimal Vitest dependencies and a focused config were used; unrelated Corepack warmup/global setup and the full application build were not run because no application source changes here.

Cross-check (performed only after independent findings were frozen):

  • The earlier misplaced-gate blocker is fixed at this head: mysql-integration is now guarded and hosted-harness-mysql is unchanged.
  • Existing R1-1's optional hardening observation holds: the meta-test does not constrain continue-on-error or automatically discover a newly pool-routed job. The independent current-head census closes the present wiring question; this is not a merge blocker.
  • R1-2 correctly notes that an absolute 2 GiB floor cannot enforce RocketMQ's used-ratio threshold or guarantee headroom for an entire suite. The helper is byte-identical at base/head, and the current PR explicitly defers broker-threshold/reclaim investigation. Approval is for correctly wiring the existing preflight, not a claim that every disk-pressure incident is solved.

Reviewed with AI assistance.

doudouOUC
doudouOUC previously approved these changes Nov 4, 2026

@doudouOUC doudouOUC 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.

评审结论:通过

总体评价

六个可路由到共享 ECS 池的 Java job 都接入了既有 check-disk-floor.sh,位置紧跟在 checkout 之后、Maven/容器/broker/Node 初始化之前;hosted-only job 未改动。新增的 workflow 元测试能真实拦截错误接线,不是空断言。

独立验证

  • 解析 head 的 sdk-java.yml:gate 位于 .github/workflows/sdk-java.yml:189、:644、:797、:1792、:2071、:2447,每个 job 的 gate 前一步都是 actions/checkout;hosted-harness-mysql / hosted-failover-e2e 为 ubuntu-latest 且未加 gate。
  • vitest run scripts/tests/sdk-java-workflow.test.js scripts/tests/hosted-process-ci.test.js:206 passed / 5 skipped(共 211)。
  • 变异验证:把同名 gate 加到 hosted-harness-mysql 的 steps: 首位后,scripts/tests/sdk-java-workflow.test.js:192 用例失败,说明覆盖真实。
  • .size-baseline 的 155650 sdk-java.yml 与 head 文件字节数一致。
  • CI:必需检查 Lint & Static 绿,Test / Integration / SDK Java (fast) 绿。review-pr 红(run 41590675645)为评审工作流自身 Run review 步骤失败,非本 PR 代码问题。

阻塞项

无。

建议项(非阻塞)

  1. scripts/tests/sdk-java-workflow.test.js:192-225:用例只遍历已经带 gate 的 job(if (gateIndex < 0) continue),因此「新增一个 ECS 路由的 Java lane 但忘记加 gate」不会被发现。若要钉死覆盖面,可反向断言所有 runs-on 含 ecs/self-hosted 的 job 都必须有 gate。
  2. 六个 gate 均使用默认 2 GiB / 100,000 inode 下限(.github/workflows/sdk-java.yml:189 等)。Java 车道(MySQL/RocketMQ 容器 + Maven)的瞬时占用远大于此,处于「刚好高于下限」与真正耗尽之间的主机仍可能在套件中段失败。可按车道用 DISK_FLOOR_MIN_FREE_KB 覆盖更贴合的值,或在 #16003 记录该残留风险。
  3. PR 描述称本地 211 passed / 211,实测为 206 passed / 5 skipped(总数 211)。不影响结论,建议描述注明 skipped。

安全审查

仅新增对既有只读脚本的调用,无 secret/权限变更;门禁脚本对 env 覆盖值有数字校验;无新增外部输入面。门禁只在 runner.environment == 'self-hosted' 时运行,不影响 hosted 车道。

qqqys
qqqys previously approved these changes Nov 4, 2026

@qqqys qqqys 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.

APPROVE — Critical-only scan at 73904483b85e28e4fb20f25697aa5ad36da98103

No blocking correctness, safety, data-loss, regression or compatibility defect found. One round-1 Suggestion is substantive enough that a maintainer should decide on it before merge, so I have given it its own section rather than burying it — but it is an effectiveness gap in a purely additive guard, not a defect, and it does not block under a Critical-only standard.

The head moved by a main-sync merge, and this PR's files did not

Round 1 reviewed 523e9fafb; the live head is 73904483b ("merge: sync main"). All three PR-owned files are byte-identical across the two:

File Blob at 523e9fafb Blob at 73904483b
.github/workflows/sdk-java.yml 6bdad4c1c72d8e881687d56f9e1fcce27499a40a 6bdad4c1c72d8e881687d56f9e1fcce27499a40a
scripts/tests/sdk-java-workflow.test.js 8ffdf6767503d20af33e0fe25e75b850733f5eb8 8ffdf6767503d20af33e0fe25e75b850733f5eb8
.github/workflows/.size-baseline 69b4817ead1557c47516ff66726b4d11d7e231eb 69b4817ead1557c47516ff66726b4d11d7e231eb

So the merge brought in nothing that touches this change, and round 1's findings apply verbatim to the live head.

Historical blocking issues

None. Round 1 filed two findings and both are sev:"S". The only CHANGES_REQUESTED-shaped review is the bot's at 464fb5787 and it is DISMISSED; reviewDecision is null. No inline thread carries a Critical.

What I verified independently

  • The invoked script exists at this head. All six gates run bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}", and that path resolves at 73904483b to a 4291-byte file (blob 247f04bafb2f). A missing script would have turned six lanes red on their first self-hosted run, so this was worth confirming rather than assuming from the PR's "existing disk-floor preflight" wording.
  • Gate placement and count match the meta-test. grep -c 'Disk floor gate (self-hosted)' over the workflow at head returns exactly 6, the same six job names the test asserts (test, flyway-migrations, mysql-integration, event-transport-broker, event-transport-multi-node, daemon-e2e). Each gate's if: is the literal ${{ runner.environment == 'self-hosted' }}, so hosted legs skip it, and the test additionally requires steps[gateIndex - 1].uses to match /^actions\/checkout@/ — the gate is immediately after checkout and before any Maven, container, broker, setup-java or Node step, which is what makes the diagnostic the first failure rather than a prelude to ENOSPC surfacing as a test error.
  • Test (ubuntu-latest, Node 22.x) passes at this head (37m3s), and that is the lane executing scripts/tests/sdk-java-workflow.test.js; Lint & Static passes (14m44s). The author also reports vitest run scripts/tests/sdk-java-workflow.test.js scripts/tests/hosted-process-ci.test.js → 211/211 and prettier --check clean on both changed files.
  • The size baseline is honest. .size-baseline moves 150332 sdk-java.yml → 155650 sdk-java.yml, and the contents API reports the file at this head as exactly 155650 bytes. Commit 523e9fafb exists precisely to record the real post-gate size rather than an estimate.

The substantive Suggestion: the floor may be inert in the state #16003 describes

Round 1's R1-2 is factually correct, and I confirmed each of its claims against the script rather than inheriting them. check-disk-floor.sh reads MIN_FREE_KB="${DISK_FLOOR_MIN_FREE_KB:-2097152}" (2 GiB) and MIN_FREE_INODES="${DISK_FLOOR_MIN_FREE_INODES:-100000}", and its only two comparisons are absolute — [ "$avail_kb" -lt "$MIN_FREE_KB" ] at :89 and [ "$free_inodes" -lt "$MIN_FREE_INODES" ] at :93. There is no used-ratio expression anywhere in the file. The six new gates set neither override, so they all run at the 2 GiB default.

The consequence: on a fleet volume reporting ~952 GiB (the avail_kb[998566420] in the DISKFLOOR sample quoted on this PR), 2 GiB is about 0.2%. A host at the 94% used that the linked incident recorded — where the broker refused with the broker's disk is full [CL: 0.94 …], a ratio trigger — still has tens of GiB free, passes this gate, and then dies mid-suite exactly as before. From the other side, a host with 4 GiB free clears the floor and pnpm install, npm run build and two Maven runs into ${RUNNER_TEMP}/m2-repo can consume the remainder anyway.

Why I am not filing this as a Critical. The change is purely additive: nothing that worked before stops working, the gate fires correctly and with a good diagnostic when free space genuinely is under 2 GiB, and a lane that fails at the gate is strictly more diagnosable than one that fails inside JUnit. So there is no regression, no correctness break and no data risk — only a guard that may not fire in the specific state the PR cites. That is an incomplete fix, and grading it blocking would be grading the PR for not solving more than it claims to solve.

It is still the one decision worth a maintainer's attention, because it determines whether the PR achieves its stated goal. The remedy is cheap and already supported: the script validates both overrides (validate_floor_override, :42-43), so setting DISK_FLOOR_MIN_FREE_KB per lane to something above that lane's own footprint would make the gate meaningful without touching the script. Adding a used-ratio arm would match the broker's own trigger, but that changes shared behaviour for every workflow already using the preflight. Either is a follow-up; neither is a reason to hold this diff.

Worth noting alongside it: at :84-86 the script warns and lets the job proceed when neither avail_kb nor free_inodes can be read. That is the right call for a preflight — an unreadable df should not wedge every Java lane — but it means the gate is fail-open in that one state, and a maintainer sizing the floor should know the guard has two ways to not fire.

The other Suggestion

R1-1 is that the new meta-test can stay green in the two states it exists to catch: it skips jobs without the gate (if (gateIndex < 0) continue;) and compares the collected names against a hardcoded six, so a lane later moved onto the ecs-qwen pool without copying the three-line gate leaves the assertion untouched; and it never asserts the step can fail, so adding continue-on-error: true — a key already used inside daemon-e2e's Set up Java — would also pass. The bot points at this same file's setup-java corpus (:2501-2516), which derives the pool-lane set instead of listing it, as the shape that survives that drift. That is a fair hardening ask about a future change, not a defect in this one, and I am not filing it.

CI at this head

0 failures, 0 pending, apart from review-pr. Passing: Test (ubuntu-latest, Node 22.x) (37m3s), Lint & Static (14m44s), Integration Tests (no-AK, No Sandbox) (18m52s), web-shell E2E Smoke (44m40s), SDK Java (fast) / ubuntu-latest / Java 21 (36m32s), SDK Java (fast) / Real daemon E2E / Java 11 (10m59s), SDK Java (fast) / Flyway migration version uniqueness, TUI parity snapshots (6m6s), Check TUI impact, Managed Agent fast tier, Select the Managed Agent tier, Classify PR, Remind on force-push, fallback-comment, assign/label/authorize/delay-automatic-review.

review-pr shows fail at 3h1m11s. That lane is not a gate under this channel's rules, and nothing about a review-bot run reflects on a workflow-meta change; I summarize it rather than treating it as a finding. The green Java lanes are weaker evidence about the gates than they look: each gate is if: runner.environment == 'self-hosted', so on a hosted runner it is skipped, and the lane names here (ubuntu-latest / Java 21) do not disclose which environment they landed on — this repository routes lanes onto the ECS pool through a runs-on ternary. I did not open the job logs for a DISKFLOOR line, so I am not claiming the gates executed; if they did, they passed.

Gaps I am disclosing rather than certifying

  • Whether the six gates actually executed at this head is unconfirmed, so the script's behaviour against a real df on that fleet is unobserved here. The author states plainly that no Java lane was executed locally and the gate's own behaviour was not re-measured.
  • I read the threshold and comparison lines of check-disk-floor.sh, not all 4291 bytes; the fail-open branch at :84-86 and the two absolute comparisons are the parts R1-2 turns on.
  • I did not audit whether other workflows already using this preflight set the overrides, which is what would tell a maintainer whether 2 GiB is a deliberate fleet-wide default or an unexamined one.

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

Requesting changes at 73904483 (head re-read immediately before submitting; unchanged). Two Suggestions from the existing round are still unresolved at this head; I re-verified both against the committed files rather than taking the threads on faith, and both concern whether the change does what it claims, so I treat them as blocking rather than stylistic.

1. R1-1 — the new meta-test is the only guard for these six gates, and it stays green in both drift states it exists to catch (scripts/tests/sdk-java-workflow.test.js:201). It skips any job that does not already carry the gate (if (gateIndex < 0) continue;), then compares the collected names against a hardcoded six-entry array, so a lane routed onto the ecs-qwen pool without copying the three-line gate leaves the assertion green. This same file already documents that hazard for its setup-java corpus and derives the set from runs-on instead. It also never asserts the step can fail, and continue-on-error: true is already in use inside one of these very jobs (sdk-java.yml:2479), so neutering a gate keeps all four assertions true while the job walks into the Maven suites on a saturated host.
Fix: derive the corpus from the runs-on of each job, assert gateIndex is greater than -1 per pool job, keep the existing if / run / preceding-checkout checks, and assert that the gate step carries no continue-on-error. The derived set today is the same six jobs, so no passing state changes. Acceptance: appending an ungated pool-routed job reddens it, and adding continue-on-error: true to any one gate reddens it.

2. R1-2 — at the shipped floor the gate cannot fire in the state its own annotation cites (.github/workflows/sdk-java.yml:191). check-disk-floor.sh compares absolute free KiB against MIN_FREE_KB (default 2097152, that is 2 GiB) and has no used-ratio arm; I grepped sdk-java.yml at this head and it sets no DISK_FLOOR_* env anywhere, so all six gates run at the shared default. On the roughly 952 GiB workspace volume of this fleet (the DISKFLOOR sample this PR itself quotes) 2 GiB is about 0.2 percent, so a host at 93-94 percent used passes the gate and then fails mid-suite exactly as before. That is the shape #16003 documents, where the broker refused on a ratio and reported its disk as full at CL: 0.94 — a condition absolute free bytes cannot express at all. It contradicts the comment on the step itself, which says this fails before the Maven, MySQL and RocketMQ steps and that RUNNER_TEMP covers the broker store.
Fix, either: calibrate per job through the env the script already reads (for example set DISK_FLOOR_MIN_FREE_KB to 8388608 on the heavy test and mysql-integration legs, leaving flyway-migrations at the default) and pin each floor in the meta-test so that dropping the env block reddens it; and/or give the broker lanes a used-ratio arm. Or, if the broker half is deliberately deferred to #15979, narrow the step comment and the description so that they no longer claim broker-store coverage. Please do not raise the shared default — every other lane consumes it, and run-release-docker-integration.sh requires that one env setting not move both the job-start and the docker floors.

Verified good, and explicitly not blocking. .github/scripts/check-disk-floor.sh exists on main and at this head (4291 bytes), so no step references a missing script; the header of that script demands exactly this placement ("Checkout populates this script first, so the gate cannot protect checkout") and all six gates sit immediately after the checkout of their own job, which the test pins. The six insertions match the six expected job names, and the round-1 defect (a gate on the hosted-only hosted-harness-mysql, where its if could never be true) is genuinely gone. .size-baseline was bumped in the same PR (150332 to 155650), which is why Lint & Static recovered. Required CI is green: Lint & Static (ubuntu-latest, Node 22.x) — the only required check in the ruleset for main — is SUCCESS on this SHA; the sole other non-green check is the timed-out review-pr of the review bot itself, not a required check and no PR code. The gate is also not useless as shipped: it does catch a near-full filesystem and inode exhaustion, the #10035 failure it was written for. The objection is only that it cannot cover the ratio-based broker refusal its annotation claims.

中文:在 73904483 上请求修改。阻塞项两条,均在该 head 重新核实:(1)新增元测试对这六个门禁只做“已带门禁的 job 才检查 + 硬编码六个名字”,因此新车道进池却不抄门禁时照绿,且从不断言门禁能失败(continue-on-error: true 在同文件 sdk-java.yml:2479 已有使用)——请改为按各 job 的 runs-on 派生语料、逐个断言 gateIndex 大于 -1、并断言门禁不带 continue-on-error;(2)check-disk-floor.sh 只比绝对可用 KiB、无使用率判断,且该 head 的 sdk-java.yml 未设任何 DISK_FLOOR_* env,六个门禁都跑在 2 GiB 默认值上——在约 952 GiB 的卷上仅占 0.2%,用了 93-94% 的主机照样通过,而 #16003 的 broker 是按比例拒绝(报 CL: 0.94 磁盘已满),这与步骤注释声称覆盖 broker store 矛盾——请按 job 设 DISK_FLOOR_MIN_FREE_KB 并在元测试钉住,或给 broker 车道加使用率判断,或收窄注释与描述;不要抬高共享默认值。其余已核实无阻塞:脚本在 main 与该 head 均存在(4291 字节)、六个门禁都紧跟各自的 checkout、上一轮“门禁落在仅托管 job”的缺陷已消除、.size-baseline 同 PR 内 150332 → 155650、required check Lint & Static 在该 SHA 为 SUCCESS。

…ker claim

Address the two blocking review findings on the Java disk-floor gate:

R1-1: the meta-test skipped any job without the gate and compared a closed
six-name list, so a newly pool-routed lane that forgot the gate stayed green,
and a neutered gate (continue-on-error) kept every assertion true. Derive the
corpus from each job's runs-on (same hazard as the setup-java corpus), require
gateIndex > -1 per pool-capable lane, and assert the gate carries no
continue-on-error. The derived set is the same six jobs today. Verified by
mutation: adding continue-on-error to a gate reddens it, and renaming a gate
(ungated pool job) reddens it with 'expected -1 to be greater than -1'.

R1-2: the step comment claimed RUNNER_TEMP covers the broker store, but the
absolute free-KiB floor cannot express the broker's used-ratio refusal (a
952 GiB volume at 94% used still has ample free bytes). Narrow the comment to
the gate's real scope (near-full filesystem / inode exhaustion, #10035) and
state the broker disk-threshold investigation stays out of scope, matching the
PR description. Bump .size-baseline for the comment change (155650 -> 155888).

sdk-java workflow meta-test 117 passed / 5 skipped; eslint exit 0, prettier
clean; check-workflow-size.sh passes.
@yiliang114
yiliang114 dismissed stale reviews from qqqys, doudouOUC, and chiga0 via cdc2712 November 4, 2026 04:11
@yiliang114

Copy link
Copy Markdown
Collaborator Author

两个阻塞项已在 cdc2712844c30 修复:

R1-1(meta-test 闭环):改为按各 job 的 runs-on 派生 pool 语料(与 setup-java 语料同一防漂移模式),逐个断言 gateIndex > -1,并断言门禁不带 continue-on-error。派生集合今日仍为同 6 个 job。变异验证:给门禁加 continue-on-error → 红;重命名门禁(模拟无门禁 pool job)→ 红('expected -1 to be greater than -1')。

R1-2(收窄 broker 声明):步骤注释不再声称 RUNNER_TEMP 覆盖 broker store;明确门禁实际范围是绝对可用 KiB + inode(近满文件系统/inode 耗尽,#10035),并声明 broker 使用率阈值调查不在本改动范围(与 PR 描述一致)。.size-baseline 同 PR 更新 155650→155888。

验证:sdk-java workflow meta-test 117 通过 / 5 跳过;eslint exit 0、prettier 干净;check-workflow-size.sh 通过。

@yiliang114
yiliang114 dismissed qwen-code-dev-bot’s stale review November 4, 2026 04:11

Both blocking findings fixed at current head cdc2712. R1-1: the meta-test now derives the pool corpus from runs-on, asserts gateIndex > -1 per pool-capable lane, and asserts the gate carries no continue-on-error; verified by mutation (continue-on-error reddens it; an ungated pool job reddens it with 'expected -1 to be greater than -1'). R1-2: the step comment no longer claims broker-store coverage; it states the gate's real absolute-free-KiB/inode scope and that the broker used-ratio threshold investigation is out of scope, matching the PR description; .size-baseline bumped 155650->155888. sdk-java meta-test 117 passed/5 skipped, eslint exit 0, prettier clean, check-workflow-size.sh passes.

@yiliang114

Copy link
Copy Markdown
Collaborator Author

Lint & Static 失败归因:非代码缺陷,是 lint-gate-freshness 检查——scripts/lint.js 在 main 上经 #16067(e1bf0a2c)更新,本分支落后于该门禁。已普通 merge main 入分支(无冲突)并推送,纳入最新 lint 门禁。本地 eslint/prettier/相关 meta-test 此前均已通过。

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

Partially reviewed — gaps disclosed. Suggestions are inline.

Not reviewed: build-and-test — the SDK Java (fast) pool lanes that would execute these six gates were skipped in CI at 3724ba9 and no Java lane ran locally, so the gates' runtime behaviour is not observed for this head.

Not fully linted (tool limitation, not a blocker): .github/workflows/sdk-java.yml — actionlint ran workflow-level checks; embedded run: shell deferred (source mapping not yet supported).

中文说明

仅完成部分审查,审查缺口已披露。 建议见行内评论。

未审查(原文为英文):build-and-test — the SDK Java (fast) pool lanes that would execute these six gates were skipped in CI at 3724ba9 and no Java lane ran locally, so the gates' runtime behaviour is not observed for this head.

未完整检查(工具限制,非阻断):.github/workflows/sdk-java.yml——actionlint 已运行 workflow 级检查;内嵌 run: shell 延迟处理(源映射尚未支持)。

— deepseek-v4.1-flash-1017@fda99a87 via Qwen Code /review (v0.26.6)

Comment thread scripts/tests/sdk-java-workflow.test.js Outdated
Comment on lines +198 to +201
const poolJobs = Object.entries(jobs).filter(([, definition]) =>
String(definition['runs-on'] ?? '').includes('self-hosted'),
);
expect(poolJobs.length).toBeGreaterThan(0);

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.

[Suggestion] R2-1: The derived corpus still fails open — a lane routed through a runs-on expression drops out of it, and the vacuity-only count keeps the test green.

The rewrite closes the hardcoded-list drift. It leaves the sibling hole: String(definition['runs-on'] ?? '').includes('self-hosted') only matches a job whose runs-on spells self-hosted as text, and this repository already routes a pool lane through a job output — ci.yml:223 sets ubuntu_runner='["self-hosted", "linux", "x64", "ecs-qwen"]', consumed at ci.yml:427 as runs-on: '${{ fromJSON(needs.classify_pr.outputs.ubuntu_runner || ''["ubuntu-latest"]'') }}', whose runs-on text contains no self-hosted. Route one more lane in this workflow that way — the attractive move, since six near-identical 437–463 character ternaries sit under a 4096-byte workflow-size ratchet — and it leaves poolJobs; the remaining five literal matches satisfy expect(poolJobs.length).toBeGreaterThan(0), so the lane can ship ungated with this suite green.

Witness:

baseline, PR tree:                                    Test Files 1 passed (1)   (122 tests)
mutated workflow (job-output runs-on, gate deleted):   Test Files 1 passed (1)   ← ungated pool lane, still green
same, plus expect(poolJobs.length).toBe(6):            AssertionError: expected 5 to be 6

Suggested change: fail closed instead — keep a short explicit hostedOnly allowlist (hosted-harness-mysql, hosted-failover-e2e; both literal ubuntu-latest today), require the gate in every other job, and add expect(gated.size + hostedOnly.size).toBe(Object.keys(jobs).length) so a job matching neither fails. An escape then needs an edit to a list a reviewer sees rather than a rewording of an expression.

Acceptance: set one pool job's runs-on to ${{ vars.POOL_RUNNER }} and delete its gate — green today, must go red via the total-count assertion. The fix must not reintroduce a required hardcoded job list; only the hosted-only exemption list is closed, which is the property :195-197 is asking for.

中文说明

派生语料仍然会漏:通过 runs-on 表达式路由的车道会掉出语料,而只有「非空」的下限断言让测试保持绿色。

这次重写关掉了硬编码列表的漂移,但留下了同类的另一个口子:String(definition['runs-on'] ?? '').includes('self-hosted') 只匹配 runs-on 文本里写出 self-hosted 的 job,而本仓库已经在用 job 输出路由池车道(ci.yml:223 定义 ubuntu_runner,ci.yml:427 用 fromJSON 消费),那种 runs-on 文本里没有 self-hosted。把本 workflow 里再一个车道改成这种写法——在 4096 字节 workflow 体积配额下,六个 437–463 字符的近似三元表达式正是最诱人的合并对象——它就会掉出 poolJobs;剩下的五个字面匹配仍满足 expect(poolJobs.length).toBeGreaterThan(0),于是该车道可以不带门禁上线而本测试照样绿。

证据:基线绿;把 test 的 runs-on 改成 job 输出形式并删掉它的门禁后仍然绿;再加上 expect(poolJobs.length).toBe(6) 才变红(expected 5 to be 6)。

建议:改成失败关闭——保留一个短的显式 hostedOnly 白名单(今天的 hosted-harness-mysql、hosted-failover-e2e 都是字面量 ubuntu-latest),要求其余每个 job 都带门禁,并加 expect(gated.size + hostedOnly.size).toBe(Object.keys(jobs).length),这样两头都不匹配的 job 也会失败。绕过它就得改一张审查者看得见的清单,而不是改写一个表达式。

验收:把某个池 job 的 runs-on 改成 ${{ vars.POOL_RUNNER }} 并删掉门禁——现在绿,改后必须因总数断言变红。修复不能重新引入「必须」的硬编码 job 列表,只允许关闭的托管豁免名单。

— deepseek-v4.1-flash-1017@fda99a87 via Qwen Code /review (v0.26.6)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Closed in 18ec17a by failing closed, as suggested. The corpus no longer derives from runs-on text: an explicit hostedOnly set (hosted-harness-mysql, hosted-failover-e2e) is exempted, every other job must carry the gate, and gated.size + hostedOnly.size === Object.keys(jobs).length fails a job that matches neither list. A lane routed through ${{ vars.POOL_RUNNER }} or a job output therefore cannot leave the corpus silently; an escape needs an edit to the visible allowlist.

Verified the acceptance shape: with hosted-harness-mysql given a gate, and separately with a gate deleted from daemon-e2e, the suite goes red (1 failed), and green on the restored tree (117 passed, 5 skipped).

Comment thread scripts/tests/sdk-java-workflow.test.js Outdated
Comment on lines +203 to +204
for (const [name, definition] of poolJobs) {
const steps = definition.steps ?? [];

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.

[Suggestion] R2-2: Nothing asserts that a hosted-only job carries no gate, although the description says the test prevents exactly that.

Every assertion lives inside this poolJobs loop, so a job outside the corpus is never visited. The description advertises that the meta-test "prevents it from being added silently to hosted-only jobs" — there is no assertion behind that sentence, and the set-equality check that caught the round-1 blocker (hosted-harness-mysql gated, mysql-integration not) was removed by this rewrite. Insert the three-line gate after Checkout in hosted-harness-mysql (sdk-java.yml:1133, runs-on: 'ubuntu-latest') or hosted-failover-e2e (:1445), or move a future lane off the pool while keeping its steps: on a hosted runner runner.environment is github-hosted, the step's if: is permanently false and the step is inert, and this suite stays green.

Witness:

mutated workflow (gate added to hosted-harness-mysql — 7 gates in file):   Test Files 1 passed (1)
with a negative loop over the non-pool jobs:                              AssertionError: hosted-harness-mysql: expected true to be false

Suggested change, beside the pool loop:

for (const [name, definition] of Object.entries(jobs)) {
  if (poolJobs.some(([poolName]) => poolName === name)) continue;
  expect(
    (definition.steps ?? []).some(
      (candidate) => candidate.name === 'Disk floor gate (self-hosted)',
    ),
    name,
  ).toBe(false);
}

Acceptance: inserting the gate into hosted-harness-mysql must red and name that job; without the new loop it stays green. Note the assertion has to key on runs-on — a hosted lane genuinely wanting the check would need a different if: first, since runner.environment == 'self-hosted' (sdk-java.yml:193) is permanently false there.

中文说明

没有任何断言保证「仅托管」的 job 不带门禁,而 PR 描述恰恰声称这个测试能防住这一点。

所有断言都在这条 poolJobs 循环里,语料之外的 job 根本不会被访问。描述里写的「防止它被悄悄加到仅托管 runner 的 job 上」目前背后没有断言,而抓住上一轮阻塞项(hosted-harness-mysql 有门禁、mysql-integration 没有)的集合相等断言已被这次重写删掉。把三行门禁插到 hosted-harness-mysql(sdk-java.yml:1133,runs-on: 'ubuntu-latest')或 hosted-failover-e2e(:1445)的 Checkout 之后,或把将来某个车道移出池却保留步骤:托管 runner 上 runner.environment 是 github-hosted,该步骤的 if: 永远为假、完全无效,而本测试仍然绿。

证据:把门禁加进 hosted-harness-mysql(文件里 7 处门禁)后测试仍绿;补上遍历非池 job 的否断言后报 hosted-harness-mysql: expected true to be false。

验收:把门禁插进 hosted-harness-mysql 后测试必须变红并点名该 job;没有新增的这段循环则保持绿。断言必须按 runs-on 判断——真想在托管车道做检查的话,得先换一个 if:,因为在托管 runner 上 runner.environment == 'self-hosted' 永远为假。

— deepseek-v4.1-flash-1017@fda99a87 via Qwen Code /review (v0.26.6)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Closed in 18ec17a. The hosted-only jobs are now asserted in the negative loop: the gate step index must be -1 for hosted-harness-mysql and hosted-failover-e2e, with the comment that runner.environment is github-hosted there, so a gate would read as protection without being any. Adding one takes the suite red (verified).

Review round on this PR found the gate could not fire in the two shapes it
exists for, and that the meta-test could go green through the same drift it
was added to prevent.

R1-2: every lane ran the shared 2 GiB / 100k-inode default. The #16003
incident was a used-ratio refusal — the broker reported 0.94 while the
952 GiB volume still had tens of GiB free — so no absolute floor can express
that threshold, and 2 GiB is below what these lanes write: a host with 4 GiB
free passed the gate and then died mid-suite. Give the five heavy lanes the
repo's build-sized 8 GiB floor, leave flyway-migrations and the shared value
alone, and add an opt-in DISK_FLOOR_MAX_USED_PCT arm to check-disk-floor.sh
for the two broker lanes (90%).

R2-1/R2-2: the corpus came from `runs-on` text and skipped jobs outside it,
so a lane routed through an expression or a job output shipped ungated while
the suite stayed green, and nothing asserted the hosted-only jobs carry no
gate. Fail closed: an explicit hosted-only allowlist, a gate required for
every other job, a total-count assertion, and a negative assertion on those
two jobs. Pin the per-lane floors so dropping one is a test failure.

Verified: sdk-java-workflow suite 117 passed, 5 skipped; it goes red when a
gate is deleted, when one is added to a hosted job, and when a floor is
removed. check-disk-floor suite 12 passed, including four new ratio cases.
@yiliang114

Copy link
Copy Markdown
Collaborator Author

本地验证(head 18ec17a08c05e)

项 命令 结果
Java workflow meta-tests npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/sdk-java-workflow.test.js `117 passed
disk-floor 单元测试 node --test .github/scripts/check-disk-floor.test.mjs 12 passed, 0 failed(含 4 个新增 ratio 用例)
变异验证 1:删除 daemon-e2e 门禁 同上 1 failed(总数断言捕获)
变异验证 2:给 hosted-harness-mysql 加门禁 同上 1 failed(hosted 负断言捕获)
变异验证 3:删除 test 的 DISK_FLOOR_MIN_FREE_KB 同上 1 failed(floor 钉住捕获)
lint / format eslint + prettier clean

不适用项:只改 CI workflow、shell 门禁脚本与其 meta-test,无 UI/TUI 渲染变化,因此没有截图。

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

Approving at 18ec17a0. The three open threads are bot Suggestion threads whose replies say "Closed in 18ec17a" — I checked each claim against the head instead of taking the reply at face value, and all three hold.

R1-2 — per-lane calibration plus the ratio arm

  • sdk-java.yml now carries DISK_FLOOR_MIN_FREE_KB: '8388608' on test (:73), mysql-integration (:681), event-transport-broker (:1693), event-transport-multi-node (:1977) and daemon-e2e (:2361), while flyway-migrations (:532) keeps the shared 2 GiB — the split the reply describes, and the shared default itself is untouched.
  • The ratio half is real, not deferred: check-disk-floor.sh reads DISK_FLOOR_MAX_USED_PCT (:38), validates it as a percent (:66), prints used_pct/max_used_pct in the DISKFLOOR sample (:107) and fails at or above the ceiling (:118-119). That is the arm the original gate could not express, since it only compared absolute free KiB.

R2-1 — the corpus fails closed instead of deriving from runs-on text

scripts/tests/sdk-java-workflow.test.js:199 declares hostedOnly = new Set(['hosted-harness-mysql', 'hosted-failover-e2e']), every other job must show gateIndex > -1 (:213), and gated.size + hostedOnly.size === Object.keys(jobs).length (:228) fails any job that lands in neither list. A lane routed through a runs-on expression can no longer drop out of the corpus silently — that was the fail-open shape the thread named.

R2-2 — hosted-only jobs are asserted in the negative

:207-210 asserts gateIndex === -1 for each hosted-only job, so the description's "prevents a gate from being added silently to hosted-only jobs" now has an assertion behind it. The surrounding pins are tighter than before as well: the gate step must be preceded by actions/checkout (:214), its if (:215) and run (:218) are pinned, and continue-on-error must be absent (:223).

Not verified: I did not execute scripts/tests/sdk-java-workflow.test.js or the shell suite; the reading above is source-level. CI at this head was not re-read for this line item, so I am not claiming a green rollup.

@qqqys qqqys 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.

APPROVE — Critical-only review at head 18ec17a

No provable Critical. CI-infrastructure change: five files, one shell script, one workflow, one baseline entry and two test files.

My approval on this PR's earlier head was dismissed and the branch has moved, so this is a full re-review rather than a delta read.

What it does

check-disk-floor.sh gains an opt-in third ceiling, DISK_FLOOR_MAX_USED_PCT, alongside the existing absolute free-kilobyte and free-inode floors. The stated reason is concrete: the RocketMQ broker refuses writes on its own used-ratio rule — 0.94 for CL/CQ/INDEX in the #16003 incident — while the volume still reports tens of GiB free, so an absolute-free-bytes floor cannot express that threshold. sdk-java.yml then installs a Disk floor gate (self-hosted) step ahead of the heavy work in six lanes, raising DISK_FLOOR_MIN_FREE_KB to 8 GiB and adding DISK_FLOOR_MAX_USED_PCT: '90' on the broker lanes.

What I checked

The new check fails in the right direction. It sets status=1, which is what already fails the job before the heavy step, and it is guarded by [ -n "$MAX_USED_PCT" ] && [ -n "$used_pct" ] so an unset ceiling or an unreadable df leaves the absolute floors in charge rather than silently widening the gate. used_pct comes from df -kP column 5 with the % stripped and then passes the same non-numeric sanitising case the existing fields use, so a malformed df line cannot reach the arithmetic comparison. validate_percent_override rejects anything outside 1–100 with ::error:: and exit 1, and empty stays disabled, which keeps the opt-in semantics honest. The comparison uses -ge, and since POSIX df rounds its used percentage up, that is the conservative side.

The ceilings are per-job, not global. DISK_FLOOR_MAX_USED_PCT is set only in the broker lanes' env, so one lane's calibration cannot move another lane's gate — the property the script's own comment claims.

The gates run and pass. Every SDK Java lane is green at this head, both the fast tier and the full tier, including the two RocketMQ 5.5.1 broker gates and the MySQL 8.4 multi-node gate. That is direct evidence the new steps do not spuriously breach on the shared pool, which is the main way a change like this could break CI. The ledger items about gates running at the shared 2 GiB default were filed at superseded heads and the 8 GiB override at this head answers them.

One bookkeeping note, non-blocking

.size-baseline records 155888 for sdk-java.yml, but the blob at this head is 157348 bytes — the entry is 1460 bytes short of the file it describes. This does not fail anything: check-workflow-size.sh compares wc -c against base + GROWTH_ALLOWANCE with an allowance of 4096, so 1460 passes. The consequence is only that this PR quietly consumes 1460 bytes of the headroom the ratchet is meant to leave for the next one, and a later PR growing the same file will hit the error 1460 bytes sooner than the recorded number suggests. Worth correcting to 157348 while the branch is open, since the ratchet's whole point is that the recorded number is the real one.

For completeness: the same comparison against this PR's base shows sdk-java.yml at 154074 bytes against a recorded 150332, so a shortfall of this kind already exists on main. The script treats that case as a warning rather than an error precisely because the file is unchanged from the PR's base — which is why it is not red here either.

CI

Everything relevant is green, including Lint & Static, Test (ubuntu-latest, Node 22.x), Managed Agent fast tier, Integration Tests (no-AK) and all fourteen SDK Java lanes. The single failure is web-shell E2E Smoke (ubuntu-latest, Node 22.x). This PR changes no TypeScript source and no web-shell file — its five files are a CI shell script, its test, a workflow, a baseline entry and a workflow meta-test — so there is no mechanism by which it reaches that lane, and I am not treating it as attributable.

For the record on review state: reviewDecision is null, no CHANGES_REQUESTED stands at this head, and the bot's review here is an approval.

@yiliang114

Copy link
Copy Markdown
Collaborator Author

Same-head CI update on 18ec17a0: the Managed Agent full lane is red rather than pending.

  • Check: SDK Java (full) / Runtime Broker and Managed Agent MySQL / Java 21 — job 126450051922, failed step Install and verify Managed Agent dependencies, tests, Checkstyle, and MySQL integration, completed 08:50:55Z.
  • Known error: WorkspaceMigrationMySqlIT.legacyCwdSettlementWaitingForMigrationSeesCommittedFence:116->admissionWaitingForMigrationSeesCommittedFenceAndPreservesReplay:167 — Expecting value to be true but was false; totals Tests run: 1342, Failures: 1, Errors: 0.
  • Still open on this head: SDK Java (full) / Hosted process fault gates / MySQL 8.4 / Java 21 IN_PROGRESS.

Everything else on this head is fine (2 approvals bound to 18ec17a0, Lint & Static green, no blocking review thread), but this lane is the one that covers the sdk-java.yml change, so the merge waits on it. No re-run or root-cause work from this side.

@yiliang114

Copy link
Copy Markdown
Collaborator Author

Two checks are red on 18ec17a, and the Managed Agent lane is one of the lanes this PR edits in sdk-java.yml, so I'm holding the merge for now.

Everything else on this head looks fine: required Lint & Static is green, both approvals are bound to 18ec17a. A newer run (41800935994) has the Java lanes queued — once the broker lane is green here, this is mergeable from my side.

@yiliang114
yiliang114 merged commit a5fec03 into main Nov 4, 2026
192 of 200 checks passed
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 41792804443 · commit 18ec17a08c05

Failing tests

  • com.alibaba.qwen.code.managedagent.persistence.WorkspaceMigrationMySqlIT.legacyCwdSettlementWaitingForMigrationSeesCommittedFence

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 41800935994 · commit 18ec17a08c05

Failing tests

  • com.alibaba.qwen.code.managedagent.HostedShellLifecycleRecoveryIT.publicDeletionRecoversOriginalResources(String)[2]
  • com.alibaba.qwen.code.managedagent.persistence.WorkspaceMigrationMySqlIT.legacyCwdSettlementWaitingForMigrationSeesCommittedFence

Tracking issue

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Released in v0.26.8.

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.

7 participants