Skip to content

refactor(managed-agent): Split server into Maven modules - #15871

Merged
doudouOUC merged 13 commits into
mainfrom
codex/managed-agent-maven-modules
Oct 30, 2026
Merged

doudouOUC merged 13 commits into
mainfrom
codex/managed-agent-maven-modules

Conversation

@doudouOUC

@doudouOUC doudouOUC commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

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

  1. Install the Java SDK from the same source into an isolated Maven repository, then run the parent reactor's complete verification. Expect all production modules, architecture checks and original test families to execute; a missing test tree or report must fail rather than pass empty.
  2. Exercise all seven former default transaction entry points through the dedicated Spring transaction manager. Verify whole-operation rollback and preserved locking, then check configuration units/defaults, host Bean isolation, internal endpoint opt-in and single-instance/pooled Harness wiring. Standalone session creation must publish configured skills and inherited extension resources and include their references in the SDK request.
  3. Verify native CSI capability refusal for memory repositories, JDBC admission and generation fencing, SDK error conversion, and recovery/retirement behavior after response loss. Run the existing MySQL, Hosted, fault, MQ and OSS gates without weakening their selectors or report completeness checks.
  4. Inspect ordinary, executable and operator JARs from the server output directory. Verify unique nested resources, maintenance entry points, an independent embedding host and the reference distribution; no database migration is expected. Confirm that Lombok is absent from executable and operator runtime libraries.

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

OS Status
🍏 macOS ✅ tested, with the scope and limits above
🪟 Windows ⚠️ not tested
🐧 Linux ⚠️ not tested

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

  • Main risk or tradeoff: This is a broad ownership migration across transaction, Spring assembly, SDK exception and classpath-resource boundaries. Final-revision Java and CI acceptance remains incomplete; this is not a deployment-ready claim. The server build now requires Lombok annotation processing, without adding it to the deployed runtime.
  • Not validated / out of scope: The integrated Java revision still needs compilation, Checkstyle/SpotBugs, the full reactor, aggregate coverage, independent Maven embedding-host validation and the complete MySQL/Hosted/fault/MQ/OSS gates. Earlier intermediate JARs are not final deliverables. An unchanged 600 ms script timing case failed in a broader earlier run and passed only in isolation; that is not a claim that the entire broader run passed. No publication, deployment, independent module versioning or unrelated feature work is included.
  • Breaking changes / migration notes: Java packages, selected types/constructors and the parent artifact coordinate change. The existing server coordinate remains, its internal dependencies publish at the same version, and executable output moves to 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 接口、配置绑定、资源归属及服务包行为与主干一致。

如何验证

  1. 将同一源码的 Java SDK 安装到隔离 Maven 仓库,再执行父 reactor 的完整验证。应执行全部生产模块、架构检查和原有测试族;测试树或报告缺失必须失败,不能空通过。
  2. 经专用 Spring 事务管理器执行七个原默认事务入口。确认整个操作回滚且锁语义保留,再核对配置单位/默认值、宿主 Bean 隔离、内部接口显式开启以及单实例/池化 Harness 装配。单实例会话创建必须发布已配置的技能和继承扩展资源,并在 SDK 请求中包含其引用。
  3. 验证内存仓储对原生 CSI 能力的拒绝、JDBC admission 和 generation 栅栏、SDK 异常转换,以及响应丢失后的恢复/退休行为。执行现有 MySQL、Hosted、故障、MQ 和 OSS 门禁,不削弱选择条件或报告完整性检查。
  4. 检查 server 输出目录中的普通、可执行和运维 JAR。验证嵌套资源唯一性、维护入口、独立嵌入宿主和参考分发包;不应需要数据库迁移。确认可执行包及运维包的运行时依赖中不含 Lombok。

合入 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 ✅ 已测试,范围和限制见上文
🪟 Windows ⚠️ 未测试
🐧 Linux ⚠️ 未测试

环境

macOS;JDK 21;Maven 3.9.14,使用隔离本地仓库;Node 26.12.1;工作流 Shell 夹具使用 Bash 5。此前 Java 验证累计使用约 598 秒共享本地预算。

风险与范围

  • 主要风险或取舍:本次跨事务、Spring 装配、SDK 异常和 classpath 资源边界调整职责归属,范围较大。最终版本的 Java 和 CI 验收仍未完成,不代表可部署交付。server 构建现在需要 Lombok 注解处理,部署运行时不增加该依赖。
  • 未验证或范围外:整合后的 Java 版本仍需编译、Checkstyle/SpotBugs、完整 reactor、聚合覆盖率、独立 Maven embedding-host 验证,以及完整 MySQL/Hosted/故障/MQ/OSS 门禁。此前中间 JAR 不是最终交付物。一个未修改的 600 ms 脚本时序用例在早前较广执行中失败,仅在隔离运行时通过,不能据此宣称整个较广执行通过。不包含发布、部署、模块独立版本化或无关功能开发。
  • 破坏性变更及迁移说明:Java 包名、部分类型/构造接口和父工程坐标改变。服务保留现有坐标,内部依赖同版本发布,可执行产物移至 server/target。仓库内使用方同步迁移。HTTP/配置键、数据库 schema 及持久化格式保持整合后主干的状态;回退替换应用产物,不重写数据。

