Repository navigation
refactor(managed-agent): Consolidate server and broker sources - #14277
Conversation
Local source/build and real-process verificationVerified source revision:
The remaining default skips are three existing macOS exclusions, four real-MySQL snapshot/locking assumptions and one opt-in Kubernetes worker protocol check. The POSIX fault profile itself skipped nothing. The local archive exercised packaging only and was not published as a reviewed-revision release. Real MySQL/MariaDB, Linux-specific deployment acceptance, actual Kubernetes/CSI, Docker image execution, external OSS/RocketMQ and GitHub CI acceptance were not run locally. Repository build, typecheck, bundle, application packaging and fault profile were run with their existing commands; the fault invocation is 中文验证说明本次为源码及构建布局重构,验证 revision 为 默认 Java 测试首次运行覆盖 271 个类、3,693 项测试,发现 33 个旧夹具路径错误,无断言失败。修正后,将全部 11 个失败类和 2 个构建 bundle 前跳过的互操作类重新编译复验,175 项全部通过,且无跳过。最终覆盖合集为 3,693 项、无剩余失败或错误、保留 8 项既有环境或显式启用条件下的跳过;未声称第二次完整运行默认套件。显式故障 profile 的 7 个类、44 项全部通过,无跳过。 692 个原始文件全部保留;278 个生产 Java 文件、6 个主资源及 13 个测试资源逐字节一致,24 个 Java 测试文件仅改路径。应用编译打包、仓库 build/typecheck/bundle、两套 Checkstyle 和 SpotBugs 均通过。7 个应用及恢复工具 JAR 的入口、两组 package 和原始资源已核对,依赖中没有独立 Broker 产物或测试 JAR。 217 项相关脚本测试、8 项分发测试、17 套相关工作流解析测试和 40 项路由测试完成验证。一项未修改的补充工作流测试在负载下触发 20 秒超时,单独重试用时 12.16 秒并通过。真实本地参考压缩包仅含 Server 与恢复工具组件,独立解压后内外两层校验和全部通过。生成的 WebShell API 未变,Flyway 检查确认 2 个迁移版本唯一。完成两轮最终无发现自审,独立审查无需要修改的问题。 8 项剩余跳过分别为 3 项既有 macOS 排除、4 项真实 MySQL 一致性或锁假设,以及 1 项需显式启用的 Kubernetes worker 协议检查。未在本地运行真实 MySQL/MariaDB、Linux 部署验收、真实 Kubernetes/CSI、Docker 镜像、外部 OSS/RocketMQ 或 GitHub CI 验收;本地压缩包仅用于打包验证,未发布。 |
|
⏳ Approval still deferred — 2 PR CI workflow run(s) still in progress for ⏳ 审批仍在延迟中 —— |
|
Thanks — this is a big diff by file count but a small one by substance, and it holds up. Template looks good ✓ (including the bilingual section). Problem: real and observable, not theoretical. At the base commit the standalone Broker artifact had to be installed before the server could build, and that install step was duplicated across five consumers — the module Dockerfile, Direction: aligned. This is build/ownership consolidation inside the managed-agent tree — no runtime behaviour, public API, private protocol, or schema bytes change, and the server is genuinely the only production consumer of the Broker. Nothing here pulls focus from the CLI. Size: 1,964 changed lines across 844 files (699 pure renames, 140 modified, 2 added, 3 removed). Breakdown: 420 production-logic lines (325 files, but most renames carry zero line changes), 559 test lines ( Approach: this is what I'd have done — One question rather than a blocker: the diff also rewrites 97 existing docs files. Updating forward-looking docs to the new layout is clearly right, but some of what got rewritten is historical record — dated design docs and a commit-pinned acceptance run. Your own description says immutable commit links and recorded latency evidence keep their historical paths; a few spots didn't follow that rule. I've detailed them in the code review. Risk: no elevated risk signals — none of the revert-correlated paths are touched. Moving on to code review. 🔍 中文说明感谢贡献!这个 PR 按文件数看很大,但按实质改动看很小,而且站得住脚。 模板完整 ✓(含中文对照)。 问题: 真实且可观测,不是理论性问题。在 base commit 上,构建 server 之前必须先安装独立的 Broker 产物,而这个安装步骤在五个调用方中重复出现——模块 Dockerfile、 方向: 对齐。这是 managed-agent 树内部的构建与源码归属整合——不改变运行时行为、公开 API、私有协议或 schema 字节,而且 Server 确实是 Broker 唯一的生产调用方。不会分散对 CLI 的注意力。 规模: 844 个文件、1,964 行改动(699 个纯重命名、140 个修改、2 个新增、3 个删除)。拆分为:生产逻辑 420 行(325 个文件,但多数重命名零行改动)、测试 559 行( 方案: 这正是我会做的—— 一个疑问而非阻塞项:diff 还改写了 97 个既有文档文件。把面向未来的文档更新到新布局显然正确,但被改写的内容里有一部分是历史记录——带日期的设计文档,以及一次固定在某个 commit 上的验收运行。你自己的描述里写了"固定 commit 链接与已有延迟采样证据保留历史路径",但有几处没有遵守这条规则。细节我在代码审查里列出。 风险: 无升级风险信号——未触及任何与 revert 相关的路径。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewI read this as a static diff (no PR code executed). The mechanical part is clean: I walked every path consumer rather than trusting the description, and the arithmetic checks out. Three things worth fixing, none of them blocking the build. 1. Two of the four version properties carried over from the Broker pom are dead, and the pins they name are silently not applied. The merged pom declares This is cosmetic in effect — the suite passes, and Boot-managed versions are a reasonable thing to inherit — but the properties actively mislead: a future maintainer reads 2. 3. Credit where due on the parts I specifically tried to break:
Test evidenceFetched once for The important caveat is coverage, not colour: What PR CI does cover is more than nothing: the Not verified, and why: the Java test counts in your description (3,693 + 175 rerun, 44 fault-gate cases, both Checkstyle scopes, SpotBugs) are your claim from a local macOS run — I did not re-run them, and per this repo's rules I don't execute PR-derived code in CI. Linux and Windows are untested by your own account. My findings above come from reading the diff and the base tree, not from running anything. Sandboxed verification would settle the part CI can't: CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 中文说明代码审查我是以静态 diff 的方式审查的(未执行任何 PR 代码)。机械改动部分很干净:我逐个走完了所有路径调用方,而不是采信描述。路径运算是对的—— 有三处值得修,但都不阻塞构建。 1. 从 Broker pom 带过来的四个版本属性中有两个是死属性,它们声明的版本其实并未生效。 合并后的 pom 声明了 实际影响很小——测试通过,继承 BOM 版本也是合理选择——但这两个属性有误导性:后来的维护者看到 2. 3. 几处我特意尝试推翻、结果确认没问题的地方:
测试证据针对 真正需要注意的是覆盖范围而非颜色: PR CI 覆盖的部分并非毫无价值: 未验证项及原因:你描述中的 Java 测试数字(3,693 + 175 定向复验、44 项 fault-gate、两套 Checkstyle、SpotBugs)是你在本地 macOS 上的声明——我没有重跑,并且按本仓库规则我不会在 CI 中执行 PR 代码。Linux 与 Windows 按你自己的说明未测试。上述结论全部来自阅读 diff 与 base 树,而非运行任何东西。 沙箱验证可以补上 CI 补不了的部分: — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Confidence: 4/5 — the mechanical move is correct everywhere I could check it, and the three things I found are all fixable in a few lines; none of them changes runtime behaviour. Going in, my own plan for this was the same one you took: move the module, fold the Broker sources into one Maven module instead of keeping an artifact dependency, then walk every consumer. So the approach isn't the question. What I spent the time on was trying to find the consumer you missed, because a 699-file rename is exactly the shape where one stale path survives and only fails in a lane nobody ran. I checked the base tree for every reference to the old paths and cross-referenced against the changed set: all nine What keeps this at 4 and not 5 is that two of your claims are slightly ahead of the diff. The Broker's h2 and JUnit version pins didn't survive — the properties are there but nothing reads them, so the BOM owns those versions now — and one commit-pinned acceptance record got rewritten when your description said it wouldn't be. Both are small, and neither is a reason to hold the PR. I'd rather you fixed them than filed a follow-up, since the misleading part is that they look handled. I'm comfortable approving on the merits. The honest limit on my confidence is coverage, not the diff: Approval is deferred until CI lands green on 中文说明Confidence: 4/5 — 机械性的迁移在我能核查的每一处都是正确的;我发现的三件事都可以在几行内修掉,且都不改变运行时行为。 一开始我自己对这个目标的方案和你采取的一致:移动模块、把 Broker 源码并入同一个 Maven 模块而不是保留产物依赖,然后逐个走完调用方。所以方案本身不是问题。我把时间花在找出你漏掉的调用方上——699 个文件的重命名正是这种形状:某个陈旧路径残留下来,只在没人跑过的 lane 里才失败。我在 base 树上检查了所有对旧路径的引用,并与改动集合交叉比对:引用它们的 9 个 让它停在 4 分而不是 5 分的是:你的两处描述略微超出了 diff 的实际情况。Broker 的 h2 与 JUnit 版本固定没有保留下来——属性在那里,但没有任何地方读取它们,因此这些版本现在由 BOM 决定;另外有一份固定在 commit 上的验收记录被改写了,而你的描述说不会改写它。两者都很小,都不构成扣住这个 PR 的理由。我更希望你直接修掉,而不是留一个 follow-up,因为它们最容易误导人的地方正是看起来已经处理过了。 就实质内容而言我可以放心批准。我的信心真正的边界在于覆盖范围,而不在于 diff: 批准将推迟到 CI 在 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
🩺 serve daemon A/BBuilt the PR base vs this PR head
|
| field | PR base (before) | this PR (after) |
|---|---|---|
activeWorkStaleMs |
4 |
5 |
— Qwen Code · serve A/B
Move the combined Java application beside sdk-java and remove the standalone Runtime Broker artifact. Update build, development, packaging and CI references while preserving Java package identities, runtime protocols and schema resources. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
chiga0
left a comment
There was a problem hiding this comment.
Verified the three core claims:
649 production Java files — pure renames (0+/0-).
I enumerated all 673 renamed Java files via the files API: 649 have exactly 0 additions and 0 deletions (byte-identical); the remaining 24 are all in src/test/.
24 test Java files — relative-path adjustments only.
Every diff for the 24 renamed-with-changes test files shows the same mechanical change: relative path strings shortened from 3 path components (packages/sdk-java/managed-agent-server/…) to 2 (packages/managed-agent-server/…). Examples checked: HostedBackgroundPublicationGate.java (../../.. → ../..), ManagedAgentPropertiesTest.java (fallback README.md path), CsiNativeReadbackProtocolTest.java.
All resource files — pure renames (0+/0-).
The 6 main resources (application.yml, csi-native-file-declarations.json, V1/V2 schema SQL, legacy-table-map.tsv, public-api OpenAPI) and all test resources are pure renames with zero content changes.
Build/module correctness:
- The new
packages/managed-agent-server/pom.xmlremoves bothqwen-managed-runtime-brokerentries (jar + test-jar) and directly compiles broker sources fromsrc/main/java/com/alibaba/qwen/code/runtimebroker/. Checkstyle is split across two executions — default checks exclude the broker package; a dedicatedruntime-broker-checkstyleexecution covers it with the broker's own config. No extra source directory plugin needed since sources live directly under the module tree. packages/sdk-java/runtime-broker/pom.xmlremoved, artifactqwen-managed-runtime-brokerstripped from theverify-maven-repocache drop list and from all workflows.
CI / workflow updates verified:
All 9 changed workflows reference packages/managed-agent-server consistently. The verify-maven-repo.yml cache key now includes packages/managed-agent-server/pom.xml; the path trigger and strip-artifacts list are consistent. CodeQL gains a second Java job entry (name: managed-agent-server, sourceroot: packages/managed-agent-server) with its own category tag — the first SDK-java job intentionally has no category to keep its existing database ID. The workflow test asserts this explicitly.
Backward compatibility for open PRs:
check-flyway-open-prs.js: the newevaluateloop normalises file paths from bothpackages/sdk-java/managed-agent-server/…andpackages/sdk-java/runtime-broker/…to the combined module before the collision check. Tests cover all three cases: collision (fail), same migration (pass), delete-predecessor + add-replacement (success).check-contract-open-prs.js/contract-version-utils.js:CONTRACT_DOCUMENT_PREDECESSORis the old path;headDocumentnow takes the path it found (touched.path) rather than hard-codingCONTRACT_DOCUMENT, so a PR still carrying the old path is read correctly.ci.ymlcontract check: ifgit show FETCH_HEAD:${DOCUMENT}fails (base predates the move), the script usesprevious_filenamefrom the PR's file list to locate the file in the base tree.
No findings. Approving.
…idance Restore commit-pinned H3 probe inputs and align the Java verification environment contract with the consolidated server layout. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
e28abea to
fdf7de2
Compare
|
Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. 中文请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。 |
|
Follow-up to the triage code review, pushed in
Follow-up validation: repository build and typecheck passed; 58 tests across all 7 newly relocated test classes passed with no skips; both Checkstyle scopes passed; 81 Flyway/workflow tests passed; the real-tree Flyway check reports 3 unique migrations. Formatting and whitespace checks passed. No full Java-suite rerun, real-database, Linux/CSI, or Docker acceptance is claimed by this follow-up. Review-thread read-back found 0 unresolved inline threads. The existing human approval was submitted against the previous head 中文说明已在 rebase 到
本轮验证:仓库 build、typecheck 通过;新增迁移涉及的 7 个测试类、58 项测试全部通过且无跳过;两套 Checkstyle 通过;81 项 Flyway/工作流测试通过;实际目录 Flyway 检查确认 3 个迁移版本唯一。格式和 whitespace 检查通过。本轮未重新运行完整 Java 套件,也不声称完成真实数据库、Linux/CSI 或 Docker 验收。 回读确认 0 个未解决行内线程。现有人类 APPROVE 针对旧 head |
Keep Maven property arguments intact on Windows and stop before Broker tests when the SDK install fails. Exercise both successful and failed SDK installation in the workflow regression tests. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Fixed the Windows / Java 21 failure in
Fresh SDK Java validation is scheduled for this exact head. Native Windows success remains pending; the local verification ran on macOS with Bash and a Maven test function. This follow-up changes only the workflow shell and its tests. Unchanged production build/typecheck results remain the previously reported There are 0 unresolved inline review threads; no inline thread required a reply or resolution in this cycle. 中文说明已通过普通后续提交
新 head 的 SDK Java 验证已触发,原生 Windows 成功结果仍待确认。本地验证环境为 macOS,使用 Bash 和 Maven 测试函数。本轮仅修改工作流 shell 及对应测试;生产代码未变,build/typecheck 沿用先前针对 目前 0 个未解决行内 review 线程,本轮没有需要回复或解决的行内线程。 |
Follow the repository yamllint single-quote rule without changing the parsed workflow configuration. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Fixed the Lint & Static failure in
No old failing lint run was blindly retried. There are 0 unresolved inline review threads; none required a reply or resolution in this cycle. 中文说明已在
没有直接重跑旧 head 的确定性 lint 失败。当前 0 个未解决行内线程,本轮没有需要逐条回复或解决的行内线程。 |
Preserve the new G3 recovery gates from main and adapt their source lookup to the consolidated server module. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Resolved the mergeability blocker by merging main
There are 0 unresolved inline review threads; none required a reply or resolution in this cycle. 中文说明已用普通合并提交
当前 0 个未解决行内线程,本轮没有需要逐条回复或解决的行内线程。 |
Preserve current main changes while mapping RocketMQ diagnostic artifacts to the consolidated server directory. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Follow-up main sync pushed as 3dc7ec7, merging ac92a0f with a normal merge. This preserves the 41 incoming files, including the latest runtime fixes, RocketMQ diagnostics, and exact-commit release gates. The source migration still retains all 701 mapped main source/resource/test files; the existing 24 Java test differences remain relative-path adjustments.
中文说明已通过普通合并提交 3dc7ec7 同步主线 ac92a0f。保留了本次主线的 41 个变更文件,包括最新运行时修复、RocketMQ 诊断和按精确提交校验的发布检查。源码迁移仍保留主线映射后的全部 701 个源码、资源和测试文件;原有 24 个 Java 测试差异仍为相对路径调整。
|
chiga0
left a comment
There was a problem hiding this comment.
Re-review (round 4): refactor(managed-agent): Consolidate server and broker sources
Verdict: APPROVE — five commits added since the dismissed round-3 review; all are main-sync material at the correct consolidated path. No new blockers.
New commits since round-3 head (d5d501d4ea9c)
30b5f53972c5 — chore(managed-agent): Sync main after the FG8 import fix
Import fix follow-up; TypeScript only. No Java production changes.
9f6ad8b44c7f — chore(managed-agent): Sync SQL and CSI changes into the standalone module
Brings in the managed-sql-millisecond-timestamps and managed-sql-query-cleanup main-branch work:
packages/managed-agent-server/src/main/resources/db/managed-schema/V1__managed_schema.sql: renamescreated_at/updated_at→gmt_create/gmt_modified(BIGINT UNSIGNED) across all tables; alignsix_ma_session_listindex to the new column name.V3__session_list_created_at.sql: corresponding column-name alignment.- Store classes (AutomationLedgerStore, ChannelInstanceStore, ChildResultRelayStore, ChildWorkspaceStore, JdbcChannelDeliveryRepository, JdbcChannelRouteRepository, ManagedActionStore, ManagedAgentDefinitionStore, ManagedAgentStore, ManagedExtensionRecordStore, ManagedProjectionResourceCollector, ManagedReceipts, ManagedSchemaJdbcTemplate, ManagedSessionRetirementStore, ManagedSessionStore, ManagedSnapshotStore, ManagedTaskEventStore, ManagedToolResultProjector, ManagedToolResultStore, SessionMessageRelayStore, SessionResourceCollectionCollector, ToolPublicationAdmissionStore, ToolPublicationCollector): column reference updates, timestamp precision changes.
All of these changes landed on main and were reviewed separately; this commit places them at the correct consolidated path.
4078245e3677 — chore(managed-agent): Sync latest main and align close fixtures
SessionLifecycleCoordinator.java: 86 additions — main-branch close-sequence work reviewed on main.SessionLifecycleCoordinatorTest.java: 484 additions — corresponding tests.
17fc6826660a — chore(managed-agent): Sync main and reconcile CI fixtures
CI fixture reconciliation. No production Java changes.
c4c1f2a1db38 — test(managed-agent): Align Hosted fault fixtures with harness scope
Integration test helper updates (hosted-shell-output-driver.ts, hosted-store-failure-driver.ts, hosted-broker-reply-loss-driver.ts, hosted-cancellation-driver.ts, hosted-process-crash-driver.ts): adds harnessScoped tracking for SSH runtime-broker endpoints (/runtimes:warm, /tool-sessions:active-holds). These endpoints are harness-scoped rather than session-scoped and should not assert on runtimeSessionId; the fix is correct and consistent with the SSH Tool Runtime support from #14318.
HostedTeamLeadMySqlIT.java: minor fixture alignment.
Accumulated verified claims (all rounds)
- All 649 production Java files: pure renames, 0+/0-.
- 24 test files: relative path depth adjustments only.
- Backward-compat scripts handle open PRs against old paths (
CONTRACT_DOCUMENT_PREDECESSOR, historical Flyway paths). - CI fixes:
shell: 'bash'for hosted Broker step;workflow_callsupport; concurrency group; cgroup v2 delegation. - Apache Commons utilities at consolidated path.
- FG8 gate fixtures and Maven profile at consolidated path.
- SQL timestamp and store query changes at consolidated path (main-reviewed separately).
- Integration test helpers correctly scoped for SSH runtime-broker paths.
yiliang114
left a comment
There was a problem hiding this comment.
Approving at head c4c1f2a1db (base c24e99e9cb, MERGEABLE). Delta re-review: my earlier vote at d5d501d4 was dismissed by five pushes, so I re-verified what actually moved rather than re-running a fresh pass. No P0/P1.
The delta past d5d501d4 is four origin/main merges plus exactly one branch-side content commit. git log --first-parent d5d501d4..c4c1f2a1db gives 30b5f539 / 9f6ad8b4 / 4078245e / 17fc6826 (all merges, second parents d98d1c70 / 25ef506c / 4a80f0a6 / c24e99e9 = current main tip) and c4c1f2a1db itself — 6 files, all test/harness. Base merges are not a free pass on a relocation PR, since main's edits land in the very trees this PR rewrites, so I checked the merged result instead of assuming it.
Production surface is byte-identical to current main. Mapping packages/sdk-java/{runtime-broker,managed-agent-server}/src/main/** onto packages/managed-agent-server/src/main/** and comparing blob SHAs: 288/288 identical (281 Java + 7 main resources), diff empty. Test side 428/428 by count. Retired roots: 0 paths; new module: 724. There is no production semantic change to review — the whole thing is the move.
Migrations tracked main instead of freezing. V1__managed_schema.sql moved 454f9c41 → c1a5872c and V3__session_list_created_at.sql 8720e29d → 03dd776b since d5d501d4; both now equal main's blobs exactly, as does V2 (88975986). Head and main each carry exactly V1/V2/V3, so no Flyway version collision.
The one branch-side commit is main-sanctioned, not a weakened gate. The five fault drivers now exempt two routes from assert.equal(fields.runtimeSessionId, promptId). Those two — /runtimes:warm and /tool-sessions:active-holds — are precisely main's two harnessRequest() call sites (hosted-workspace-broker.ts:180, :706), and main's own harnessRequest (:754) sends { harnessSessionId } only, documenting "Harness-scoped routes carry and answer no Runtime Session identity ... so a new harness-scoped caller cannot forget to exempt itself (#13986 R1-5)". The previous unconditional assertion was checking something production no longer does. Exclusion is scoped to the ledger only, the messages were honestly re-worded ("must not contact Broker" → "must not execute Broker operations") rather than quietly loosened, and the effect guards stay (acknowledge/release still asserted absent, "Unsettled execution must retain its owner" intact). hosted-shell-output-driver.ts allowing active-holds during restoring is main's #13930 R1-2 restart drain read, which is its documented purpose.
The IT expectation flip follows main's own contract. HostedTeamLeadMySqlIT went leadCloseWaitsForItsRunningMember → leadCloseCancelsItsRunningMember in merge 17fc6826, matching main's 2026-10-14-managed-close-stops-child-turn.md (#13875, option B: the cascade cancels the child's Turn itself) — child Turn ends CANCELLED, and releases.get("carol").getCount() == 1 proves the close did not wait out the held model response. Worth flagging for whoever owns #13875: main's own copy of this IT still asserts the old "waits" behaviour, and that doc says the real-stack acceptance probes "remain to be rerun" — this PR happens to bring the real-stack IT to the new contract ahead of main. The companion HOLD guard added in c4c1f2a1db is correctly indexed (MEMBER is H4EB1_MEMBER_([a-z]+)_(WAIT|HOLD|DONE), so group(2) is the verb) and right in substance: after cancellation the exchange is disconnected, so writing a natural report would be the bug.
Broker coverage did not shrink with main's new tests. The -Dtest=com/alibaba/qwen/code/runtimebroker/**/{Test*,*Test,*Tests,*TestCase}.java selector leaves 19 of 116 files unselected; all 19 are fixtures/helpers/contract bases and each carries @Test=0 (ExecutionTakeoverContract, RuntimeRecoveryContract, JdbcRepositoryContract, TestWorkspaces checked individually). Nothing real drops out.
CI at head is green — Test, Lint & Static, Serve A/B, Integration Tests (no-AK), reference distribution build, web-shell E2E, TUI parity, OpenTUI no-flicker all SUCCESS; only review-pr is QUEUED and the rest are expected SKIPPED. wenshao's independent A/B at d5d501d4 (23/23 assertions, no broker artifact resolves, 3807 default tests == base's 943+2864, identical failure sets, fault-gates 44/44) is pinned one head back, but the surface it certified is byte-identical to what is here now.
Still standing, both non-blocking and already acknowledged by the author — restating so they are not lost, not asking for them here:
- P2
.github/workflows/ci.yml:1137— the per-PR contract-version gate keys onpackages/managed-agent-server/...openapi.jsonwith aprevious_filenamefallback, while the two open-PR guards in this same diff were deliberately taught about the retired root. Deferred as follow-up. - P3
.github/workflows/sdk-java.yml:406still declaresMARIADB_DATABASE: 'runtime_broker_test'although this diff deleted the only step that connected to it. Harmless but actively misleading, since that is exactly the database whose emptinessManagedSchemaMySqlITdocuments as a precondition. Context-only line, so it cannot take an inline comment.
Not verified on this box: no MySQL/MariaDB, Docker or Linux execution, so the database-backed ITs (including the two files above) and the fault-gate profile are unread here — matching the PR's own out-of-scope list. Note sdk-java.yml has no pull_request trigger, so those lanes do not gate this PR either way; worth a glance at the first nightly after merge.
中文说明
在 head c4c1f2a1db 批准(base c24e99e9cb,MERGEABLE)。这是增量复审:我在 d5d501d4 的那票被五次推送 dismiss 掉了,所以只核对真正动了什么,没有重跑一遍全量。无 P0/P1。
- 增量形态:
d5d501d4..c4c1f2a1db的 first-parent 链是四次origin/main合并 + 唯一一个分支侧内容提交c4c1f2a1db(6 个文件,全是 test/harness)。搬家类 PR 不能把 base merge 当免费通过——main 的改动正落在本 PR 重写的那两棵树上,所以查的是合并结果而非假设。 - 生产面与当前 main 逐字节一致:把
packages/sdk-java/{runtime-broker,managed-agent-server}/src/main/**映射到packages/managed-agent-server/src/main/**比 blob SHA,288/288 全同(281 Java + 7 主资源),diff为空。旧根 0 条路径,新模块 724 个文件。生产语义零改动,整个 PR 就是搬家。 - 迁移跟着 main 走而不是被冻住:
V1从454f9c41变c1a5872c、V3从8720e29d变03dd776b,两者现在都精确等于 main 的 blob,V2亦然;head 与 main 都只有 V1/V2/V3,无 Flyway 版本号相撞。 - 唯一的分支侧提交是 main 认可的口径,不是放水:五个 fault driver 放宽的两条路由
/runtimes:warm、/tool-sessions:active-holds正是 main 自己两处harnessRequest()调用点,而 main 的harnessRequest只发harnessSessionId,注释明写「Harness-scoped routes carry and answer no Runtime Session identity」。旧断言在校验生产已不再做的事。放宽只作用于 ledger,断言文案是诚实改写而非静默削弱,效果守卫(acknowledge/release、「Unsettled execution must retain its owner」)全部保留。 - IT 期望翻转跟的是 main 自己的契约:
leadCloseWaitsForItsRunningMember→leadCloseCancelsItsRunningMember对应 main 的 #13875(option B,级联自己取消子 Turn),子 Turn 终态CANCELLED,且releases.get("carol").getCount() == 1证明 close 没有等模型那条 held 响应。顺带提给 #13875 的负责人:main 自己那份 IT 仍写着旧的「waits」,设计文档也说真机验收探针「remain to be rerun」——本 PR 反而先把真机 IT 带到了新契约。配套的HOLD守卫索引正确(MEMBER正则group(2)就是动词),语义也对:取消之后连接已断,再写自然报告才是 bug。 - broker 覆盖没因 main 新增测试而缩水:
-Dtest=...runtimebroker/**选择器下 116 个文件里有 19 个未被选中,逐个查过@Test=0,都是 fixture/helper/contract 基类,没有真测试漏掉。 - head 的 CI 全绿,只有 bot 的
review-pr在排队。wenshao在d5d501d4的独立 A/B(23/23、broker 产物不解析、3807 例等于 base 两臂之和 943+2864、失败集合相同、fault-gates 44/44)钉在上一个 head,但它认证的生产面与现在逐字节相同。 - 两条仍在、均非阻塞且作者已确认:P2
ci.yml:1137契约版本门的触发路径;P3sdk-java.yml:406残留的MARIADB_DATABASE: 'runtime_broker_test'(上下文行,挂不了 inline)。
本机未验证:无 MySQL/MariaDB、Docker、Linux,所以数据库 IT 与 fault-gate profile 未实跑,与 PR 自述的 out-of-scope 一致。另 sdk-java.yml 没有 pull_request 触发器,这些车道两边都不为本 PR 把关,建议合并后看一眼首个 nightly。
Main relocated the managed-agent-server and runtime-broker sources (QwenLM#14277). This merge carries the PR's changes across that move to packages/managed-agent-server, leaving no files at the old packages/sdk-java paths, and refreshes the lint-gate baseline (eslint.config.js, .github/workflows/ci.yml). Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Patrol-Run: qwen-pr-conflict/jmva9zka98o
…lisecond SQL) Merge origin/main 28415dd. Main moved the server to packages/managed-agent-server, folded the Runtime Broker into it (#14277), and switched persisted timestamps to BIGINT UNSIGNED epoch milliseconds with gmt_create/gmt_modified names and explicit column projections (#14185). - V1 schema: keep consecutive_failures, budget_exempt_failures and budget_exempt_attempt next to main's unsigned millisecond columns. - ManagedSchemaProjection: add the three columns to TURN and OPERATION. The mappers read them through additiveInt, which answers 0 for an absent column, so without this every Turn and operation would read a zero failure count and a zero answered watermark and the retry budgets would never close. - Port this branch's SQL to the new conventions: updated_at becomes gmt_modified, the claim fences compare against ManagedSchemaTime.SQL_NOW, and the failed-lifecycle lookup orders by gmt_modified and gmt_create. - claimOperation keeps this branch's re-drive of every blocked lifecycle shape (R6-2) with main's millisecond lease fence. - Tests: pass the ManagedAgentService that #14218 added to SessionLifecycleCoordinator, and move fixture SQL to gmt_* columns and millisecond lease arithmetic.
Resolve the module relocation from #14277 (packages/sdk-java/managed-agent-server -> packages/managed-agent-server): the PR's new EventTransportBrokerGateStatisticsTest moves with the rename, and its import block is reordered to the enforced Checkstyle group order (*, java, then statics), which the relocated file violated.
Clears the "Check lint gate freshness" failure in Lint & Static: main moved eslint.config.js (28415dd, QwenLM#14277) and .github/workflows/ci.yml (c3012a5, QwenLM#14298) after this branch's baseline, so the lane was checking out a stale gate definition. Pure mechanical merge, no hand edits: the merged tree is byte-identical to `git merge-tree --write-tree` and the PR delta is unchanged (24 files, +1773/-51). Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Patrol-Run: qwen-pr-conflict/jmvaik7ci93
|
Released in v0.25.3. |
What this PR does
Move Managed Agent Server to
packages/managed-agent-server, alongside the Java SDK, and compile Runtime Broker production sources, resources and tests in the same Maven module. Remove the separate Broker artifact and test-JAR dependency while preserving Java package names, public APIs, private protocols and schema resources. Update development, container and reference-distribution builds, repository scripts, CI, contract guards and documentation to follow the new layout.Why it's needed
Managed Agent Server is the only production consumer of the Broker in this repository. The separate module requires an extra fixed-version artifact and test JAR to be installed before building the application, and placing the application inside the Java SDK obscures source ownership. Combining the application sources removes that build dependency and gives the server its own package directory while retaining the internal Java package boundaries.
Reviewer Test Plan
Verify that the application builds after installing only the Java SDK, without resolving a standalone Broker artifact. Confirm that the combined module retains both original source trees, classpath resources, default test coverage, explicit integration profiles and fault gates. Existing tool execution, cancellation and recovery contracts should retain their behavior.
How to verify
Build the Java SDK and then package the application from its new directory. Inspect the application and recovery JARs for both Java package trees and the original schema resources. Run the combined unit tests and explicit fault profile, and check that the relocated development and packaging commands use the new module without a separate Broker installation.
Local validation included repository build, typecheck and bundle, application packaging, a 3,693-case default Java run followed by a successful 175-case rerun of corrected fixture paths and interop checks, 44 passing fault-gate cases, both Checkstyle scopes, SpotBugs, focused script/workflow tests and reference-distribution checksum verification. Eight existing environment or opt-in Java skips remain. The Java figure is coverage from the full run plus the targeted rerun, not a second clean full-suite invocation; the detailed report is posted separately.
An independent inventory check retained all 692 original source, resource and test files. All 278 production Java files and six main resources are byte-identical; 24 Java test files contain relative-path changes only. Independent review returned no actionable findings.
Evidence (Before & After)
N/A — source layout and build refactor with no intended UI behavior change.
Tested on
Environment (optional)
macOS arm64, JDK 21.0.8, Maven 3.9.14, Node.js 22.22.3 and pnpm 11.24.0. Java process/fault tests used the locally built CLI bundle. The local reference archive was extracted and verified independently; it was not published.
Risk & Scope
packages/managed-agent-server; the separateqwen-managed-runtime-brokerartifact and test JAR are removed. The server still depends on the Java SDK. Java package names, public APIs, runtime protocols and migration bytes are preserved; no database migration is introduced. Historical PR-head checks retain predecessor-path handling, and immutable commit links and recorded latency evidence retain their historical paths.Design: English | 简体中文. Both versions cover the same decisions, constraints, validation and acceptance criteria.
Linked Issues
None.
中文说明
此 PR 的改动
将 Managed Agent Server 移至
packages/managed-agent-server,与 Java SDK 并列,并在同一个 Maven 模块中编译 Runtime Broker 的生产源码、资源和测试。删除独立 Broker 产物及测试 JAR 依赖,同时保留 Java 包名、公开 API、私有协议和 schema 资源。同步调整开发、容器及参考分发构建、仓库脚本、CI、契约检查和文档,使其使用新的源码布局。为什么需要
Managed Agent Server 是仓库中唯一的 Broker 生产调用方。独立模块要求构建应用前额外安装固定版本的产物和测试 JAR,应用位于 Java SDK 内部也使源码归属不清晰。合并应用源码后可消除这项构建依赖,并为 Server 提供独立的包目录,同时保留内部 Java package 边界。
评审测试计划
验证应用仅需预先安装 Java SDK 即可构建,不再解析独立 Broker 产物。确认合并模块保留两个原始源码树、classpath 资源、默认测试覆盖、显式集成 profile 和故障门禁。既有工具执行、取消及恢复契约应保持原有行为。
如何验证
构建 Java SDK,然后从新目录打包应用。检查应用及恢复工具 JAR 包含两个 Java package 及原有 schema 资源。运行合并后的单元测试和显式故障 profile,并确认迁移后的开发及打包命令使用新模块,不再单独安装 Broker。
本地验证包括仓库 build、typecheck 和 bundle、应用打包、一次覆盖 3,693 项的默认 Java 测试及随后成功运行的 175 项定向复验(修正夹具路径并验证互操作)、44 项通过的故障门禁、两套 Checkstyle、SpotBugs、相关脚本及工作流测试,以及参考分发包校验和验证。保留 8 项既有环境或显式启用条件下的 Java 测试跳过。Java 数字是全量运行与定向复验的覆盖合集,并非第二次完整运行默认测试;详细报告单独发布。
独立清单检查确认原有 692 个源码、资源和测试文件全部保留。278 个生产 Java 文件和 6 个主资源逐字节保持一致;24 个 Java 测试文件仅调整相对路径。独立审查未发现需要修改的问题。
证据(前后对比)
N/A — 源码布局及构建重构,无预期 UI 行为变化。
测试平台
环境(可选)
macOS arm64、JDK 21.0.8、Maven 3.9.14、Node.js 22.22.3 和 pnpm 11.24.0。Java 进程及故障测试使用本地构建的 CLI bundle。本地参考压缩包已独立解压并校验,未对外发布。
风险与范围
packages/managed-agent-server;独立的qwen-managed-runtime-broker产物及测试 JAR 已删除。Server 继续依赖 Java SDK。保留 Java 包名、公开 API、运行时协议和迁移字节,不引入数据库迁移。历史 PR head 检查保留旧路径处理,固定 commit 链接及已有延迟采样证据保留历史路径。设计:English | 简体中文。两种版本完整覆盖相同的决策、约束、验证及验收标准。
关联 Issue
无。