-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(ci): gate no-AK installs on disk capacity #10539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
37dead9
7da0eb7
d8ff4f2
1186e50
c17ce29
44344d4
6eae982
0c7fe0a
5c8456d
050a8f7
eeb92eb
b2ffdeb
5cdd5db
b460690
942e416
097632e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -223,6 +223,7 @@ describe('no-AK integration CI wiring', () => { | |||||||||||||||||||
| for (const stepName of [ | ||||||||||||||||||||
| 'Setup Node.js (hosted)', | ||||||||||||||||||||
| 'Use pre-installed Node.js (self-hosted)', | ||||||||||||||||||||
| 'Disk floor gate (self-hosted)', | ||||||||||||||||||||
| 'Install Dependencies', | ||||||||||||||||||||
| 'Run required no-AK integration gate', | ||||||||||||||||||||
| ]) { | ||||||||||||||||||||
|
|
@@ -232,6 +233,26 @@ describe('no-AK integration CI wiring', () => { | |||||||||||||||||||
| ).toContain("steps.ci_profile.outputs.ci_profile == 'full'"); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const diskFloorGate = getWorkflowStep( | ||||||||||||||||||||
| gateJob, | ||||||||||||||||||||
| 'Disk floor gate (self-hosted)', | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| expect(diskFloorGate).toContain( | ||||||||||||||||||||
| "if: \"${{ steps.ci_profile.outputs.ci_profile == 'full' && runner.environment == 'self-hosted' }}\"", | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| expect(diskFloorGate).toContain( | ||||||||||||||||||||
| 'run: \'bash .github/scripts/check-disk-floor.sh "${GITHUB_WORKSPACE}" "${RUNNER_TEMP:-/tmp}"\'', | ||||||||||||||||||||
| ); | ||||||||||||||||||||
| expect(diskFloorGate).not.toContain('continue-on-error'); | ||||||||||||||||||||
| expect(diskFloorGate).not.toContain('|| true'); | ||||||||||||||||||||
| expect(diskFloorGate).not.toContain('env:'); | ||||||||||||||||||||
|
Comment on lines
+246
to
+248
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R2-3: This block pins the disk-floor gate's hard-fail shape, but nothing in the suite pins the Witness: 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 中文说明这一段固定了磁盘门槛步骤的硬失败形状,但整个套件都没有为 实测:变异(守卫移到 Checkout 之上)→ 13/13 全绿;变异 + 守卫顺序固定 → 红( 修复须遵守测试文件 Windows 部分自己写下的契约:"Repository-local — qwen3.8-max via Qwen Code /review (v0.22.3)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-1: (fix-induced) The Witness: 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 中文说明(fix-induced)第 1 轮修复加入的 实测:变异(job 级 env 置 0)→ 脚本对饱和目录退出 0(样本 修复只应把这两个覆盖开关名固定出 CI workflow,不要移除脚本文档化的覆盖支持( — qwen3.8-max via Qwen Code /review (v0.22.3) |
||||||||||||||||||||
| expect(gateJob.indexOf("id: 'ci_profile'")).toBeLessThan( | ||||||||||||||||||||
| gateJob.indexOf("name: 'Disk floor gate (self-hosted)'"), | ||||||||||||||||||||
| ); | ||||||||||||||||||||
|
yiliang114 marked this conversation as resolved.
|
||||||||||||||||||||
| expect( | ||||||||||||||||||||
| gateJob.indexOf("name: 'Disk floor gate (self-hosted)'"), | ||||||||||||||||||||
| ).toBeLessThan(gateJob.indexOf("name: 'Install Dependencies'")); | ||||||||||||||||||||
|
Comment on lines
+252
to
+254
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R2-2: These ordering pins bound the gate between Witness:
Suggested change
The pin must encode gate-after-checkout, never the reverse ( 中文说明这些顺序断言把门槛限定在 实测:变异(Checkout 移到门槛之下)→ 13/13 全绿;变异 + 新增顺序固定 → 红( 该固定必须表达"门槛在 Checkout 之后",绝不能相反( — qwen3.8-max via Qwen Code /review (v0.22.3) |
||||||||||||||||||||
|
|
||||||||||||||||||||
| const gateStep = getWorkflowStep( | ||||||||||||||||||||
| gateJob, | ||||||||||||||||||||
| 'Run required no-AK integration gate', | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] R2-1: The disk-floor gate invocation this PR adds is the fourth byte-identical copy in this workflow (
testline 477,web_shell_e2e_smokeline 903, this one,integration_cliline 1699), but the contract test pins only this copy. If a later edit softens any of the other three — appending|| trueor addingcontinue-on-error: trueto 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-headkeeps the four checkout guards from drifting while each caller keeps its own run condition, and this same test file'sguardCalls/nodeCallsloops 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:
Either move the invocation into a composite action (each caller keeps its own
if:, asverify-checkout-headdoes), or keep the inline copies and extend the contract assertions into a loop over all four jobs'Disk floor gate (self-hosted)steps, mirroringguardCalls: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 中第四份逐字节相同的副本(
test477 行、web_shell_e2e_smoke903 行、本处、integration_cli1699 行),但契约测试只固定了本副本。若日后有人软化其他三份之一——比如为消除偶发磁盘满导致的 flake 而追加|| true或加上continue-on-error: true——所有测试仍为绿色,而该 job 的 ENOSPC 准入检查已被静默禁用,因为没有任何断言约束它们的形状。仓库对同类形状已有两个现成机制:.github/actions/verify-checkout-head使四处 checkout 守卫不会漂移、且各调用方保留自己的运行条件;同一测试文件的guardCalls/nodeCalls循环固定了那些步骤的所有调用点——文件自己的注释写明这些调用点"也必须被固定,否则回退到 PR 前的内联脚本仍会让套件保持绿色"。实测:把
testjob 的副本(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)