Skip to content

ci(sdk-java): run the Hosted admission gates even when the Hosted verify fails - #16010

Merged
wenshao merged 15 commits into
mainfrom
ci/admission-gates-independent-of-hosted-verify
Oct 31, 2026
Merged

wenshao merged 15 commits into
mainfrom
ci/admission-gates-independent-of-hosted-verify

Conversation

@wenshao

@wenshao wenshao commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Verify Hosted admission gates in the Hosted process job now runs even when the Hosted Java, Spring and MySQL verify before it fails. It takes the condition that the Runtime Broker fault gates (#15776) and the O4 step in the same job already use: run unless the workflow run was cancelled, as long as the SDK install step succeeded.

Because it can now run after a failed verify, it no longer shares that verify's database. It creates qwen_admission_ci and boots there, the same way O4 uses qwen_o4_ci.

The Check that every Hosted admission gate class ran step after it now follows the admission step's outcome instead of the job status.

The job ceiling rises from 304 to 324. A Verify that timed out used to skip admission; now that path too can fill all four step ceilings, so the uncapped setup steps keep 33 minutes of allowance and a slow setup still leaves the O4 gates time to run.

The workflow pin test covers all of this. It now also pins the O4 step's condition, which nothing pinned before.

The sdk-java.yml line in .github/workflows/.size-baseline moves to the file's new size, as the workflow growth ratchet requires. See Risk & Scope for how much of that is this PR's.

Why it's needed

The admission step had no if:, so it ran only when every earlier step passed, including the Hosted verify. From 10-14 to 10-30 the Hosted verify failed on 13 nights, and the admission gates were skipped on all 13. That includes 10-28, 10-29 and 10-30, the three nights since #15776 merged. On those nights the fault gates already ran (45/0) while the admission gates still did not. On the three nights the verify passed (10-17, 10-22, 10-24), the admission gates ran green in about two minutes.

The two gate classes, HostedRecoveryWedgeGate and HostedBackgroundPublicationGate, don't depend on anything the Hosted verify builds. The step runs its own clean verify on the module, and needs only what the bundle step installs and builds (node_modules and dist/cli.js), the installed SDK and the job's MySQL service.

The shared database was the one thing a failed verify could break for them:

  • Managed schema validation refuses any table outside the managed set.
  • HostedMonitorRunFaultGatesIT, HostedSessionRelayFaultGatesIT, HostedWorkflowRelayFaultGatesIT and HostedAutomationFaultGatesIT create fg*_fire tables in hosted_harness_test and drop them during cleanup. The relay classes drop theirs only while their Spring context is still active. A class killed before its cleanup leaves its table behind.
  • The isolation extension the Hosted classes use truncates only the ma_ tables, so nothing removes a leftover fg*_fire table.
  • With one left behind, both admission gates fail at boot, for a reason that has nothing to do with them. On a green night every class has finished its cleanup, so nothing is left.

A fresh database removes that dependency. The rig run below shows both classes initializing the schema and passing on one.

The class check reads only the admission step's failsafe reports. Without its own condition it would still skip after a red Hosted verify even though the step it audits ran. A gate class dropped from the profile would then go unnoticed on exactly those nights.

Reviewer Test Plan

How to verify

Run npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/hosted-process-ci.test.js. The relevant cases:

  • runs the %s step even when the Hosted verify fails: one row each for the fault gates, admission and O4.
  • checks the admission gate classes whenever the admission step passes.
  • boots the admission gates on a database of their own.
  • keeps the steps after the Hosted verify off its outcome, bar its own checks: derives the contract from the job. Every step after the verify except its two report checks must carry a condition that still runs after a red verify, none may carry continue-on-error, and every Maven gate must carry the exact condition and a ceiling.
  • keeps the %s job ceiling above its summed step ceilings: the rows carry the setup allowance (['hosted-harness-mysql', 291, 324, 33], ['hosted-failover-e2e', 270, 285, 15]) and assert ceiling - steps against it. The enforced floor stays at summed + 13.

In CI, the admission step should now run after a red Verify Hosted Java, Spring and MySQL processes, the same way the fault gates and Verify O4 filesystem process and capacity gates already do. It should still be skipped when the run is cancelled or a setup step fails.

Evidence (Before & After)

Nightly Hosted process fault gates / MySQL 8.4 / Java 21, 10-14 to 10-30 (before):

Hosted verify Nights Fault gates Admission gates O4
success 3 (10-17, 10-22, 10-24) ran, green ran, green (~2 min) ran
failure, before #15776 10 skipped skipped ran on all 10
failure, after #15776 (10-28, 10-29, 10-30) 3 ran, 45/0 skipped ran, green
cancelled 1 (10-26) skipped skipped skipped

On the three nights after #15776, the Hosted verify failed after 79–91 minutes, on test failures rather than its 201-minute timeout.

The admission step itself, on a rig: Linux aarch64, MySQL 8.4.6 in Docker, JDK 21, Node 22. The rig built the source as the job's setup steps do, then ran the exact run: text of the base and head admission steps:

Arm Command hosted_harness_test Result
A0 base clean exit 0, both classes pass, class check passes
A1 base plus an fg9b_fire table exit 1, both classes error at boot: Managed schema must contain exactly the 38 target tables: [fg9b_fire, ma_agent_definition, …
B this PR still has fg9b_fire exit 0, both classes pass on qwen_admission_ci (38 managed tables plus Flyway history), class check passes

Mutants against the workflow, each run under the pin test:

Mutant Result
drop the admission step's if:, point it at steps.managed_deps, or add continue-on-error red: the admission row
anything added to the admission command (|| true, || :, | tee, a later line, -fn, --fail-never, -Dmaven.test.failure.ignore=true, a second -Dmysql.url or --define mysql.url), -fn in its MAVEN_ARGS, an extra env var, or shell: 'bash {0}' on its step red: the database case, which pins the command, env and shell whole
move the install step after the Hosted verify red: all three rows
drop O4's if: or add continue-on-error to it red: the O4 row
drop id: 'hosted_admission' red: the class-check case
drop the class check's if:, or change it to always() red: the class-check case
add continue-on-error, || true or shell: 'true {0}' to the class check red: the class-check case
move the class check away from the admission step, or rename it red: the class-check case
point the admission step back at hosted_harness_test red: the database case
drop the CREATE DATABASE line red: the database case
a different MYSQL_PWD red: the database case
if: false on the bundle step red: all three rows, naming Install, build and bundle CLI
if: always() on the install step red: all three rows, naming Install Managed Agent dependencies
the job ceiling back to 304 red: the budget row
a new step after the verify with no if:, or with success(), job.status, !failure(), cancelled() or if: true, run as Maven, a script or an action red: the after-verify case
a narrowing clause on the verify, a report check, a later step or a failure() step red: the after-verify case
a new Maven gate with the condition but no timeout-minutes red: the after-verify case
admission 50 → 60 with the row moved to 301, ceiling left at 324 red: the budget row (expected 23 to be 33)

Each mutant reddens only the case or rows listed. Before this PR the install-step message read expected [ Array(1) ] to deeply equal [], because vitest abbreviates the array in its failure headline when the step name is long. That was the non-blocking note on #15964. The assertion now lists the offenders in its message, falling back to id or uses for an unnamed step.

Local, Linux x86_64, Node 22:

  • hosted-process-ci.test.js: 89/89.
  • Every script test that reads sdk-java.yml, plus workflow-size.test.js and check-failsafe-reports.test.js: 11 files, 970 passed, 2 skipped.
  • .github/scripts/check-workflow-size.sh against the PR base: exit 0 with the new baseline, exit 1 with the old one.
  • .github/scripts/ci-runner-routing.test.mjs under node --test: 102/102.
  • node scripts/lint.js --actionlint and --yamllint both exit 0.
  • Prettier and ESLint are clean.

Tested on

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

Environment (optional)

Rig: Linux aarch64 (Orange Pi), MySQL 8.4.6 container with --disable-log-bin, JDK 21.0.12, Maven 3.9.0, Node 22. CI runs ubuntu-latest with the job's mysql:8.4.6 service.

Risk & Scope

  • Main risk or tradeoff:
    • After a red Hosted verify, the admission gates share the runner with whatever the failed verify left behind, as the fault gates and O4 already do. They no longer share its database.
    • A red Hosted job can take up to 50 more minutes in the worst case. A Verify that timed out used to skip admission; now that path too can fill all four capped ceilings (291 minutes) on one night. So the job ceiling moves from 304 to 324, which keeps 33 minutes of setup allowance: a slow setup (the CLI install makes up to three attempts) still leaves the O4 gates time to run. On every nightly from 10-14 to 10-30 the uncapped steps took under 10 minutes (5.8–9.5), and admission about two.
    • On such a night, an admission-gate failure is now reported alongside the Hosted failure instead of being hidden by it.
    • .size-baseline for sdk-java.yml moves from 144802 to 150332. Of the 5530 bytes:
      • 3971 were already on main, where the file was 148773 bytes, 125 under the ceiling, after growth that never bumped the baseline.
      • 1559 are this PR's: 389 bytes of step lines and 1170 of comments, net.
      • With every comment change reverted, the file would still be 149162 bytes, over the 148898 ceiling. So trimming prose couldn't avoid the bump.
  • Not validated / out of scope:
    • The live run of the new condition on GitHub. It happens on the first nightly after merge with a red Hosted verify, or on a workflow_dispatch of sdk-java.yml (tier full) against this branch.
    • The Hosted verify failures themselves.
    • The admission step's failsafe reports are still not uploaded as an artifact. That was true before this change too.
    • The fault-gate and O4 commands, which this PR doesn't change, are still pinned only by contains-checks. For example, an || : after O4's command passes the pin, as it did before.
  • Breaking changes / migration notes: none.

Linked Issues

Follow-up to #15776, which left this step out of scope. It also folds in the non-blocking diagnostic note from #15964.

中文说明

本 PR 做了什么

Hosted process job 里的 Verify Hosted admission gates,现在即使排在它前面的 Hosted Java、Spring 和 MySQL 验证失败了,也照样会运行。它沿用同一个 job 里 Runtime Broker fault gates(#15776)和 O4 步骤已经在用的条件:只要 workflow run 没有被取消、并且 SDK 安装步骤成功,就会运行。

既然它现在可能在验证失败之后运行,它就不再和那个验证共用数据库。它会新建 qwen_admission_ci 并在那里启动,做法和 O4 使用 qwen_o4_ci 一样。

它后面的 Check that every Hosted admission gate class ran 改为跟随 admission 步骤自己的结果,而不再看整个 job 的状态。

job 上限从 304 提到 324。以前 Verify 超时时 admission 会被跳过;现在这条路径也可能把四个步骤的上限全部跑满,因此没有上限的 setup 步骤保留 33 分钟余量,setup 慢一些时 O4 门禁仍有时间跑完。

workflow 固定测试覆盖了以上全部改动,并且把此前没有任何断言固定的 O4 步骤条件也固定了下来。

.github/workflows/.size-baseline 里 sdk-java.yml 那一行改为文件的新大小,这是 workflow 体积棘轮的要求。其中有多少属于本 PR,见“风险与范围”。

为什么需要

admission 这一步原来没有写 if:,所以只有在前面所有步骤(包括 Hosted 验证)都通过时才会运行。10-14 到 10-30 之间,Hosted 验证失败了 13 晚,admission gates 这 13 晚全部被跳过。其中包括 #15776 合入后的 10-28、10-29、10-30 三晚:这三晚 fault gates 已经照常运行(45/0),admission gates 却仍被跳过。在 Hosted 验证通过的三晚(10-17、10-22、10-24),admission gates 都运行并通过,耗时约两分钟。

两个 gate 类 HostedRecoveryWedgeGate 和 HostedBackgroundPublicationGate 不依赖 Hosted 验证构建出的任何东西。这一步自己会对模块跑 clean verify,只需要 bundle 步骤安装和构建出的东西(node_modules 和 dist/cli.js)、已安装的 SDK 和 job 的 MySQL 服务。

共用的数据库,是失败的验证唯一可能把它们搞坏的地方:

  • Managed schema 校验会拒绝受管表集合之外的任何表。
  • HostedMonitorRunFaultGatesIT、HostedSessionRelayFaultGatesIT、HostedWorkflowRelayFaultGatesIT 和 HostedAutomationFaultGatesIT 会在 hosted_harness_test 里建 fg*_fire 表,并在清理时删掉。其中两个 relay 类只有在 Spring 上下文仍然存活时才删。一个类如果在清理之前被杀掉,它的表就会留下来。
  • Hosted 类使用的隔离扩展只 TRUNCATE ma_ 开头的表,所以没有任何东西会删掉残留的 fg*_fire 表。
  • 只要留下一张,两个 admission gate 就都会在启动时失败,失败原因和它们本身毫无关系。绿夜不会出现这种情况,因为每个类都完成了清理,不会留下任何东西。

换成新库就去掉了这个依赖。下面测试机上的运行表明,两个类都能在新库上初始化 schema 并通过。

类检查只读取 admission 步骤的 failsafe 报告。如果它没有自己的条件,Hosted 验证变红后,即使它要审计的那一步已经运行了,它仍会被跳过。这样一来,恰恰在这些晚上,某个 gate 类从 profile 里掉出去也不会有人发现。

评审测试计划

如何验证

运行 npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/hosted-process-ci.test.js。相关用例:

  • runs the %s step even when the Hosted verify fails:fault gates、admission 和 O4 各一行。
  • checks the admission gate classes whenever the admission step passes。
  • boots the admission gates on a database of their own。
  • keeps the steps after the Hosted verify off its outcome, bar its own checks:从 job 推导约束。verify 之后的步骤,除它自己的两个报告检查外,都必须带在 verify 变红后仍会运行的条件,都不得带 continue-on-error;每个 Maven gate 都必须带完全相同的条件和上限。
  • keeps the %s job ceiling above its summed step ceilings:每行带上 setup 余量(['hosted-harness-mysql', 291, 324, 33]、['hosted-failover-e2e', 270, 285, 15]),并断言 ceiling - steps 等于它。强制下限仍是总和 + 13。

在 CI 上,Verify Hosted Java, Spring and MySQL processes 变红之后,admission 步骤现在应该照样运行,和 fault gates 以及 Verify O4 filesystem process and capacity gates 已有的行为一致。run 被取消或某个前置步骤失败时,它仍应被跳过。

证据(前后对比)

夜跑 Hosted process fault gates / MySQL 8.4 / Java 21,10-14 到 10-30(改动前):

Hosted 验证 晚数 fault gates admission gates O4
success 3(10-17、10-22、10-24) 运行,通过 运行,通过(约 2 分钟) 运行
failure,#15776 之前 10 跳过 跳过 10 晚全部运行
failure,#15776 之后(10-28、10-29、10-30) 3 运行,45/0 跳过 运行,通过
cancelled 1(10-26) 跳过 跳过 跳过

#15776 之后的三晚,Hosted 验证在 79–91 分钟时失败,原因是测试失败,而不是撞上 201 分钟的超时。

admission 步骤本身,在测试机上: Linux aarch64、Docker 里的 MySQL 8.4.6、JDK 21、Node 22。测试机先按 job 的 setup 步骤构建源码,然后逐字运行 base 和 head 两版 admission 步骤的 run: 文本:

臂 命令 hosted_harness_test 结果
A0 base 干净 退出码 0,两个类通过,类检查通过
A1 base 多一张 fg9b_fire 表 退出码 1,两个类都在启动时报错:Managed schema must contain exactly the 38 target tables: [fg9b_fire, ma_agent_definition, …
B 本 PR 仍有 fg9b_fire 退出码 0,两个类在 qwen_admission_ci(38 张受管表加 Flyway history)上通过,类检查通过

针对 workflow 的变异,每个都用固定测试运行:

变异 结果
删掉 admission 步骤的 if:、把它指向 steps.managed_deps,或加 continue-on-error 变红:admission 那一行
在 admission 命令上追加任何内容(|| true、|| :、| tee、再加一行、-fn、--fail-never、-Dmaven.test.failure.ignore=true、第二个 -Dmysql.url 或 --define mysql.url),在它的 MAVEN_ARGS 里加 -fn,多加一个环境变量,或给它的步骤加 shell: 'bash {0}' 变红:数据库用例(它把命令、env 和 shell 整体钉死)
把安装步骤挪到 Hosted verify 之后 变红:三行都红
删掉 O4 的 if:,或给它加 continue-on-error 变红:O4 那一行
删掉 id: 'hosted_admission' 变红:类检查用例
删掉类检查的 if:,或改成 always() 变红:类检查用例
给类检查加 continue-on-error、|| true 或 shell: 'true {0}' 变红:类检查用例
把类检查从 admission 步骤后面挪走,或给它改名 变红:类检查用例
把 admission 步骤改回 hosted_harness_test 变红:数据库用例
删掉 CREATE DATABASE 那一行 变红:数据库用例
换一个 MYSQL_PWD 变红:数据库用例
给 bundle 步骤加 if: false 变红:三行都红,报错点名 Install, build and bundle CLI
给安装步骤加 if: always() 变红:三行都红,报错点名 Install Managed Agent dependencies
把 job 上限改回 304 变红:预算那一行
在 verify 之后新增一个步骤,不带 if:,或带 success()、job.status、!failure()、cancelled()、if: true,以 Maven、脚本或 action 形式运行 变红:verify 之后的用例
收窄子句引用 verify、报告检查、后面的步骤或 failure() 步骤 变红:verify 之后的用例
新增带条件但没有 timeout-minutes 的 Maven gate 变红:verify 之后的用例
admission 50 → 60、该行改为 301、上限仍为 324 变红:预算那一行(expected 23 to be 33)

每个变异都只让所列的用例或行变红。本 PR 之前,安装步骤那条报错是 expected [ Array(1) ] to deeply equal []:步骤名较长时,vitest 会在失败标题行里把数组缩写掉。这是 #15964 上的那条非阻塞意见。现在断言会在消息里列出违规步骤,没有名字的步骤依次用 id、uses 兜底。

本机,Linux x86_64,Node 22:

  • hosted-process-ci.test.js:89/89。
  • 所有读取 sdk-java.yml 的 script 测试,加上 workflow-size.test.js 和 check-failsafe-reports.test.js:11 个文件,970 项通过,2 项跳过。
  • 针对 PR base 运行 .github/scripts/check-workflow-size.sh:用新 baseline 退出码 0,用旧 baseline 退出码 1。
  • .github/scripts/ci-runner-routing.test.mjs(node --test):102/102。
  • node scripts/lint.js --actionlint 和 --yamllint 退出码都是 0。
  • Prettier 和 ESLint 无问题。

测试平台

OS 状态
🍏 macOS ⚠️
🪟 Windows ⚠️
🐧 Linux ✅

环境(可选)

测试机:Linux aarch64(Orange Pi),MySQL 8.4.6 容器(--disable-log-bin),JDK 21.0.12,Maven 3.9.0,Node 22。CI 用的是 ubuntu-latest 和 job 的 mysql:8.4.6 service。

风险与范围

  • 主要风险或权衡:
    • Hosted 验证变红后,admission gates 会和失败的验证遗留下来的东西共用同一台 runner,fault gates 和 O4 本来就是这样;但它们不再共用那个验证的数据库。
    • 最坏情况下,变红的 Hosted job 会多跑最多 50 分钟。以前 Verify 超时时 admission 会被跳过;现在这条路径也可能在同一晚把四个有上限的步骤(291 分钟)全部跑满,因此 job 上限从 304 提到 324,保留 33 分钟 setup 余量:某个 setup 步骤变慢(CLI 安装最多尝试三次)时,O4 门禁仍有时间跑完。10-14 到 10-30 的每次夜跑里,没有上限的步骤都不到 10 分钟(5.8–9.5),admission 约两分钟。
    • 在这样的晚上,admission gate 的失败现在会和 Hosted 的失败一起报告,而不是被它掩盖。
    • .size-baseline 里 sdk-java.yml 从 144802 改为 150332。这 5530 字节中:
      • 3971 字节在 main 上本来就有:那里的文件已是 148773 字节,离上限只剩 125 字节,而那些增长都没有同步上调 baseline。
      • 1559 字节属于本 PR:净增步骤行 389 字节、注释 1170 字节。
      • 即使把本 PR 的注释改动全部撤回,文件也有 149162 字节,仍超过 148898 的上限。所以靠删注释避免不了上调。
  • 未验证 / 不在范围内:
    • 新条件在 GitHub 上的实际运行。要等合入后第一个 Hosted 验证变红的夜跑,或者对本分支做一次 sdk-java.yml 的 workflow_dispatch(tier 为 full)。
    • Hosted 验证本身的失败。
    • admission 步骤的 failsafe 报告仍然没有作为 artifact 上传,本 PR 之前也是如此。
    • fault gates 和 O4 的命令本 PR 没有改,仍只用 contains 断言固定。例如在 O4 命令后加 \|\| : 仍能通过固定测试,和本 PR 之前一样。
  • 破坏性变更 / 迁移说明: 无。

关联 Issue

#15776 的后续(它把这一步留在了范围之外),也顺带处理了 #15964 上那条非阻塞的诊断意见。

…ify fails

The admission step had no condition, so it ran only when every earlier
step passed. The Hosted verify fails most nights, and the step was skipped
on all 13 nights from 10-14 to 10-30 that the verify failed, including the
three since the Runtime Broker fault gates stopped being skipped the same
way. It ran on the other three nights and passed each time, in about two
minutes.

The step rebuilds the module with `clean verify` and needs only the CLI
bundle, the installed SDK and the MySQL service. Each gate class works
under its own random tenant, and on green nights it already runs against
the database the Hosted verify used. So it takes the condition the fault
gates and the O4 step use: run unless the run was cancelled, as long as
the SDK install succeeded.

The class check after it reads only the admission step's reports. It now
follows that step's outcome instead of the job status; otherwise it would
still skip after a red Hosted verify while the step it audits ran.

The pin for the fault-gate condition now covers both steps, and a new case
pins the class check's condition and position. The setup-step assertion
now names the offending steps in its message: vitest abbreviates the
array once a step name is long enough, and the install step's own name
already is.
@wenshao
wenshao requested a balanced review from Copilot October 31, 2026 10:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@qwen-code-review-bot

qwen-code-review-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

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

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

@wenshao wenshao left a comment

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.

Reviewed commit 63d3bc588f825c81b973541831457a59cce7f024: no actionable findings.

The two conditions preserve the intended failure boundaries. !cancelled() allows admission to run after an earlier failed step, while managed_dependencies.outcome == 'success' still requires the preceding checkout/toolchain/bundle setup to have succeeded. Those setup steps have neither if: nor continue-on-error, and the expanded test protects that prerequisite chain for both gate steps.

I also checked the admission profile and both gate classes: admission performs its own reactor clean verify, supplies its Node/CLI/MySQL inputs, and uses distinct random tenants and temporary workspaces. The class-coverage check follows the admission step's own successful outcome and remains immediately after it, before O4's next clean can replace the reports. The added step ID has a matching, live consumer.

Validation on macOS / Node 22.22.2, using an isolated snapshot of the reviewed commit:

  • Changed workflow test: 86/86 passed.
  • All nine script-test files that read sdk-java.yml: 690 passed, 15 skipped, 0 failed, combining the completed runs. The three suites requiring process inspection or local sockets were rerun outside the restricted sandbox and passed; the initial sandbox failures are not PR defects.
  • Failsafe report-checker tests: 22/22 passed.
  • Actionlint expression/workflow validation, Prettier on both changed files, and ESLint on the changed test passed. Actionlint's embedded ShellCheck/Pyflakes checks were disabled for this run.

The October 30 nightly independently confirms the motivating failure pattern: Hosted verify failed, the Broker fault gates and O4 succeeded, and admission plus its class check were skipped. I found no existing inline review threads requiring reconciliation.

The new post-failure Java/MySQL execution path was not run live in this review; a full-tier/nightly run is still needed to verify that runtime path. The local results establish the workflow configuration and report-checking contracts.

中文摘要

评审提交 63d3bc5,未发现需要修改的问题。已核查前置构建依赖、取消与失败条件、两个 gate 的独立运行条件,以及类覆盖检查在报告被清理前执行的顺序。相关测试共 712 项通过、15 项跳过;受进程/端口沙箱限制影响的套件重跑后通过。格式、ESLint 和 actionlint 表达式检查通过。真实的“Hosted verify 失败后继续执行 admission”Java/MySQL 路径仍待完整 CI 验证。

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR — this is a clean follow-through on #15776.

Template looks good ✓

Problem: observed, not theoretical. You've got run-level evidence rather than a hypothesis: 13 nights between 10-14 and 10-30 where the Hosted verify went red and the admission gates were skipped as a consequence, including the three nights after #15776 where the fault gates ran 45/0 in the same job while the admission gates still didn't. The mechanism is also plain in the YAML — the step had no if:, so it inherited the default success() and was hostage to a step it doesn't depend on.

Direction: aligned. A gate that only runs on green nights is a gate that isn't running when you most need to know, and this repo's whole posture is that CI definitions carry their own meta-tests. Restoring coverage to two admission witnesses is squarely inside that.

Size: not applicable — no core paths. Two files, +48/-8: the workflow condition plus its pin test.

Approach: minimal, and it reuses rather than invents. I checked the three conditions side by side in the job and they're byte-identical — fault gates (L1305), admission (L1345), O4 (L1365) all key on steps.managed_dependencies.outcome == 'success'. Keying the class check on steps.hosted_admission.outcome is the right call too: it audits that one step's reports, so it should follow that step and not a job status an earlier failure already set. Folding in the #15964 diagnostic note is technically a second concern, but at six lines and named in the description I wouldn't split it.

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

One thing I'd flag before the code review, because it's the kind of thing that only bites in CI: sdk-java.yml is sitting 125 bytes under its growth-ratchet ceiling on main right now. Worth a look at what the size gate says on this branch.

Moving on to code review. 🔍

中文说明

感谢贡献——这是 #15776 的一次干净收尾。

模板完整 ✓

问题: 已观测,非理论性。你给出的是 run 级别的证据而不是假设:10-14 到 10-30 之间有 13 晚 Hosted 验证变红,admission gates 因此被跳过;其中包含 #15776 合入后的三晚——那三晚同一个 job 里 fault gates 跑了 45/0,admission gates 却依然没跑。机制在 YAML 里也一目了然:这一步没有 if:,于是继承了默认的 success(),被一个它并不依赖的步骤绑住了。

方向: 对齐。一个只在绿灯晚上运行的门禁,等于在最需要它的时候没有运行;而本仓库的一贯立场是 CI 定义要自带 meta-test。给两个 admission witness 恢复覆盖率完全在这个范围内。

规模: 不适用——未触及核心路径。两个文件,+48/-8:workflow 条件加上它的固定测试。

方案: 最小化,而且是复用而非新造。我把 job 里三个条件并排核对过,逐字节一致——fault gates(L1305)、admission(L1345)、O4(L1365)都以 steps.managed_dependencies.outcome == 'success' 为条件。类检查改为以 steps.hosted_admission.outcome 为条件也是对的:它只审计那一步的报告,就该跟随那一步,而不是跟随一个已被更早的失败设定好的 job 状态。顺带处理 #15964 的诊断意见严格说是第二件事,但只有六行且描述里点明了,我不会要求拆出去。

风险: 无升级风险信号——两个文件都不匹配与 revert 相关的路径。

有一件事想在代码审查前先提出来,因为这类问题只会在 CI 里咬人:sdk-java.yml 目前在 main 上距离它的体积棘轮上限只剩 125 字节。建议看一下这个分支上体积门禁的输出。

进入代码审查 🔍

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

Reviewed at 63d3bc588f825c81b973541831457a59cce7f024 · re-run with @qwen-code /triage

@qwen-code-review-bot

qwen-code-review-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Code review

The workflow change itself is right, and I checked each assertion against the file rather than taking the description's word for it. One blocker, and it isn't in the logic — it's the size ratchet.

Blocking: sdk-java.yml trips the workflow growth ratchet

Lint & Static is red on both heads, with the same message:

##[error].github/workflows/sdk-java.yml grew to 149521 bytes, 4719 over its
recorded 144802 (allowance 4096). Move prose into a sibling .md and long steps
into .github/scripts/ — or, if the growth is real, update
.github/workflows/.size-baseline in this PR and say why.

The numbers, measured off the API rather than estimated:

bytes
.size-baseline records 144802
ceiling (baseline + 4096 allowance) 148898
main today 148773 — 125 bytes of headroom left
this PR's head 149521 — fails by 623

This PR adds 748 bytes to the file: 551 of comment prose and 197 of function (id: plus the two if: lines). That matters, because it means trimming the comments cannot rescue this — deleting all 551 prose bytes lands at 148970, still 72 over the ceiling. The one-line baseline bump is the only realistic remedy, which is what the gate's own message prescribes.

Two things worth saying in the PR when you bump it:

Why your local sweep missed it — not carelessness, the tooling genuinely doesn't cover it:

  • scripts/lint.js runs actionlint, yamllint and shellcheck, but not check-workflow-size.sh. The size gate is its own Check workflow file size step in lint_and_static, so --actionlint and --yamllint both exiting 0 says nothing about it.
  • scripts/tests/workflow-size.test.js is the vitest mirror that enforces the same rule, but it never contains the string sdk-java.yml — it enumerates .github/workflows/* and reads .size-baseline. Your "every script test that reads sdk-java.yml: 9 files" sweep is accurate and still misses it. Its %s is within its baseline allowance case would fail on the same arithmetic on any lane that runs it; on this PR the Windows lane is skipped, so the bash gate is the only enforcer that fired.

What I verified as correct

  • Condition parity. Fault gates (L1305), admission (L1345) and O4 (L1365) are byte-identical: ${{ !cancelled() && steps.managed_dependencies.outcome == 'success' }}. No drift between the three.
  • Class-check wiring. id: 'hosted_admission' at L1332; the check at L1360 keys on steps.hosted_admission.outcome and sits immediately after admission (L1331 → L1357), before O4 (L1363). The indexOf(check) === indexOf(admission) + 1 pin matches reality.
  • The setup invariant survives. The test still asserts no step up to and including managed_dependencies carries if: or continue-on-error, and bundle < install < gates. Both new conditions are after install, so the guarantee that a failed bundle leaves install skipped — and therefore the gates skipped rather than spawning a missing dist/cli.js — is untouched.
  • MySQL outlives a red verify. It's a job-level service (services: mysql: image: mysql:8.4.6, L1178-1180), not a step artifact, so the dependency the description claims holds.
  • Budget claim checks out. Job timeout-minutes: 304 is unchanged, and check-ci-budget.mjs matches only ^ {4}timeout-minutes — job level. Step-level if: additions can't move it, so "291 + 13 = 304, the job ceiling does not move" is right.
  • Test-quality improvements are real. expect(gates, name).toBeDefined() is what makes the it.each refactor diagnosable, and naming the offenders in the setup-invariant message fixes the [ Array(1) ] abbreviation the test(ci): pin the setup steps the Broker fault-gate condition relies on #15964 note was about. The not.toMatch(/it\.test|includesFile|excludesFile|<test>/) negative assertion at L415 is unaffected by the added lines.

No over-abstraction, no duplication, nothing in the wrong package.

Test evidence — the PR's own CI, via the API

I did not build or run anything from this branch; the review is static and the evidence below is the PR's own check-runs at the reviewed commit.

Lint & Static failed at both heads (9718197e and the current one) with the identical ratchet error above — so the merge from main did not disturb it, and this is deterministic, not flaky.

One cascade worth knowing about: at the previous head the lint failure took the whole Qwen Code CI run to cancelled — Test, web-shell E2E Smoke and Integration Tests (no-AK) all came back cancelled and produced no results at all. Those jobs are re-running on the current head. So as of writing there is no unit-suite evidence for either commit, only the lint verdict.

38 checks are skipped, which includes Hosted process fault gates / MySQL 8.4 / Java 21.

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

Check Conclusion
(needs.scope.outputs.tier == 'full' || needs.scope.outputs.touched != 'true' || (github.event_name != 'pull_request' && 🚫 cancelled
Integration Tests (no-AK, No Sandbox) 🚫 cancelled
Lint & Static (ubuntu-latest, Node 22.x) ❌ failure
SDK Java (fast) / ubuntu-latest / Java 21 🚫 cancelled
Test (ubuntu-latest, Node 22.x) 🚫 cancelled
web-shell E2E Smoke (ubuntu-latest, Node 22.x) 🚫 cancelled
Check TUI impact ✅ success
Classify PR ✅ success
SDK Java (fast) / Flyway migration version uniqueness ✅ success
SDK Java (fast) / Real daemon E2E / Java 11 ✅ success
Select the Managed Agent tier ✅ success
TUI parity snapshots (ink vs opentui) ✅ success

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

Not verified, and why:

  • The changed steps never execute on this PR's own CI. hosted-harness-mysql is gated if: "${{ inputs.tier != 'fast' }}", and this PR's SDK Java run is the fast tier — the job is among the 38 skipped. So no run of this PR has ever evaluated the new conditions live. You already declare this under "Not validated", and I agree with the declaration rather than treating it as a gap you hid.
  • The pin-test and mutant numbers are your claim, not evidence I reproduced. Triage never executes PR-derived code, so 86/86, the eight mutants and the 704-passed sweep are attributed to you and unchecked here. They're also the kind of claim that doesn't need my re-run — the assertions are readable in the diff and I confirmed each one against the YAML above.

What would actually settle the live behaviour: neither sandboxed lane applies here. @qwen-code /verify A/Bs a CLI build against base and @qwen-code /tmux drives the TUI; the claim under review is how GitHub Actions evaluates a step condition in a nightly Java job, which neither can observe. The real oracle is a workflow_dispatch of sdk-java.yml with tier: full — the input defaults to full, so that runs hosted-harness-mysql — against a Hosted verify that goes red. Failing that, the first nightly with a red verify after merge, as you say. Worth noting the dispatch would still need the ratchet fixed first, since Lint & Static gates nothing there but a red required check blocks the merge regardless.

中文说明

代码审查

workflow 改动本身是对的,我把每条断言都对着文件核过,没有只采信描述。有一个阻塞项,但不在逻辑里——在体积棘轮上。

阻塞:sdk-java.yml 触发了 workflow 体积棘轮

Lint & Static 在两个 head 上都红了,报错一致:文件涨到 149521 字节,比记录的 144802 多出 4719,而容差是 4096。

实测数字(走 API 量的,不是估的):baseline 记 144802,上限 148898(baseline + 4096),main 今天是 148773——只剩 125 字节余量,本 PR 的 head 是 149521,超限 623 字节。

本 PR 给该文件加了 748 字节:551 字节注释文字,197 字节功能行(id: 加两行 if:)。这一点很关键,因为删注释救不回来——把 551 字节注释全删掉也才到 148970,仍超 72 字节。唯一现实的办法就是那一行 baseline 上调,这也正是门禁报错自己给的建议。

上调时建议在 PR 里说明两点:

为什么你本机没扫出来——不是疏忽,是工具确实没覆盖:

  • scripts/lint.js 跑的是 actionlint、yamllint、shellcheck,不含 check-workflow-size.sh。体积门禁是 lint_and_static 里独立的 Check workflow file size 步骤,所以 --actionlint 和 --yamllint 都退出 0 说明不了任何事。
  • scripts/tests/workflow-size.test.js 是执行同一规则的 vitest 镜像,但它里面根本不出现 sdk-java.yml 这个字符串——它枚举 .github/workflows/* 并读 .size-baseline。你那份"所有读取 sdk-java.yml 的 script 测试:9 个文件"是准确的,但仍然漏掉了它。它的 %s is within its baseline allowance 用例在任何会执行它的 lane 上都会以同样的算术失败;本 PR 的 Windows lane 被跳过,所以只有 bash 门禁真的响了。

已核实为正确的部分

  • 条件一致性。 fault gates(L1305)、admission(L1345)、O4(L1365)逐字节相同:${{ !cancelled() && steps.managed_dependencies.outcome == 'success' }}。三者无漂移。
  • 类检查接线。 id: 'hosted_admission' 在 L1332;类检查在 L1360 以 steps.hosted_admission.outcome 为条件,紧跟在 admission 之后(L1331 → L1357),在 O4(L1363)之前。indexOf(check) === indexOf(admission) + 1 这条固定与事实相符。
  • 前置不变量未被破坏。 测试仍然断言直到 managed_dependencies 为止的任何步骤都不得带 if: 或 continue-on-error,且 bundle < install < gates。两个新条件都在 install 之后,所以"bundle 失败则 install 被跳过、进而 gates 被跳过,而不是去启动一个不存在的 dist/cli.js"这条保证没有被动到。
  • MySQL 比红掉的验证活得久。 它是 job 级 service(services: mysql: image: mysql:8.4.6,L1178-1180),不是某一步的产物,所以描述里声称的这个依赖成立。
  • 预算说法成立。 job 的 timeout-minutes: 304 未变,而 check-ci-budget.mjs 只匹配 ^ {4}timeout-minutes——job 级。步骤级新增 if: 动不了它,所以"291 + 13 = 304,job 上限不变"是对的。
  • 测试质量改进是实的。 expect(gates, name).toBeDefined() 正是让 it.each 改造可诊断的那一处;在前置不变量的报错里点名违规步骤,也解决了 test(ci): pin the setup steps the Broker fault-gate condition relies on #15964 那条意见说的 [ Array(1) ] 缩写问题。L415 的 not.toMatch(/it\.test|includesFile|excludesFile|<test>/) 反向断言不受新增行影响。

没有过度抽象,没有重复代码,没有放错包。

测试证据——PR 自身的 CI,经 API 获取

我没有在这个分支上构建或运行任何东西;审查是静态的,下面的证据是 PR 自身在被审提交上的 check-run。

Lint & Static 在两个 head 上都失败(9718197e 和当前这个),报错完全相同——所以从 main 合并没有扰动它,这是确定性的,不是 flaky。

有一个连带情况值得知道:在上一个 head 上,lint 失败把整个 Qwen Code CI run 带到了 cancelled——Test、web-shell E2E Smoke、Integration Tests (no-AK) 全部返回 cancelled,没有产出任何结果。这些 job 正在当前 head 上重跑。所以截至此刻,两个提交都没有单测套件证据,只有 lint 的结论。

有 38 个 check 被跳过,其中包含 Hosted process fault gates / MySQL 8.4 / Java 21。

(CI 结论表见上方英文部分,两处 region 标记之间即为机器可读区域。)

未验证,及原因:

  • 被改动的步骤在本 PR 自身的 CI 上从未执行。 hosted-harness-mysql 受 if: "${{ inputs.tier != 'fast' }}" 限制,而本 PR 的 SDK Java run 是 fast tier——该 job 就在被跳过的 38 个里。所以本 PR 没有任何一次运行真正对这两个新条件求值过。你在"未验证"里已经声明了这一点,我认同这个声明,不认为它是你藏起来的缺口。
  • 固定测试和变异数字是你的说法,不是我复现的证据。 triage 从不执行 PR 派生的代码,所以 86/86、八个变异、704 通过都归属于你,在此未经核验。不过这类说法也不需要我重跑——断言在 diff 里可读,而我已在上面逐条对着 YAML 核实过。

什么才能真正定论这个行为: 两条沙箱通道都不适用。@qwen-code /verify 是把 CLI 构建与 base 做 A/B,@qwen-code /tmux 驱动 TUI;而本次待审的主张是 GitHub Actions 在一个夜跑 Java job 里如何对步骤条件求值,两者都观察不到。真正的判据是对 sdk-java.yml 做一次 workflow_dispatch 并带 tier: full——该输入默认就是 full,因此会运行 hosted-harness-mysql——且让 Hosted 验证变红。退一步,就是合入后第一个验证变红的夜跑,如你所说。需要提醒的是:dispatch 之前也得先修好棘轮,因为 Lint & Static 在那里不拦任何东西,但一个红掉的必需 check 无论如何都会挡住合并。

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

Reviewed at 63d3bc588f825c81b973541831457a59cce7f024 · re-run with @qwen-code /triage

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Confidence: 2/5 — the design is right and I'd merge the logic as written, but a required check is red on both heads and the PR cannot land until one line changes.

Stepping back: my independent proposal before reading the diff was exactly what you did — give the admission step the condition the fault gates already use, and key the auditing step on the audited step's own outcome rather than on job status. There's no simpler path I can find, and nothing here is trying too hard. Two if: lines, one id:, and a pin test that would go red if any of it were removed. The eight mutants you list are the right eight; A3 and A4 in particular are the ones that catch the subtle failure, where the class check silently skips on exactly the nights it exists to police.

The reasoning in the comments is also the good kind — it records why the step must not inherit success(), which is a fact about GitHub Actions semantics that a future reader would otherwise have to rediscover from nightly history.

So this is not a "needs rethinking." It is one missing line, and the gate told you about it twice:

.github/workflows/.size-baseline line 63 still reads 144802 sdk-java.yml while the file is 149521. Bump it, say in the PR that 3971 of the overage is pre-existing main-side drift rather than yours, and this is approvable on the next pass. The detail that makes it non-negotiable rather than merely untidy: main is at 148773 against a 148898 ceiling, so there are 125 bytes of headroom left for everyone. This PR needed 748. Somebody had to be the one to trip it, and trimming your comments wouldn't have helped — 551 prose bytes isn't 623.

Two smaller things, neither blocking, both yours to judge:

  • The added workflow comment reads a little tangled in its last clause — "without this it did on all 13 nights from 10-14 to 10-30 that the verify failed, the three after the fault gates got this condition included." I had to read it twice to get that "the three" means the post-ci(sdk-java): run the Runtime Broker fault gates when the Hosted verify fails #15776 nights. Since this file is byte-budgeted anyway, a shorter clause costs nothing and lands better.
  • The ratchet is now a live hazard for whoever touches sdk-java.yml next, for a drift this PR didn't create. Worth a separate one-line PR on main reclaiming the baseline to the real size, so the next contributor isn't handed the same surprise and doesn't have to explain someone else's 3971 bytes in theirs.

If I were maintaining this in six months I'd thank you for the pin test and curse the byte ceiling, in that order. Requesting changes only because the check is red — not because anything here needs redesigning. 🙏

中文说明

置信度:2/5 —— 设计是对的,就逻辑而言我会照原样合并;但一个必需 check 在两个 head 上都是红的,改一行之前这个 PR 无法落地。

退一步看:在读 diff 之前我自己的方案和你做的完全一致——给 admission 步骤加上 fault gates 已在用的那个条件,并让审计步骤以被审计步骤自身的结果为准,而不是以 job 状态为准。我找不到更简单的路径,这里也没有任何东西在过度用力。两行 if:、一个 id:,加一个"任何一处被删掉就会变红"的固定测试。你列的八个变异正是该列的那八个;其中 A3 和 A4 尤其能抓住那个隐蔽的失败——类检查恰恰在它本该把关的那些晚上静默跳过。

注释里的推理也是好的那一种:它记下了这一步为什么不能继承 success(),而这是一条关于 GitHub Actions 语义的事实,否则未来的读者只能从夜跑历史里重新挖出来。

所以这不是"需要重新思考"。这是缺一行,而且门禁已经告诉你两次了:

.github/workflows/.size-baseline 第 63 行仍写着 144802 sdk-java.yml,而文件已是 149521。把它上调,并在 PR 里说明 4719 的超额中有 3971 是 main 上早已存在的漂移而非你造成的,下一轮就可以批准。让这件事成为"必须做"而不是"只是不整洁"的细节是:main 现在是 148773,上限 148898,也就是说给所有人只剩 125 字节余量。本 PR 需要 748。总得有人踩上去,而删注释也帮不了你——551 字节的文字不等于 623。

另外两件小事,都不阻塞,由你判断:

  • 新增的 workflow 注释最后一个从句读起来有点绕——"without this it did on all 13 nights from 10-14 to 10-30 that the verify failed, the three after the fault gates got this condition included." 我读了两遍才明白 "the three" 指的是 ci(sdk-java): run the Runtime Broker fault gates when the Hosted verify fails #15776 之后那三晚。反正这个文件本来就按字节预算管理,写短一点不花成本,读起来也更顺。
  • 这个棘轮现在对下一个动 sdk-java.yml 的人来说是个现实隐患,而漂移不是本 PR 造成的。值得在 main 上单独开一个一行 PR,把 baseline 收回到真实尺寸,免得下一位贡献者接到同样的意外,还得在自己的 PR 里解释别人的 3971 字节。

如果六个月后由我来维护,我会先感谢你的固定测试,再骂这个字节上限——就是这个顺序。请求修改只因为 check 是红的,不是因为这里有任何东西需要重新设计。🙏

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

Reviewed at 63d3bc588f825c81b973541831457a59cce7f024 · 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.

@wenshao One blocker, and it isn't in the logic — the workflow size ratchet.

Lint & Static is red on both heads with the same message: sdk-java.yml grew to 149521 bytes against a recorded baseline of 144802 and a 4096 allowance, so it fails by 623 bytes. .size-baseline line 63 still reads 144802 sdk-java.yml.

The fix is that one line — bump it to 149521, and say in the PR that only 748 of the 4719-byte overage is yours; the other 3971 is pre-existing drift on main that never got its same-PR bump. The gate hard-fails rather than taking the #9904 stale-baseline warning path precisely because this PR modifies the file.

Worth knowing before you try to trim your way out: the PR adds 551 bytes of comment prose and 197 bytes of function. Deleting every prose byte lands at 148970 — still 72 over the ceiling. Main sits at 148773 against 148898, leaving 125 bytes of headroom for everyone.

Why your local sweep missed it: scripts/lint.js runs actionlint/yamllint/shellcheck but not check-workflow-size.sh (that's a separate step in lint_and_static), and scripts/tests/workflow-size.test.js never contains the string sdk-java.yml — it enumerates .github/workflows/* and reads .size-baseline, so the 9-file sweep is accurate and still misses it.

Everything else I checked holds: the three conditions are byte-identical, the class check is correctly keyed to hosted_admission and positioned immediately after it, the bundle < install < gates invariant is untouched, MySQL is a job-level service so it outlives a red verify, and check-ci-budget.mjs only parses job-level timeouts so your 304-minute claim is right.

Details in the Stage 2 and Stage 3 comments above. Requesting changes only because a required check is red — the design needs nothing rethought. 🙏

@wenshao

wenshao commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: findings — 43 of 45 scripted assertions passed, 2 failed, both the same PR-attributed workflow-size ratchet. The central claim is proven load-bearing by A/B: the head pin test is 86/86 against the head workflow and drops exactly the two new pins (84/86) against the base workflow. Verified head b40bbf12a2ed4d99903cb810da964f049d5e2c5e (base c726d2cfc15b42e4a6bd6b3f1a016354ec5c8991; the PR's production commit is 9718197ea8, the rest are main merges). The head moved mid-round from 900e1f0b to b40bbf12; the A/B and mutation matrix were measured at 900e1f0b and carried because the workflow and test blobs they read are byte-identical (734fa6f9… and 2870d595… at both heads, closure diffstat empty), while the pin suite and size gate were re-run at b40bbf12.

中文摘要

判定:findings(43/45) —— 中心主张成立:admission 步骤改用 fault gates 已在用的条件后,官方表达式引擎在"取消 / 安装失败 / 安装跳过 / 安装缺失"各档都给出预期跳过,只有"未取消且安装成功"才运行;固定测试在 base workflow 上正好红两条(86 项里 84 过),在 head 上 86/86。14 个变异全部被杀:作者列的 8 个,加上本轮补的 6 个兄弟变异(含"移动而非删除类检查"和"语义等价的空格式改动")。

阻塞项只有一条:sdk-java.yml 触发 workflow 体积棘轮(149521 > 148898,超 623 字节),Lint & Static 在 head 上必红,PR 不能合入。修法是 .size-baseline 一行改成 149521 sdk-java.yml——本轮在临时工作树实测:shell 门禁 rc 0、vitest 镜像 238 过 1 跳过。说明:4719 的超额里只有 748 属于本 PR,另外 3971 是 main 上早已存在的漂移,PR 里应写明这一点。

轮中 head 从 900e1f0b 前进到 b40bbf12(又合了一次 main):A/B 与变异矩阵所在的两个 blob 在两个 head 上逐字节相同(已给出 blob 哈希与空 diffstat),固定测试和体积门禁已在新 head 上重跑(86/86;门禁仍 rc 1)。

另一条低优先、仅为推断:admission 的 50 分钟上限正好吃掉 job 在"Hosted 验证撞自己 201 分钟超时"那一档的全部余量(13+201+20+50+20=304),极端情况下会取消最后的 O4 步骤;近三晚验证在 79–91 分钟失败,未观察到。

未覆盖:新条件没有在真实 workflow 运行里求值过——PR 自己的 CI 走 fast tier,hosted-harness-mysql 被跳过,本轮也未触发 workflow_dispatch;失败验证留下的 runner/DB 状态对 admission gates 的影响只做了静态核对(随机 tenant、上传步骤在 admission 之前)。

Central claim and A/B

Claim. Verify Hosted admission gates now carries the condition the fault gates and O4 already use — ${{ !cancelled() && steps.managed_dependencies.outcome == 'success' }} — so a red Hosted verify no longer skips it; and Check that every Hosted admission gate class ran now keys on steps.hosted_admission.outcome instead of the job status. Secondary claim: the pin test covers both changes and the setup-step guard, and the diagnostic now names offending steps.

Instrument. The identical 86-case pin suite was run against two workflow YAMLs that differ only by the PR — the head file at 900e1f0b and the base file at 35daec35. The swapped YAML is the only difference between cells; the M .github/workflows/sdk-java.yml shown in the capture is that swap, and every cell restored the tree afterwards (clean-tree assertion between rows). Both files are byte-identical at the final head/base (b40bbf12/c726d2cf), where the suite was re-run at 86/86.

Cell Workflow YAML Pin test Result
head / head 900e1f0b head (86 cases) 86/86 pass
head test / base YAML 35daec35 head (86 cases) 84/86 — exactly the two new pins red
base test / head YAML 900e1f0b base (84 cases) 84/84 pass (the base pin cannot see the change)
base / base 35daec35 base (84 cases) 84/84 pass

The two base-arm failures are the intended behavioural mismatches, not setup errors: expected undefined to be '${{ !cancelled() && steps.managed_dep…' (the admission step has no if: on base) and expected undefined to be 'hosted_admission' (no id on base).

A/B: head pin test on head vs base workflow

Condition semantics. The workflow pins strings; the runner decides what they mean. Every expression was evaluated with the official @actions/expressions engine (0.3.61, cancelled() supplied as a zero-arg function, steps context built per tuple):

Condition cancelled() Step context Expected Actual
admission false install success run run
admission true install success skip skip
admission false install failure skip skip
admission false install skipped skip skip
admission false install missing skip skip
class check false admission success (job red) run run
class check false admission failure skip skip
class check false admission skipped skip skip
class check true admission success skip skip

The two new conditions are byte-identical to the fault-gate and O4 conditions, and the wiring order is: Upload Hosted process reports (if: always()) → admission → class check → O4. The upload preceding the admission step matters: on a red night the admission step's clean verify cannot destroy the Hosted verify's failsafe reports before they are uploaded.

Mutation matrix — 14/14 killed, none escaped:

Mutant Change Expected red Measured
A1 drop admission if: admission row ✔ 85/86
A2 drop id: 'hosted_admission' class-check case ✔ 85/86
A3 drop class-check if: class-check case ✔ 85/86
A4 class-check if: → always() class-check case ✔ 85/86
A5 admission if: points at steps.managed_deps admission row ✔ 85/86
A6 delete the class-check step class-check case ✔ 85/86
M4 if: false on the bundle step both rows, naming the bundle step ✔ 84/86
M6 if: always() on the install step both rows, naming the install step ✔ 84/86
A6b move the class check before admission (not delete) class-check case (position) ✔ 85/86
S1 admission if: → always() admission row ✔ 85/86
S3 class check points at managed_dependencies class-check case ✔ 85/86
S4 positive control: fault-gate outcome → conclusion pre-existing fault-gate row ✔ 85/86
S5 whitespace-only condition change (semantics identical) admission row (literal pin) ✔ 85/86
S6 class-check run target hosted-gates → hosted class-check case ✔ 85/86

S4 is the positive control: it mutates a clause a pre-existing row already pins, proving the runner collects this file's tests and a kill is reachable. The unmutated baseline ran first through the same runner (86/86). M6's custom message names the step (setup steps with if: or continue-on-error: Install Managed Agent dependencies), which is the #15964 diagnostic fix the PR folds in; the unannotated vitest diff still abbreviates to [ Array(1) ], but the message carries the name.

Mutation matrix: 14/14 killed exactly the expected pin

Nightly evidence (census, not a sample). Every scheduled sdk-java.yml run from 10-14 to 10-30 was read from the API (17 runs):

Verify Nights Fault gates Admission Class check O4
success (10-17, 10-22, 10-24) 3 ran, green ran, green (2m55s on 10-24) ran, green ran, green
failure, before #15776 10 skipped skipped skipped ran (3 red)
failure, after #15776 (10-28..10-30) 3 ran, green skipped 3/3 skipped 3/3 ran, green
cancelled (10-26) 1 skipped skipped skipped skipped

verify_failure=13, admission_skipped_on_red=13, admission_ran_on_red=0. The three post-#15776 nights failed at 79m51s, 91m02s and 83m48s — test failures, not the 201-minute timeout — and the Hosted report upload succeeded 13/13 before admission would have run.

Nightly census 10-14..10-30: admission skipped on 13/13 red nights

Findings

F1 — blocking (PR): the workflow size ratchet is red at the head; the PR cannot land

Lint & Static failed at head b40bbf12 (check-run 124524113010, 50 s) with the same annotation the triage saw at 63d3bc5 and at the previous head 900e1f0b (check-run 124520778507):

.github/workflows/sdk-java.yml: .github/workflows/sdk-java.yml grew to 149521 bytes,
4719 over its recorded 144802 (allowance 4096). Move prose into a sibling .md and long
steps into .github/scripts/ — or, if the growth is real, update
.github/workflows/.size-baseline in this PR and say why.

Reproduced locally with the CI command (WORKFLOW_SIZE_BASE_SHA set to the base OID): shell gate exit 1; the vitest mirror workflow-size.test.js is 237 passed / 1 failed of 239. The arithmetic: baseline 144802 + 4096 = 148898 ceiling; head 149521; 623 bytes over. The PR adds 748 bytes to the file (551 comment prose, 197 function); trimming all the added prose still lands at 148970, 72 over, so the baseline bump is the only realistic remedy — exactly what the gate's own message prescribes.

The bump is one line, and it is measured, not eyeballed: setting .github/workflows/.size-baseline line 63 to 149521 sdk-java.yml makes the shell gate exit 0 and the mirror 238 passed / 1 skipped, with a one-line diff and no other file touched. The pin suite is unaffected (hosted-process-ci.test.js 86/86 before and after; it does not read the baseline).

One thing to state in the PR when bumping: of the 4719 overage, only 748 is this PR's; 3971 is pre-existing drift on main that never got its same-PR bump. The ratchet hard-fails here rather than taking the stale-baseline warning path precisely because this PR does modify the file (file_matches_base only extends leniency to byte-identical files).

Reproduce:

cd <head-worktree>
WORKFLOW_SIZE_BASE_SHA=c726d2cfc15b42e4a6bd6b3f1a016354ec5c8991 bash .github/scripts/check-workflow-size.sh   # exit 1
WORKFLOW_SIZE_BASE_SHA=c726d2cfc15b42e4a6bd6b3f1a016354ec5c8991 npx vitest run \
  --config ./scripts/tests/vitest.config.ts scripts/tests/workflow-size.test.js                              # 1 failed

Workflow size ratchet at head: 623 bytes over the ceiling

F2 — suggestion (inferred, not observed): the admission ceiling consumes the job's last 50 minutes of slack

The job is timeout-minutes: 304; the four step ceilings sum to 291 (201 verify + 20 fault gates + 50 admission + 20 O4) and the comment accounts 13 minutes for the uncapped setup. Before this PR, a night whose Hosted verify hit its 201-minute ceiling ran 13+201+20+20 = 254 minutes, leaving 50 minutes of slack. After this PR that same night is 13+201+20+50+20 = 304 — exactly the job ceiling, with the class check still to run. If the admission run ever reaches its 50-minute ceiling on such a night, the job is cancelled at 304 and the last step (O4) is lost; pre-PR, O4 ran in that regime.

The measured regime does not reach it: the three red nights failed at 79–91 minutes, and the only green admission run took 2m55s, so this is arithmetic from the YAML ceilings, not something I observed. Printing the numbers:

node -e 'const{parse}=require("yaml"),fs=require("fs");
const j=parse(fs.readFileSync(".github/workflows/sdk-java.yml","utf8")).jobs["hosted-harness-mysql"];
const s=j.steps.reduce((a,x)=>a+(x["timeout-minutes"]||0),0);
console.log({job:j["timeout-minutes"],stepCeilings:s,gap:j["timeout-minutes"]-s})'

No change is required for merge; the report records the boundary because "the job ceiling does not move" is true but the slack does.

Not covered

  • No live evaluation of the new conditions in a real workflow run. The PR's own CI is the SDK Java fast tier, so hosted-harness-mysql is among the skipped checks; no workflow_dispatch was triggered this round. The first nightly after merge (or a workflow_dispatch with the default tier: full against a red Hosted verify) remains the live oracle, as the PR says.
  • The Hosted verify failures themselves — out of scope.
  • Admission gates against a failed verify's runner/DB leftovers — not executed. Statically verified: each class uses its own random tenant (wedge-<uuid>, publication-<uuid>), and the Hosted report upload precedes admission, so admission's clean cannot erase the failed verify's evidence.
  • Windows lane — skipped on this PR. yamllint is not installed on this machine (actionlint exited 0; the YAML was parsed by the yaml package and by the expression harness).
  • Per-commit attribution — the only production commit is 9718197ea8; 63d3bc58, 900e1f0b and b40bbf12 are main merges. The aggregate base→head diff was verified; rows were not attributed commit-by-commit.
  • Head moved mid-round — 900e1f0b → b40bbf12, a second main merge (c726d2cf). git diff --stat 900e1f0b..b40bbf12 over the consumed closure is empty and the workflow/pin-test blobs are 734fa6f9…/2870d595… at both heads. The pin suite (86/86) and size gate (exit 1) were re-run at b40bbf12; the A/B cells and mutation matrix carry on the identical blobs. The non-closure delta is docs, RuntimeBrokerService.java and a web-shell vite config, none of which these measurements read. The PR base also advanced (35daec35 → c726d2cf); sdk-java.yml and .size-baseline are byte-identical at both bases, and the size gate was re-run against c726d2cf.
  • The 9-file sdk-java.yml-reading sweep was run at this head on macOS: 693 passed, 15 skipped of 708. The PR body's 704/1 was measured on Linux at an earlier head; the extra skips here are platform-gated. The touched pin file itself is 86/86 here.

Methodology

macOS aarch64; harness Node 24.18.1, project Node 22-compatible. Detached worktrees at tmp/pr16010-head (900e1f0b, later b40bbf12) and tmp/pr16010-base (35daec35), each seeded from the checkout's node_modules by hardlink; the resolved realpath of node_modules/yaml points into each tree, so the base arm cannot load head code. The pin suite was run through the repo's own scripts/tests/vitest.config.ts with the vitest JSON reporter; each cell restored the tree with git checkout HEAD -- and asserted a clean status before the next cell. The 14 mutants are single-point text edits to the head workflow (line-anchored where the step name repeats across jobs); each ran the same suite and the unmutated baseline ran first. Expression semantics were evaluated with the npm-published @actions/expressions 0.3.61 (unpacked under /tmp, not added to the repo). Nightly step conclusions came from gh api over every scheduled run in the window. The size gate ran with the CI's own WORKFLOW_SIZE_BASE_SHA (final run against the advanced base c726d2cf); the one-line fix was applied in the scratch tree, measured, and reverted. Raw logs, per-cell JSON and the harnesses are in tmp/pr16010-verify-20261031-190819/ (assertions.json, mutations.json, logs/, harness/).

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

Not reviewed: build-and-test — SDK Java (fast) / Hosted process fault gates / MySQL 8.4 / Java 21 was skipped in CI and its Java/MySQL suite did not run locally, so the new step condition was never evaluated live.

Not explored to full depth (tool budget reached): "agent 4": none — 9 tool calls used of ~33.; "agent 6a": whether processes leaked into /sys/fs/cgroup/fg8 by a failed fault-gates or verify parent can disturb the 2400 s admission fork on the newly-reachable red pat….

Not linted (tool limitation, not a blocker): .github/workflows/sdk-java.yml — actionlint embedded-shell source mapping is not yet supported.

[Critical] R1-1: the workflow size ratchet is still red, and .github/workflows/.size-baseline was not bumped in this PR. .github/workflows/sdk-java.yml is 149521 bytes against a recorded baseline of 144802 plus a 4096-byte allowance (ceiling 148898), so bash .github/scripts/check-workflow-size.sh exits 1 and the vitest mirror scripts/tests/workflow-size.test.js fails on the same arithmetic — Lint & Static and Test are both red on this head. Main sits at 148773 bytes (125 bytes of headroom) and this diff adds 748 (551 of prose, 197 of function), so 3971 of the 4719-byte overage is pre-existing drift rather than this change's; write that split in the description when you bump the baseline line to 149521 sdk-java.yml, or trim the added prose to fit under 148898.

中文说明

仅完成部分审查,审查缺口已披露。

未审查(原文为英文):build-and-test — SDK Java (fast) / Hosted process fault gates / MySQL 8.4 / Java 21 was skipped in CI and its Java/MySQL suite did not run locally, so the new step condition was never evaluated live.

未探索到全部深度(达到工具调用预算):"agent 4":none — 9 tool calls used of ~33.;"agent 6a":whether processes leaked into /sys/fs/cgroup/fg8 by a failed fault-gates or verify parent can disturb the 2400 s admission fork on the newly-reachable red pat…。

未检查(工具限制,非阻断):.github/workflows/sdk-java.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。

[Critical] R1-1: the workflow size ratchet is still red, and .github/workflows/.size-baseline was not bumped in this PR. .github/workflows/sdk-java.yml is 149521 bytes against a recorded baseline of 144802 plus a 4096-byte allowance (ceiling 148898), so bash .github/scripts/check-workflow-size.sh exits 1 and the vitest mirror scripts/tests/workflow-size.test.js fails on the same arithmetic — Lint & Static and Test are both red on this head. Main sits at 148773 bytes (125 bytes of headroom) and this diff adds 748 (551 of prose, 197 of function), so 3971 of the 4719-byte overage is pre-existing drift rather than this change's; write that split in the description when you bump the baseline line to 149521 sdk-java.yml, or trim the added prose to fit under 148898.

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

Comment thread .github/workflows/sdk-java.yml Resolved
Comment thread scripts/tests/hosted-process-ci.test.js Resolved
Comment thread scripts/tests/hosted-process-ci.test.js Resolved
The admission step now runs on red-verify nights too, so the job's worst
case sums all four capped steps (291 min) plus the uncapped setup. Raise
the hosted-harness-mysql ceiling from 304 to 324 so a slow setup (the CLI
install retries three times) cannot cancel the job before the O4 gates,
whose !cancelled() condition would record them skipped.

Close the two pin gaps the review found: the red-verify condition test
gains the O4 row (all three conditioned steps are now pinned), and the
admission class-check test pins that the check step carries no
continue-on-error, so a dropped gate class still fails the job.

All three pins are mutation-witnessed at this head (ceiling back to 304,
O4 if: deleted, continue-on-error on the check step each redden exactly
their case); the nine sdk-java.yml parsing suites pass 709/709.
… the size baseline

Now that the admission step runs after a red Hosted verify, it must not
share that verify's database. Managed schema validation refuses any table
outside the managed set, and four Hosted ITs create fg*_fire tables they
drop only during cleanup (the relay classes only while their Spring context
is active), while the isolation extension truncates only ma_ tables. A
class killed before its cleanup would leave one behind and fail both
admission gates at boot. On a MySQL 8.4.6 rig, an fg9b_fire table in
hosted_harness_test made the base command fail both classes with "Managed
schema must contain exactly the 38 target tables", while this command
passed both on a fresh qwen_admission_ci. The step now creates that
database the way O4 creates qwen_o4_ci.

The pin test adds the O4 row, pins that the class check has no
continue-on-error, custom shell or altered command, that no gate command
swallows its failure, and that admission boots on its own database. Both
steps' names are checked before use.

sdk-java.yml outgrew the ratchet: main's copy was already 3971 bytes over
its recorded 144802 without a bump, and this change adds the rest. Even
without its comments the file would exceed the ceiling, so the baseline
moves to the file's size.
…f-hosted-verify' into ci/admission-gates-independent-of-hosted-verify

# Conflicts:
#	scripts/tests/hosted-process-ci.test.js
@wenshao

wenshao commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: findings — 54 of 56 scripted assertions passed, 2 failed, both the same PR-attributed workflow-size ratchet. This is a follow-up round: since round 1 (b40bbf12, comment 6542823926) the only change to the pinned inputs is f637a55a9 (+20/−6), which closes round 1's budget note and the two pin gaps and leaves the size ratchet open. Verified head 1ca91a2773ebb4b7be730ca028e202f08cd7d30b (base 74bd584f0b89932ea183efcc38d43fb9f01b39c2; production commits 9718197ea8 and f637a55a9f, everything else is main merges).

中文摘要

判定:findings(54/56) —— 轮次增量只有 f637a55a9:job 上限 304→324(33 分钟 setup 余量,O4 在红夜仍可达)、O4 加入"红夜仍运行"的三行钉、类检查新增 continue-on-error 缺席钉。这三处都已实测承重:17/17 变异被杀(含 324→304、删 O4 的 if:、给类检查加 continue-on-error),固定测试 87/87,官方表达式引擎 24/24(含预算 291+33=324、< GitHub 360 上限)。轮 1 的预算余量提示(F2)与评审 bot 的两条 pin 缺口(R1-2/R1-3)关闭。

唯一阻塞项仍在:.size-baseline 没有更新,head 149854 B 比上限 148898 超 956 B,Lint & Static 在 head 上红(check-run 124556763932)。本轮新增的两个 pin 让文件又长了 333 B,超限从 623 升到 956;一行改成 149854 sdk-java.yml 实测门禁转绿(238 过 1 跳过),仍是唯一现实修法。4719→5052 的超额里,3971 B 是 main 原有漂移。

A/B 诚实说明:head 测试在 base workflow 上只红三条(预算行、admission 行、类检查用例),因为 fault-gate 与 O4 的条件在 base 已存在;新增的 O4 pin 由删除 O4 if: 的变异证明承重,不由 base 臂证明。base 测试在 head 上红一条(旧的 304 预算钉看到 324),说明超时改动同样被钉住。

未覆盖:新条件仍未在真实 workflow 运行中求值(PR 自身 CI 走 fast tier,hosted-harness-mysql 被跳过;本轮未触发 workflow_dispatch);失败验证留下的 runner/DB 状态对 admission gates 的影响只做静态核对;夜跑普查沿用轮 1(10-31 的夜跑尚未发生)。

What changed since round 1

Commit Change Effect
f637a55a9 hosted-harness-mysql ceiling 304 → 324 (33-minute setup allowance); O4 added to the red-verify it.each rows; the class check's continue-on-error absence pinned closes round-1 F2 and the two bot pin gaps (R1-2, R1-3)

git diff --stat b40bbf12..1ca91a27 over the six-file input closure is just the two files (+20/−6); the only commit touching them is f637a55a9. Everything else in the 119-file delta is main.

Central claim re-verified at the new head

The identical 87-case pin suite was run against the head workflow and the base workflow; the base arm swaps only the YAML.

Cell Workflow YAML Pin test Result
head / head 1ca91a27 head (87 cases) 87/87 pass
head test / base YAML 74bd584f head (87 cases) 84/87 — three red: budget row (304 ≠ 324), admission row (no if: on base), class-check case (no id on base)
base test / head YAML 1ca91a27 base (84 cases) 83/84 — one red: the old 304 budget pin sees the new 324
base / base 74bd584f base (84 cases) 84/84 pass

The fault-gate and O4 rows pass on the base YAML because their conditions pre-exist there; the new O4 pin is proven load-bearing by the deletion mutant below, not by the base arm. The base-test arm's single red is the stale 304 row — evidence the timeout change is visible to the old test rather than silently absorbed.

Round 2 A/B: head pin test on head vs base workflow

Mutation matrix — 17/17 killed, none escaped:

Mutant Change Expected red Measured
A1 drop admission if: admission row ✔ 86/87
A2 drop id: 'hosted_admission' class-check case ✔ 86/87
A3 drop class-check if: class-check case ✔ 86/87
A4 class-check if: → always() class-check case ✔ 86/87
A5 admission if: points at steps.managed_deps admission row ✔ 86/87
A6 delete the class-check step class-check case ✔ 86/87
A6b move the class check before admission class-check case ✔ 86/87
M4 if: false on the bundle step fault + admission + O4 rows ✔ 84/87
M6 if: always() on the install step fault + admission + O4 rows ✔ 84/87
S1 admission if: → always() admission row ✔ 86/87
S3 class check points at managed_dependencies class-check case ✔ 86/87
S4 positive control: fault-gate outcome → conclusion fault-gate row ✔ 86/87
S5 whitespace-only condition change (semantics identical) admission row (literal pin) ✔ 86/87
S6 class-check run target hosted-gates → hosted class-check case ✔ 86/87
T1 job ceiling 324 → 304 budget row ✔ 86/87
O4 delete O4's if: O4 row ✔ 86/87
CE continue-on-error: true on the class check class-check case ✔ 86/87

T1, O4 and CE are exactly the three witnesses f637a55a9 claims; each reddens its own case and nothing else. M4/M6 now kill three rows because O4 joined the shared it.each. S4 remains the positive control that proves the runner collects this file's tests and a kill is reachable; the unmutated baseline ran first through the same runner (87/87).

Round 2 mutation matrix: 17/17 killed exactly the expected pin

Budget and semantics (official engine, 24/24): job 324; step ceilings sum 291 (201 + 20 + 50 + 20); setup allowance 33, above the 13-minute floor; 324 < 360 (GitHub hosted cap); 0.3.61 evaluates the three gate conditions exactly as before (run only when !cancelled() and the install succeeded; the class check runs only when admission succeeded). .github/scripts/check-ci-budget.mjs passes. The measured setup on the last three nights was 8m10s (10-30) and 8m47s (10-29), so 33 minutes is ample for the O4-reachability intent.

Repo sweeps: hosted-process-ci.test.js 87/87; the nine sdk-java.yml-reading suites 694 passed, 15 skipped, 0 failed of 709 on macOS (the 15 skips are platform-gated; the commit's 709/709 is the Linux count); Prettier clean; actionlint exits 0.

Findings

F1 — blocking (PR, carried): the size ratchet is still red, and this push made it larger

Lint & Static failed at head 1ca91a27 (check-run 124556763932, 53 s):

.github/workflows/sdk-java.yml: .github/workflows/sdk-java.yml grew to 149854 bytes,
5052 over its recorded 144802 (allowance 4096). Move prose into a sibling .md and long
steps into .github/scripts/ — or, if the growth is real, update
.github/workflows/.size-baseline in this PR and say why.

Measured locally with the CI command: shell gate exit 1; the vitest mirror workflow-size.test.js is 237 passed / 1 failed of 239. The arithmetic: baseline 144802 + 4096 = 148898 ceiling; head 149854; 956 bytes over. The PR now adds 1081 bytes to the file (it was 748 at round 1); the two new pins and their comments account for the extra 333. The added prose is not the lever: the baseline bump is the gate's own prescribed remedy and the only realistic one.

The bump is one line and measured, not eyeballed: setting .github/workflows/.size-baseline line 63 to 149854 sdk-java.yml makes the shell gate exit 0 and the mirror 238 passed / 1 skipped, with a one-line diff and the pin suite unchanged. As at round 1: of the 5052-byte overage, 3971 is pre-existing drift on main that never got its same-PR bump; state that split when bumping.

Reproduce:

cd <head-worktree>
WORKFLOW_SIZE_BASE_SHA=74bd584f0b89932ea183efcc38d43fb9f01b39c2 bash .github/scripts/check-workflow-size.sh   # exit 1
WORKFLOW_SIZE_BASE_SHA=74bd584f0b89932ea183efcc38d43fb9f01b39c2 npx vitest run \
  --config ./scripts/tests/vitest.config.ts scripts/tests/workflow-size.test.js                              # 1 failed

Round 2 size ratchet: 149854 bytes, 956 over the ceiling

Closed since round 1

  • F2 (budget boundary) — closed. The ceiling is now 324, the step ceilings still sum 291, so the setup allowance is 33 instead of 13. At the floor the O4 gates are reachable (291 + 13 = 304 ≤ 324), 324 < 360, and the CI budget script passes. Measured setup (8–9 minutes) leaves ~24 minutes of headroom. This is a correct, pinned response; no new finding.
  • R1-2 (O4 condition unpinned) — closed. O4 joined the red-verify it.each; deleting its if: reddens exactly runs the Verify O4 filesystem process and capacity gates step even when the Hosted verify fails (86/87).
  • R1-3 (class check could not fail the job) — closed. The class-check test now pins continue-on-error absent; adding continue-on-error: true reddens exactly checks the admission gate classes whenever the admission step passes (86/87).

Not covered

  • No live evaluation of the new conditions in a real workflow run. The PR's own CI is the SDK Java fast tier, so hosted-harness-mysql is skipped; no workflow_dispatch was triggered this round. The first nightly after merge (or a workflow_dispatch with the default tier: full against a red Hosted verify) remains the live oracle.
  • Admission gates against a failed verify's runner/DB leftovers — static only: random tenants (wedge-<uuid>, publication-<uuid>), and the Hosted report upload precedes admission.
  • Windows lane — skipped. yamllint is not installed on this machine; actionlint exits 0 (not used as evidence).
  • Nightly census — reused from round 1 (10-14..10-30: 17 runs, 13 verify failures, admission skipped 13/13, fault gates ran on the three post-ci(sdk-java): run the Runtime Broker fault gates when the Hosted verify fails #15776 nights). The 10-31 nightly had not run at report time, so the fix's live effect is still future.
  • The nine-file sweep's 15 skips are macOS/Linux environment gates; the author's 709/709 is the Linux count. The touched pin file is 87/87 here.
  • Per-commit attribution — the production commits are 9718197ea8 (admission condition) and f637a55a9f (O4 reachability + pins); the other seven commits on the head are main merges. The aggregate diff was verified; rows were not attributed per merge.

Methodology

macOS aarch64; harness Node 24.18.1. Detached worktrees at tmp/pr16010-r2-head (1ca91a27) and tmp/pr16010-r2-base (74bd584f), each seeded from the checkout's node_modules by hardlink; the resolved realpath of node_modules/yaml points into each tree. The pin suite ran through the repo's own scripts/tests/vitest.config.ts with the vitest JSON reporter; each A/B cell restored the tree with git checkout HEAD -- and asserted a clean status. The 17 mutants are single-point text edits to the head workflow (dynamic line lookup inside hosted-harness-mysql where a step name repeats across jobs); the unmutated baseline ran first. Expression semantics and budget wiring were evaluated with the npm-published @actions/expressions 0.3.61 (unpacked under /tmp) and the yaml parser. The size gate ran with the CI's own WORKFLOW_SIZE_BASE_SHA; the one-line fix was applied in the scratch tree, measured, and reverted. Raw logs, per-cell JSON, the ledger and harnesses are in tmp/pr16010-verify-r2-20261031-215825/ (assertions.json, mutations.json, logs/, harness/).

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

Not reviewed: build-and-test — SDK Java (fast) / Hosted process fault gates / MySQL 8.4 / Java 21 was skipped in CI (fast tier) and the live Java/MySQL path was not run locally, so the new red-verify step condition was never evaluated live.

Not linted (tool limitation, not a blocker): .github/workflows/sdk-java.yml — actionlint embedded-shell source mapping is not yet supported.

中文说明

仅完成部分审查,审查缺口已披露。

未审查(原文为英文):build-and-test — SDK Java (fast) / Hosted process fault gates / MySQL 8.4 / Java 21 was skipped in CI (fast tier) and the live Java/MySQL path was not run locally, so the new red-verify step condition was never evaluated live.

未检查(工具限制,非阻断):.github/workflows/sdk-java.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。

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

Comment thread .github/workflows/sdk-java.yml Resolved
…the verify

The admission step's command, env and shell are now pinned with literal
values. The hosted-gates class check counts a failed class as one that
ran, so an `||` fallback, a pipe, or -fn in the command or in MAVEN_ARGS
would have turned a red admission gate green, and a second -Dmysql.url
would have pointed it back at the shared database. A list of forbidden
substrings caught some of these and rejected harmless commands, so the
fault-gate and O4 rows go back to pinning only their condition and
continue-on-error; their commands are unchanged by this PR.

The three gate rows also pin that the SDK install comes before the Hosted
verify. After it, a red verify would skip the install and every gate with
it, on exactly the nights the condition is for.

Comments: the job comment opened with stale ceilings (162 + 20 + 50 + 20
= 252); it now gives the measured setup time (under 10 minutes on every
nightly from 10-14 to 10-30), states that what changed is the timed-out
Verify path, which used to skip admission, and says the CLI install makes
up to three attempts rather than retrying three times. The O4 row comment
says O4 has carried its condition since it was added.
…f-hosted-verify' into ci/admission-gates-independent-of-hosted-verify
@wenshao
wenshao requested a balanced review from Copilot October 31, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@wenshao

wenshao commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed f6cf12a602. It addresses R1-4 and adds one change of its own. It merges on top of f637a55a9f and keeps everything that commit published: the 324 ceiling, the O4 row and the class-check continue-on-error pin. A few of its comments are worded more precisely.

R1-4, the size ratchet: .size-baseline now records 150332 sdk-java.yml, the file's exact size. Of the 5530 bytes over the old 144802, 3971 were already on main (148773 bytes) without a bump. The other 1559 are this PR's. With every comment change in this PR reverted, the file would still be 149162 bytes, above the 148898 ceiling, so the bump was unavoidable. check-workflow-size.sh against the PR base exits 0 with the new number and 1 with the old one.

Admission now boots on its own database. Now that the step runs after a red verify, sharing hosted_harness_test with it was a real hazard:

  • Managed schema validation refuses any table outside the managed set.
  • Four Hosted ITs create fg*_fire tables and drop them only during cleanup; the relay classes drop theirs only while their Spring context is active.
  • The isolation extension truncates only ma_ tables, so nothing else removes a leftover fg*_fire table.

On a MySQL 8.4.6 rig, using the exact run: text of both versions:

Arm Command hosted_harness_test Result
A0 base clean both classes pass
A1 base plus fg9b_fire both classes error at boot: Managed schema must contain exactly the 38 target tables: [fg9b_fire, …
B this push still has fg9b_fire both classes pass on a fresh qwen_admission_ci, and the class check passes

The step now creates qwen_admission_ci the way O4 creates qwen_o4_ci, and a new case, boots the admission gates on a database of their own, pins it.

More pins, each mutation-checked (88/88 intact):

  • The class check's command is pinned exactly, and it may not carry a custom shell.
  • The admission step's command, env and shell are pinned whole. The hosted-gates class check counts a failed class as one that ran, so an || fallback, a pipe, or -fn in the command or MAVEN_ARGS could turn a red admission gate green, and a second -Dmysql.url would point it back at the shared database. The fault-gate and O4 commands aren't changed here and keep their existing contains-checks.
  • The install step must come before the Hosted verify; after it, a red verify would skip the install and all three gates with it.
  • Comment fixes in the job comment: it opened with stale ceilings (162 + 20 + 50 + 20 = 252), and it now states the cause of the 33-minute allowance (a Verify that timed out used to skip admission) and that the CLI install makes up to three attempts.
  • Both step names are checked before use.

All 34 mutants against this PR's steps go red, and each reddens only the case or rows it targets. The one exception is renaming the admission step, which also reddens two earlier cases that look the step up by name. The PR body is updated to match, in both languages.

中文说明

已推送 f6cf12a602:处理 R1-4,并加了一处我自己的改动。它合并在 f637a55a9f 之上,保留了那个提交发布的全部内容:324 上限、O4 那一行,以及类检查的 continue-on-error 断言;其中几处注释改得更准确。

R1-4,体积棘轮: .size-baseline 现在记录 150332 sdk-java.yml,即文件的精确大小。比旧值 144802 多出的 5530 字节里,3971 字节在 main 上本来就有(148773 字节),一直没上调;其余 1559 字节属于本 PR。即使把本 PR 的注释改动全部撤回,文件也有 149162 字节,仍超过 148898 的上限,所以上调无法避免。针对 PR base 运行 check-workflow-size.sh:用新值退出码 0,用旧值退出码 1。

admission 现在在自己的数据库上启动。 这一步现在会在验证变红之后运行,继续和验证共用 hosted_harness_test 就成了实际隐患:

  • Managed schema 校验会拒绝受管表集合之外的任何表。
  • 有四个 Hosted IT 会建 fg*_fire 表,只在清理时删掉;其中两个 relay 类只有在 Spring 上下文仍存活时才删。
  • 隔离扩展只 TRUNCATE ma_ 开头的表,所以残留的 fg*_fire 表不会被别的东西删掉。

在 MySQL 8.4.6 测试机上,逐字运行两版的 run: 文本:

臂 命令 hosted_harness_test 结果
A0 base 干净 两个类通过
A1 base 多一张 fg9b_fire 两个类都在启动时报错:Managed schema must contain exactly the 38 target tables: [fg9b_fire, …
B 本次推送 仍有 fg9b_fire 两个类在新建的 qwen_admission_ci 上通过,类检查也通过

这一步现在像 O4 建 qwen_o4_ci 那样建 qwen_admission_ci,新用例 boots the admission gates on a database of their own 把它固定下来。

更多断言,每条都用变异验证过(未变异时 88/88):

  • 类检查的命令整行固定,并且不得带自定义 shell。
  • admission 步骤的命令、env 和 shell 整体固定。hosted-gates 类检查会把失败的类也算作“已运行”,所以在命令或 MAVEN_ARGS 里加 || 兜底、管道或 -fn,都可能把红的 admission gate 变成绿的;第二个 -Dmysql.url 则会把它指回共享库。fault gates 和 O4 的命令本次没改,保留原有的 contains 断言。
  • 安装步骤必须排在 Hosted verify 之前;排在之后的话,verify 变红就会跳过安装,三个 gate 也随之全部跳过。
  • job 注释的几处修正:开头的上限数字已过时(162 + 20 + 50 + 20 = 252);现在写明了 33 分钟余量的成因(以前 Verify 超时会让 admission 被跳过);CLI 安装改为“最多尝试三次”。
  • 两个步骤名在使用前都先确认存在。

针对本 PR 所改步骤的 34 个变异全部变红,且每个只让它针对的用例或行变红。唯一例外是给 admission 步骤改名:按名字查找该步骤的两个已有用例也会一起变红。PR 正文已同步更新,中英文都改了。

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

1 Suggestion-level finding(s) this review confirmed are already reported on this PR and are not repeated:

  • admission gate reports are wiped by O4's clean verify before any upload — already declared out of scope in the PR description (Not validated / out of scope)

Not reviewed: build-and-test — SDK Java (fast) / Hosted process fault gates / MySQL 8.4 / Java 21 was skipped in CI (fast tier), and the Java/MySQL lane cannot be run here, so the new red-verify condition was never evaluated live.

Not linted (tool limitation, not a blocker): .github/workflows/sdk-java.yml — actionlint embedded-shell source mapping is not yet supported.

中文说明

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

本轮确认的 1 条建议级发现已在 PR 上报告过,不再重复发布(列表见上方英文部分)。

未审查(原文为英文):build-and-test — SDK Java (fast) / Hosted process fault gates / MySQL 8.4 / Java 21 was skipped in CI (fast tier), and the Java/MySQL lane cannot be run here, so the new red-verify condition was never evaluated live.

未检查(工具限制,非阻断):.github/workflows/sdk-java.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。

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

Comment thread scripts/tests/hosted-process-ci.test.js Resolved
Comment thread scripts/tests/hosted-process-ci.test.js Resolved
…up allowance

The red-verify condition was asserted over three hand-listed step names,
so a gate added to the job later sat outside every assertion and a red
verify would skip it silently, as it skipped the admission gates. A new
case derives the contract from the steps after the Hosted verify:

- Only the two report checks that need the verify's output may run on a
  green job alone. Every other step's condition must be `always()`, or
  `${{ }}` around `always()`, `!cancelled()` or `failure()`, optionally
  narrowed by one step's outcome. Any other condition either has no
  status function, so GitHub prefixes `success() &&`, or still reads the
  job status. A narrowing step must itself run regardless of the verify.
- No step after the verify carries continue-on-error.
- Every step that invokes Maven, matched as a word so folded commands,
  wrappers and quoted paths count, carries the exact red-verify condition
  and a ceiling, so it enters the summed step budget.

The job-budget rows now carry the setup allowance (33 for the MySQL job,
15 for failover) and assert ceiling - steps against it, so raising a step
ceiling re-derives the allowance instead of quietly spending it.
@wenshao
wenshao requested a balanced review from Copilot October 31, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Qwen Code review did not complete successfully. Qwen review exited with status 1. A transient error is retried automatically; if you are seeing this, retry with @qwen-code /review. See workflow logs.

@wenshao
wenshao requested a balanced review from Copilot October 31, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@wenshao

wenshao commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: merge-ready — 75 of 75 scripted assertions passed, 0 failed. Every blocker from the earlier rounds is closed at head f15f799f44bf9e26863f97e3c071a3a344216177 (base eaafba5d140b4e5531f5eeb879c79e7d1779bc3b): the workflow size ratchet is green with the baseline matching the file exactly, the job budget carries a pinned setup allowance, the red-verify contract is derived from the job instead of a name list, and the admission step — command, env and shell — is pinned whole, including its own database. The PR's own CI is fully green at this head: every non-skipped lane passes (Lint & Static 6m51s, Test 21m58s, web-shell E2E Smoke 43m, SDK Java (fast) / ubuntu / Java 21 35m, Integration Tests (no-AK) 17m); the hosted-harness-mysql job remains skipped because the PR runs the fast tier.

中文摘要

判定:merge-ready(75/75) —— 前两轮的全部阻塞项在新 head f15f799f 上关闭:.size-baseline 记为 150332、与文件逐字节相等,体积门禁与 vitest 镜像全绿(实测 rc 0 / 238 过 1 跳过);job 预算行带上 setup 余量并断言 ceiling - steps(291/324/33 与 270/285/15);"红夜仍运行"契约改为从 job 派生(verify 之后的每个步骤,除两个报告检查外必须带可红夜运行的条件、不得 continue-on-error,Maven 门禁必须带精确条件与正超时);admission 步骤整体钉住——含 CREATE DATABASE qwen_admission_ci、指向独立库的 URL、精确 env 与默认 shell。

验证:固定测试 89/89;A/B 中 head 测试在 base workflow 上恰好红 5 条(预算 304、admission 条件、派生契约、类检查、数据库用例),base 测试在 head 上只红旧 304 预算钉;31/31 变异全杀——含评审提出的验收臂(第四个无 if: 的 Maven 门禁、带条件但无超时的门禁、success() 门禁、admission 50→60 且行改 301 的余量侵蚀臂)与 7 个数据库钉变异(URL 指回共享库、删建库行、换 MYSQL_PWD、加 || true、第二个 -Dmysql.url、多 env、shell: 覆盖);官方表达式引擎与接线/隔离/预算 29/29。PR 自身 CI 在该 head 全绿。

未覆盖:新条件与独立库行为仍未在本轮真实 workflow/Java 运行中复跑——hosted-harness-mysql 在 fast tier 被跳过,本轮未触发 workflow_dispatch;独立库上的 admission gates 以作者 rig(A0/A1/B)为活性证据,本轮静态核对了 URL/建库/env/接线与 O4 先例;合入后第一个红夜夜跑仍是生产 oracle。Windows lane 跳过;本机无 yamllint;九文件套件在 macOS 有 15 个平台性跳过(0 失败)。

What changed since round 2

Commit Change
bc011b7e38 the admission step boots on its own database (CREATE DATABASE qwen_admission_ci + its own -Dmysql.url), as O4 does; .size-baseline line 63 → 150332 sdk-java.yml; a new case pins the step's command, env and shell whole
607762863f the admission step pinned whole; the install kept ahead of the Hosted verify (steps.indexOf(install) < verify)
c15bab7d01 the red-verify contract derived from the job (keeps the steps after the Hosted verify off its outcome, bar its own checks); the budget rows carry the allowance (['hosted-harness-mysql', 291, 324, 33], ['hosted-failover-e2e', 270, 285, 15]) and assert ceiling - steps

Central claim re-verified at the new head

The identical 89-case pin suite ran against the head workflow and the base workflow; the base arm swaps only the YAML.

Cell Workflow YAML Pin test Result
head / head f15f799f head (89 cases) 89/89 pass
head test / base YAML eaafba5d head (89 cases) 84/89 — five red: budget row (304 ≠ 324), admission row (no if: on base), the derived after-verify case, the class-check case (no id), the database case (base shares hosted_harness_test)
base test / head YAML f15f799f base (84 cases) 83/84 — one red: the old 304 budget pin sees the new 324
base / base eaafba5d base (84 cases) 84/84 pass

Round 3 A/B: head pin test on head vs base workflow

Mutation matrix — 31/31 killed, none escaped (each row a real 89-case collection; no 0-test runs):

Group Mutants Killing test(s)
conditions A1 drop admission if:, A5 wrong step ref, S1 always(), S5 whitespace-only admission row and the after-verify case (the derived gate loop pins the exact condition)
A3 drop class-check if:, A4 !cancelled() && always(), CE continue-on-error class-check case + after-verify case
A2 drop id: 'hosted_admission' class-check case + after-verify case (the narrowing can no longer be validated)
A6 delete the class check, S3 narrow on managed_dependencies, S6 run target change class-check case only
S4 positive control fault-gate outcome→conclusion, O4 drop O4 if:, NEW5 O4 narrows on a later step the own row + after-verify case
setup M4 if: false on the bundle, M6 if: always() on the install all three gate rows
ORD move the verify before the install (structural block move) 6 red: the three rows, the after-verify case, plus the two collateral order pins (cgroup delegation, Hosted/non-Hosted separation) — expected from a structural move
budget T1 ceiling 324→304; AL1 admission 50→60 with the row moved to 301 (the R3-2 erosion arm) the budget row; AL1 fails on expected 23 to be 33
database DB1 URL back to hosted_harness_test, DB2 drop CREATE DATABASE, DB3 different MYSQL_PWD, DB4 `
new gates NEW1 fourth Maven gate, no if:, no timeout; NEW2 script gate, no if:; NEW3 Maven gate with the condition but no ceiling; NEW4 script gate with if: 'success()' exactly the after-verify case
NEW6 new gate with continue-on-error after-verify case + budget row (its ceiling enters the sum)

NEW1–NEW4 are precisely the R3-1 acceptance criterion (a gate added later joins the contract automatically) and AL1 the R3-2 criterion; each reddens where the round-2 suite stayed green. The unmutated baseline ran first through the same runner (89/89).

Round 3 mutation matrix: 31/31 killed exactly the expected pin

Wiring, database isolation and budget (29/29, official @actions/expressions 0.3.61 + the yaml parser): the three gate conditions are byte-identical; the class check keys on hosted_admission and sits immediately after the admission step; Upload Hosted process reports (if: always()) precedes admission; the admission run creates qwen_admission_ci and points -Dmysql.url at it while the verify keeps hosted_harness_test and O4 keeps qwen_o4_ci; the admission env is exactly the three variables, no shell: override, no continue-on-error; step ceilings sum 291, job ceiling 324 (allowance 33, under GitHub's 360). The engine evaluates run only for !cancelled() && install success, and the class check only when admission succeeded — identical to rounds 1–2.

Size ratchet — green, measured: .size-baseline records 150332 sdk-java.yml, the head file is exactly 150332 bytes, the shell gate exits 0 and the vitest mirror is 238 passed / 1 skipped / 0 failed. Of the 5530-byte baseline raise, 1559 is this PR's growth and 3971 the pre-existing main drift, as the PR description now states.

Round 3 size ratchet: baseline matches the file, gate green

Suites: hosted-process-ci.test.js 89/89; the nine sdk-java.yml-reading suites 696 passed, 15 skipped, 0 failed of 711 on macOS (platform-gated skips); Prettier clean; .github/scripts/check-ci-budget.mjs passes.

Closed since round 2

  • F1 / R1-4 (size ratchet) — closed. The baseline bump landed and matches the file byte-for-byte; gate and mirror green at this head, and Lint & Static passes in CI.
  • R3-1 (hand-written name list) — closed. The contract is derived from the job; NEW1–NEW4 each redden exactly the after-verify case.
  • R3-2 (allowance not compared) — closed. The rows carry the allowance and assert ceiling - steps; the erosion arm (AL1) fails on expected 23 to be 33.

Not covered

  • No live evaluation of the new conditions in a real workflow run. The PR's CI is the fast tier, so hosted-harness-mysql is skipped; no workflow_dispatch was triggered this round. The first nightly after merge with a red Hosted verify remains the production oracle.
  • The admission gates on the fresh database were not re-run in this round. The live evidence is the author's rig (A0/A1/B: both classes pass on qwen_admission_ci with 38 managed tables plus Flyway history, and fail at boot on the shared database once an fg*_fire table is left behind). This round verified statically: the URL wiring (System.getProperty("mysql.url") drives the Spring datasource in both gate classes), the CREATE DATABASE line, the exact env/shell, and the O4 precedent that boots the same way.
  • Windows lane — skipped on this PR. yamllint is not installed locally (actionlint exits 0; not used as evidence).
  • The nine-file sweep's 15 skips are macOS/Linux environment gates; the touched pin file is 89/89 here.
  • Nightly census — reused from round 1 (10-14..10-30: 17 runs, 13 verify failures, admission skipped 13/13); no nightly has run since.
  • Per-commit attribution — the production commits are 9718197ea8, f637a55a9f, bc011b7e38, 607762863f, c15bab7d01; the rest are main merges. The aggregate base→head diff was verified.

Methodology

macOS aarch64; harness Node 24.18.1. Detached worktrees at tmp/pr16010-r3-head (f15f799f) and tmp/pr16010-r3-base (eaafba5d), each seeded from the checkout's node_modules by hardlink; the resolved realpath of node_modules/yaml points into each tree. The pin suite ran through the repo's own scripts/tests/vitest.config.ts with the vitest JSON reporter; each A/B cell restored both files with git checkout HEAD -- and asserted a clean tree. The 31 mutants are single-point edits (two also edit the pinned budget row, one is a structural block move); the unmutated baseline ran first, and every mutant's run collected the full 89 cases. Expression semantics, DB isolation and budget wiring were checked with the npm-published @actions/expressions 0.3.61 (unpacked under /tmp) and the yaml parser. The size gate ran with the CI's own WORKFLOW_SIZE_BASE_SHA. Raw logs, per-cell JSON, the ledger and harnesses are in tmp/pr16010-verify-r3-20261101-020136/ (assertions.json, mutations.json, logs/, harness/).

@wenshao
wenshao merged commit 143a8b0 into main Oct 31, 2026
37 checks passed

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No P0/P1/P2/P3 findings. APPROVE.

This PR moves the admission gates to the same !cancelled() && steps.managed_dependencies.outcome == 'success' condition that the fault gates and O4 already use, gives them their own database (qwen_admission_ci) to isolate from Hosted verify leftovers, and ties the class-check condition to the admission step's own outcome instead of the job status.

The workflow pin test (+195/−18) covers every contract asserted here: the three conditions are byte-identical across fault gates, admission and O4; the admission command/env/shell is pinned whole; the O4 condition (previously unpinned) is now asserted; the after-verify contract forbids new unguarded or continue-on-error steps; and the budget test now computes a per-job setup allowance and asserts it explicitly. The mutant table in the PR body shows each mutant reddens only the intended case.

The .size-baseline bump from 144802 to 150332 includes 3971 bytes of pre-existing drift on main plus 1559 from this PR. The earlier bot CHANGES_REQUESTED on head 63d3bc5 about the same issue is resolved at this head.

Lint & Static (actionlint validates workflow expressions) and Test (ubuntu-latest) (runs the contract tests) are both green at head f15f799f. The fast-tier Hosted process fault gates lane is skipped because it requires tier: full; the Maven command text itself is unchanged (only the target database and CREATE DATABASE prefix differ), and the author acknowledges the live run remains to be verified on the first nightly after merge.

Zero findings.

@wenshao

wenshao commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author
**Verdict: `merge-ready`** — 1317 of 1317 scripted assertions passed, 0 failed. Follow-up round on an unchanged head `f15f799f44bf9e26863f97e3c071a3a344216177` (base `eaafba5d140b4e5531f5eeb879c79e7d1779bc3b`): the PR was squash-merged as `143a8b0653` at 18:25 UTC while this round ran, and the squash carries this PR's `sdk-java.yml` and pin test byte for byte (`bc79896d6821b81a`, `2b5f8817e880153a`), so every result below is evidence about what landed. Round 3's verdict reproduces, and the one thing this round adds is a first measurement of the central claim: GitHub's own expression engine runs a red-verify night and puts the admission step at RUN on head, SKIP on base.
中文摘要

判定:merge-ready(1317/1317) —— 复验轮,head 与上一轮完全相同(f15f799f)。本轮过程中 PR 已被 squash 合入 143a8b0653(18:25 UTC),落地提交里的 sdk-java.yml 与固定测试与本轮验证的 head 逐字节相同,因此下面每条结论都是对已落地代码的证据。

本轮新增的实测(前三轮都没有做):用 GitHub 自己的表达式引擎 @actions/expressions 0.3.61,把 job 的 17 个步骤按四种形态逐一求值——红验夜上 admission 返回 RUN(head)/SKIP(base),其类检查同样 RUN/SKIP;绿夜、取消夜、安装步骤失败夜两臂行为一致;23/23 断言通过;同一 harness 跑 base 是 17/23。这条把"红夜 admission 会被跳过"从读 YAML 变成了运行时结果。

其余:条件求值 23/23、固定测试 89/89(head workflow)、head 测试跑 base workflow 恰好红 5 条、base 测试跑 head workflow 只红旧 304 预算钉、变异矩阵 25/25 全杀(含行内正控 C1)、尺寸门禁两臂(不升基线 exit 1,升了 exit 0)与落地 tip 上复跑 exit 0、读取 sdk-java.yml 的十套件 949 过 1 跳过 0 失败、尺寸套件 238 过 1 跳过。PR 自身 CI 在该 head 上全绿(Lint & Static 6m51s、Test 21m58s、SDK Java ubuntu/Java 21 35m47s 等),hosted-harness-mysql 因 fast tier 被跳过。

未覆盖:新条件仍未发生在真实 GitHub 运行里——本轮用的是官方引擎的本地求值,不是 runner 上的真跑;admission gates 在独立库上的 Java 行为仍以作者 rig 为证据(本轮只静态核对了 URL/建库/env/接线与 O4 先例)。Windows lane 跳过,yamllint 本机未装,CI 的 git fetch 路径在离线环境不可达(已用门禁自身的测试夹具覆盖)。

What changed since round 3

Nothing in the PR. git rev-parse HEAD^2 style resolution gives the same head f15f799f as round 3's verified head; the five production commits are unchanged (9718197ea8, f637a55a9f, bc011b7e38, 607762863f, c15bab7d01). What changed is the PR's state: it is merged, and this round therefore re-ran every carried-forward measurement rather than quoting round 3.

Fact Value
head verified f15f799f44bf9e26863f97e3c071a3a344216177 (same as round 3)
base eaafba5d140b4e5531f5eeb879c79e7d1779bc3b (was origin/main until the merge; main tip is now 06c1f98971)
squash commit 143a8b0653 — .github/workflows/sdk-java.yml sha256 bc79896d6821b81a…, scripts/tests/hosted-process-ci.test.js sha256 2b5f8817e880153a…, both equal to the verified head
merged 2026-10-31 18:25:44 UTC via wenshao

Round-3 finding status at this head

# Finding Severity Status here
F1 .size-baseline not bumped; Lint & Static red on 956-byte overage blocking fixed — baseline records 150332 sdk-java.yml; gate exit 0 on the head and again on the landed tip; Lint & Static passes on the merge commit
R1-2 O4's condition pinned by nothing suggestion fixed — deleting O4's if: reddens its row (E3 also reddens the after-verify case)
R1-3 class check could not fail the job suggestion fixed — continue-on-error on it reddens the class-check case (mutant B3)
R1-4, R3-1, R3-2 size ratchet, name-list contract, allowance not compared blocking / suggestion fixed in round 3, re-measured here (see below)

Central claim, measured with GitHub's own engine

The claim this PR exists for: on a night when Verify Hosted Java, Spring and MySQL processes fails, Verify Hosted admission gates runs anyway. Previous rounds read that off the YAML. This round evaluates every step's if: in order with @actions/expressions 0.3.61 — the engine published by actions/runner and used by GitHub for expression evaluation — under four night shapes, on both arms:

Shape HEAD workflow BASE workflow
green run admission RUNS, class check RUNS, O4 RUNS same
red Hosted verify admission RUNS, class check RUNS (15 steps run) admission SKIPS, class check SKIPS (13 steps run)
run cancelled before admission admission SKIPS, class check SKIPS same
SDK install failed admission SKIPS, O4 SKIPS same

Totals: HEAD 23/23, BASE 17/23 — the six base-side failures are exactly the PR's four changes (admission condition, class-check condition and id, job ceiling, allowance). The two instrument: rows are the harness's own positive control: an unconditional step must skip once an earlier step failed, and always() must still run — both hold on both arms, so a PASS on the red-verify row is the engine saying RUN, not an inert evaluator.

Condition A/B: HEAD vs BASE sdk-java.yml on GitHub-like night shapes

The same job under the pin suite, as a cross-arm A/B (head's 89 cases against each arm's workflow):

Cell Workflow Suite Result
head / head f15f799f head (89) 89/89
head tests / base workflow eaafba5d head (89) 84/89 — the five reds are the budget row (304 ≠ 324), the admission row (undefined vs the condition), the derived after-verify contract (4 offending steps vs 2), the class-check case (no id), and the database case (the mvn line vs the CREATE DATABASE line)
base tests / head workflow f15f799f base (84) 83/84 — the old 304 budget pin sees 324
base / base eaafba5d base (84) 84/84

Mutation matrix — 25/25 killed, none escaped

Third, independent worktree (tmp/pr16010-r3-mut, realpath of node_modules/yaml inside it), head workflow, same runner for every row; the unmutated baseline ran first and was green (89/89). Every row is a job-scoped single-point edit, restored byte-exactly from a backup (never git checkout) with a clean-tree assertion after each row.

Group Mutants Killed by
control C1 rename the admission step 6 red — the positive control that the runner reaches this file's pins at all
admission condition A1 drop if:, A2 always(), A3 wrong step id, A4 success(), A6 failure() admission row + the derived after-verify case
admission id A5 drop id: hosted_admission class-check case + after-verify case
class check B1 drop if:, B2 watch managed_dependencies, B3 continue-on-error, B4 wrong gate group, B5 moved away from admission class-check case
fresh database D1 URL back to hosted_harness_test, D2 drop CREATE DATABASE, D3 different MYSQL_PWD, D4 || true, D5 shell: 'bash {0}', D6 a second -Dmysql.url database case only
budget T1 ceiling 324 → 304, T2 admission 50 → 60 with the allowance left at 33 budget row
steps after the verify E1 new step with no if:, E2 new Maven gate with no ceiling, E3 continue-on-error on O4, E4 the latency check made to run after a red verify after-verify case
setup order F1 if: false on the bundle step all three gate rows

Mutation matrix: 25/25 killed, positive control C1 reddens 6 cases

The matrix claims per-guard coverage, not per-commit: mutations.json records coverageClaim: "per-guard" with the five production commits listed, and does not assert a row per commit.

Size ratchet and budget, re-measured

Arm Setting Result
product (as landed) head file 150332 B, baseline 150332 sdk-java.yml gate exit 0; landed tip 06c1f98971 exit 0; check-ci-budget.mjs "PR-stage CI budget holds"
control same file, pre-PR baseline 144802 gate exit 1 — grew to 150332 bytes, 5530 over its recorded 144802 (allowance 4096)

The bump is load-bearing, not cosmetic: mutating the baseline back makes the gate red with the exact error the description quotes. The split is 1559 bytes this PR / 3971 pre-existing main drift over the ceiling; the drift began after 7b09c0a940 (10-27) set 144802, with f87fd6a037 … bc8ad53f95 and 4cd3372bb6 growing the file without a bump. On the squash commit the swept qwen-triage.yml baseline is current too (375110 for 375180 bytes as of 06c1f98971).

Size ratchet: control arm red, landed arm green

Gates and sweeps

  • scripts/tests/hosted-process-ci.test.js: 89/89.
  • The ten suites that parse sdk-java.yml (nine readers plus workflow-size.test.js): 949 passed, 1 skipped, 0 failed of 950 in one run; workflow-size.test.js alone 238 passed, 1 skipped, 0 failed of 239. The one fatal: 'origin' does not appear to be a git repository line in that log comes from a deliberate fixture in a throwaway repo (the fetch-path case builds its own bare origin); the case passes and nothing touches this checkout's remotes.
  • The PR's own CI at this head is fully green apart from fast-tier skips (Lint & Static 6m51s, Test (ubuntu-latest) 21m58s, web-shell E2E Smoke 43m3s, Integration Tests (no-AK) 17m18s, SDK Java (fast) / ubuntu-latest / Java 21 35m47s).
  • YAML shape: the job parses to 17 steps, ceiling 324, admission step keys name,id,if,timeout-minutes,env,run, O4 after admission.

Not covered

  • No live GitHub run of the new conditions. The engine result is the official evaluator run locally; the first nightly after merge with a red Hosted verify (or a workflow_dispatch at tier full) remains the production oracle. This is the same gap rounds 1–3 carried, narrowed from "read the YAML" to "the engine says RUN".
  • The admission gates' Java behaviour on the fresh database was not re-run here: no JDK/MySQL in this round's rig, and the PR's CI skips the job on the fast tier. The live evidence stays the author's rig (A0/A1/B); this round verified the URL wiring, the CREATE DATABASE line, the exact env and shell, and the O4 precedent statically.
  • Windows lane — skipped. yamllint is not installed on this machine; actionlint was not used as evidence.
  • The CI git fetch --depth=1 origin <base> path is unreachable offline; the gate's own fixture covers it, and the size gate was run with an explicit base that resolves locally.
  • Per-commit attribution — the five production commits are verified as an aggregate; hosted-process-ci.test.js rows were not attributed one per commit.

Methodology

Linux x86_64 (Alibaba Cloud Linux 3, 32 cores), Node 24.22.1. Worktrees under the clone's tmp/: pr16010-r3-head (f15f799f), pr16010-r3-base (eaafba5d), pr16010-r3-mut (the mutation tree, never shared with a measurement arm), pr16010-r3-landed (06c1f98971); each seeded by hardlink from the checkout's node_modules, and readlink -f node_modules/yaml resolves inside each tree. The pin suite ran through the repo's own scripts/tests/vitest.config.ts. Conditions were evaluated with @actions/expressions 0.3.61 (npm pack, extracted under /tmp) plus the repo's yaml parser, the four status functions supplied as function definitions and the ${{ }} wrapper stripped as GitHub does. Mutants applied to the third tree from a byte backup with a clean-tree assertion after every row. Raw logs, per-cell JSON, harnesses and the asset directory are in tmp/pr16010-verify-r3-20261101-020942/ (assertions.json, mutations.json, logs/, harness/, evidence/).

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

@github-actions github-actions Bot added the skip-changelog-auto Automatically exclude internal CI changes from release notes label Nov 1, 2026
@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Released in v0.26.6.

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

Labels

skip-changelog-auto Automatically exclude internal CI changes from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants