Repository navigation
refactor(managed-agent): Split server into Maven modules - #15871
Conversation
Separate contracts, orchestration, persistence, adapters, assembly, and verification while retaining the existing service delivery model. Move tests and build consumers together and document local evidence and pending CI acceptance. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
🩺 serve daemon A/BBuilt the PR base vs this PR head
|
| field | PR base (before) | this PR (after) |
|---|---|---|
activeWorkStaleMs |
46 |
44 |
— Qwen Code · serve A/B
|
Thanks for the PR — and for a description that is unusually candid about what was and wasn't verified. Template looks good ✓. All required sections are present, and the design doc ships in both English and 简体中文 with reciprocal links. Problem: This is a Direction: Internal build architecture for Size: Large — 1,219 files, +17,653 / −11,097 (28,750 changed lines). The honest breakdown is ~19,870 production lines (532 files), ~8,365 test lines (678 files), ~515 docs lines, no generated/schema files. Worth noting the Stage 0 exclusion patterns are TypeScript-only, so applied literally they'd call 28,744 of those lines "production" — the split above is the meaningful one. No file matches the core-module globs ( Approach: Three questions worth settling before the code review — none of them blockers.
Risk: No elevated risk signals. None of the revert-correlated high-risk paths ( Moving on to code review. 🔍 中文说明感谢提交,也感谢 PR 描述对"哪些验证过、哪些没验证"写得格外坦诚。 模板完整 ✓,设计文档中英文双语齐备且互相链接。 问题: 这是 方向: 属于 规模: 较大——1,219 个文件,+17,653 / −11,097(共 28,750 行变更)。实际构成约为生产代码 19,870 行(532 个文件)、测试 8,365 行(678 个文件)、文档 515 行,无生成/schema 文件。需要说明:Stage 0 的排除规则只覆盖 TypeScript,若照字面套用,会把其中 28,744 行都算作"生产代码",上面的拆分才是有意义的口径。 没有文件命中核心模块匹配规则( 方案: 有三个问题建议在代码审查前先想清楚,都不是阻塞项。
风险: 无升级风险信号。与回滚相关的高风险路径( 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewI read the diff structure and the changed build/CI files statically, and cross-read the failing checks against it. Nothing here was executed — no PR code was built or run. Three of the four red checks trace back to one defect class: a path moved and the code that pins it wasn't updated. That's the headline, and it's fixable, but it's also the reason I can't sign off on the behaviour-preservation claim yet. 1. Blocking — Java fixtures unreachable after the module move (179 failing tests)
Those tests resolve shared fixtures relative to the Maven module basedir: var path = Path.of("../cli/src/serve/contracts/managed-csi-v1.fixtures.json");Before the split the module basedir was The fixtures themselves are fine — I confirmed all seven ( The PR clearly anticipated this class of problem: it introduces Suggested fix direction: route them through 2. Blocking — workflow meta-test left stale (AGENTS.md rule 3)
This is worth flagging as a process gap, not just a miss. AGENTS.md rule 3 says to run Minor, same hunk: 3. Blocking — packaging default output moved, its test didn't
Three independent instances of the same failure mode argues for a deliberate sweep rather than fixing these one at a time. Grepping 4. Non-blocking — 115 unrelated
|
| Module | Files | Production main/java |
Notes |
|---|---|---|---|
verification/ |
665 | 0 | unpublished test module; 631 test classes; source of finding 1 |
contracts/ |
210 | 208 | largest module; holds 89 runtimebroker/** classes — see Stage 1 question 3 |
persistence/ |
108 | 105 | gained db/managed-schema/V1__managed_schema.sql |
server/ |
76 | 72 | assembly module; pom.xml +292; executable output now server/target |
control-plane/ |
63 | 62 | |
adapters/ |
43 | 42 | |
runtime-broker/ |
2 | 1 | only RuntimeBrokerService.java |
src/ (old root) |
5 | 0 | all five are deletions — old layout correctly emptied |
Parent pom.xml: +145 / −985 (build config moved into the modules). New module poms: verification 706, server 292, persistence 92, control-plane 87, adapters 87, contracts 79, runtime-broker 51. File statuses overall: 1,049 renamed, 120 added, 45 modified, 5 removed.
Outside the module: 8 files in .github/workflows/ (finding 2), 11 in scripts/tests/, 7 in scripts/ (finding 3), 3 packages/cli/src/serve/*.test.ts, 1 packages/web-shell/scripts/generate-managed-agent-api.mjs, 6 design docs, plus AGENTS.md (+13/−8) and README.md (+32/−20) — both correctly updated for the moved schema and OpenAPI paths.
Testing evidence
This is an unattended CI run, so per the gate rules I did not build or execute any PR-derived code. The evidence below is the PR's own CI on the reviewed commit, read through the API — real check names and conclusions, with the failing jobs' log excerpts quoted above.
All PR CI workflow runs for this head have completed; none are still in flight. Two workflows are red: Qwen Code CI and Managed Agent gate. Managed Agent fast tier is a roll-up wrapper — its ##[error]The fast tier failure. is the Java suite propagating, not a fourth independent defect. review-pr and triage are bot orchestration jobs, not PR CI.
I found no evidence of pre-existing infrastructure noise here. All three defects are attributable to the diff: each pins a path or literal that this PR changed, and main is green on the same checks.
| Check | Conclusion |
|---|---|
| SDK Java (fast) / ubuntu-latest / Java 21 | ❌ failure |
| Managed Agent fast tier | ❌ failure |
| Lint & Static (ubuntu-latest, Node 22.x) | ❌ failure |
| Test (ubuntu-latest, Node 22.x) | ❌ failure |
| Build and verify reference distribution | ✅ success |
| SDK Java (fast) / Flyway migration version uniqueness | ✅ success |
| SDK Java (fast) / Real daemon E2E / Java 11 | ✅ success |
| Select the Managed Agent tier | ✅ success |
| Serve A/B (ubuntu-latest, Node 22.x) | ✅ success |
| Integration Tests (no-AK, No Sandbox) | ✅ success |
| TUI parity snapshots (ink vs opentui) | ✅ success |
| OpenTUI no-flicker gate | ✅ success |
| Check TUI impact | ✅ success |
| web-shell E2E Smoke (ubuntu-latest, Node 22.x) | ✅ success |
| Classify PR / authorize / assign / label | ✅ success |
| 63 further checks | ⏭️ skipped |
Sandboxed verification would settle the behaviour-preservation claim once the suite is green: @qwen-code /verify. The central promise here — that embedding, HTTP surfaces, configuration binding, resource ownership and packaged service behaviour all match main — is exactly what a static read of a 1,219-file rename cannot establish, and finding 4 shows the diff carries edits that are not pure moves. It's not worth triggering today: with 179 Java tests failing on fixture paths, an A/B run would mostly measure the breakage. Re-run it after the three path fixes land, and treat it as the check on "nothing changed but the layout". /tmux is not the right lane — there's no TUI surface here.
中文说明
代码审查
本次为无人值守 CI 运行,全程静态审查,未构建、未执行任何 PR 代码。
四个红灯中有三个源于同一类缺陷:路径移动了,但钉住该路径的代码没同步更新。这是核心问题,可修,但也正是我暂时无法为"行为保持一致"背书的原因。
1(阻塞)——模块迁移后 Java 契约夹具不可达,179 个用例失败。 SDK Java (fast) 在 qwen-managed-agent-verification 跑了 5,973 个用例,107 failures + 72 errors。这些测试用相对于 Maven 模块 basedir 的路径读取共享夹具(Path.of("../cli/src/serve/contracts/..."))。拆分前 basedir 是 packages/managed-agent-server/,../cli/... 指向 packages/cli/...;现在测试源码移到 verification/src/test/java/...,surefire 工作目录深了一层,../cli/... 变成 packages/managed-agent-server/cli/...,不存在。夹具文件本身没问题——我已确认七个夹具在该 head SHA 的 packages/cli/src/serve/contracts/ 下都还在,坏的只是相对前缀。PR 其实已经预见到这类问题:模块 pom 引入了 managed.module.root(${project.basedir}/..)并移除了 qwen.cli.entry,但 Java 源码里硬编码的 ../cli/... 没有改用该属性。由于 1,219 个文件中有 1,049 个是纯重命名、内容零改动,这些字面量就静默地跟着搬了过去。建议统一改走 managed.module.root(或 surefire workingDirectory/系统属性),而不是逐个改字面量,这样下次再移模块不会重演。
2(阻塞)——workflow 元测试未同步更新,违反 AGENTS.md 第 3 条。 Lint & Static 红灯,但 ESLint 与 Prettier 均通过,失败点是元测试 .github/scripts/ci-runner-routing.test.mjs:911:它仍钉着旧的 rm -rf ... qwen-managed-agent-server 字面量,而 release-managed-agent-reference.yml(在 diff 中,2/2)已把 m2 清理放宽为 qwen-managed-agent-* 通配。多模块同前缀发布后这个放宽是对的,只是测试没跟上。这一点也暴露流程缺口:AGENTS.md 让执行 grep -R ".github/workflows/<filename>.yml" scripts/tests/,而这个测试位于 .github/scripts/,严格照文档操作也找不到它——建议后续把规则的搜索范围扩到 .github/scripts/。另外 "${repo}/com/alibaba/"qwen-managed-agent-* 引号与通配混用,bash 下可用,但整体加引号到 * 之前与相邻参数更一致。
3(阻塞)——打包默认产物路径已改,对应测试未改。 Test:134 个文件中 1 failed / 3,953 passed。scripts/create-managed-runtime-package.js 的默认输出已正确插入 server 段,变为 packages/managed-agent-server/server/target/managed-runtime;但不在 diff 中的 scripts/tests/managed-runtime-package.test.js(222–225 行)仍按 managed-agent-server / target / managed-runtime 拼期望路径,因此找不到产物。三处同类失败建议做一次系统性排查,而不是逐个修:在 scripts/、.github/scripts/、.github/workflows/、integration-tests/ 和 Java 源码中搜索 managed-agent-server/target、managed-agent-server/src/main、qwen-managed-agent-server、../cli/——很可能还有 CI 因提前中断而没跑到的。
4(非阻塞)——115 处无关的 public 修饰符插入。 涉及 13 个文件。生产契约接口里属语义空操作(接口成员本就隐式 public);测试里则产生了没人会手写的格式——修饰符单独占一行。能编译、Checkstyle 也放过了,但明显是未经人工复核的批量改写产物,且与"无预期行为变更"的定位不符。AGENTS.md 要求最小变更集。建议整体回退这轮可见性改写,除非其中确有为跨模块访问所必需的部分——若确有,这几处更应单独显式呈现,而不是混在 115 处空操作里。
5(非阻塞)——自述为草稿但未标记草稿。 isDraft 为 false,正文却写"草稿状态表示最终版本的 Java 和 CI 验收待完成"。正文也坦承"最后一次限定时长的 reactor 验证超时"、早前 Java 结果"不能证明最终整合后的 Java 版本通过"。这份坦诚很有价值,CI 现在也补上了本地预算没能给出的答案。但若暂不打算合并,建议真正标记为 draft,避免信号矛盾。
未验证项: 模块依赖无环性、contracts 是否暴露框架或客户端实现类型、七个原默认事务入口的事务边界保持、嵌入宿主的 Spring Bean 隔离、JAR 嵌套资源唯一性,以及 MySQL/Hosted/故障/MQ/OSS 门禁。这些正是评审测试计划要求人工确认的内容,无法从 1,219 文件 diff 的静态阅读中得出,而本应覆盖它们的测试套件目前是红的。未验证:该 head 尚无通过的 Java 版本。
测试证据
按门禁规则,无人值守 CI 运行中我没有构建或执行任何 PR 派生代码;以上证据均来自 PR 自身在该 commit 上的 CI,经 API 读取——真实检查名与结论,失败作业日志摘录已在正文引用。
该 head 的 PR CI 工作流均已结束,无仍在运行项。两个工作流红灯:Qwen Code CI 与 Managed Agent gate。Managed Agent fast tier 是汇总包装作业,其失败由 Java 套件传导,并非第四个独立缺陷。review-pr 与 triage 是机器人编排作业,不属于 PR CI。
未发现既有基础设施噪声:三个缺陷都可归因于本 diff——各自钉住的正是本 PR 改动的路径或字面量,且 main 在相同检查上是绿的。
沙箱验证可在测试套件转绿后确认"行为保持一致"这一主张:@qwen-code /verify。本 PR 的核心承诺——嵌入、HTTP 接口、配置绑定、资源归属与打包服务行为均与 main 一致——正是 1,219 文件重命名的静态审查无法确立的,而第 4 项也说明 diff 并非纯粹搬迁。但今天触发意义不大:179 个 Java 用例正因夹具路径失败,A/B 运行测到的多半是破损本身。建议在上述三处路径修复落地后再跑,用它来验证"除了目录结构,什么都没变"。/tmux 不适用——这里没有 TUI 界面。
— Qwen Code · qwen3.8-max-2026-09-02
Reviewed at 2135fdc62f25c1154042b4cd50f0623c41aec08f · re-run with @qwen-code /triage
|
Confidence: 2/5 — the architecture work is serious and honestly documented, but this head has 179 failing Java tests and three separate places where a moved path wasn't propagated, so it cannot merge as-is. Stepping back: I don't doubt the intent or the effort here. Splitting a single module into six so the compiler enforces ownership is a legitimate thing to want, the design doc exists in both languages, What I keep coming back to is that all three blocking findings are the same mistake. A relative fixture prefix, a But it does change how I'd sequence the work. Fixing three symptoms one at a time is how a fourth survives: CI aborts early on the Java suite, so the MySQL, Hosted, fault, MQ and OSS gates — the ones that actually prove transaction, fencing and recovery boundaries survived the move — have not run against this layout at all. A sweep for every encoded path ( Two things I'd genuinely reconsider, separately from the red: The 115 bare And the boundary shape still doesn't match the story. If I were maintaining this in six months I'd thank the author for the module boundaries and curse the codemod residue. Both are fixable this week. Requesting changes on the three blocking findings — not on the direction, which I think is right. 中文说明Confidence: 2/5 —— 架构工作本身是认真且记录坦诚的,但当前 head 有 179 个 Java 用例失败,另有三处路径移动未同步,因此按现状不能合并。 退一步看:我不怀疑这里的意图和投入。把单模块拆成六个、让编译器来约束职责归属,是值得做的目标;设计文档中英双语齐备; 我反复想到的是:三个阻塞项其实是同一个错误。夹具的相对路径前缀、workflow 元测试里的 但这确实改变了我对推进顺序的看法。逐个修三个症状,正是第四个漏网的方式:Java 套件让 CI 提前中断,因此 MySQL、Hosted、故障、MQ、OSS 门禁——真正能证明事务、隔离栅栏与恢复边界在迁移后仍然成立的那些——在这个新目录结构上一次都没跑过。建议在下次 push 前,把 除红灯之外,有两点我会认真重新考虑: 115 处裸 边界形态也仍与叙述不符: 如果六个月后由我来维护,我会感谢作者建立的模块边界,也会抱怨这些批量改写的残留。两者本周都能修好。我就三个阻塞项请求修改——不是针对方向,方向我认为是对的。 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Requesting changes on three blocking findings — full detail in my Stage 2 and Stage 3 comments above. 🙏
All three are the same defect class: this PR moves where things live, and code that encodes those locations wasn't updated.
-
Java fixtures unreachable (179 failing tests).
SDK Java (fast)reports 107 failures + 72 errors of 5,973 inqwen-managed-agent-verification. The CSI protocol tests read shared fixtures viaPath.of("../cli/src/serve/contracts/..."), relative to the Maven module basedir. Moving the test sources intoverification/put surefire's working directory one level deeper, so../cli/...now resolves topackages/managed-agent-server/cli/.... The fixtures are all still present underpackages/cli/src/serve/contracts/— only the relative prefix broke. Themanaged.module.rootproperty this PR adds is the right mechanism; the Java literals just weren't wired to it. -
Stale workflow meta-test.
.github/workflows/release-managed-agent-reference.ymlwidened its m2 eviction to aqwen-managed-agent-*glob, but.github/scripts/ci-runner-routing.test.mjs:911still pins the old literal, soLint & Staticis red. (Side note: AGENTS.md rule 3 tells you to grepscripts/tests/, which would not have found this file — the rule's search path looks incomplete.) -
Packaging default output moved, its test didn't.
scripts/create-managed-runtime-package.jsnow emits to.../managed-agent-server/server/target/managed-runtime, butscripts/tests/managed-runtime-package.test.js:222-225still expects the pre-split path, soTestis red (1 failed / 3,953 passed).
Because CI aborts early on the Java suite, the MySQL / Hosted / fault / MQ / OSS gates have not run against the new layout at all — those are the ones that would prove the transaction, fencing and recovery boundaries survived. I'd suggest sweeping every encoded path (managed-agent-server/target, managed-agent-server/src/main, qwen-managed-agent-server, ../cli/) across scripts/, .github/scripts/, .github/workflows/, integration-tests/ and the Java sources before the next push, so the full reactor gets one clean attempt rather than fixing these one at a time.
Two non-blocking items worth a look while you're in there: the 115 bare public insertions (no-ops in interfaces, and they left the modifier stranded on its own line in several tests — unrelated churn against a "no intended behavior change" PR), and isDraft is false even though the description says draft status reflects pending acceptance.
Nothing here is a direction objection — splitting the module so the compiler enforces ownership is worth doing, and the design doc, bilingual docs and the AGENTS.md/README path updates are all in good shape. The body was also upfront that the final reactor verification timed out, which is exactly what CI then confirmed.
中文说明
就三个阻塞项请求修改——完整细节见上方 Stage 2 与 Stage 3 评论。
三者属同一类缺陷:本 PR 改变了"东西放在哪",而编码了这些位置的代码没有同步更新。
-
Java 夹具不可达(179 个用例失败)。
SDK Java (fast)在qwen-managed-agent-verification的 5,973 个用例中报出 107 failures + 72 errors。CSI 协议测试用Path.of("../cli/src/serve/contracts/...")读取共享夹具,该路径相对于 Maven 模块 basedir。测试源码移入verification/后,surefire 工作目录深了一层,../cli/...变成packages/managed-agent-server/cli/...。七个夹具在packages/cli/src/serve/contracts/下都还在,坏的只是相对前缀。本 PR 引入的managed.module.root正是对的机制,只是 Java 里的字面量没接上去。 -
workflow 元测试未更新。
.github/workflows/release-managed-agent-reference.yml已把 m2 清理放宽为qwen-managed-agent-*通配,但.github/scripts/ci-runner-routing.test.mjs:911仍钉着旧字面量,导致Lint & Static红灯。(附带一提:AGENTS.md 第 3 条让你 grepscripts/tests/,这找不到该文件——规则的搜索路径似乎不完整。) -
打包默认输出已移动,对应测试未移动。
scripts/create-managed-runtime-package.js现输出到.../managed-agent-server/server/target/managed-runtime,而scripts/tests/managed-runtime-package.test.js:222-225仍期望拆分前路径,导致Test红灯(1 failed / 3,953 passed)。
由于 Java 套件让 CI 提前中断,MySQL/Hosted/故障/MQ/OSS 门禁在新目录结构上一次都没跑过——而正是它们才能证明事务、隔离栅栏与恢复边界在迁移后依然成立。建议在下次 push 前,把 scripts/、.github/scripts/、.github/workflows/、integration-tests/ 与 Java 源码中所有编码路径(managed-agent-server/target、managed-agent-server/src/main、qwen-managed-agent-server、../cli/)系统排查一遍,让完整 reactor 有一次干净的执行机会,而不是逐个修。
另有两项非阻塞项,顺手可以看看:115 处裸 public 插入(在接口中是空操作,且在多个测试中把修饰符单独留在了一行——与"无预期行为变更"的定位不符的无关改动);以及描述中说草稿状态代表验收待完成,但 isDraft 实为 false。
以上都不是对方向的否定——拆模块让编译器约束职责归属值得做,设计文档、双语文档以及 AGENTS.md/README 的路径更新都做得很到位。正文也坦承最后一次 reactor 验证超时,而这正是 CI 随后确认的结果。
— Qwen Code · qwen3.8-max-2026-09-02
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Preserve live message paging in the Maven module layout, adapt repository references, and migrate the new H2/MySQL tests into verification. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Resolve shared fixtures and worker paths from the Maven module root, update CI packaging assertions, and align existing test fixtures with the extracted contracts. Restore restricted Workspace constructors and remove redundant test visibility changes without altering inherited MySQL coverage. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
In response to Stage 1: retaining the explicitly agreed, coordinated module/package migration. Enforcer and ArchUnit remain useful checks, but a single artifact still puts every implementation on one compile classpath; separate POMs make sibling implementation imports fail to compile. Package changes give each production package one artifact owner instead of retaining cross-JAR package-private coupling. The small Broker implementation module is intentional: shared requests, identities, records and deterministic protocol rules belong with their contracts, while scheduling/recovery orchestration belongs in the implementation. Class counts alone do not establish that boundary; the dependency matrix and bytecode checks must verify it. Further decomposition of the large Broker class stays outside this PR. These choices are now recorded in the English design and Chinese design in b32e278ee9. Final Java acceptance remains pending CI. |
|
In response to Stage 2: corrections are pushed in b32e278ee9. Surefire/Failsafe now expose the module root and built CLI path, and the affected CLI/Core/WebShell fixture readers, Node working directories, Dockerfile reader and Hosted worker defaults use the relocated layout. The workflow cache-eviction assertion and runtime-package output expectation now match the actual multi-module build. Historical tagged-release patches and old-layout compatibility fallbacks were preserved. The old Java log also contains failures unrelated to fixture paths. This commit updates stale exception constructors/status assertions, Spring test dependencies, SDK-to-contract recovery assertions, worktree/MQ mocks and lifecycle/capability fixtures. It restores three package-private Workspace constructors rather than weakening their visibility test. It removes 109 redundant standalone public modifiers and formats the six public methods needed for cross-package MySQL test inheritance. No tests, selectors or coverage gates were removed. The current PR body no longer claims draft status; GitHub remains non-draft. Local verification: all 92 runner-routing checks and all 5 runtime-packaging checks passed, as did formatting and the commit hook. No Java verification was run in this follow-up because the shared 10-minute budget is exhausted; Java compilation and full acceptance remain pending CI. |
|
In response to Stage 3 and the CHANGES_REQUESTED review: b32e278ee9 addresses the three identified migration omissions and the additional test-fixture mismatches found in the Java log. The 179 old failures/errors were not all caused by paths, so I am not treating the path repair or the 97 passing script checks as proof that Java is green. The complete Java/H2, MySQL, Hosted/fault and MQ/OSS acceptance is still pending; no failing workflow was blindly rerun or gate relaxed. The existing review block is left for re-review after CI. |
|
Review follow-up pushed: b32e278ee9.
This commit adds no test classes and changes 204 lines in / 251 lines out. Two clean self-audit passes and the normal formatting/ESLint commit hook completed. The prior build/typecheck evidence is reused only for unchanged TypeScript/build inputs. Local Java validation was skipped because the cumulative budget remains 598.38/600 seconds; no additional Java/Maven setup, builds or tests ran. The old Java CI failure is not cleared by these local script passes, and all required Java/platform integration gates still need results on the new head. There are 0 unresolved inline review threads (0 existed to resolve). Each actionable top-level review comment has a linked reply; CHANGES_REQUESTED remains pending the reviewer's re-review. No merge, release or deployment was performed. |
Preserve SDK refusal messages and register the managed OSS adapter at fixture injection points. Keep the existing retry and client shutdown assertions intact. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
CI follow-up pushed: c2147432f0. Both reported failures are fixture regressions; the fast-tier status is the aggregate of the same Java failure, so no unchanged failing workflow was rerun.
Evidence on the previous head This increment changes six existing test/fixture files (+19/−12), with no production changes or additional test classes. Two clean self-audit passes and an independent read-only source review completed. No local Java validation ran because the cumulative budget remains 598.38/600 seconds; validation of the new head is pending CI. MySQL/Hosted/fault/MQ/OSS acceptance remains pending the approval-triggered full tier. Earlier review replies are preserved without duplicate responses; there were no new reviewer comments and 0 unresolved inline review threads at the start of this follow-up. 中文说明已推送 c2147432f0,修正剩余两项 CI 失败对应的夹具。fast-tier 失败汇总的是同一项 Java 失败,没有重跑未修改的失败工作流。 恢复 Automation 和两个 relay 异常夹具的完整 SDK 错误文本,保留错误字段、延后与重试断言;将配置测试及两处 Hosted 注入点的现有 OSS mock 包装成所需适配器,保留专用客户端关闭及宿主 Bean 隔离检查。 上版 |
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
CI follow-up pushed: ad02d7d05a. This changes only the order of the existing Harness imports in the Hosted cleanup coordinator, correcting both reported ImportOrder violations. No runtime statements, dependencies, tests or gates changed; no unchanged failing workflow was rerun.
The CI log distinguishes the successful test build from the later style failure. The import-only diff received a clean source audit and 中文说明已推送 ad02d7d05a,仅重新排列 Hosted cleanup coordinator 的现有 Harness imports,修正两处 ImportOrder 违规,没有修改运行语句、依赖、测试或门禁,也没有重跑未修改的失败工作流。
本次 import-only 差异已完成干净源码自审和 |
Supply the required transcript coverage in the recovery browser fixture and wait for history before testing a complete handoff. Preserve its existing safety and submission assertions. Order the cleanup coordinator test imports for Checkstyle. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
CI follow-up pushed: daad40b3de.
Validation: the original handoff case failed locally exactly as CI (30.643 s). With the fix, all three Chromium cases in the recovery spec pass once without retries (13.933 s). The task-owned Vite server was stopped. Formatting, ESLint, two clean self-audit passes and the committed/tested source-hash check passed. No production code, dependencies, new test classes, test selectors or gates changed. CI evidence on Local Java verification was skipped under the unchanged 598.38/600-second cumulative budget. Prior root build/typecheck evidence is reused because production TypeScript, dependencies and build inputs are unchanged, and both WebShell typecheck configs exclude the edited E2E spec. There were no new review comments and 0 unresolved inline threads at the poll; earlier replies remain deduplicated and CHANGES_REQUESTED awaits re-review. 中文说明已推送 daad40b3de。测试模块的 cleanup coordinator 仍有旧 import 顺序,已重新排序。六个生产模块的 Checkstyle 在 WebShell 失败已在本地按 CI 同一断言复现:base 的 上版 CI 的 Java 验证为 5,972 通过、0 失败/错误、19 跳过;生产 Checkstyle、Node Test、Lint & Static 和 reference distribution 均通过,WebShell 为 413/414 通过。Maven 镜像警告和 Vite 连接拒绝日志不是最终失败原因,没有盲目重跑。新 head 的 Java 质量检查、完整 414 项烟测及批准后触发的 MySQL/Hosted/故障/MQ/OSS 完整门禁仍待 CI。 Java 共享预算仍为 598.38/600 秒,本轮跳过本地 Java。生产 TypeScript、依赖与构建输入未变,WebShell 两套 typecheck 配置均排除本次 E2E spec,因此复用先前根构建与类型检查证据。本轮没有新增评审评论,轮询时未解决行内线程为 0;不重复旧回复,原 CHANGES_REQUESTED 仍等待复审。 |
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / afterFull-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
|
Flyway status triage for Current main is Please keep fixture-based checker experiments in dry-run mode with a fake API, and let the trusted main workflow own the live status context. The new trusted main recheck has now restored 中文说明
当前主干为 请将基于夹具的检查器实验限定为 dry-run 和假 API,并由可信主干工作流维护真实状态。本轮可信主干重检已将状态恢复为 |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: reverse-audit round 3 — not run: two 253-territory rounds were executed (round 1 and round 2); a third did not fit the remaining budget before the deadline, so the audit did not reach two consecutive dry rounds.
Not reviewed: reverse-audit round 2 findings — 23 territory auditors reported candidates that were never verified: the verification wave could not run before the deadline, so they are reported in the terminal and the saved report only.
Not reviewed: findings from the first fan-out outside the posted set — 30 Nice-to-have and 26 uncorroborated Suggestion candidates were not verified in this run and are terminal-only.
Not reviewed: the executable-script lint — packages/managed-agent-server/Dockerfile: hadolint is not installed.
Not explored to full depth (tool budget reached): chunk 243: a full javac compile of the eight files (no prebuilt target/classes in this shared worktree to compile against, and building in place is forbidden in a PR r…; chunk 22: none — I finished the checks I started within budget.; "agent 1c": full page-by-page walk of the 71,268-line diff (≈1,000 of the 1,224 entries are pure renames and the 194-file verification test tree was not read line by line…; chunk 4: none — all paths, callers and claims inside this range were verified.; chunk 166: I did not run mvn / javac on the verification module — type resolution above is source inspection against the PR tree, not a compiler run., and 21 more.
Not reviewed: "agent verify (round 1)" — pointed at diff lines it never opened: it made tool calls, but none of them read the diff.
Not linted (tool limitation, not a blocker): .github/workflows/ci.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/qwen-triage.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/release-managed-agent-reference.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/release-managed-runtime.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/sdk-java-contract-open-prs.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/sdk-java-flyway-open-prs.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/sdk-java.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/verify-maven-repo.yml — actionlint embedded-shell source mapping is not yet supported.
中文说明
仅完成部分审查,审查缺口已披露。
未审查(原文为英文):reverse-audit round 3 — not run: two 253-territory rounds were executed (round 1 and round 2); a third did not fit the remaining budget before the deadline, so the audit did not reach two consecutive dry rounds.
未审查(原文为英文):reverse-audit round 2 findings — 23 territory auditors reported candidates that were never verified: the verification wave could not run before the deadline, so they are reported in the terminal and the saved report only.
未审查(原文为英文):findings from the first fan-out outside the posted set — 30 Nice-to-have and 26 uncorroborated Suggestion candidates were not verified in this run and are terminal-only.
未审查(原文为英文):the executable-script lint — packages/managed-agent-server/Dockerfile: hadolint is not installed.
未探索到全部深度(达到工具调用预算):chunk 243:a full javac compile of the eight files (no prebuilt target/classes in this shared worktree to compile against, and building in place is forbidden in a PR r…;chunk 22:none — I finished the checks I started within budget.;"agent 1c":full page-by-page walk of the 71,268-line diff (≈1,000 of the 1,224 entries are pure renames and the 194-file verification test tree was not read line by line…;chunk 4:none — all paths, callers and claims inside this range were verified.;chunk 166:I did not run mvn / javac on the verification module — type resolution above is source inspection against the PR tree, not a compiler run.,另有 21 条。
未审查:"agent verify (round 1)"——启动 prompt 为它指定了 diff 中的行,但它从未打开:有工具调用,却没有一次读取 diff。
未检查(工具限制,非阻断):.github/workflows/ci.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/qwen-triage.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/release-managed-agent-reference.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/release-managed-runtime.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/sdk-java-contract-open-prs.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/sdk-java-flyway-open-prs.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/sdk-java.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/verify-maven-repo.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
Already have 2 approves.
Reconcile with #15871's Maven module split: the write-back prunes and the host-cache purge now cover every in-house coordinate (the purge globs qwen-managed-agent-*), keeping this PR's any-depth prune, five-name bookkeeping filter, mkdir warning path and seed nesting fix. The release seed keeps the glob purge and the bookkeeping drop. Meta-test pins and both design docs move with the merged shape; .size-baseline re-measured.
The terminal result a parent reads was assembled by joining every stored text part of the child's answer with a newline. The projection splits a text run wherever another event lands between two deltas of the same answer, so those newlines land in the middle of words and sentences: a 65,501-character answer reported in QwenLM#13874 came back with one inserted at offset 3,072, and the relayed text no longer matched the child's journal. Join adjacent text parts as they were sent and break the line only where the child reasoned in between, which is the rule the journal already applies. The message lookup, the resource-integrity check and the answer ordering are unchanged, and a message with no text part still yields no result. Tests pin the branch the review round asked for: a part list that opens with reasoning starts no line, a turn that only thought reports no result rather than an empty one, and the fixture reasons with the part type the projection emits, split across a real sequence gap. The store moved to the persistence module with QwenLM#15871 and its test to the verification module, so this lands on the split layout. Fixes QwenLM#13874
|
Released in v0.26.5. |
|
|
…ver ships them in (#16175) * fix(managed-agent): find the Flyway scripts in the module jar the server ships them in Since #15871 split the server into Maven modules, its Flyway scripts ship in BOOT-INF/lib/qwen-managed-agent-persistence-*.jar rather than in BOOT-INF/classes/db/. The upgrade command's check read only the classes, so on every archive since then its database row warned "cannot compare the Flyway scripts (no Flyway script found in ...)", and a release that changed or reordered a script the installed database ran went unflagged. migrationScripts() now also reads db/**/ at the root of each nested jar in BOOT-INF/lib/. Spring Boot stores those uncompressed, so their directories are read in place; a compressed one, which Spring Boot would not load, is skipped. A script keeps its path as its name wherever it ships, so one moved from the classes into a module compares as unchanged. The reference distribution workflow now reads the scripts out of the exact archive it built, so a later change of layout fails there rather than turning check's row into a standing WARN. * fix(managed-agent): read a Flyway script shipped twice with different contents as unreadable The reader keys the scripts on their classpath path, and the nested jars give that key a second source. Two copies of one path with different contents left whichever the central directory listed last in the map, so the database row compared one arbitrary copy, while the class loader would hand Flyway the other. Matching copies are still one script; differing ones now make the jar unreadable, which the row reports as "cannot compare the Flyway scripts". * fix(managed-agent): name both places that ship a differing Flyway script, and pin the local extra field - When one script path ships twice with different contents, the error now names the two places, BOOT-INF/classes or the nested jar, so the operator need not unpack the jar to find the second copy. - The test zips can carry a local-header extra field, as archivers add for timestamps or alignment, and the nested-jar case reads entries past one, so dropping that term from dataStart fails the suite.



What this PR does
Split the Managed Agent Server into six production Maven modules and one unpublished verification module, built and versioned together. Framework-neutral contracts define the boundaries; control-plane orchestration, Runtime Broker orchestration, persistence and adapters depend only on those contracts, while the server assembles the implementations and remains the single executable service.
Migrate the existing tests, resources, embedded-host integration, launchers, packaging, publication configuration and CI consumers together. Preserve the current main branch's bounded-history queries, live message paging, Hosted cleanup retries and upgrade preflight within the new boundaries. The server retains its published coordinate and executable/operator classifiers. Server configuration uses compile-time Lombok accessors for 349 simple getters/setters while retaining custom normalization, copying and fallback logic. Repeated SDK exception conversion is shared by typed helpers; deferred submissions and stream operations retain their conversion boundaries. Shared settings and Broker contracts expose only operations needed across module boundaries; private forwarding methods and unused test factories are removed.
Why it's needed
The single-module layout permits models, orchestration, storage and external clients to depend on one another, so directory names alone cannot enforce ownership. Separate Maven compilation and bytecode architecture checks make those dependencies explicit while keeping deployment and release coordination unchanged. The migration also preserves the original transaction, identity, fencing and recovery boundaries instead of splitting atomic work into independent repository calls.
Reviewer Test Plan
Verify that the production modules compile using only their declared dependencies, that contracts expose no framework or client implementation types, and that implementation modules do not depend on one another. Confirm that embedding, public/internal HTTP surfaces, configuration binding, resource ownership and packaged service behavior match main.
How to verify
After merging
main@8457254f75, repository build and typecheck passed. Twelve selected workflow/E2E runner meta-test suites passed 873 cases with 19 existing skips; the CI failure workflow suite initially failed under macOS Bash 3.2, then passed all 150 cases under the already-installed Bash 5. Four WebShell message-paging consumer suites passed 322 cases. The generated API matches the relocated OpenAPI byte for byte. Two clean merge audits and source comparisons preserve the upstream paging SQL, cursors, transaction boundaries, authorization checks and test cases while adapting package references, error status values and the test constructor to the module boundaries. Java compilation and runtime acceptance remain pending CI under the unchanged shared budget.Earlier local Java evidence, before that integration: all six production modules compiled and passed production Checkstyle/SpotBugs; architecture, transaction-proxy, configuration, embedding, SDK conversion and packaging checks passed, alongside 199 Broker, 44 lock-order, 33 retirement and 47 cancellation/command/automation cases. These results do not establish a passing final integrated Java revision. The final bounded reactor verification timed out, and the shared ten-minute Java budget was not reset for PR preparation.
The accessor/SDK-wrapper simplification, contract narrowing and revised composition test have source-level comparison, formatting and two clean self-audit passes as local evidence. Source comparison preserves configuration behavior, authorization/input call order and existing ACK test cases. The new configuration, deferred-call, stream-failure, composition and packaging regressions have not run locally because the same Java budget remains exhausted. The previously inspected Java CI failed, including moved-fixture path and test-context Bean failures; those broader failures are not claimed resolved, and final-revision Java acceptance remains pending.
Evidence (Before & After)
N/A — structural refactor with no intended UI change.
Tested on
Environment (optional)
macOS; JDK 21; Maven 3.9.14 with an isolated local repository; Node 26.12.1; Bash 5 for workflow shell fixtures. Earlier Java verification consumed approximately 598 seconds of the shared local budget.
Risk & Scope
server/target. Repository consumers migrate together. HTTP/configuration keys, database schema and persisted formats remain those of the integrated main revision; rollback replaces application artifacts without rewriting data.The complete, synchronized design and local evidence are available in English and 简体中文.
Linked Issues
None.
中文说明
本次变更
将 Managed Agent Server 拆为六个生产 Maven 模块和一个不发布的验证模块,统一构建和版本。框架无关的契约定义边界;控制面编排、Runtime Broker 编排、持久化和适配器仅依赖契约,server 装配各实现,并继续作为单个可执行服务交付。
同时迁移现有测试、资源、嵌入宿主集成、启动器、打包、发布配置及 CI 使用方。在新边界内保留当前主干的有界历史查询、实时消息分页、Hosted 清理重试和升级预检。服务保持现有发布坐标及可执行/运维 classifier。server 配置使用编译期 Lombok 注解替代 349 个简单 getter/setter,保留自定义规范化、复制和回退逻辑。重复的 SDK 异常转换集中到带类型的辅助方法,延迟提交和流操作仍保留各自的转换边界。共享配置和 Broker 契约仅暴露跨模块需要的操作,删除私有转发方法及未使用的测试工厂。
为什么需要
单模块布局允许模型、编排、存储和外部客户端相互依赖,目录名称无法单独约束职责。独立 Maven 编译和字节码架构检查使依赖关系明确,同时保持部署和发布协调方式不变。迁移还保留原有事务、身份、隔离栅栏及恢复边界,不把原子操作拆成相互独立的仓储调用。
评审测试计划
确认生产模块仅按声明依赖编译,契约不暴露框架或客户端实现类型,各实现模块不相互依赖。核对嵌入、公共/内部 HTTP 接口、配置绑定、资源归属及服务包行为与主干一致。
如何验证
合入
main@8457254f75后,仓库 build 和 typecheck 通过。十二组定向工作流/E2E 启动器元测试通过 873 项、保留 19 项既有跳过;其中 CI 失败处理工作流测试最初在 macOS Bash 3.2 下失败,切换到已安装的 Bash 5 后全部 150 项通过。四组 WebShell 消息分页调用方测试通过 322 项。生成的 API 与迁移后的 OpenAPI 逐字节一致。两遍连续干净合并自审及源码比对确认,上游分页 SQL、游标、事务边界、授权检查和测试用例保持不变,仅按模块边界适配包引用、错误状态值和测试构造参数。共享预算保持不变,Java 编译及运行时验收仍待 CI。整合前的本地 Java 证据:六个生产模块均已编译并通过生产 Checkstyle/SpotBugs;架构、事务代理、配置、嵌入、SDK 转换和打包检查通过,另有 199 个 Broker、44 个锁顺序、33 个退休及 47 个取消/命令/自动化用例通过。这些结果不能证明最终整合后的 Java 版本通过。最后一次限定时长的 reactor 验证超时,准备 PR 时没有重置共享十分钟 Java 预算。
访问方法/SDK 包装精简、契约收窄和装配测试改写的本地证据为源码比对、格式检查及两遍连续干净自审。源码比对确认配置行为、授权/输入调用顺序和既有 ACK 测试用例保持不变。同一 Java 预算已用尽,因此新增的配置、延迟调用、流异常、装配及打包回归尚未在本地运行。此前查看的 Java CI 失败,包含迁移后的夹具路径和测试上下文 Bean 问题;不宣称这些更广范围的失败已解决,最终版本的 Java 验收仍未完成。
变更前后证据
N/A — 结构重构,没有预期的 UI 变化。
测试平台
环境
macOS;JDK 21;Maven 3.9.14,使用隔离本地仓库;Node 26.12.1;工作流 Shell 夹具使用 Bash 5。此前 Java 验证累计使用约 598 秒共享本地预算。
风险与范围
server/target。仓库内使用方同步迁移。HTTP/配置键、数据库 schema 及持久化格式保持整合后主干的状态;回退替换应用产物,不重写数据。完整且同步的设计与本地证据见英文版和中文版。
关联问题
无。