Repository navigation
ci(sdk-java): run the Hosted admission gates even when the Hosted verify fails - #16010
Conversation
…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.
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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 验证。
|
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 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 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: Moving on to code review. 🔍 中文说明感谢贡献——这是 #15776 的一次干净收尾。 模板完整 ✓ 问题: 已观测,非理论性。你给出的是 run 级别的证据而不是假设:10-14 到 10-30 之间有 13 晚 Hosted 验证变红,admission gates 因此被跳过;其中包含 #15776 合入后的三晚——那三晚同一个 job 里 fault gates 跑了 45/0,admission gates 却依然没跑。机制在 YAML 里也一目了然:这一步没有 方向: 对齐。一个只在绿灯晚上运行的门禁,等于在最需要它的时候没有运行;而本仓库的一贯立场是 CI 定义要自带 meta-test。给两个 admission witness 恢复覆盖率完全在这个范围内。 规模: 不适用——未触及核心路径。两个文件,+48/-8:workflow 条件加上它的固定测试。 方案: 最小化,而且是复用而非新造。我把 job 里三个条件并排核对过,逐字节一致——fault gates(L1305)、admission(L1345)、O4(L1365)都以 风险: 无升级风险信号——两个文件都不匹配与 revert 相关的路径。 有一件事想在代码审查前先提出来,因为这类问题只会在 CI 里咬人: 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewThe 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:
|
| 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:
.size-baselineline 63 →149521 sdk-java.yml.- 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 CI: workflow-size gate red-walls all open PRs when a workflow grows without a same-PR baseline bump (recurred: #9747, #9822) #9904 stale-baseline warning path precisely because this PR does modify the file —
file_matches_baseonly extends leniency to files byte-identical to base. So the bump is correct, but the number over-attributes main's drift to this change, and a reviewer reading the diff deserves to know that.
Why your local sweep missed it — not carelessness, the tooling genuinely doesn't cover it:
scripts/lint.jsruns actionlint, yamllint and shellcheck, but notcheck-workflow-size.sh. The size gate is its ownCheck workflow file sizestep inlint_and_static, so--actionlintand--yamllintboth exiting 0 says nothing about it.scripts/tests/workflow-size.test.jsis the vitest mirror that enforces the same rule, but it never contains the stringsdk-java.yml— it enumerates.github/workflows/*and reads.size-baseline. Your "every script test that readssdk-java.yml: 9 files" sweep is accurate and still misses it. Its%s is within its baseline allowancecase 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 onsteps.hosted_admission.outcomeand sits immediately after admission (L1331 → L1357), before O4 (L1363). TheindexOf(check) === indexOf(admission) + 1pin matches reality. - The setup invariant survives. The test still asserts no step up to and including
managed_dependenciescarriesif:orcontinue-on-error, andbundle < 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 missingdist/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: 304is unchanged, andcheck-ci-budget.mjsmatches only^ {4}timeout-minutes— job level. Step-levelif: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 theit.eachrefactor 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. Thenot.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-mysqlis gatedif: "${{ 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 里说明两点:
.size-baseline第 63 行改成149521 sdk-java.yml。- 4719 的超额里只有 748 是本 PR 的,3971 是 main 上早已存在、一直没做同 PR 上调的漂移。棘轮在这里硬失败而不是走 CI: workflow-size gate red-walls all open PRs when a workflow grows without a same-PR baseline bump (recurred: #9747, #9822) #9904 的过期 baseline 警告路径,恰恰是因为本 PR 确实改了该文件——
file_matches_base只对与 base 逐字节相同的文件放行。所以上调是对的,但这个数字把 main 的漂移算到了本次改动头上,看 diff 的人应该知道这一点。
为什么你本机没扫出来——不是疏忽,是工具确实没覆盖:
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
|
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 The reasoning in the comments is also the good kind — it records why the step must not inherit So this is not a "needs rethinking." It is one missing line, and the gate told you about it twice:
Two smaller things, neither blocking, both yours to judge:
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 状态为准。我找不到更简单的路径,这里也没有任何东西在过度用力。两行 注释里的推理也是好的那一种:它记下了这一步为什么不能继承 所以这不是"需要重新思考"。这是缺一行,而且门禁已经告诉你两次了:
另外两件小事,都不阻塞,由你判断:
如果六个月后由我来维护,我会先感谢你的固定测试,再骂这个字节上限——就是这个顺序。请求修改只因为 check 是红的,不是因为这里有任何东西需要重新设计。🙏 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
@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. 🙏
|
Verdict: 中文摘要判定: 阻塞项只有一条: 轮中 head 从 另一条低优先、仅为推断:admission 的 50 分钟上限正好吃掉 job 在"Hosted 验证撞自己 201 分钟超时"那一档的全部余量(13+201+20+50+20=304),极端情况下会取消最后的 O4 步骤;近三晚验证在 79–91 分钟失败,未观察到。 未覆盖:新条件没有在真实 workflow 运行里求值过——PR 自己的 CI 走 fast tier, Central claim and A/BClaim. Instrument. The identical 86-case pin suite was run against two workflow YAMLs that differ only by the PR — the head file at
The two base-arm failures are the intended behavioural mismatches, not setup errors: Condition semantics. The workflow pins strings; the runner decides what they mean. Every expression was evaluated with the official
The two new conditions are byte-identical to the fault-gate and O4 conditions, and the wiring order is: Mutation matrix — 14/14 killed, none escaped:
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 ( Nightly evidence (census, not a sample). Every scheduled
FindingsF1 — blocking (PR): the workflow size ratchet is red at the head; the PR cannot land
Reproduced locally with the CI command ( The bump is one line, and it is measured, not eyeballed: setting 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 ( 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 failedF2 — suggestion (inferred, not observed): the admission ceiling consumes the job's last 50 minutes of slackThe job is 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
MethodologymacOS aarch64; harness Node 24.18.1, project Node 22-compatible. Detached worktrees at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
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)
…dependent-of-hosted-verify
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
|
Verdict: 中文摘要判定: 唯一阻塞项仍在: A/B 诚实说明:head 测试在 base workflow 上只红三条(预算行、admission 行、类检查用例),因为 fault-gate 与 O4 的条件在 base 已存在;新增的 O4 pin 由删除 O4 未覆盖:新条件仍未在真实 workflow 运行中求值(PR 自身 CI 走 fast tier, What changed since round 1
Central claim re-verified at the new headThe identical 87-case pin suite was run against the head workflow and the base workflow; the base arm swaps only the YAML.
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 Mutation matrix — 17/17 killed, none escaped:
T1, O4 and CE are exactly the three witnesses Budget and semantics (official engine, 24/24): job Repo sweeps: FindingsF1 — blocking (PR, carried): the size ratchet is still red, and this push made it larger
Measured locally with the CI command: shell gate exit 1; the vitest mirror The bump is one line and measured, not eyeballed: setting 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 failedClosed since round 1
Not covered
MethodologymacOS aarch64; harness Node 24.18.1. Detached worktrees at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
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)
…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
There was a problem hiding this comment.
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.
|
Pushed R1-4, the size ratchet: Admission now boots on its own database. Now that the step runs after a red verify, sharing
On a MySQL 8.4.6 rig, using the exact
The step now creates More pins, each mutation-checked (88/88 intact):
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. 中文说明已推送 R1-4,体积棘轮: admission 现在在自己的数据库上启动。 这一步现在会在验证变红之后运行,继续和验证共用
在 MySQL 8.4.6 测试机上,逐字运行两版的
这一步现在像 O4 建 更多断言,每条都用变异验证过(未变异时 88/88):
针对本 PR 所改步骤的 34 个变异全部变红,且每个只让它针对的用例或行变红。唯一例外是给 admission 步骤改名:按名字查找该步骤的两个已有用例也会一起变红。PR 正文已同步更新,中英文都改了。 |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
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 verifybefore 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)
…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.
There was a problem hiding this comment.
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 did not complete successfully. Qwen review exited with status 1. A transient error is retried automatically; if you are seeing this, retry with |
…dependent-of-hosted-verify
There was a problem hiding this comment.
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.
|
Verdict: 中文摘要判定: 验证:固定测试 89/89;A/B 中 head 测试在 base workflow 上恰好红 5 条(预算 304、admission 条件、派生契约、类检查、数据库用例),base 测试在 head 上只红旧 304 预算钉;31/31 变异全杀——含评审提出的验收臂(第四个无 未覆盖:新条件与独立库行为仍未在本轮真实 workflow/Java 运行中复跑—— What changed since round 2
Central claim re-verified at the new headThe identical 89-case pin suite ran against the head workflow and the base workflow; the base arm swaps only the YAML.
Mutation matrix — 31/31 killed, none escaped (each row a real 89-case collection; no 0-test runs):
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). Wiring, database isolation and budget (29/29, official Size ratchet — green, measured: Suites: Closed since round 2
Not covered
MethodologymacOS aarch64; harness Node 24.18.1. Detached worktrees at |
yiliang114
left a comment
There was a problem hiding this comment.
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.
**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.
中文摘要判定: 本轮新增的实测(前三轮都没有做):用 GitHub 自己的表达式引擎 其余:条件求值 23/23、固定测试 89/89(head workflow)、head 测试跑 base workflow 恰好红 5 条、base 测试跑 head workflow 只红旧 304 预算钉、变异矩阵 25/25 全杀(含行内正控 C1)、尺寸门禁两臂(不升基线 exit 1,升了 exit 0)与落地 tip 上复跑 exit 0、读取 未覆盖:新条件仍未发生在真实 GitHub 运行里——本轮用的是官方引擎的本地求值,不是 runner 上的真跑;admission gates 在独立库上的 Java 行为仍以作者 rig 为证据(本轮只静态核对了 URL/建库/env/接线与 O4 先例)。Windows lane 跳过, What changed since round 3Nothing in the PR.
Round-3 finding status at this head
Central claim, measured with GitHub's own engineThe claim this PR exists for: on a night when
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 The same job under the pin suite, as a cross-arm A/B (head's 89 cases against each arm's workflow):
Mutation matrix — 25/25 killed, none escapedThird, independent worktree (
The matrix claims per-guard coverage, not per-commit: Size ratchet and budget, re-measured
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 Gates and sweeps
Not covered
MethodologyLinux x86_64 (Alibaba Cloud Linux 3, 32 cores), Node 24.22.1. Worktrees under the clone's — DeepSeek-V4.1-Flash-1017@fda99a87 via Qwen Code /verify-pr (v0.26.4; skill c5273cc80df5) |
|
Released in v0.26.6. |













What this PR does
Verify Hosted admission gatesin 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_ciand boots there, the same way O4 usesqwen_o4_ci.The
Check that every Hosted admission gate class ranstep 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.ymlline in.github/workflows/.size-baselinemoves 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,
HostedRecoveryWedgeGateandHostedBackgroundPublicationGate, don't depend on anything the Hosted verify builds. The step runs its ownclean verifyon the module, and needs only what the bundle step installs and builds (node_modulesanddist/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:
HostedMonitorRunFaultGatesIT,HostedSessionRelayFaultGatesIT,HostedWorkflowRelayFaultGatesITandHostedAutomationFaultGatesITcreatefg*_firetables inhosted_harness_testand 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.ma_tables, so nothing removes a leftoverfg*_firetable.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 carrycontinue-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 assertceiling - stepsagainst 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 andVerify O4 filesystem process and capacity gatesalready 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):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:hosted_harness_testfg9b_firetableManaged schema must contain exactly the 38 target tables: [fg9b_fire, ma_agent_definition, …fg9b_fireqwen_admission_ci(38 managed tables plus Flyway history), class check passesMutants against the workflow, each run under the pin test:
if:, point it atsteps.managed_deps, or addcontinue-on-error|| true,|| :,| tee, a later line,-fn,--fail-never,-Dmaven.test.failure.ignore=true, a second-Dmysql.urlor--define mysql.url),-fnin itsMAVEN_ARGS, an extra env var, orshell: 'bash {0}'on its stepif:or addcontinue-on-errorto itid: 'hosted_admission'if:, or change it toalways()continue-on-error,|| trueorshell: 'true {0}'to the class checkhosted_harness_testCREATE DATABASElineMYSQL_PWDif: falseon the bundle stepInstall, build and bundle CLIif: always()on the install stepInstall Managed Agent dependenciesif:, or withsuccess(),job.status,!failure(),cancelled()orif: true, run as Maven, a script or an actionfailure()steptimeout-minutesexpected 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 toidorusesfor an unnamed step.Local, Linux x86_64, Node 22:
hosted-process-ci.test.js: 89/89.sdk-java.yml, plusworkflow-size.test.jsandcheck-failsafe-reports.test.js: 11 files, 970 passed, 2 skipped..github/scripts/check-workflow-size.shagainst the PR base: exit 0 with the new baseline, exit 1 with the old one..github/scripts/ci-runner-routing.test.mjsundernode --test: 102/102.node scripts/lint.js --actionlintand--yamllintboth exit 0.Tested on
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 runsubuntu-latestwith the job'smysql:8.4.6service.Risk & Scope
.size-baselineforsdk-java.ymlmoves from 144802 to 150332. Of the 5530 bytes:main, where the file was 148773 bytes, 125 under the ceiling, after growth that never bumped the baseline.workflow_dispatchofsdk-java.yml(tierfull) against this branch.|| :after O4's command passes the pin, as it did before.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 服务。共用的数据库,是失败的验证唯一可能把它们搞坏的地方:
HostedMonitorRunFaultGatesIT、HostedSessionRelayFaultGatesIT、HostedWorkflowRelayFaultGatesIT和HostedAutomationFaultGatesIT会在hosted_harness_test里建fg*_fire表,并在清理时删掉。其中两个 relay 类只有在 Spring 上下文仍然存活时才删。一个类如果在清理之前被杀掉,它的表就会留下来。ma_开头的表,所以没有任何东西会删掉残留的fg*_fire表。换成新库就去掉了这个依赖。下面测试机上的运行表明,两个类都能在新库上初始化 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(改动前):#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_testfg9b_fire表Managed schema must contain exactly the 38 target tables: [fg9b_fire, ma_agent_definition, …fg9b_fireqwen_admission_ci(38 张受管表加 Flyway history)上通过,类检查通过针对 workflow 的变异,每个都用固定测试运行:
if:、把它指向steps.managed_deps,或加continue-on-error|| true、|| :、| tee、再加一行、-fn、--fail-never、-Dmaven.test.failure.ignore=true、第二个-Dmysql.url或--define mysql.url),在它的MAVEN_ARGS里加-fn,多加一个环境变量,或给它的步骤加shell: 'bash {0}'if:,或给它加continue-on-errorid: 'hosted_admission'if:,或改成always()continue-on-error、|| true或shell: 'true {0}'hosted_harness_testCREATE DATABASE那一行MYSQL_PWDif: falseInstall, build and bundle CLIif: always()Install Managed Agent dependenciesif:,或带success()、job.status、!failure()、cancelled()、if: true,以 Maven、脚本或 action 形式运行failure()步骤timeout-minutes的 Maven gateexpected 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 项跳过。.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。测试平台
环境(可选)
测试机: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.6service。风险与范围
.size-baseline里sdk-java.yml从 144802 改为 150332。这 5530 字节中:main上本来就有:那里的文件已是 148773 字节,离上限只剩 125 字节,而那些增长都没有同步上调 baseline。sdk-java.yml的workflow_dispatch(tier 为full)。\|\| :仍能通过固定测试,和本 PR 之前一样。关联 Issue
#15776 的后续(它把这一步留在了范围之外),也顺带处理了 #15964 上那条非阻塞的诊断意见。