完整且同步的设计与本地证据见英文版和中文版。

关联问题

无。

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>
@qwen-code-review-bot

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

Copy link
Copy Markdown
Collaborator

🩺 serve daemon A/B

Built the PR base vs this PR head 8f93271, drove a fixed endpoint set against each, and diffed the JSON responses. Only fields that changed are shown.

health-deep-with-session

field PR base (before) this PR (after)
activeWorkStaleMs 46 44

— Qwen Code · serve A/B

@doudouOUC
doudouOUC marked this pull request as ready for review October 29, 2026 15:09
@doudouOUC doudouOUC self-assigned this Oct 29, 2026
@qwen-code-review-bot

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

Copy link
Copy Markdown
Collaborator

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

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

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

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 refactor, not a fix, so the reproduction gate doesn't apply — and the problem is real rather than theoretical. In a single Maven module nothing prevents models, orchestration, storage and external clients from depending on one another; directory names enforce nothing at compile time. That's an observable property of today's build, not a hypothesis.

Direction: Internal build architecture for managed-agent-server, squarely within scope, and it doesn't pull focus from user-facing work. No upstream CHANGELOG signal is expected for an internal Java build restructure, so I didn't treat that as a criterion.

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 (packages/core/src/**, packages/*/src/{auth,providers,models,config,tools,services}/**); the three packages/cli files touched are all src/serve/*.test.ts. It is a cross-package change (managed-agent-server, cli, web-shell). @doudouOUC has admin on this repo, so the two-tier core gate is maintainer-exempt — no hard block, no forced escalation. Flagging the scale for awareness only; it's well past the 1,000-line advisory, and I'd gently suggest the rename could travel separately from the split if that's still cheap to undo.

Approach: Three questions worth settling before the code review — none of them blockers.

  1. The goal is enforcement: "directory names alone cannot enforce ownership". Physical module separation achieves it, but Maven Enforcer bannedDependencies plus the bytecode architecture check this PR already adds can express the same rules inside the existing single module, for a small fraction of the churn. Was that considered and rejected? If so the design doc is the right place to record why — it's the question the next person will ask.
  2. Two large changes are bundled: the module split and a Java package rename (managedagent.persistence → maintenance, managedagent.harness → managedagent.contracts.harness, daemon.HarnessRuntimeRecovery → managedagent.harness.contracts.*) plus a parent artifact coordinate change. Either alone is reviewable; together they give all 1,049 renames semantic weight at once.
  3. The boundary shape doesn't obviously match the description. runtime-broker/ — named for "Runtime Broker orchestration" — holds exactly one production class (RuntimeBrokerService.java), while 89 other runtimebroker/** production classes landed in contracts/. And contracts/ holds 208 of ~490 production files (42%), including repository, model, transport, protocol, security and schema packages. The one module every other module is permitted to depend on is also the biggest one, which makes "implementation modules do not depend on one another" hard to verify in practice. Is that the intended end state, or did contracts become the path of least resistance during the move?

Risk: No elevated risk signals. None of the revert-correlated high-risk paths (geminiChat, shellExecutionService, mcp-client, sandbox.ts, acpConnection, …) are touched.

Moving on to code review. 🔍

中文说明

感谢提交,也感谢 PR 描述对"哪些验证过、哪些没验证"写得格外坦诚。

模板完整 ✓,设计文档中英文双语齐备且互相链接。

问题: 这是 refactor 而非 fix,复现门禁不适用——而且问题是真实存在的,不是理论假设。单一 Maven 模块下,模型、编排、存储和外部客户端之间没有任何编译期约束,目录名本身无法强制职责边界。这是当前构建方式的客观属性。

方向: 属于 managed-agent-server 的内部构建架构,完全在范围内,也不会分散对用户可见功能的注意力。内部 Java 构建重构不会在上游 CHANGELOG 留痕,因此未将其作为判断依据。

规模: 较大——1,219 个文件,+17,653 / −11,097(共 28,750 行变更)。实际构成约为生产代码 19,870 行(532 个文件)、测试 8,365 行(678 个文件)、文档 515 行,无生成/schema 文件。需要说明:Stage 0 的排除规则只覆盖 TypeScript,若照字面套用,会把其中 28,744 行都算作"生产代码",上面的拆分才是有意义的口径。

没有文件命中核心模块匹配规则(packages/core/src/**、packages/*/src/{auth,providers,models,config,tools,services}/**);涉及的 3 个 packages/cli 文件都是 src/serve/*.test.ts。但这确实是一个跨包变更(managed-agent-server、cli、web-shell)。@doudouOUC 在本仓库拥有 admin 权限,因此核心模块两级门禁按维护者豁免处理——不硬性拦截,也不强制上升。规模仅作提示,已远超 1,000 行建议阈值;如果现在还来得及,包重命名与模块拆分分开提交会更好审。

方案: 有三个问题建议在代码审查前先想清楚,都不是阻塞项。

  1. 目标是可强制的边界:"目录名无法单独约束职责"。物理拆模块能达成,但 Maven Enforcer 的 bannedDependencies 加上本 PR 已经引入的字节码架构检查,同样能在现有单模块内表达这些规则,代价小得多。是否考虑过并否决了?若否决,建议把理由写进设计文档——这正是下一个人会问的问题。
  2. 这里捆绑了两个大变更:模块拆分与 Java 包重命名(managedagent.persistence → maintenance、managedagent.harness → managedagent.contracts.harness、daemon.HarnessRuntimeRecovery → managedagent.harness.contracts.*),外加父工程坐标变更。任一项单独都可审;放在一起会让 1,049 个重命名同时携带语义变化。
  3. 边界形态与描述不太吻合。以"Runtime Broker 编排"命名的 runtime-broker/ 只有一个生产类(RuntimeBrokerService.java),而另外 89 个 runtimebroker/** 生产类落进了 contracts/;contracts/ 共持有 208 / ~490 个生产文件(42%),其中包含 repository、model、transport、protocol、security、schema 等包。所有模块都被允许依赖的那个模块同时又是最大的模块,这让"各实现模块不相互依赖"在实践中很难验证。这是预期的最终形态,还是迁移过程中 contracts 成了阻力最小的去处?

风险: 无升级风险信号。与回滚相关的高风险路径(geminiChat、shellExecutionService、mcp-client、sandbox.ts、acpConnection 等)均未被触及。

进入代码审查 🔍

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

Reviewed at 2135fdc62f25c1154042b4cd50f0623c41aec08f · re-run with @qwen-code /triage

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Code review

I 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)

SDK Java (fast) / ubuntu-latest / Java 21 ran 5,973 tests in qwen-managed-agent-verification and reported 107 failures + 72 errors, 23 skipped. Nearly all share one root cause:

[ERROR]   ManagedCsiProtocolTest.replaysTheSameClosedEnvelopeAndIndependentPhysicalKeyFixturesAsTypescript:18
          » NoSuchFile ../cli/src/serve/contracts/managed-csi-v1.fixtures.json
[ERROR]   CsiFileHistoryProtocolTest.sharesEmptyAndInheritedPreimagePinsAndRejectsCrossedEvidence:18
          » FileNotFound ../cli/src/serve/contracts/managed-csi-file-history-v1.fixtures.json (No such file or directory)
[ERROR] Failed to execute goal ...maven-surefire-plugin:3.5.6:test (default-test)
          on project qwen-managed-agent-verification: There are test failures.
##[error]Maven suite 'runtime-broker H2 suite' failed with status 1

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 packages/managed-agent-server/, so ../cli/... resolved to packages/cli/.... The test sources now live under packages/managed-agent-server/verification/src/test/java/..., so surefire's working directory sits one level deeper and ../cli/... resolves to packages/managed-agent-server/cli/..., which doesn't exist.

The fixtures themselves are fine — I confirmed all seven (managed-csi-v1, managed-csi-files-v2, managed-csi-worker-ack-v1, managed-csi-file-finalize-v1, managed-csi-file-history-v1, managed-csi-native-readback-v1, managed-context-v1) are still present at packages/cli/src/serve/contracts/ on this head SHA. Only the relative prefix broke.

The PR clearly anticipated this class of problem: it introduces <managed.module.root>${project.basedir}/..</managed.module.root> in the module poms and drops <qwen.cli.entry>${project.basedir}/../../dist/cli.js</qwen.cli.entry>. But the hardcoded ../cli/... literals in the Java sources were never rewired to that property. Since 1,049 of the 1,219 files are pure renames with no content change, those literals travelled silently — nothing in the diff drew attention to them.

Suggested fix direction: route them through managed.module.root (or a surefire workingDirectory / system property) rather than editing each literal, so the next module move can't break them the same way.

2. Blocking — workflow meta-test left stale (AGENTS.md rule 3)

Lint & Static (ubuntu-latest, Node 22.x) is red. ESLint and Prettier both passed cleanly; the failure is a meta-test:

not ok 46 - release-managed-agent-reference.yml build is safe on a shared pool host
  location: .github/scripts/ci-runner-routing.test.mjs:911
  The input did not match the regular expression
    /rm -rf -- "\$\{repo\}\/com\/alibaba\/qwencode-sdk" "\$\{repo\}\/com\/alibaba\/qwen-managed-agent-server"/
  actual: rm -rf -- "${repo}/com/alibaba/qwencode-sdk" "${repo}/com/alibaba/"qwen-managed-agent-*

.github/workflows/release-managed-agent-reference.yml is in the diff (2/2): the m2 eviction widened from the single qwen-managed-agent-server coordinate to a qwen-managed-agent-* glob, which is the right call now that several modules publish under that prefix. But .github/scripts/ci-runner-routing.test.mjs is not in the diff and still pins the old literal.

This is worth flagging as a process gap, not just a miss. AGENTS.md rule 3 says to run grep -R ".github/workflows/<filename>.yml" scripts/tests/ — but this pinning test lives in .github/scripts/, so following the documented command exactly would not have surfaced it. The rule's grep target is incomplete; widening it to cover .github/scripts/ too looks like a worthwhile follow-up.

Minor, same hunk: "${repo}/com/alibaba/"qwen-managed-agent-* mixes a quoted prefix with an unquoted glob. It works in bash, but quoting the path up to the * would read consistently with the argument beside it.

3. Blocking — packaging default output moved, its test didn't

Test (ubuntu-latest, Node 22.x): 1 failed / 3,953 passed / 13 skipped across 134 files.

FAIL  scripts/tests/managed-runtime-package.test.js
      > separate Managed runtime archive
        > keeps default archives outside existing CLI assets and runtime discovery
AssertionError: expected false to be true // Object.is equality
Test Files  1 failed | 133 passed (134)

scripts/create-managed-runtime-package.js now defaults to packages/managed-agent-server/server/target/managed-runtime — the PR correctly inserts the new server segment in both the help text and the path join. But scripts/tests/managed-runtime-package.test.js is not in the diff and still assembles its expected path as managed-agent-server / target / managed-runtime (lines 222–225), so the archive isn't where the test looks.

Three independent instances of the same failure mode argues for a deliberate sweep rather than fixing these one at a time. Grepping managed-agent-server/target, managed-agent-server/src/main, qwen-managed-agent-server and ../cli/ across scripts/, .github/scripts/, .github/workflows/, integration-tests/ and the Java sources would likely find the rest — including ones CI hasn't reached yet because the suite aborts early.

4. Non-blocking — 115 unrelated public modifier insertions

The diff adds a bare public on 115 lines across 13 files. In the production contract interfaces it's a semantic no-op, since interface members are already implicitly public:

-    boolean isAvailable();
+    public boolean isAvailable();
-    default void recoverForWake(String tenantId, String sessionId) {
+    public default void recoverForWake(String tenantId, String sessionId) {

(contracts/.../managedagent/contracts/harness/HarnessConnector.java, contracts/.../runtimebroker/RuntimeProvisioner.java)

In the tests it produced formatting nobody would write by hand — the modifier stranded on its own line:

     @Test
+    public
     void sharesAllThreeClosedActionsAndTheNullablePreparedRule() throws Exception {

Three such occurrences in CsiNativeReadbackProtocolTest.java alone. It compiles and Checkstyle let it through, but it reads as unreviewed codemod output, and it's unrelated churn in a PR whose stated contract is "no intended behavior change". AGENTS.md asks for the minimal change set. I'd revert the visibility sweep entirely unless part of it was genuinely required for cross-module access — and if it was, those few cases deserve to be visible on their own rather than hidden among 115 no-op edits.

5. Non-blocking — described as a draft, not marked one

isDraft is false, yet the body says "Draft status reflects pending final-revision Java and CI acceptance, not a deployment-ready claim." The body is also upfront that "the final bounded reactor verification timed out" and that the earlier Java results "do not establish a passing final integrated Java revision". That candour is genuinely appreciated, and CI has now supplied the answer the local budget couldn't. But if this isn't meant to be merged yet, marking it a draft would keep it out of the merge queue and stop the mixed signal.

What I did not verify

Module dependency acyclicity; that contracts exposes no framework or client implementation types; transaction-boundary preservation across the seven former default entry points; Spring bean isolation in the embedding host; JAR nested-resource uniqueness; and the MySQL / Hosted / fault / MQ / OSS gates. These are exactly what the Reviewer Test Plan asks a human to check, none are observable from a static read of a 1,219-file diff, and the suite that would have covered them is red. Not verified: no green Java revision exists yet for this head.

Module map (how the 1,219 files are distributed)
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

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

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, AGENTS.md and the README were correctly updated for the moved schema and OpenAPI paths, and the description volunteers its own gaps instead of hiding them — including saying outright that the final reactor verification timed out and that the earlier Java numbers "do not establish a passing final integrated Java revision". That is not how a PR trying to slip something past the gate reads. CI has now supplied the answer the local ten-minute budget couldn't, and it's red.

What I keep coming back to is that all three blocking findings are the same mistake. A relative fixture prefix, a rm -rf literal in a workflow meta-test, and a packaging default output path all encode "where things live". This PR moves where things live — that's its whole job — and 1,049 of the 1,219 files are pure renames with zero content change, so those encodings travelled silently. The PR even built the right mechanism (managed.module.root) and then didn't finish wiring it. That's a completeness problem, not a design problem, which is why I'd fix forward rather than rethink.

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 (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 is worth doing before the next push, so the full reactor gets one clean attempt.

Two things I'd genuinely reconsider, separately from the red:

The 115 bare public insertions bother me more than their size suggests. In the contract interfaces they're no-ops — interface members are implicitly public — and in the tests they left the modifier stranded on its own line above void, three times in one file. That's machine output nobody read. In a PR whose entire claim is "the layout changed, the behaviour didn't", every edit that isn't a move is a claim a reviewer has to check, and this adds 115 of them for nothing. Drop the sweep; keep only what cross-module access truly required, and let those be visible.

And the boundary shape still doesn't match the story. runtime-broker/ holds one production class while 89 of its siblings sit in contracts/, which carries 208 of ~490 production files. If the module everything may depend on is also the largest module, the enforcement the split buys is thinner than advertised. I don't think that's necessarily wrong — records, SPIs and exceptions do belong in a contract layer — but transport, protocol, security and schema packages living there deserve a sentence in the design doc explaining why, because the next person will ask whether contracts was the destination or just the easiest one.

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 用例失败,另有三处路径移动未同步,因此按现状不能合并。

退一步看:我不怀疑这里的意图和投入。把单模块拆成六个、让编译器来约束职责归属,是值得做的目标;设计文档中英双语齐备;AGENTS.md 与 README 都随 schema 和 OpenAPI 路径正确更新了;描述也主动交代了自己的缺口——包括明说最后一次 reactor 验证超时、早前 Java 数据"不能证明最终整合后的 Java 版本通过"。这不是一个想蒙混过关的 PR 该有的样子。CI 现在补上了本地十分钟预算没能给出的答案,而它是红的。

我反复想到的是:三个阻塞项其实是同一个错误。夹具的相对路径前缀、workflow 元测试里的 rm -rf 字面量、打包默认输出路径,三者都在编码"东西放在哪"。而本 PR 的工作恰恰就是改变"东西放在哪"——1,219 个文件中有 1,049 个是内容零改动的纯重命名,于是这些编码静默地跟着搬走了。PR 甚至已经建好了正确的机制(managed.module.root),只是没接完线。所以这是完整性问题,不是设计问题——我倾向于往前修,而不是推倒重来。

但这确实改变了我对推进顺序的看法。逐个修三个症状,正是第四个漏网的方式: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 插入,其影响超出它的体量。在契约接口里是空操作(接口成员本就隐式 public),在测试里则把修饰符单独留在了 void 上方一行,单个文件出现三次。这是没人读过的机器产物。在一个全部主张就是"目录变了、行为没变"的 PR 里,每一处非搬迁改动都是要复核者额外验证的断言,而这 115 处换不来任何东西。建议整轮回退,只保留跨模块访问确实需要的部分,并让它们显眼可见。

边界形态也仍与叙述不符:runtime-broker/ 只有一个生产类,而它的 89 个同类待在 contracts/;后者持有约 490 个生产文件中的 208 个。如果人人可依赖的模块同时是最大的模块,这次拆分换来的约束力就比宣称的要薄。我不认为这必然是错的——record、SPI 和异常类型确实属于契约层——但 transport、protocol、security、schema 这些包放在那里,值得在设计文档中用一句话说明理由,因为下一个人一定会问:contracts 是目的地,还是只是最省力的去处。

如果六个月后由我来维护,我会感谢作者建立的模块边界,也会抱怨这些批量改写的残留。两者本周都能修好。我就三个阻塞项请求修改——不是针对方向,方向我认为是对的。

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

Reviewed at 2135fdc62f25c1154042b4cd50f0623c41aec08f · 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.

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.

  1. Java fixtures unreachable (179 failing tests). SDK Java (fast) reports 107 failures + 72 errors of 5,973 in qwen-managed-agent-verification. The CSI protocol tests read shared fixtures via Path.of("../cli/src/serve/contracts/..."), relative to the Maven module basedir. Moving the test sources into verification/ put surefire's working directory one level deeper, so ../cli/... now resolves to packages/managed-agent-server/cli/.... The fixtures are all still present under packages/cli/src/serve/contracts/ — only the relative prefix broke. The managed.module.root property this PR adds is the right mechanism; the Java literals just weren't wired to it.

  2. Stale workflow meta-test. .github/workflows/release-managed-agent-reference.yml widened its m2 eviction to a qwen-managed-agent-* glob, but .github/scripts/ci-runner-routing.test.mjs:911 still pins the old literal, so Lint & Static is red. (Side note: AGENTS.md rule 3 tells you to grep scripts/tests/, which would not have found this file — the rule's search path looks incomplete.)

  3. Packaging default output moved, its test didn't. scripts/create-managed-runtime-package.js now emits to .../managed-agent-server/server/target/managed-runtime, but scripts/tests/managed-runtime-package.test.js:222-225 still expects the pre-split path, so Test is 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 改变了"东西放在哪",而编码了这些位置的代码没有同步更新。

  1. 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 里的字面量没接上去。

  2. 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 条让你 grep scripts/tests/,这找不到该文件——规则的搜索路径似乎不完整。)

  3. 打包默认输出已移动,对应测试未移动。 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

doudouOUC and others added 4 commits October 30, 2026 00:21
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>
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

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.

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

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.

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

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.

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Review follow-up pushed: b32e278ee9.

Item Action
Shared fixtures, worker entry and process working directories Corrected paths for the verification module while retaining its local fixture working directory.
CI routing and runtime package assertions Corrected both stale expectations; 92 routing and 5 packaging checks pass locally.
Java fixture and contract mismatches Updated existing exception, Spring, SDK recovery, worktree, MQ, capability and SSH lifecycle fixtures; restored restricted Workspace constructors. Awaiting Java CI.
Visibility cleanup Removed 109 redundant modifier lines; retained all six cross-package inherited MySQL methods as public.
Module/package design questions Retained the agreed scope and documented compile-classpath enforcement and contract ownership in both languages.
Draft wording Current description has no draft claim; acceptance is still explicitly pending.

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

Copy link
Copy Markdown
Collaborator Author

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.

Item Action
Automation failure detail Restored the SDK's full HTTP error-message format in the automation and two relay fakes; retained the error fields and the existing defer/retry assertions.
OSS fixture injection Registered the managed OSS adapter around the existing mock at the configuration test and both remaining Hosted injection sites; retained the dedicated client's shutdown verification and host-bean isolation checks.

Evidence on the previous head b32e278ee9: the Java verification module ran 5,991 cases with 5,970 passed, 2 failed, 0 errors and 19 skipped. Production modules compiled and the module architecture test passed. The Node Test and Lint & Static jobs are green. The two Java failures are reproduced in the CI log.

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 隔离检查。

上版 b32e278ee9 的 Java 验证模块执行 5,991 项,其中 5,970 通过、2 失败、0 错误、19 跳过;生产模块编译和架构测试通过,Node Test 与 Lint & Static 已转绿。本次仅修改 6 个现有测试/夹具文件(+19/−12),完成两遍自审及独立只读源码复核。共享预算仍为 598.38/600 秒,本轮没有执行本地 Java 验证,新 head 的运行结果待 CI;完整 MySQL/Hosted/故障/MQ/OSS 验收仍待批准后触发的完整 CI。本轮没有新增评审评论,开始时未解决行内线程为 0,未重复回复此前评论。

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

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.

Item Status
Java verification on c2147432f0 5,991 cases: 5,972 passed, 0 failures, 0 errors, 19 skipped. The reactor test build and module architecture test passed.
Failure on that head The later Checkstyle step reported two import-order violations in one control-plane file. The fast-tier failure aggregates that same failed job.
Correction Existing imports are now in the order required by the owning Checkstyle configuration.
Pending acceptance Quality checks on the new head, remaining module Checkstyle/SpotBugs where not yet reached, and the approval-triggered MySQL/Hosted/fault/MQ/OSS full tier.

The CI log distinguishes the successful test build from the later style failure. The import-only diff received a clean source audit and git diff --check; local Java verification was skipped because the cumulative budget remains 598.38/600 seconds. Existing runtime-test evidence is reused for this import-only change; final CI acceptance remains pending. No new reviewer comments were reported, earlier individual replies remain deduplicated, and there were 0 unresolved inline threads at the poll. The existing CHANGES_REQUESTED review awaits re-review.

中文说明

已推送 ad02d7d05a,仅重新排列 Hosted cleanup coordinator 的现有 Harness imports,修正两处 ImportOrder 违规,没有修改运行语句、依赖、测试或门禁,也没有重跑未修改的失败工作流。

c2147432f0 的 Java 验证模块执行 5,991 项:5,972 通过、0 失败、0 错误、19 跳过;reactor 测试构建和架构检查通过。后续 Checkstyle 才在同一控制面文件报出两处 import 顺序错误,fast-tier 失败汇总的是同一失败任务。新提交的质量检查、尚未执行到的后续模块 Checkstyle/SpotBugs,以及批准后触发的 MySQL/Hosted/故障/MQ/OSS 完整门禁仍待 CI。

本次 import-only 差异已完成干净源码自审和 git diff --check。共享预算仍为 598.38/600 秒,因此跳过本地 Java 验证,沿用未被 import 顺序调整影响的运行测试证据,最终验收仍待 CI。本轮没有新增评审评论,不重复此前逐条回复;轮询时未解决行内线程为 0,原 CHANGES_REQUESTED 仍等待复审。

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

Copy link
Copy Markdown
Collaborator Author

CI follow-up pushed: daad40b3de.

Failure Classification and correction
Java verification Checkstyle The test module's cleanup-coordinator imports still used the old order; reordered the existing imports. All six production modules already passed Checkstyle on ad02d7d05a.
WebShell recovery smoke Reproduced the same deterministic missing-history assertion locally. Base commit 89d3aaea62 introduced required transcript coverage validation, while the existing browser fixture omitted coveredSequence. Supplied coverage 6 for its six events and waited for history to render before testing a complete handoff; every original assertion remains.
Managed Agent fast tier Aggregates the same Java job failure. No separate code defect and no unchanged-workflow rerun.

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 ad02d7d05a: Java verification has 5,972 passed, 0 failures/errors and 19 skipped; all production Checkstyle checks, Node Test, Lint & Static and reference distribution passed. The previous WebShell suite had 413/414 passed. The Maven mirror warnings and Vite connection-refused noise do not explain the terminal source/fixture failures; neither failed workflow was blindly rerun. New-head Java quality checks and the complete 414-case smoke suite remain pending, as does the approval-triggered MySQL/Hosted/fault/MQ/OSS full tier.

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 在 ad02d7d05a 上均已通过。

WebShell 失败已在本地按 CI 同一断言复现:base 的 89d3aaea62 加入必填 transcript coverage 校验,现有浏览器夹具却遗漏 coveredSequence,导致历史被拒绝加载。现为六条事件补齐 coverage 6,并在完整交接用例中等待历史显示后再点击;所有原断言保留。原单例失败耗时 30.643 秒,修复后该 spec 的三个 Chromium 用例一次通过、无重试,耗时 13.933 秒;测试 Vite 已关闭。格式、ESLint、两遍干净自审和提交源码与已测试源码的 hash 核对通过,未改生产代码、依赖、测试选择或门禁,也未新增测试类。

上版 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 仍等待复审。

@qwen-code-review-bot

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

Copy link
Copy Markdown
Collaborator

🖼️ web-shell visual preview

Rendered against a mock daemon (no real backend): the PR base vs this PR head dfbefd0. Only screenshots that changed are shown (flows below, if any, are head-only) — refreshes on every push.

Screenshots · before / after

collab-squad-no-action-dark before/after

collab-squad-no-action-light before/after

simple-composer-dark before/after

Full-resolution recordings (.webm) are attached to the workflow run.

— Qwen Code · web-shell visuals

@doudouOUC

doudouOUC commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Flyway status triage for daad40b3de: the Flyway migration version uniqueness (latest main) failure returned at 2026-10-29 23:48:23 UTC after the trusted main recheck had restored No collision with main. The API identifies qwen-code-review-bot as the new status creator. Its target is the nonexistent actions/runs/7, and its description includes V1__core.sql, which exists in the checker’s test fixtures rather than the actual migration tree. The exact process that wrote the status is not established.

Current main is 70be140e148f8fc7527cc51717603a6dd84abc19. Main and this PR each contain only V1__managed_schema.sql; the PR relocates it with an identical Git blob (244b71d2cf03cdfc8522b0c9e7c9b03e71c0da1c). The earlier isolated reproduction used the complete 1,224-file PR metadata with dryRun: true and an injected fake API that rejected writes: the current main checker against the actual main tree and the PR checker against the resulting module layout both pass. Only adding the synthetic V1__core.sql fixture reproduces this exact failure text.

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 SUCCESS: No collision with main. There is no SQL, schema-version, production-source or gate change to make for this status. Full MySQL/Hosted/fault/MQ/OSS acceptance and re-review remain pending.

中文说明

daad40b3de 的 Flyway 最新主干状态在 2026-10-29 23:48:23 UTC 再次被写为失败,尽管可信主干重检此前已经恢复 No collision with main。API 显示这次状态的创建者为 qwen-code-review-bot;状态链接仍指向不存在的 actions/runs/7,描述中的 V1__core.sql 是检查器的测试夹具文件名,不在真实迁移树内。尚不能确定具体执行了写入的进程。

当前主干为 70be140e148f8fc7527cc51717603a6dd84abc19。主干与本 PR 各只有一份 V1__managed_schema.sql,本 PR 仅移动其路径,Git blob 完全相同(244b71d2cf03cdfc8522b0c9e7c9b03e71c0da1c)。此前已使用完整 1,224 个 PR 文件的元数据、dryRun: true 及拒绝写入的假 API 完成隔离复现:当前主干检查器配真实主干目录、PR 检查器配迁移后的模块目录均通过;只有加入合成的 V1__core.sql 夹具才能复现这条完全相同的失败描述。

请将基于夹具的检查器实验限定为 dry-run 和假 API,并由可信主干工作流维护真实状态。本轮可信主干重检已将状态恢复为 SUCCESS: No collision with main;这条状态不需要修改 SQL、schema 版本、生产源码或门禁。完整 MySQL/Hosted/故障/MQ/OSS 验收及复审仍待完成。

@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: 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)

Comment thread scripts/run-managed-agent-server-e2e.ts Resolved
Comment thread scripts/tests/sdk-java-workflow.test.js Resolved
@doudouOUC
doudouOUC dismissed qwen-code-review-bot’s stale review October 30, 2026 14:56

Already have 2 approves.

@doudouOUC
doudouOUC merged commit f3af3dd into main Oct 30, 2026
121 of 124 checks passed
@doudouOUC
doudouOUC deleted the codex/managed-agent-maven-modules branch October 30, 2026 14:56
wenshao added a commit that referenced this pull request Oct 31, 2026
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.
Aling33 pushed a commit to Aling33/qwen-code that referenced this pull request Oct 31, 2026
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
@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Released in v0.26.5.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 41071842780 · commit 8f93271371ae

Failing tests

  • com.alibaba.qwen.code.runtimebroker.adapter.HttpRuntimeTransportTest.closesTheConnectionOnTheDeadlineAndOnCallerCancel
  • com.alibaba.qwen.code.managedagent.HostedProcessCrashIT.processCrashesNeverReplayHostedToolsOnMySql
  • com.alibaba.qwen.code.managedagent.harness.HostedHarnessPoolMySqlIT.realProcessesKeepTenantPlacementAndReleaseIdleOwnersWithoutCancellingSessions
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13fDenyReplyLossReplaysTheBlockedDecisionOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13bHookPlanResultStoreRejectionRebuildsTheMarkerOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13bHookResultStoreRejectionSettlesFromTheReceiptOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13aStatusReplyLossStaysUnknownUntilTheNextPollOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13aHookResultStoreAckLossSettlesWithoutASecondCallOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13fFailClosedReplyLossReplaysTheBlockedFailureOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookFaultGatesIT.fg13cHarnessKillDuringCommandSettlesFromTheOriginalReceiptOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookCancelFaultGatesIT.fg13dHeldCancelEscalatesToCgroupKillAndSettlesCancelledOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookCancelFaultGatesIT.fg13dCancelWithDroppedReplySettlesThroughStatusOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookCancelFaultGatesIT.fg13dCancelWithStoppedWorkerStaysUnknownAndKeepsTheHoldOnMySql
  • com.alibaba.qwen.code.managedagent.HostedEventStreamLivenessIT.aKilledHarnessBehindAHalfOpenStreamEndsTheReadWithinTheBound
  • com.alibaba.qwen.code.managedagent.HostedEventStreamLivenessIT.aStalledStreamReattachesWithoutReplayingTheTurn
  • com.alibaba.qwen.code.managedagent.HostedCommittedEventLineReplayIT.readerAcceptsTheCommittedEventShapes
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[1]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[2]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellV2DeletionTriggersCollectionWithoutRetirementSeams
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.ownerAnswersHostedApprovalsThroughBothSurfaces
  • …and 5 more

Tracking issue

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 41074235540 · commit 8f93271371ae

Failing tests

  • com.alibaba.qwen.code.managedagent.HostedProcessCrashIT.processCrashesNeverReplayHostedToolsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkflowFaultGatesIT.fg10aDigestIntegrityHoldsAcrossTamperAndFractionalArgsOnMySql
  • com.alibaba.qwen.code.managedagent.harness.HostedHarnessPoolMySqlIT.realProcessesKeepTenantPlacementAndReleaseIdleOwnersWithoutCancellingSessions
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13fDenyReplyLossReplaysTheBlockedDecisionOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13bHookPlanResultStoreRejectionRebuildsTheMarkerOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13bHookResultStoreRejectionSettlesFromTheReceiptOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13aStatusReplyLossStaysUnknownUntilTheNextPollOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13aHookResultStoreAckLossSettlesWithoutASecondCallOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookReplyLossFaultGatesIT.fg13fFailClosedReplyLossReplaysTheBlockedFailureOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookFaultGatesIT.fg13cHarnessKillDuringCommandSettlesFromTheOriginalReceiptOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookCancelFaultGatesIT.fg13dHeldCancelEscalatesToCgroupKillAndSettlesCancelledOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookCancelFaultGatesIT.fg13dCancelWithDroppedReplySettlesThroughStatusOnMySql
  • com.alibaba.qwen.code.managedagent.HostedHookCancelFaultGatesIT.fg13dCancelWithStoppedWorkerStaysUnknownAndKeepsTheHoldOnMySql
  • com.alibaba.qwen.code.managedagent.HostedEventStreamLivenessIT.aKilledHarnessBehindAHalfOpenStreamEndsTheReadWithinTheBound
  • com.alibaba.qwen.code.managedagent.HostedEventStreamLivenessIT.aStalledStreamReattachesWithoutReplayingTheTurn
  • com.alibaba.qwen.code.managedagent.HostedCommittedEventLineReplayIT.readerAcceptsTheCommittedEventShapes
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[1]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[2]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellV2DeletionTriggersCollectionWithoutRetirementSeams
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.ownerAnswersHostedApprovalsThroughBothSurfaces
  • …and 5 more

Tracking issue

wenshao added a commit that referenced this pull request Nov 5, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants