fix(ci): gate no-AK installs on disk capacity - #10539
Conversation
The in-repo slice of #10035: fail fast on a saturated self-hosted host before npm ci instead of dying on ENOSPC mid-run, and keep the disk-pressure timeline from a failed run as an artifact so the peak can be correlated with the job and runner after cleanup reclaims the host.
…trings Co-authored-by: Qwen-Coder <qwen-coder @alibabacloud.com>
The sample-file setup landed inside the routing block that no-ak-integration-ci pins identical across test/test_macos/test_windows, breaking the identity assertion. Move the DISK_SAMPLES definition and DISKCONTEXT header ahead of the routing block; the DFSAMPLE lines still carry the routed tmpdir.
Keep the disk-floor shell comparisons inside bash's signed integer range by rejecting numeric overrides that cannot be compared safely. Add the existing helper test coverage for the overflow boundary.\n\nCo-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Pin the three behaviours of validate_floor_override that the current suite leaves unpinned, each verified to catch its mutant: - INT64_MAX is a legal floor and must reach the disk comparison (tightening the length check to -gt 18 now goes red). - Zero-padded overrides padded past 19 raw characters are normalized and accepted (removing the leading-zero strip now goes red). - 20-digit values are rejected by the length branch, which the existing 19-digit case never exercises (widening to -gt 20 now goes red). Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Resolve the ci.yml helper-test list while preserving both main and PR entries. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Thanks for the PR! Template looks good ✓ Problem: observed, not theoretical. #10035 documents transient ENOSPC killing Direction: aligned. This is the direct continuation of the in-flight #10035 CI-reliability work, stacked on #10394 by the same author; it pulls no new surface into the repo. CHANGELOG: not applicable — CI internals. Size: not applicable — no core package paths touched (+17/−0 across 2 files: 4 workflow lines, 13 test lines). Approach: the scope is exactly right. The step is byte-for-byte the same shape as the three gates already on the stacked base (same script, same Risk: no elevated risk signals — neither changed file matches the revert-correlated high-risk paths. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:是已观测到的问题,不是理论性加固。#10035 记录了饱和 self-hosted 主机上 方向:对齐。这是 #10035 CI 可靠性工作的直接延续,由同一作者 stacked 在 #10394 之上,没有引入任何新表面。CHANGELOG:不适用——纯 CI 内部改动。 规模:不适用——未触及核心包路径(+17/−0,共 2 个文件:4 行 workflow、13 行测试)。 方案:范围恰好。该步骤与 stacked base 上已有的三个门槛形态完全一致(同一脚本、同样的 风险:无升级风险信号——两个改动文件均未命中与 revert 相关的高风险路径。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewBefore reading the diff: given #10394 already gates the other heavy self-hosted install paths with a shared What I verified:
No blockers, no convention violations. Reuse is maximal (the script and the gate pattern both come from the stacked base). Testing — CI evidenceThis commit has no PR CI of its own, by construction:
Two adjacent signals stand in for the missing PR CI:
Not verified: the gate firing on a genuinely saturated host (no reproduction environment; the PR says so too). Live-behavior lanes ( 中文说明代码审查:在读 diff 之前,我的独立方案就是——既然 #10394 已用共享的 已核对:新步骤与 stacked base 上三个既有门槛形态一致(同名、同样的脚本调用);该脚本接受 测试证据:该提交按构造没有自己的 PR CI—— — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 4/5 — clean, minimal, pattern-perfect change; the one reservation is structural (stacked base), not a code concern. Stepping back: my independent proposal for "the no-AK job is the one install path #10394 didn't gate" was exactly this — same shared script, same arguments, same position relative to The honest reservation, and the reason this is 4/5 rather than 5/5: by construction no CI ran on this commit — Approving. ✅ 中文说明回过头看:我对"no-AK job 是 #10394 唯一没门控的安装路径"的独立方案就是这样——同一个共享脚本、同样的参数、相对 真实的保留意见、也是给 4/5 而不是 5/5 的原因:按构造这个提交没有跑过 CI—— 批准。✅ — Qwen Code · qwen3.8-max Reviewed at |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed. Suggestions are inline.
Not explored to full depth (tool budget reached): "agent 1d": none — no check was cut short..
Not reviewed: reverse audit — stopped before round 5 by the review time budget.
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/ci.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
仅完成部分审查,审查缺口已披露。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"agent 1d":none — no check was cut short.。
未审查:反向审计——评审时间预算不足,未能开始第 5 轮。
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/ci.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.22.3)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
The base branch was changed.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Refresh the PR against the latest base before retrying the cancelled CI run. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Refreshed the branch with the latest |
|
The gate placement and profile conditions look right. One non-blocking follow-up:
|
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/ci.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查。 建议见行内评论。
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/ci.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.22.3)
| - name: 'Disk floor gate (self-hosted)' | ||
| if: "${{ steps.ci_profile.outputs.ci_profile == 'full' && runner.environment == 'self-hosted' }}" | ||
| run: 'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"' |
There was a problem hiding this comment.
[Suggestion] R2-1: The disk-floor gate invocation this PR adds is the fourth byte-identical copy in this workflow (test line 477, web_shell_e2e_smoke line 903, this one, integration_cli line 1699), but the contract test pins only this copy. If a later edit softens any of the other three — appending || true or adding continue-on-error: true to silence an intermittent disk-full flake, say — every test stays green while that job's ENOSPC admission check is silently disabled, because nothing asserts their shape. The repo already solved this exact shape twice: .github/actions/verify-checkout-head keeps the four checkout guards from drifting while each caller keeps its own run condition, and this same test file's guardCalls/nodeCalls loops pin every call site of those steps — the file's own comment says those call sites "must be pinned too, or a revert to the inline pre-PR script keeps the suite green".
Witness:
MUTANT (append `|| true` to the test job's copy, ci.yml:477):
Test Files 1 passed (1) / Tests 13 passed (13) ← gate silently disabled, all green
SAME MUTANT + loop over the four jobs' gate steps:
Test Files 1 failed (1) / Tests 1 failed | 12 passed (13)
AssertionError: test disk floor gate invocation:
- run: 'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"'
+ run: 'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}" || true'
Either move the invocation into a composite action (each caller keeps its own if:, as verify-checkout-head does), or keep the inline copies and extend the contract assertions into a loop over all four jobs' Disk floor gate (self-hosted) steps, mirroring guardCalls:
for (const jobName of ['test', 'web_shell_e2e_smoke', 'integration_no_ak', 'integration_cli']) {
const gate = getWorkflowStep(getWorkflowJob(workflow, jobName), 'Disk floor gate (self-hosted)');
expect(gate).toContain(
'run: \'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"\'',
);
expect(gate).not.toContain('continue-on-error');
expect(gate).not.toContain('|| true');
}The fix must keep every gate invoked after its job's Checkout step — .github/scripts/check-disk-floor.sh:9: "Checkout populates this script first, so the gate cannot protect checkout." Whichever shape is chosen, the loop (or the composite action's single pinned body) must go red if any one call site reverts to a softened or differently-invoked copy — please remove one call site's coverage and confirm the mutation turns the suite red.
中文说明
本 PR 新增的磁盘门槛调用是该 workflow 中第四份逐字节相同的副本(test 477 行、web_shell_e2e_smoke 903 行、本处、integration_cli 1699 行),但契约测试只固定了本副本。若日后有人软化其他三份之一——比如为消除偶发磁盘满导致的 flake 而追加 || true 或加上 continue-on-error: true——所有测试仍为绿色,而该 job 的 ENOSPC 准入检查已被静默禁用,因为没有任何断言约束它们的形状。仓库对同类形状已有两个现成机制:.github/actions/verify-checkout-head 使四处 checkout 守卫不会漂移、且各调用方保留自己的运行条件;同一测试文件的 guardCalls/nodeCalls 循环固定了那些步骤的所有调用点——文件自己的注释写明这些调用点"也必须被固定,否则回退到 PR 前的内联脚本仍会让套件保持绿色"。
实测:把 test job 的副本(ci.yml:477)追加 || true:Tests 13 passed (13)——门槛被静默禁用,全绿;加上"对四个 job 的门槛步骤循环断言"后:1 failed | 12 passed,断言错误指明被软化的 run: 行。探针双向翻转。
修复可二选一:把调用移入复合 action(各调用方保留自己的 if:,与 verify-checkout-head 一致);或保留内联副本,把契约断言扩展为对四个 job 的 Disk floor gate (self-hosted) 步骤的循环(仿照 guardCalls)。
修复不得违反的前提:任何共享机制仍须在各 job 的 Checkout 之后调用——.github/scripts/check-disk-floor.sh:9:"Checkout populates this script first, so the gate cannot protect checkout."。无论采用哪种形式,删除任一调用点的覆盖都必须使测试变红——请移除某一处覆盖并回放该变异以确认。
— qwen3.8-max via Qwen Code /review (v0.22.3)
| expect( | ||
| gateJob.indexOf("name: 'Disk floor gate (self-hosted)'"), | ||
| ).toBeLessThan(gateJob.indexOf("name: 'Install Dependencies'")); |
There was a problem hiding this comment.
[Suggestion] R2-2: These ordering pins bound the gate between ci_profile and Install Dependencies, but nothing pins it after Checkout — and the gate runs the workspace-relative path bash .github/scripts/check-disk-floor.sh, whose own header says "Checkout populates this script first". A reorder that keeps ci_profile above the gate while moving Checkout below it — e.g. Checkout moved down between the gate and Install Dependencies — makes the gate execute before checkout with every assertion here green (measured: the suite still passes 13/13). On the warm self-hosted pool this job targets — its workspace persists between runs, which is exactly why the job opens with Restore workspace ownership / Clean stale .qwen before checkout — the pre-checkout gate would execute the previous run's check-disk-floor.sh, and since this job checks out PR heads those stale bytes are contributor code; on a fresh runner the reordered step instead fails at runtime with "No such file or directory". This file already pins the same contract for the Windows job's ./-relative references.
Witness:
MUTANT (Checkout moved below the gate): Test Files 1 passed (1) / Tests 13 passed (13)
MUTANT + checkout-ordering pin: AssertionError: expected 10376 to be less than 10122
INTACT + checkout-ordering pin: Tests 13 passed (13)
| expect( | |
| gateJob.indexOf("name: 'Disk floor gate (self-hosted)'"), | |
| ).toBeLessThan(gateJob.indexOf("name: 'Install Dependencies'")); | |
| expect(gateJob.indexOf("name: 'Checkout'")).toBeLessThan( | |
| gateJob.indexOf("name: 'Disk floor gate (self-hosted)'"), | |
| ); | |
| expect( | |
| gateJob.indexOf("name: 'Disk floor gate (self-hosted)'"), | |
| ).toBeLessThan(gateJob.indexOf("name: 'Install Dependencies'")); |
The pin must encode gate-after-checkout, never the reverse (.github/scripts/check-disk-floor.sh:9). With the pin in place, moving Checkout below the gate must turn runs the no-AK integration script as its own check on PRs and the merge queue red — please apply that mutation and confirm.
中文说明
这些顺序断言把门槛限定在 ci_profile 与 Install Dependencies 之间,但没有把它固定在 Checkout 之后——而门槛执行的是工作区相对路径 bash .github/scripts/check-disk-floor.sh,脚本头部明确写着 "Checkout populates this script first"。若某次重排保持 ci_profile 在门槛之上、却把 Checkout 移到门槛之下(例如把 Checkout 下移到门槛与 Install Dependencies 之间),门槛会在 checkout 之前执行,而这里的所有断言仍为绿色(实测:套件仍 13/13 全绿)。在本 job 所用的常驻 self-hosted 池上,工作区在运行之间持久存在——这正是该 job 以 Restore workspace ownership / Clean stale .qwen before checkout 开头的原因——checkout 之前执行的门槛会运行上一次运行遗留的 check-disk-floor.sh,而本 job 检出的是 PR head,这些遗留字节来自贡献者代码;在全新 runner 上,重排后的步骤则会在运行时以 "No such file or directory" 失败。本文件已为 Windows job 的 ./ 相对引用固定过同类契约。
实测:变异(Checkout 移到门槛之下)→ 13/13 全绿;变异 + 新增顺序固定 → 红(expected 10376 to be less than 10122);原样 + 新固定 → 13/13 绿。
该固定必须表达"门槛在 Checkout 之后",绝不能相反(.github/scripts/check-disk-floor.sh:9)。加上固定后,把 Checkout 移到门槛之下必须使 runs the no-AK integration script as its own check on PRs and the merge queue 变红——请回放该变异确认。
— qwen3.8-max via Qwen Code /review (v0.22.3)
| expect(diskFloorGate).not.toContain('continue-on-error'); | ||
| expect(diskFloorGate).not.toContain('|| true'); | ||
| expect(diskFloorGate).not.toContain('env:'); |
There was a problem hiding this comment.
[Suggestion] R2-3: This block pins the disk-floor gate's hard-fail shape, but nothing in the suite pins the Verify checkout includes expected head commit guard after Checkout for integration_no_ak — the guard call there is asserted on uses: and expected_sha content only, while the Windows job pins exactly that ordering (expect(guardUseIndex).toBeGreaterThan(windowsCheckoutIndex)). Moving the guard above Checkout in this job escapes every assertion (measured: 13/13 green, and none of the other workflow contract suites — 246 tests — catches it either). On a warm runner the guard would then verify the previous run's stale workspace against the expected SHA instead of the fresh checkout — defeating exactly the stale-checkout detection it exists for — and on a fresh runner the repo-local ./ action does not resolve at all.
Witness:
MUTANT (guard above Checkout in integration_no_ak): Test Files 1 passed (1) / Tests 13 passed (13)
MUTANT + guard-ordering pin: AssertionError: expected 7621 to be less than 7408
INTACT + guard-ordering pin: Tests 13 passed (13)
Add beside the pins this PR adds:
expect(gateJob.indexOf("name: 'Checkout'")).toBeLessThan(
gateJob.indexOf("uses: './.github/actions/verify-checkout-head'"),
);The suite's own Windows-section comment states the contract this pin encodes: "Repository-local ./ actions resolve from the job workspace, so the checkout must precede them." With the pin in place, the guard-above-checkout reorder must turn this test red — please apply that mutation and confirm.
中文说明
这一段固定了磁盘门槛步骤的硬失败形状,但整个套件都没有为 integration_no_ak 固定 Verify checkout includes expected head commit 守卫在 Checkout 之后的顺序——该 job 中的守卫调用只断言了 uses: 与 expected_sha 内容,而 Windows job 恰好固定了这一顺序(expect(guardUseIndex).toBeGreaterThan(windowsCheckoutIndex))。把该守卫移到本 job 的 Checkout 之上可以逃过所有断言(实测:13/13 全绿;其他 246 个 workflow 契约测试也不会捕获)。在常驻 runner 上,守卫会拿上一次运行遗留的工作区与期望 SHA 比对,而不是新鲜的 checkout——恰恰废掉了它存在的意义(陈旧检出检测);在全新 runner 上,仓库本地 ./ action 根本无法解析。
实测:变异(守卫移到 Checkout 之上)→ 13/13 全绿;变异 + 守卫顺序固定 → 红(expected 7621 to be less than 7408);原样 + 新固定 → 13/13 绿。
修复须遵守测试文件 Windows 部分自己写下的契约:"Repository-local ./ actions resolve from the job workspace, so the checkout must precede them."。加上固定后,守卫移到 Checkout 之上的重排必须使本测试变红——请回放该变异确认。
— qwen3.8-max via Qwen Code /review (v0.22.3)
| ); | ||
| expect(diskFloorGate).not.toContain('continue-on-error'); | ||
| expect(diskFloorGate).not.toContain('|| true'); | ||
| expect(diskFloorGate).not.toContain('env:'); |
There was a problem hiding this comment.
[Suggestion] R1-1: (fix-induced) The env: negation the round-1 fix added reads as coverage against env-based gate-neutering, but it only sees this step's own slice: a job-level or workflow-level env: zeroing DISK_FLOOR_MIN_FREE_KB / DISK_FLOOR_MIN_FREE_INODES still disables the floor with every assertion here green. GitHub Actions merges workflow → job → step env into the gate step, and the script's validator accepts 0 (.github/scripts/check-disk-floor.sh:25-36), so with both floors at zero the breach comparison is unsatisfiable and the gate emits a normal-looking sample and exits 0 on any host — e.g. after an "emergency unblock" during a fleet-wide disk incident the exact ENOSPC-mid-install failure (#10035) this PR exists to prevent returns, with this test reporting the env vector fully covered. The premise the fix must not violate: the step-scoped negation here stays step-scoped (ci.yml legitimately carries env: blocks on neighbouring steps), so the new assertions pin the override names out of the whole workflow instead.
Witness:
MUTANT (job-level env: DISK_FLOOR_MIN_FREE_KB: '0', DISK_FLOOR_MIN_FREE_INODES: '0'):
script on saturated dir: exit 0, sample DISKFLOOR ... floor_kb[0] floor_inodes[0]
(huge-floor control arm: ::error::Disk floor breached, exit 1)
suite: Tests 13 passed (13)
MUTANT + whole-workflow name pins: Test Files 1 failed (1) / Tests 1 failed | 12 passed (13)
AssertionError: ... not to contain 'DISK_FLOOR_MIN_FREE_KB'
INTACT + whole-workflow name pins: Tests 13 passed (13)
Pin the override names out of the whole workflow (the script's documented override stays available for manual/local runs):
expect(workflow).not.toContain('DISK_FLOOR_MIN_FREE_KB');
expect(workflow).not.toContain('DISK_FLOOR_MIN_FREE_INODES');(or at minimum assert both names absent from gateJob, which covers job-level and every step-level env in the job). The fix must pin the names out of the CI workflow only, not remove the script's documented override support (.github/scripts/check-disk-floor.sh:14-16: "Floors, checked per directory's filesystem (env-overridable)"). With the assertions in place, adding the job-level zero-env block must turn this test red — please apply that mutation and confirm.
中文说明
(fix-induced)第 1 轮修复加入的 env: 负向固定看似覆盖了"通过 env 使门槛失效"的路径,但它只能看到该步骤自身的切片:在 job 级或 workflow 级 env: 中把 DISK_FLOOR_MIN_FREE_KB / DISK_FLOOR_MIN_FREE_INODES 置 0,仍能在本文件所有断言保持绿色的情况下禁用磁盘门槛。GitHub Actions 会把 workflow → job → step 的 env 合并进门槛步骤,且脚本的校验器接受 0(.github/scripts/check-disk-floor.sh:25-36),于是两个地板均为 0 时,突破比较永远不成立,门槛会输出看似正常的采样并在任何主机上以 0 退出——例如在一次全集群磁盘事故中作为"紧急放行"加上之后,本 PR 要消除的"安装中途 ENOSPC"(#10035)会原样返回,而本测试还报告 env 路径已被完全覆盖。修复必须遵守的前提:此处的步骤级负向固定保持步骤级作用域(ci.yml 中相邻步骤合法地携带 env: 块),因此新断言改为把覆盖开关名固定出整个 workflow。
实测:变异(job 级 env 置 0)→ 脚本对饱和目录退出 0(样本 DISKFLOOR ... floor_kb[0] floor_inodes[0];巨值地板对照组报 ::error::Disk floor breached 并退出 1),套件 13/13 全绿;变异 + 全 workflow 名称固定 → 1 failed | 12 passed(AssertionError: ... not to contain 'DISK_FLOOR_MIN_FREE_KB');原样 + 新固定 → 13/13 绿。
修复只应把这两个覆盖开关名固定出 CI workflow,不要移除脚本文档化的覆盖支持(.github/scripts/check-disk-floor.sh:14-16:"Floors, checked per directory's filesystem (env-overridable)");或至少断言这两个名称不出现在 gateJob 中(覆盖 job 级及该 job 内所有步骤级 env)。加上断言后,加入 job 级置 0 env 块必须使本测试变红——请回放该变异确认。
— qwen3.8-max via Qwen Code /review (v0.22.3)
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
qwen-code-dev-bot
left a comment
There was a problem hiding this comment.
Gate APPROVE at head 097632ee: the no-AK job's disk-floor gate sits correctly after checkout and before Install Dependencies (verified in the YAML itself), the invocation is pinned verbatim with no continue-on-error/|| true/env escape, the helper script is on main from #10394, and required CI is green. The 4 open threads are test-pin completeness Suggestions (post-Checkout ordering pin, cross-copy equality, job-level env caveat) — the underlying behavior is verified; follow-up material, not blockers. 中文:门禁通过。gate 落位、参数钉法、helper 前置依赖均实证无误,CI 全绿;4 条未关闭为测试钉完整性建议,不阻塞。
chiga0
left a comment
There was a problem hiding this comment.
No blocking findings.
Scope: .github/workflows/ci.yml (4 lines added) and scripts/tests/no-ak-integration-ci.test.js (21 lines added). Workflow change is additive; no existing steps modified.
What was checked:
-
Workflow step placement and condition. The new
Disk floor gate (self-hosted)step lands immediately beforeInstall Dependencieswith conditionci_profile == 'full' && runner.environment == 'self-hosted'. Three other disk-floor gate instances in the same file (lines 475, 901, 1697) confirm this is the established pattern. TheInstall Dependenciesstep uses onlyci_profile == 'full'(no self-hosted guard), so the gate is correctly scoped to self-hosted and transparent to GitHub-hosted runs. -
Script contract.
check-disk-floor.shaccepts positional directory arguments, emits aDISKFLOORtelemetry line per directory, and exits non-zero on a breach with no|| trueescape path. The new step invokes"${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}", matching the three sibling invocations byte-for-byte. Nocontinue-on-erroron the step, consistent with hard-fail intent. -
Test assertions. The new block pins the full
if:line, the fullrun:line, absence ofcontinue-on-error/|| true/env:at step scope, and two ordering constraints (ci_profile< gate; gate <Install Dependencies). -
CI.
Integration Tests (no-AK, No Sandbox)— pass (19m16s, the target job).Test (ubuntu-latest, Node 22.x)— pass (21m58s, coverstest:scripts).Dependency CVE audit— pass.web-shell E2E Smoke— pending at review time (unrelated to this change). macOS and Windows test jobs are SKIPPED on this fork PR; the disk-floor gate targets Linux self-hosted runners and those paths are exercised by the ubuntu run.
Cross-check against prior reviews. qwen-code-ci-bot filed four open suggestions — none are blockers:
-
R2-1: PR adds the fourth byte-identical invocation but the test only pins this copy. The other three (lines 477, 903, 1699) are pre-existing untested copies; this PR follows the established pattern without making their coverage worse. A loop-based assertion or composite action in a follow-up would close the gap.
-
R2-2: No
Checkout-ordering upper bound in the test (the script header notes it cannot protect checkout). The workflow step IS correctly ordered after checkout; the gap is in the test's ability to catch a future reorder. A future bad reorder on a fresh runner would fail at runtime. -
R2-3: Pre-existing gap —
Verify checkout includes expected head commitordering is not pinned for this job. Predates this PR; not introduced here. -
R1-1 fix-induced: The step-scoped
not.toContain('env:')does not catch a job-levelenv:block zeroing the floor overrides. Addressed by addingexpect(gateJob).not.toContain('DISK_FLOOR_MIN_FREE_KB')in a follow-up.
All four are legitimate test-harness improvements for a follow-up. None invalidate the correctness of the workflow change or the existing test coverage.
Unreviewed dimensions: working tree unavailable so execution rungs 1–3 not run locally; CI provides the primary execution evidence. CONTRIBUTING.md: no AI review restriction found.
Reviewed with AI assistance.
yiliang114
left a comment
There was a problem hiding this comment.
Reviewed: no findings. The disk-floor gate runs before Install Dependencies in the no-AK job, scoped to full profile + self-hosted, and check-disk-floor.sh exists on main. The wiring test pins the hard-fail contract (no continue-on-error / '|| true' / env), the step order (after ci_profile, before install), and adds the step to the order list. CI green. (Self-PR: GitHub blocks self-approval, needs another maintainer.)
|
Released in v0.23.0. |
What this PR does
Adds the same pre-install disk-floor admission check to the dedicated no-credential integration job when it runs on the self-hosted pool. The check uses the job's existing full-profile condition and runs immediately before dependency installation; GitHub-hosted runs remain unchanged.
This was originally stacked on #10394. After #10394 merged, the branch was refreshed with the latest
mainand this PR was retargeted tomain.Why it's needed
#10394 gates the other heavy self-hosted install paths, but the dedicated no-credential integration job shares the Ubuntu runner routing and still reached
npm ciwithout the admission check. Under the transient disk pressure reported in #10035, that job could therefore fail during installation even though the other covered jobs would fail early with a clear disk-floor error.Reviewer Test Plan
How to verify
npm run test:scripts -- scripts/tests/no-ak-integration-ci.test.js— 11 passed, 2 platform-specific cases skipped on macOS. The workflow contract test pins the profile condition, self-hosted condition, script invocation, and ordering before installation.npx prettier --check .github/workflows/ci.yml scripts/tests/no-ak-integration-ci.test.js,actionlint .github/workflows/ci.yml,yamllint .github/workflows/ci.yml, andgit diff --checkpass.Evidence (Before & After)
N/A — CI workflow change with no user-visible or UI surface.
Tested on
Environment (optional)
Node.js 22 with the repository's existing dependencies; workflow linting used local actionlint and yamllint.
Risk & Scope
Linked Issues
Part of #10035. #10394 is merged; this follow-up is now based on
mainand does not close the host-level infrastructure work.中文说明
这个 PR 做了什么
当无凭据集成 job 运行在 self-hosted runner 池时,在依赖安装前增加与其他重型 job 相同的磁盘门槛准入检查。该检查复用 job 既有的 full-profile 条件,并紧邻依赖安装之前执行;GitHub-hosted 运行不受影响。
这个 PR 原先以 #10394 为 base;#10394 合并后,分支已合入最新
main,PR 也已切回main。为什么需要
#10394 已覆盖其他重型 self-hosted 安装路径,但独立的无凭据集成 job 与 Ubuntu job 共用 runner 路由,却仍可在没有准入检查的情况下进入
npm ci。在 #10035 报告的瞬时磁盘压力下,该 job 仍可能在安装期间失败,而其他已覆盖 job 会提前给出清晰的磁盘门槛错误。Reviewer Test Plan
如何验证
npm run test:scripts -- scripts/tests/no-ak-integration-ci.test.js:11 个通过,macOS 上跳过 2 个平台相关用例。workflow 契约测试固定了 profile 条件、self-hosted 条件、脚本调用以及安装前的执行顺序。npx prettier --check .github/workflows/ci.yml scripts/tests/no-ak-integration-ci.test.js、actionlint .github/workflows/ci.yml、yamllint .github/workflows/ci.yml与git diff --check均通过。Evidence(Before & After)
N/A——CI workflow 变更,没有用户可见或 UI 表面。
测试平台
环境(可选)
Node.js 22 与仓库现有依赖;workflow lint 使用本地 actionlint 和 yamllint。
风险与范围
关联 Issue
Part of #10035。#10394 已合并;本 follow-up 现以
main为 base,不会关闭主机级基础设施工作。