Skip to content

refactor(managed): Remove persisted public message snapshots - #15870

Merged
doudouOUC merged 5 commits into
mainfrom
refactor/managed-remove-public-snapshots
Oct 30, 2026
Merged

doudouOUC merged 5 commits into
mainfrom
refactor/managed-remove-public-snapshots

Conversation

@doudouOUC

@doudouOUC doudouOUC commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Remove persisted public conversation snapshots and make bounded current-message paging the default for public Items, transcript, recent history and export. The canonical schema drops ma_snapshot and its public snapshot metadata, reducing business tables from 39 to 38; background snapshot construction, refresh and collection disappear. Native journal snapshots, canonical history, execution checkpoints, reader leases and recovery protection remain intact.

Dependency #15865 is merged as 89d3aaea62af96849c4b9b7a2bc68e26347a7ac8 (final head ca8970b84b96c6d3cc5f77fc43b577150a0944c8). This PR now targets main, replaying only the snapshot-removal increment and preserving the dependency's coverage validation and smoke-fixture repairs. The user-authorized dependency condition for Ready for review is met; CI acceptance remains pending.

Why it's needed

The direct message pager makes a second persisted copy of conversation history unnecessary for the selected live-read/export behavior. Removing the table together with its readers, writers, retention paths and CSI inventory avoids obsolete SQL and repeated whole-history copies while preserving bounded reads and safe event-stream handoff.

Reviewer Test Plan

How to verify

Initialize fresh matching Server/Broker state and confirm exactly 38 business tables with no public snapshot table or metadata. Read recent history and older pages, including equal first-sequence positions and numeric after; verify complete ordering, scope/direction/projection checks and current authorization on every request. Change message bodies during export and confirm membership remains bounded by the first request while content stays live. A lagging initial export must return retryable pending; transcript must resume SSE from actual materialized coverage without skipping the unprojected tail. Exercise replay-floor advancement/rebuild, reader-versus-GC interleavings, retirement and strict CSI validation, and retain native journal snapshot/recovery checks.

Current 2193d519765ddec86bb4069f67830088e2dd8e13 CI succeeded: Managed fast 40967805430/job123776897036 reports 5974 total unit/H2 cases, 0 failures, 0 errors and 17 skips; the updated removal suite passed 3 and retained-artifact suite passed 27. SDK and both Server/Broker Checkstyle checks have zero violations. Qwen CI 40967805249 succeeded, with exact-head smoke 414 passed in 28.1 minutes; Node/lint/no-AK succeeded by job metadata. Java and reference distribution 40967805267 actually checked out merge eb7decbdc4c7e78cd72c00dcd254cbcc46ee9e40, tree 97ddea21399507b29c87ba4cb15313ca97e6ded2, parents main 70be140e and PR 2193d519. Comparison retains 28 unrelated release/workflow/scripts/documentation differences, no package-source changes; the integration and branch trees differ. Reference archive/MySQL boot-health passed, publication skipped. All inspected runs are attempt 1. Ordinary execution of the changed tests is now verified; guard-removal mutation sensitivity was not executed. The MySQL literal-drift test, full MySQL/paging/EXPLAIN, Hosted/fault/transport and SpotBugs remain pending/skipped. Five cancelled administrative review-route jobs have unavailable BlobNotFound404 logs and unverified cancellation causes; they were retained without rerun or flake claims. No local Java, source edit, test rerun or manual dispatch occurred this cycle.

At publication, follow-up 2193d519765ddec86bb4069f67830088e2dd8e13 fixes three new review suggestions in two Java test files and the synchronized design pair: collection now depends on the producer's own release marker, three four-part released-body identity faults isolate their hex/ordinal/digest guards, and migration guidance explicitly covers default transcript decimal cursors becoming opaque with invalid_message_cursor. Three repeated cleanup/extra-matrix suggestions keep their existing deferrals. The mock visual report for parent505 shows no screenshot changes; it is not live backend acceptance. Production, schema and TypeScript inputs are unchanged. Formatting/reference checks and source review passed; the two edited Java tests, including mutation sensitivity, have not been compiled or run locally and await new-head CI. The Java allocation remains CLOSED596.235/600; unchanged TypeScript evidence is reused. Parent505 fast/H2/Checkstyle/smoke evidence below retains its exact earlier test inputs; full MySQL/Hosted/fault/transport/SpotBugs qualification remains pending. Review summary. Six new threads individually replied and resolved; all 25 threads are resolved.

Parent CI observation for 505d1fa9c285f72590d0d5716d3804cc71bcb1c2: Qwen Code CI 40951609892 succeeded, including exact-head Chromium smoke with 414 passed in 28.5 minutes; Node unit, Lint/Static and no-AK integration succeeded by job metadata. Managed fast 40951610327/job123721204581 completed 5971 unit/H2 cases total, 0 failures, 0 errors and 17 skips, with SDK and both Managed Server/Broker Checkstyle checks reporting zero violations. All nine changed unit/H2 classes passed: artifact API 29, retained artifacts 24, removal 3, message paging 11, numeric paging 7, Session schema store 21, API contract 23, query budget 29 and replay-floor retraction 4. The changed MySQL literal-drift test was not executed by fast. Java fast and reference distribution 40951610134 actually checked out merge 872ce7dbe6168dee8ba1466959804a9be77d6adf, tree 3359342fc798fb8de9b47951c13d8d90c75dd3f7, with parents main 70be140e and PR 505d1fa9. Its 28 differences from the branch are unrelated release/workflow/scripts/documentation, with no package-source differences; the branch and integration trees are distinct. Reference archive verification and MySQL-backed boot/health succeeded, while publication was skipped. All inspected runs were attempt 1. Full MySQL/paging/EXPLAIN, Hosted/fault/transport and SpotBugs/full verify remain unqualified; fast skipped those profiles and did not run SpotBugs. No local Java, rerun or manual dispatch occurred. Eighteen new cancelled checks were administrative Qwen Autofix review-route jobs; every job log returned HTTP 404 BlobNotFound. Their exact cancellation reason is unverified, all error responses are retained, and none was restarted or classified as a flake.

Earlier publication record: Review follow-up at 505d1fa9c285f72590d0d5716d3804cc71bcb1c2: 19 suggestions independently checked; 10 fixed, 4 partially fixed, 2 pushed back, 3 deferred. No production Java logic changed.

Fixed scope: message-page error/recovery documentation and generated response aliases; live history/Broker docs; stronger body-read, no-write, reference, coverage/control, transaction-attribute, legacy-selector and MySQL literal-drift witnesses; fixture millisecond fidelity. The private-session exclusion fixture stays unreferenced so it still detects a missing privacy guard; no unsupported manual projection rewind was added. Additional parser/interface cleanup and a service-level paging matrix are deferred.

Validation: API types regenerated; WebShell package typecheck passed in 15.27s; formatting/ESLint hook and diff/reference checks passed; test-engineer performed source review and an in-memory timestamp precision observation. Changed Java tests were not compiled or run locally because the shared Java allocation remains CLOSED596.235/600. Prior green fast CI belongs to 74142dd and its documented integration merge; it does not qualify these new test inputs. New-head CI, full MySQL/Hosted/fault/transport and SpotBugs remain pending. Historical failures are retained; no blind rerun, manual full dispatch or preview/database operation.

Review action summary.

Historical local evidence for the original removal increment: build, typecheck and bundle passed; four WebShell suites passed 318 cases and the final generated types passed package typecheck. The collected local unit/H2 reports contain 835 cases with 834 passing and one API fixture error; local MySQL reports contain 141 cases with 140 passing and one schema fixture error. Those late fixture/validator/CSI edits were not rerun locally before publication. These aggregates span selected earlier runs, not a final-source gate. Original attempts remain recorded in the separate validation report.

After synchronization, approval-triggered full CI 40915271041 compiled the prior 6851d1a8 source tree. The checked-out synthetic merge abe373a3 has the same tree digest (8c3df7ebb2911e57ecf2c20e2d2082827733285e). Schema diagnostics, retained artifacts, removal regressions, direct paging and the API contract passed there, but the run failed: two Checkstyle imports and ten stale table-count failures in a 5971-case unit phase (0 errors, 17 skips), before MySQL integration. This follow-up removes both unused imports, changes three physical-table counts from 40 to 39 and clarifies migration semantics. New-source Managed Agent gate, Qwen Code CI and reference-distribution pull-request runs now exist; their results were pending at that earlier observation. No code-failure rerun, manual full dispatch or local Java execution was performed.

The latest follow-up only repairs a stale recovery-browser mock: required coverage and terminal metadata are now present, and the response is type-checked. The original failing Chromium case reproduced RED; all three final-fixture recovery cases then passed in 13.6 seconds with zero retries, and narrow fixture typecheck plus formatting/ESLint passed. Production recovery code, the coverage guard, private-answer filtering and all test assertions remain unchanged. The prior 44b2f5c7 integration merge 2baec9fc (base 70be140e) passed Java fast with 5971 unit/H2 cases, 0 failures, 0 errors, 17 skips and both Checkstyle checks clean. Comparison with that head shows only unrelated release/workflow/documentation differences, not Java/SDK/Core/CLI/WebShell source differences. Node unit, lint/static and no-AK integration also passed on 44b2f5c7; Qwen CI still failed the deterministic recovery smoke fixture (413 passed, 1 failed, including repeated failed retries), now corrected. The failure record is retained, no blind rerun was made, and current-head results are recorded below; full MySQL/Hosted qualification remains pending. No local Java budget was reopened.

At prior head 74142dd2ba94cdf5e8dbed649880afe8a0c549ec, Qwen Code CI 40932999891 succeeded, including all 414 Chromium smoke cases (30.2 minutes), Node unit tests, Lint/Static and no-AK integration. The smoke job checked out that exact head. Managed Agent fast 40933000064 also succeeded: 5971 unit/H2 cases total, 0 failures, 0 errors and 17 skips, with SDK and both Server/Broker Checkstyle checks reporting zero violations. The API contract (23), surface registry (4), removal regression (3), direct paging (11), retained-artifact negatives (24) and inventory/validator suite (66) all passed. Java fast and reference distribution 40932999759 actually checked out integration merge 1bfab383d5762e9fea4ad788bf8d9406661f425f, tree 994122974ee11c06af4567407bd81d05904a0e49, with main parent 70be140e and PR parent 74142dd2. Its 28 differences from the branch are release/workflow/scripts/documentation, with no package-source differences; the two trees are not claimed equal. The reference archive checksum and MySQL-backed boot health check succeeded; this is not full MySQL behavior qualification or a published release. The fast tier skipped the complete MySQL, Hosted/fault and transport jobs and did not run SpotBugs, so complete qualification remains pending. All runs were attempt 1; no manual dispatch or rerun was made.

Earlier observation at 74142dd2: the module's shared local Java budget remains closed at 596.235/600 seconds, including prerequisites and cleanup. Final-source compilation, the listed unit/H2 regressions and Checkstyle now have the source-qualified CI evidence above. SpotBugs/full verify, complete MySQL paging/concurrency and applicable Hosted/fault profiles remain pending. The earlier local MySQL Session-schema group was interrupted and the dedicated message-paging group did not start; those incomplete local results are retained.

Review observation on 2026-10-30 UTC: yiliang114 and qqqys approved current head 2193d519765ddec86bb4069f67830088e2dd8e13. Review-triggered full gate 40979340577 is running and a second approval-triggered run 40979828462 is pending; completion and actual checkout/source qualification have not yet been audited. The current “Flyway migration version uniqueness (latest main)” context is successful: its complete job log explicitly reports “#15870 success: No collision with main” against main 70be140e148f8fc7527cc51717603a6dd84abc19. The earlier failure status from qwen-code-review-bot is retained; its linked run 7 returns HTTP 404, so that old diagnosis remains unverified. The legacy view: messages MVC compatibility test and decimal transcript-cursor migration note already exist at this head. The earlier formal bot CHANGES_REQUESTED remains untouched. All 25 review threads are resolved. This maintenance made no source change, local Java execution, CI dispatch or rerun; full acceptance remains pending.

Evidence (Before & After)

Before: the merged baseline source probe found 39 business tables, public snapshot metadata and six production Java files referencing ma_snapshot. This was source evidence, not a live runtime baseline. After: three H2 removal cases passed for schema absence, materialization/replay coverage and public-body collection/native-reference separation; direct paging and related integration fixtures supplied partial H2/MySQL evidence. No live browser, Managed HTTP or visual before/after capture was performed, so no visual or end-to-end acceptance is claimed.

Tested on

OS Status
🍏 macOS ✅ tested (historical focused evidence and final recovery mock cases; complete tree unrun locally)
🪟 Windows ⚠️ not tested
🐧 Linux ✅ tested on current2193 CI; full profiles pending

Environment (optional)

macOS arm64, Node.js v26.12.1, recorded JDK 21.0.8/Maven 3.9.14, isolated H2 and disposable MySQL 8.4.11. MySQL used max_allowed_packet=134217728, disabled binary logging and disabled native AIO. The temporary server/data were cleaned up; existing previews and user databases were untouched. Prior Java CI used Linux arm64, JDK 21.0.13 and Maven 3.9.11.

Risk & Scope

  • Main risk or tradeoff: live bodies/statuses can change between pages; the initial sequence bound fixes membership, not content. Replay resynchronization must use materialized coverage, and rebuild invalidates message cursors.
  • Not validated / out of scope: guard-removal mutation sensitivity, MySQL literal-drift regression and complete MySQL behavior, SpotBugs/full verify, complete MySQL/Hosted/fault/transport profiles, live Managed business HTTP/browser/model and Linux physical CSI qualification. Native recovery history is preserved; this change does not authorize deleting canonical history or modifying existing preview databases.
  • Breaking changes / migration notes: The default /transcript/query cursor changes from a positive decimal event sequence to an opaque message cursor. Previously issued decimal cursors are rejected with 400 invalid_message_cursor, replacing the old invalid_cursor code; discard stored decimal cursors and reload the first message page after upgrading. Public Items numeric after and SSE afterSequence retain their existing numeric semantics. Default transcript now accepts 1–100 messages instead of 1–1000 events; default remains 100, and explicit limits 101–1000 are rejected. Clients should omit the removed view selector; existing unknown-property handling is retained. old snapshot cursors and the optional message-view selector are removed. Retained snapshot-named response fields identify coverage or membership bounds as documented. The first-release canonical V1 changes in place; development catalogs require recreation, with no in-place upgrade, live DROP, schema-version bump or repair/history bypass.

Complete synchronized design: English and 简体中文.

Linked Issues

Depends on #15865; follows merged #15839. No issue is auto-closed by this PR.

中文说明

这个 PR 做了什么

移除持久化公开对话快照,让公开 Items、transcript、最近历史和导出默认使用有界实时消息分页。canonical schema 删除 ma_snapshot 及公开快照元数据,业务表由 39 张减少为 38 张;后台快照构建、刷新和回收同时移除。保留原生 journal 快照、canonical 历史、执行 checkpoint、读租约和恢复保护。

依赖 #15865 已以 89d3aaea62af96849c4b9b7a2bc68e26347a7ac8 合并(最终 head 为 ca8970b84b96c6d3cc5f77fc43b577150a0944c8)。本 PR 现面向 main,只重放快照删除增量,并保留依赖中的水位校验和 smoke 夹具修正。用户授权的 Ready for review 依赖条件已经满足;CI 验收仍待完成。

为什么需要

对于已选择的实时读取和导出语义,直接消息分页器让第二份持久化对话历史副本不再必要。同步删除表、读写方、保留路径及 CSI 清单,避免残留 SQL 和反复复制完整历史,同时保留有界查询及安全的事件流交接。

评审测试计划

如何验证

用匹配的 Server/Broker 初始化新库,确认恰好 38 张业务表,且没有公开快照表和元数据。读取最近历史及更早分页,覆盖相同 first-sequence 和数字 after;验证完整排序、scope/方向/投影代次检查及每次请求的当前授权。导出过程中修改消息正文,确认成员范围固定在首请求上界内、内容保持实时。初始导出投影落后时必须返回可重试 pending;transcript 必须从实际物化水位续接 SSE,不能跳过未投影尾部。覆盖 replay floor 推进/重建、读者与 GC 交错、退役和严格 CSI 校验,并保留原生 journal 快照/恢复检查。

当前 2193d519765ddec86bb4069f67830088e2dd8e13 CI 已成功:Managed fast 40967805430/job123776897036 报告单元/H2 共 5974 项,0 失败、0 错误、17 跳过;改动的删除回归组 3 项、保留产物组 27 项均通过。SDK 及 Server/Broker 两项 Checkstyle 均零违规。Qwen CI 40967805249 成功,smoke 实际 checkout 该 head,414 项在 28.1 分钟内通过;Node/lint/无 AK 集成的任务元数据均成功。Java 与参考分发 40967805267 实际 checkout 为 merge eb7decbdc4c7e78cd72c00dcd254cbcc46ee9e40,tree 为 97ddea21399507b29c87ba4cb15313ca97e6ded2,父提交为 main 70be140e 和 PR 2193d519。相对分支保留 28 处无关发布/工作流/脚本/文档差异,没有包源码变化,集成与分支 tree 不相等。参考归档及 MySQL 启动健康检查通过,发布步骤跳过。已检查的运行均为 attempt 1。改动测试的普通执行现已验证,但未执行删除守卫的变异敏感性检查。MySQL 字面量漂移测试、完整 MySQL/分页/EXPLAIN、Hosted/fault/传输及 SpotBugs 仍待或被跳过。5 个取消的评审路由管理任务均无法取得日志(BlobNotFound404),具体取消原因未核实;保留记录,没有重跑或判为偶发故障。本轮没有执行本地 Java、改源码、重跑测试或手动派发。

发布时记录:后续提交 2193d519765ddec86bb4069f67830088e2dd8e13 在两个 Java 测试文件及同步英中设计中修正三条新建议:回收依赖生产路径自己的释放标记,三个结构完整的释放后正文身份分别隔离十六进制段/序号/摘要守卫,并明确默认 transcript 十进制游标改为不透明格式及 invalid_message_cursor 的迁移说明。三条重复清理/额外矩阵建议沿用已有延期决定。父提交505的模拟视觉报告显示截图无变化,不等于实时后端验收。生产、schema 和 TypeScript 输入未变。格式/引用检查及源码审阅通过;两个新改动的 Java 测试(含变异敏感性)未在本地编译或运行,仍待新 head CI。Java 额度保持 CLOSED596.235/600,复用未变的 TypeScript 证据。下方父提交505 fast/H2/Checkstyle/smoke 证据保留其精确旧测试输入,完整 MySQL/Hosted/fault/传输/SpotBugs 资格仍待。 GitHub。6 个新线程已逐条回复并解决,当前全部 25 个线程均已解决。

父提交 505d1fa9c285f72590d0d5716d3804cc71bcb1c2 的 CI 观察:Qwen Code CI 40951609892 已成功,Chromium smoke 实际 checkout 该 head,414 项在 28.5 分钟内全部通过;Node 单元、Lint/Static 和无 AK 集成的任务元数据均为成功。Managed fast 40951610327/job123721204581 完成单元/H2 总计 5971 项,0 失败、0 错误、17 跳过,SDK 及 Managed Server/Broker 两项 Checkstyle 均零违规。9 个改动的单元/H2 类全部通过:artifact API 29、保留产物 24、删除回归 3、消息分页 11、数字分页 7、Session schema store 21、API 契约 23、查询预算 29、replay-floor 回退 4。改动的 MySQL 字面量漂移测试未由 fast 执行。Java fast 和参考分发 40951610134 实际 checkout 为 merge 872ce7dbe6168dee8ba1466959804a9be77d6adf,tree 为 3359342fc798fb8de9b47951c13d8d90c75dd3f7,父提交为 main 70be140e 和 PR 505d1fa9;相对分支的 28 处差异仅为无关发布/工作流/脚本/文档,没有包源码差异,分支与集成 tree 不相等。参考归档校验及 MySQL 启动/健康检查成功,发布步骤被跳过。所有已检查运行均为 attempt 1。完整 MySQL/分页/EXPLAIN、Hosted/fault/传输及 SpotBugs/完整 verify 仍未具备资格;fast 跳过这些 profile 且未运行 SpotBugs。没有执行本地 Java、重跑或手动派发。18 个新增取消检查均为 Qwen Autofix 评审路由管理任务,每份任务日志都返回 HTTP 404 BlobNotFound;具体取消原因尚未核实,错误响应全部保留,没有重启或将其判为偶发故障。

较早发布记录:本次后续提交 505d1fa9c285f72590d0d5716d3804cc71bcb1c2 逐条核实 19 条建议:10 条修正、4 条部分修正、2 条有理由不采纳、3 条延期。上表逐项给出链接与处理结果,没有改变生产 Java 逻辑。

修正范围:消息分页错误/恢复说明及生成响应类型、实时历史与 Broker 文档;正文读取、零写入、引用、水位/控制事件、事务属性、旧选择参数及 MySQL 字面量漂移见证;夹具毫秒精度。私有会话排除夹具继续保持无引用,确保能发现隐私守卫丢失;没有增加脱离协议的手动投影回退。额外解析器/接口清理及服务层分页矩阵延期。

验证:已重新生成 API 类型,WebShell 包类型检查 15.27 秒通过,格式/ESLint 提交钩子及差异/引用检查通过;test-engineer 完成源码复核及内存时间精度观察。共享 Java 额度保持 CLOSED596.235/600,改动的 Java 测试未在本地编译或运行。先前绿色 fast CI 只属于 74142dd 及记录的集成 merge,不能证明本次新测试输入通过。新 head CI、完整 MySQL/Hosted/fault/传输与 SpotBugs 仍待。保留历史失败,没有盲重跑、手动完整派发或预览/数据库操作。

GitHub

原始删表增量的历史本地证据:build、typecheck 和 bundle 通过;四个 WebShell 文件共 318 项通过,最终生成类型也通过包内 typecheck。收集的本地单元/H2 报告共 835 项,834 通过、一项 API 夹具出错;本地 MySQL 报告共 141 项,140 通过、一项 schema 夹具出错。这些最终夹具、校验器及 CSI 改动在发布前未在本地重跑。计数来自多次较早选定运行,不能视为最终源码门禁;原始尝试保留在独立验证报告。

同步后,审批触发的 full CI 40915271041 已编译旧 6851d1a8 源码树;实际 checkout 的合成 merge abe373a3 与该 head 的 tree 摘要相同(8c3df7ebb2911e57ecf2c20e2d2082827733285e)。schema 诊断、保留产物、删除回归、直接分页及 API 契约在该树上通过,但完整运行因两条 Checkstyle import,以及 5971 项单元阶段中的十项旧表数断言失败(0 错误、17 跳过),尚未进入 MySQL 集成。本轮删除两条未使用 import、把三处物理表数从 40 改为 39 并澄清兼容语义。新源码已有 Managed Agent gate、Qwen Code CI 和 reference distribution pull-request 运行,当时结果仍待完成。没有重跑代码失败、手动派发完整工作流或执行本地 Java。

最新后续改动只修复旧恢复浏览器 mock:补齐必填覆盖水位和 terminal 元数据,并对响应做类型检查。原失败 Chromium 单例已复现 RED;最终夹具的三个恢复场景随后全部通过,13.6 秒、零重试,窄范围类型检查及格式/ESLint 也通过。生产恢复代码、水位保护、私有回答过滤和全部测试断言未变。旧 44b2f5c7 的集成 merge 2baec9fc(base 为 70be140e)通过 Java fast:5971 项单元/H2,0 失败、0 错误、17 跳过,两项 Checkstyle 零违规;相对该分支的差异仅为无关发布/工作流/文档,不涉及 Java、SDK、Core、CLI 或 WebShell 源码。该旧 head 的 Node 单元、Lint/Static、无 AK 集成也通过,但 Qwen CI 因确定性的恢复 smoke 夹具失败(413 通过、1 失败,重试仍失败),现已修正。失败记录保留,没有盲目重跑,当前 head 的结果见下文,完整 MySQL/Hosted 资格仍待完成,没有重开本地 Java 额度。

较早 head 74142dd2ba94cdf5e8dbed649880afe8a0c549ec 的 Qwen Code CI 40932999891 已成功,包括全部 414 项 Chromium smoke(30.2 分钟)、Node 单元、Lint/Static 和无 AK 集成;smoke 实际 checkout 正是该 head。Managed Agent fast 40933000064 也成功:单元/H2 总计 5971 项,0 失败、0 错误、17 跳过,SDK 及 Server/Broker 两项 Checkstyle 均零违规。API 契约 23 项、surface registry 4 项、删除回归 3 项、直接分页 11 项、保留产物负例 24 项及清单/校验器组 66 项均通过。Java fast 与参考分发 40932999759 实际 checkout 为集成 merge 1bfab383d5762e9fea4ad788bf8d9406661f425f,tree 为 994122974ee11c06af4567407bd81d05904a0e49,父提交为 main 70be140e 和 PR 74142dd2;相对分支的 28 处差异仅为发布/工作流/脚本/文档,没有包源码差异,不声称两个 tree 相等。参考归档校验和及使用 MySQL 的启动健康检查成功,这不等于完整 MySQL 行为资格或已经发布。fast tier 跳过了完整 MySQL、Hosted/fault 和传输任务,且未执行 SpotBugs,因此完整资格仍待。所有运行均为 attempt 1,没有手动派发或重跑。

较早 74142dd2 观察:模块共享的本地 Java 额度仍在 596.235/600 秒关闭,包含前置准备和清理。最终源码编译、上述单元/H2 回归及 Checkstyle 现在已有上方注明源码来源的 CI 证据;SpotBugs/完整 verify、完整 MySQL 分页/并发及适用 Hosted/fault profile 仍待。较早的本地 MySQL Session schema 组被中断,专门的消息分页组没有开始,这些未完成的本地结果继续保留。

2026-10-30 UTC 评审观察:yiliang114 和 qqqys 已批准当前 head 2193d519765ddec86bb4069f67830088e2dd8e13。评审事件触发的完整 gate 40979340577 正在运行,第二个审批事件触发的运行 40979828462 仍待调度;尚未审计其完整结果及实际 checkout/源码资格。当前 “Flyway migration version uniqueness (latest main)” 状态已成功:完整任务日志 明确记录相对 main 70be140e148f8fc7527cc51717603a6dd84abc19 的 “#15870 success: No collision with main”。保留 qwen-code-review-bot 较早写入的失败状态;其指向的 run 7 返回 HTTP 404,旧诊断仍未核实。旧 view: messages 的 MVC 兼容测试及十进制 transcript 游标迁移说明已在当前 head 中。此前机器人的正式 CHANGES_REQUESTED 保持不动。25 个评审线程均已解决。本次维护没有修改源码、执行本地 Java、派发或重跑 CI;完整验收仍待。

证据(变更前后)

变更前:已合并基线的源码探针发现 39 张业务表、公开快照元数据及六个引用 ma_snapshot 的生产 Java 文件。这是源码证据,不是实时运行基线。变更后:三项 H2 删除回归通过,覆盖 schema 缺失对象检查、物化/重放水位及公开正文回收与原生引用隔离;直接分页及相关集成夹具提供部分 H2/MySQL 证据。没有运行实时浏览器、Managed HTTP 或采集可视化前后对比,因此不声明视觉或端到端验收通过。

测试平台

操作系统 状态
🍏 macOS ✅ 已测试(历史选定证据及最终恢复 mock 场景;未在本地运行完整源码树)
🪟 Windows ⚠️ 未测试
🐧 Linux ✅ 当前2193 CI 已测试;完整 profile 仍待

环境(可选)

macOS arm64、Node.js v26.12.1、已记录的 JDK 21.0.8/Maven 3.9.14、隔离 H2 及临时 MySQL 8.4.11。MySQL 使用 max_allowed_packet=134217728、关闭 binary log 和 native AIO。临时服务及数据已清理;现有预览和用户数据库未改动。较早 Java CI 使用 Linux arm64、JDK 21.0.13 和 Maven 3.9.11。

风险与范围

  • 主要风险或取舍:每页正文和状态可能变化;初始序号上界固定成员范围,不固定内容。重放重新同步必须使用物化水位,重建会使消息游标失效。
  • 未验证或范围外:删除守卫的变异敏感性、MySQL 字面量漂移回归及完整 MySQL 行为、SpotBugs/完整 verify、完整 MySQL/Hosted/fault/传输 profile、实时 Managed 业务 HTTP/浏览器/模型及 Linux 物理 CSI 验收。保留原生恢复历史;本次变更不授权删除 canonical 历史或修改现有预览数据库。
  • 兼容变化与迁移说明:默认 /transcript/query 游标从正十进制事件序号改为不透明消息游标。此前发出的十进制游标返回 400 invalid_message_cursor,替代旧的 invalid_cursor 错误码;升级后应丢弃保存的十进制游标,从首个消息页重新读取。公开 Items 的数字 after 及 SSE 的 afterSequence 保留既有数字语义。 默认 transcript 现在接受 1–100 条消息而非 1–1000 个事件;默认仍为 100,显式 101–1000 请求会被拒绝。客户端应省略已移除的 view 参数;现有未知属性处理保留。移除旧快照游标及可选消息视图选择参数。保留的 snapshot 命名响应字段按文档表示覆盖水位或成员上界。首发前 canonical V1 原地修改;开发库需要重建,不提供原地升级、实时 DROP、schema 版本提升或 repair/history 绕过。

完整同步设计:English 和简体中文。

关联事项

依赖 #15865,承接已合并的 #15839。本 PR 不自动关闭 issue。

@doudouOUC

doudouOUC commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Managed public snapshot removal: validation evidence

Status: current candidate 2193d519765ddec86bb4069f67830088e2dd8e13, acceptance pending. Current-source ordinary unit/H2 execution and Checkstyle passed with integration provenance below, including both changed test classes. Guard-removal mutation sensitivity, MySQL literal-drift and full MySQL/Hosted/fault/transport/SpotBugs qualification remain pending. Local Java stays CLOSED596.235/600.

Review observation on 2026-10-30 UTC: yiliang114 and qqqys approved current head 2193d519765ddec86bb4069f67830088e2dd8e13. Review-triggered full gate 40979340577 is running and a second approval-triggered run 40979828462 is pending; completion and actual checkout/source qualification have not yet been audited. The current “Flyway migration version uniqueness (latest main)” context is successful: its complete job log explicitly reports “#15870 success: No collision with main” against main 70be140e148f8fc7527cc51717603a6dd84abc19. The earlier failure status from qwen-code-review-bot is retained; its linked run 7 returns HTTP 404, so that old diagnosis remains unverified. The legacy view: messages MVC compatibility test and decimal transcript-cursor migration note already exist at this head. The earlier formal bot CHANGES_REQUESTED remains untouched. All 25 review threads are resolved. This maintenance made no source change, local Java execution, CI dispatch or rerun; full acceptance remains pending.

Current2193 ordinary CI evidence

Current 2193d519765ddec86bb4069f67830088e2dd8e13 CI succeeded: Managed fast 40967805430/job123776897036 reports 5974 total unit/H2 cases, 0 failures, 0 errors and 17 skips; the updated removal suite passed 3 and retained-artifact suite passed 27. SDK and both Server/Broker Checkstyle checks have zero violations. Qwen CI 40967805249 succeeded, with exact-head smoke 414 passed in 28.1 minutes; Node/lint/no-AK succeeded by job metadata. Java and reference distribution 40967805267 actually checked out merge eb7decbdc4c7e78cd72c00dcd254cbcc46ee9e40, tree 97ddea21399507b29c87ba4cb15313ca97e6ded2, parents main 70be140e and PR 2193d519. Comparison retains 28 unrelated release/workflow/scripts/documentation differences, no package-source changes; the integration and branch trees differ. Reference archive/MySQL boot-health passed, publication skipped. All inspected runs are attempt 1. Ordinary execution of the changed tests is now verified; guard-removal mutation sensitivity was not executed. The MySQL literal-drift test, full MySQL/paging/EXPLAIN, Hosted/fault/transport and SpotBugs remain pending/skipped. Five cancelled administrative review-route jobs have unavailable BlobNotFound404 logs and unverified cancellation causes; they were retained without rerun or flake claims. No local Java, source edit, test rerun or manual dispatch occurred this cycle.

Latest producer and identity witnesses

Latest follow-up 2193d519765ddec86bb4069f67830088e2dd8e13 fixes three new review suggestions in two Java test files and the synchronized design pair: collection now depends on the producer's own release marker, three four-part released-body identity faults isolate their hex/ordinal/digest guards, and migration guidance explicitly covers default transcript decimal cursors becoming opaque with invalid_message_cursor. Three repeated cleanup/extra-matrix suggestions keep their existing deferrals. The mock visual report for parent505 shows no screenshot changes; it is not live backend acceptance. Production, schema and TypeScript inputs are unchanged. Formatting/reference checks and source review passed; the two edited Java tests, including mutation sensitivity, have not been compiled or run locally and await new-head CI. The Java allocation remains CLOSED596.235/600; unchanged TypeScript evidence is reused. Parent505 fast/H2/Checkstyle/smoke evidence below retains its exact earlier test inputs; full MySQL/Hosted/fault/transport/SpotBugs qualification remains pending. Review summary. Six new threads individually replied and resolved; all 25 threads are resolved.

Parent 505d1fa CI observation

CI observation for 505d1fa9c285f72590d0d5716d3804cc71bcb1c2: Qwen Code CI 40951609892 succeeded, including exact-head Chromium smoke with 414 passed in 28.5 minutes; Node unit, Lint/Static and no-AK integration succeeded by job metadata. Managed fast 40951610327/job123721204581 completed 5971 unit/H2 cases total, 0 failures, 0 errors and 17 skips, with SDK and both Managed Server/Broker Checkstyle checks reporting zero violations. All nine changed unit/H2 classes passed: artifact API 29, retained artifacts 24, removal 3, message paging 11, numeric paging 7, Session schema store 21, API contract 23, query budget 29 and replay-floor retraction 4. The changed MySQL literal-drift test was not executed by fast. Java fast and reference distribution 40951610134 actually checked out merge 872ce7dbe6168dee8ba1466959804a9be77d6adf, tree 3359342fc798fb8de9b47951c13d8d90c75dd3f7, with parents main 70be140e and PR 505d1fa9. Its 28 differences from the branch are unrelated release/workflow/scripts/documentation, with no package-source differences; the branch and integration trees are distinct. Reference archive verification and MySQL-backed boot/health succeeded, while publication was skipped. All inspected runs were attempt 1. Full MySQL/paging/EXPLAIN, Hosted/fault/transport and SpotBugs/full verify remain unqualified; fast skipped those profiles and did not run SpotBugs. No local Java, rerun or manual dispatch occurred. Eighteen new cancelled checks were administrative Qwen Autofix review-route jobs; every job log returned HTTP 404 BlobNotFound. Their exact cancellation reason is unverified, all error responses are retained, and none was restarted or classified as a flake.

Latest review corrections

Earlier publication record: review follow-up at 505d1fa9c285f72590d0d5716d3804cc71bcb1c2: 19 suggestions independently checked; 10 fixed, 4 partially fixed, 2 pushed back, 3 deferred. No production Java logic changed.

Fixed scope: message-page error/recovery documentation and generated response aliases; live history/Broker docs; stronger body-read, no-write, reference, coverage/control, transaction-attribute, legacy-selector and MySQL literal-drift witnesses; fixture millisecond fidelity. The private-session exclusion fixture stays unreferenced so it still detects a missing privacy guard; no unsupported manual projection rewind was added. Additional parser/interface cleanup and a service-level paging matrix are deferred.

Validation: API types regenerated; WebShell package typecheck passed in 15.27s; formatting/ESLint hook and diff/reference checks passed; test-engineer performed source review and an in-memory timestamp precision observation. Changed Java tests were not compiled or run locally because the shared Java allocation remains CLOSED596.235/600. Prior green fast CI belongs to 74142dd and its documented integration merge; it does not qualify these new test inputs. New-head CI, full MySQL/Hosted/fault/transport and SpotBugs remain pending. Historical failures are retained; no blind rerun, manual full dispatch or preview/database operation.

Review action summary.

Prior 74142dd CI (2026-10-29 19:27 UTC observation)

At prior head 74142dd2ba94cdf5e8dbed649880afe8a0c549ec, Qwen Code CI 40932999891 succeeded, including all 414 Chromium smoke cases (30.2 minutes), Node unit tests, Lint/Static and no-AK integration. The smoke job checked out that exact head. Managed Agent fast 40933000064 also succeeded: 5971 unit/H2 cases total, 0 failures, 0 errors and 17 skips, with SDK and both Server/Broker Checkstyle checks reporting zero violations. The API contract (23), surface registry (4), removal regression (3), direct paging (11), retained-artifact negatives (24) and inventory/validator suite (66) all passed. Java fast and reference distribution 40932999759 actually checked out integration merge 1bfab383d5762e9fea4ad788bf8d9406661f425f, tree 994122974ee11c06af4567407bd81d05904a0e49, with main parent 70be140e and PR parent 74142dd2. Its 28 differences from the branch are release/workflow/scripts/documentation, with no package-source differences; the two trees are not claimed equal. The reference archive checksum and MySQL-backed boot health check succeeded; this is not full MySQL behavior qualification or a published release. The fast tier skipped the complete MySQL, Hosted/fault and transport jobs and did not run SpotBugs, so complete qualification remains pending. All runs were attempt 1; no manual dispatch or rerun was made.

Recovery smoke and historical follow-up

Qwen CI 40922766392 / smoke job123620323614 checked out exact head44b2f5c7, completed413 cases and failed one recovery handoff case across its original run plus retries. Its mock omitted coveredSequence; the existing provider guard rejected the transcript, leaving no loaded history. This was independently reproduced RED with existing Chromium. The fixture now provides coverage6, required terminal metadata and a typed response; final three-case Chromium verification passed13.6s/retries0 and narrow tsc passed0.774s. The first narrow tsc caught missing terminal and is retained separately. All private-answer exclusion, editable/preselected handoff, original cancellation and no-auto-send assertions remain. No product code, timeout, retry or assertion was relaxed. Logs/source hashes and task-port58317 cleanup are retained locally. No Java, database, model or preview5196 operations were run.

Java fast40922766539/job123620567398 completed5971 unit/H2 cases (0failures,0errors,17skips) and both Checkstyle checks with0violations. Actual checkout was merge2baec9fc801a6839f89f69474fa29dbacc6b8a56/tree700ab83d1fc86c155c0c9f54a0c89f5d76228f35, combining head44b2f5c7 with base70be140e. GitHub comparison shows the extra files are release scripts/workflows/docs, not Java/SDK/Core/CLI/WebShell source. This is PR integration evidence with explicit provenance, not an assertion that the merge tree equals the branch tree. Node unit, Lint/Static and no-AK integration jobs also passed at44b2f5c7. The overall Qwen workflow failed the smoke case and is not claimed green. This was the earlier observation; current-head results are recorded above. Full MySQL/Hosted profiles remain pending; no blind rerun or manual full dispatch.

Subsequent exact-tree CI evidence

Run 40915271041, attempt 1, is an approval-triggered full Managed Agent run for prior head 6851d1a8c10c46fca4cbf08d4c5f51997c784753. The complete downloaded job logs show actual checkout abe373a3b32b962ea1008a52a20784507a6d66ef; GitHub commit metadata confirms its tree 8c3df7ebb2911e57ecf2c20e2d2082827733285e equals that head, with parents main 89d3aaea and 6851d1a8. This is execution evidence for that prior tree.

The Linux Java 21 job compiled 393 main and 622 test sources, then failed Checkstyle on two unused imports. The full MySQL lane also compiled those sources and passed schema diagnostic 24, retained artifacts 24, removal 3, direct paging 11 and API contract 23 cases, but its unit phase ended at 5971 cases / 10 failures / 0 errors / 17 skips. Every failure comes from three stale 40-table pins (actual 39): backfill 1, native-activation 7, and hosted-files 2. It did not reach real MySQL integration. Broker 7 and multi-node 10 selected cases passed before their jobs hit the same Checkstyle failure; a Surefire post-exit warning is retained, not silently discarded. No failed workflow is claimed green. The old cancelled label job has 404 logs and was not restarted.

At the earlier 44b2f5c observation, that candidate fixed those imports/counts. Its pull-request runs were Managed Agent gate 40922766539, Qwen Code CI 40922766392, and reference distribution 40922766286. They were pending at that earlier observation; the later evidence above supersedes that status. No blind rerun or manual full workflow dispatch was made; the closed local budget was not reset.

Evidence locations and provenance

Commands, elapsed time, exit status, logs and test reports are retained under .qwen/investigations/managed-message-snapshot-removal/. java-budget.json contains every Java-related command verbatim, including prerequisite SDK installation, MySQL startup and cleanup. collected-test-report-index.json indexes the collected XML outcomes. These files are retained in the task checkout; their local paths are provenance records, not public CI artifacts or release/production evidence. Execution preceded the explicitly listed late source changes; the reported counts do not prove the complete published revision passed.

TypeScript and build checks

Check Command Result
Build npm run build Passed, 141.668 seconds
Typecheck npm run typecheck Passed, 57.393 seconds
Bundle npm run bundle Passed, 2.312 seconds
Final WebShell typecheck npm run typecheck --workspace=packages/web-shell Passed, 16.506 seconds after final contract/type generation and formatting
WebShell focused tests From packages/web-shell: ../../node_modules/.bin/vitest run client/components/managed/java-managed-agent-provider.test.ts client/components/managed/managed-session-export.test.tsx client/components/managed/managed-session-messages.test.ts client/components/managed/use-managed-session.test.tsx 318 passed; React act warnings retained

The build and test inputs already included default direct reads and removal of the redundant view selector. Final parent-source reconciliation did not change their tested runtime source bytes. Final OpenAPI review updated descriptions, summaries and the public Items 413 response, then regenerated the WebShell declaration. No release artifact or live preview acceptance is implied by the bundle.

Java unit/H2 evidence

Latest collected reports across selected runs contain 835 cases: 834 passed, zero skipped, one error. This aggregate is not a single passing Maven invocation. The original 776-case run had 10 failures and four errors; all attempts remain retained. Later selected reruns cleared those errors except the final API fixture described below.

Passing reports include the direct message pager, three new removal tests, schema stores, query budgets, replay floor/retraction, message identity, resource reader/collector concurrency, API integration fixtures, surface admission, native journal snapshots, retained artifacts and CSI inventories. ToolPublicationStoreTest evidence covers only projectsOrdinaryNotStartedReceipt and tickPublishesOneReceiptOnlyWhenEnabled, not its complete class.

The remaining ManagedAgentApiContractTest.routesAnswerWithTheirSchemas error came from an empty Session using a helper that required at least two messages. The fixture now waits for public Items readiness before export. That correction has not been rerun. Later OpenAPI edits and the validator/CSI fixture edits below likewise lack final Java contract verification.

Disposable MySQL evidence

The task-owned server used MySQL 8.4.11, loopback port 51624, max_allowed_packet=134217728, binary logging disabled and native AIO disabled. It was stopped and its data files removed. Existing previews and database services were not used or changed.

Completed reports contain 141 cases: 140 passed, zero skipped, one error:

Group Completed cases Outcome
ManagedAgentMySqlIT 27 Passed
ManagedNativeJournalSnapshotsMySqlIT 22 Passed
WorkspaceCsiRetainedArtifactsMySqlIT 24 Passed before three negative-fixture fixes below
WorkspaceCsiApplicationInventoryMySqlIT 66 Passed
ManagedSchemaMySqlIT 2 One passed; one errored

The schema error was an obsolete lookup for removed ck_ma_resource_snapshot_page. The negative fixture now weakens surviving ck_ma_resource_length, asserts strict refusal and restores it. This correction has not been rerun. The Session-schema group began but was interrupted without a completed XML report. The dedicated message-paging/EXPLAIN group did not start. The overall MySQL command timed out at the remaining budget bound and did not pass.

Source changes not locally rerun before publication (historical)

  • The empty-Session API readiness fixture and MySQL CHECK-drift fixture above were corrected after local budget closure.
  • Three retained-artifact negatives (body-extra, body-order, body-utf8) were strengthened so valid digest-derived resource identity does not mask the intended invalid body. The UTF-8 case preserves the original large-body length. They are uncompiled and unrun. The earlier 24-case H2/MySQL reports prove only the prior fixture state. Its preserved source is WorkspaceCsiRetainedArtifactsTest.pre-negative-fixture-fix.java, SHA256 349012b688f13b8d77a5301f80ac210ac46fcb1e3cb504b46278a5a1f57a6f48, with adjacent provenance JSON.
  • Independent review found the generated-column validator still commuted an old OR expression although projection_pending is now a single comparison. Removed the obsolete branch and added missing/changed-expression metadata negatives requiring the normal SQLException diagnostic. This production correction and its regression were not compiled or run locally before publication; their unit/H2 CI execution is recorded above.
  • OpenAPI descriptions/summaries were aligned with live message semantics; public Items now declares its possible 413 response. Generated types were regenerated. The later unit/H2 API contract execution is recorded above; complete profile qualification remains pending.

Source review and remaining gates

Independent message/API and schema/storage reviewers inspected the current scoped source, the complete removed snapshot implementation and downstream consumers. All concrete findings were addressed and reread, with no unresolved reported code finding. Their source review is not execution evidence. Scoped test authors also completed two consecutive clean author-audit passes after their final corrections.

The default Java allocation for this explicit deletion request is closed at 596.235/600 seconds, including preparation and cleanup. Earlier chat allocations were not reused or reset. No additional Java execution is authorized by a changed SHA or a review round.

Publication hook: staged Prettier/ESLint passed, with no runtime source changes from the previously reviewed tree. This hook did not run Java or reset the budget.

Remaining CI: SpotBugs/full verify, complete MySQL paging/concurrency/EXPLAIN and all applicable Hosted/fault/transport profiles. Prior 74142dd unit/H2 (including the listed API/schema/strengthened-negative suites) and Checkstyle have the qualified CI evidence above; skips remain explicit. No live Managed HTTP/browser/model or Linux physical CSI acceptance was run for this deletion. No production/deployment/release acceptance is claimed. Development catalogs must be recreated under the canonical V1 policy; no live DROP or in-place migration is supplied.

中文验证说明

2026-10-30 UTC 评审观察:yiliang114 和 qqqys 已批准当前 head 2193d519765ddec86bb4069f67830088e2dd8e13。评审事件触发的完整 gate 40979340577 正在运行,第二个审批事件触发的运行 40979828462 仍待调度;尚未审计其完整结果及实际 checkout/源码资格。当前 “Flyway migration version uniqueness (latest main)” 状态已成功:完整任务日志 明确记录相对 main 70be140e148f8fc7527cc51717603a6dd84abc19 的 “#15870 success: No collision with main”。保留 qwen-code-review-bot 较早写入的失败状态;其指向的 run 7 返回 HTTP 404,旧诊断仍未核实。旧 view: messages 的 MVC 兼容测试及十进制 transcript 游标迁移说明已在当前 head 中。此前机器人的正式 CHANGES_REQUESTED 保持不动。25 个评审线程均已解决。本次维护没有修改源码、执行本地 Java、派发或重跑 CI;完整验收仍待。

当前 2193d519765ddec86bb4069f67830088e2dd8e13 CI 已成功:Managed fast 40967805430/job123776897036 报告单元/H2 共 5974 项,0 失败、0 错误、17 跳过;改动的删除回归组 3 项、保留产物组 27 项均通过。SDK 及 Server/Broker 两项 Checkstyle 均零违规。Qwen CI 40967805249 成功,smoke 实际 checkout 该 head,414 项在 28.1 分钟内通过;Node/lint/无 AK 集成的任务元数据均成功。Java 与参考分发 40967805267 实际 checkout 为 merge eb7decbdc4c7e78cd72c00dcd254cbcc46ee9e40,tree 为 97ddea21399507b29c87ba4cb15313ca97e6ded2,父提交为 main 70be140e 和 PR 2193d519。相对分支保留 28 处无关发布/工作流/脚本/文档差异,没有包源码变化,集成与分支 tree 不相等。参考归档及 MySQL 启动健康检查通过,发布步骤跳过。已检查的运行均为 attempt 1。改动测试的普通执行现已验证,但未执行删除守卫的变异敏感性检查。MySQL 字面量漂移测试、完整 MySQL/分页/EXPLAIN、Hosted/fault/传输及 SpotBugs 仍待或被跳过。5 个取消的评审路由管理任务均无法取得日志(BlobNotFound404),具体取消原因未核实;保留记录,没有重跑或判为偶发故障。本轮没有执行本地 Java、改源码、重跑测试或手动派发。

最新后续提交 2193d519765ddec86bb4069f67830088e2dd8e13 在两个 Java 测试文件及同步英中设计中修正三条新建议:回收依赖生产路径自己的释放标记,三个结构完整的释放后正文身份分别隔离十六进制段/序号/摘要守卫,并明确默认 transcript 十进制游标改为不透明格式及 invalid_message_cursor 的迁移说明。三条重复清理/额外矩阵建议沿用已有延期决定。父提交505的模拟视觉报告显示截图无变化,不等于实时后端验收。生产、schema 和 TypeScript 输入未变。格式/引用检查及源码审阅通过;两个新改动的 Java 测试(含变异敏感性)未在本地编译或运行,仍待新 head CI。Java 额度保持 CLOSED596.235/600,复用未变的 TypeScript 证据。下方父提交505 fast/H2/Checkstyle/smoke 证据保留其精确旧测试输入,完整 MySQL/Hosted/fault/传输/SpotBugs 资格仍待。 GitHub。6 个新线程已逐条回复并解决,当前全部 25 个线程均已解决。

505d1fa9c285f72590d0d5716d3804cc71bcb1c2 的 CI 观察:Qwen Code CI 40951609892 已成功,Chromium smoke 实际 checkout 该 head,414 项在 28.5 分钟内全部通过;Node 单元、Lint/Static 和无 AK 集成的任务元数据均为成功。Managed fast 40951610327/job123721204581 完成单元/H2 总计 5971 项,0 失败、0 错误、17 跳过,SDK 及 Managed Server/Broker 两项 Checkstyle 均零违规。9 个改动的单元/H2 类全部通过:artifact API 29、保留产物 24、删除回归 3、消息分页 11、数字分页 7、Session schema store 21、API 契约 23、查询预算 29、replay-floor 回退 4。改动的 MySQL 字面量漂移测试未由 fast 执行。Java fast 和参考分发 40951610134 实际 checkout 为 merge 872ce7dbe6168dee8ba1466959804a9be77d6adf,tree 为 3359342fc798fb8de9b47951c13d8d90c75dd3f7,父提交为 main 70be140e 和 PR 505d1fa9;相对分支的 28 处差异仅为无关发布/工作流/脚本/文档,没有包源码差异,分支与集成 tree 不相等。参考归档校验及 MySQL 启动/健康检查成功,发布步骤被跳过。所有已检查运行均为 attempt 1。完整 MySQL/分页/EXPLAIN、Hosted/fault/传输及 SpotBugs/完整 verify 仍未具备资格;fast 跳过这些 profile 且未运行 SpotBugs。没有执行本地 Java、重跑或手动派发。18 个新增取消检查均为 Qwen Autofix 评审路由管理任务,每份任务日志都返回 HTTP 404 BlobNotFound;具体取消原因尚未核实,错误响应全部保留,没有重启或将其判为偶发故障。

较早发布记录:本次后续提交 505d1fa9c285f72590d0d5716d3804cc71bcb1c2 逐条核实 19 条建议:10 条修正、4 条部分修正、2 条有理由不采纳、3 条延期。上表逐项给出链接与处理结果,没有改变生产 Java 逻辑。

修正范围:消息分页错误/恢复说明及生成响应类型、实时历史与 Broker 文档;正文读取、零写入、引用、水位/控制事件、事务属性、旧选择参数及 MySQL 字面量漂移见证;夹具毫秒精度。私有会话排除夹具继续保持无引用,确保能发现隐私守卫丢失;没有增加脱离协议的手动投影回退。额外解析器/接口清理及服务层分页矩阵延期。

验证:已重新生成 API 类型,WebShell 包类型检查 15.27 秒通过,格式/ESLint 提交钩子及差异/引用检查通过;test-engineer 完成源码复核及内存时间精度观察。共享 Java 额度保持 CLOSED596.235/600,改动的 Java 测试未在本地编译或运行。先前绿色 fast CI 只属于 74142dd 及记录的集成 merge,不能证明本次新测试输入通过。新 head CI、完整 MySQL/Hosted/fault/传输与 SpotBugs 仍待。保留历史失败,没有盲重跑、手动完整派发或预览/数据库操作。

GitHub

较早 74142dd CI(2026-10-29 19:27 UTC 观察)

较早 head 74142dd2ba94cdf5e8dbed649880afe8a0c549ec 的 Qwen Code CI 40932999891 已成功,包括全部 414 项 Chromium smoke(30.2 分钟)、Node 单元、Lint/Static 和无 AK 集成;smoke 实际 checkout 正是该 head。Managed Agent fast 40933000064 也成功:单元/H2 总计 5971 项,0 失败、0 错误、17 跳过,SDK 及 Server/Broker 两项 Checkstyle 均零违规。API 契约 23 项、surface registry 4 项、删除回归 3 项、直接分页 11 项、保留产物负例 24 项及清单/校验器组 66 项均通过。Java fast 与参考分发 40932999759 实际 checkout 为集成 merge 1bfab383d5762e9fea4ad788bf8d9406661f425f,tree 为 994122974ee11c06af4567407bd81d05904a0e49,父提交为 main 70be140e 和 PR 74142dd2;相对分支的 28 处差异仅为发布/工作流/脚本/文档,没有包源码差异,不声称两个 tree 相等。参考归档校验和及使用 MySQL 的启动健康检查成功,这不等于完整 MySQL 行为资格或已经发布。fast tier 跳过了完整 MySQL、Hosted/fault 和传输任务,且未执行 SpotBugs,因此完整资格仍待。所有运行均为 attempt 1,没有手动派发或重跑。

历史验证记录

较早候选为 74142dd2ba94cdf5e8dbed649880afe8a0c549ec,本轮只修复恢复浏览器夹具,没有改生产逻辑。旧44b2f5c7 的 smoke 在414项中413通过、1项恢复交接失败,重试仍失败;本地精确复现后,最终夹具3个 Chromium 场景13.6秒、零重试通过,窄 tsc0.774秒通过,保留首次类型错误及全部安全断言。旧44的 Java fast 在实际集成 merge2baec9fc 上报告5971项、0失败/0错误/17跳过和两项 Checkstyle零违规;合成树相对分支仅含无关发布/工作流/文档,明确保留其不同 tree 的来源。Node/Lint/无AK集成也通过,但旧Qwen整体因smoke失败。当时新 head CI 仍待,最新结果见上文;完整 MySQL/Hosted 仍待。没有盲重跑、手动完整派发、本地Java或5196预览操作。以下旧记录和局部通过不能等同当前修订整体验收。

较早候选 44b2f5c78ea8f2eb27ffdd3a545e63a558e525a0 已基于合并后的 main 基线 89d3aaea62af96849c4b9b7a2bc68e26347a7ac8,完整验收仍待 CI。#15865 的最终水位校验及 smoke 夹具修正已保留,只重放删表增量并更新双语设计状态,删表运行逻辑未变。本轮删除两条未使用 import 并修正三处物理表数为 39;修正后仍待新 head CI。外部 full run 40915271041 的实际合成 merge 与旧 6851 树摘要一致,编译和若干相关回归通过,但完整任务因两条 Checkstyle 违规及 5971 项单元阶段的 10 失败/0 错误/17 跳过而失败,未进入 MySQL 集成。三个新 head 的 Managed Agent、Qwen CI 和 reference-distribution PR 工作流已经存在,未手动派发完整流程、未盲目重跑、未重开本地 Java 额度。以下本地测试是原始 3acf733ef1f8af9aa2ba8ab6349ba606e8a2581e 增量的历史证据,本轮仅做源码复核,没有重跑运行检查,也没有重开 Java 额度。根目录 build/typecheck/bundle 通过,四个受影响 WebShell 测试文件共 318 项通过;最终重新生成类型后的 WebShell typecheck 也通过。提交钩子的 Prettier/ESLint 通过,没有产生新的运行源码变化。

已收集的单元/H2 报告共 835 项(834 通过、1 错误),MySQL 8.4.11 已完成报告共 141 项(140 通过、1 错误)。计数来自多个选定运行,不是一次完整通过。API 空 Session 等待夹具和已删除 CHECK 的 schema 负例已修正但未重跑;三项加强后的 CSI 正文负例,以及最终生成列表达式校验器修正/回归也未在发布前本地编译、运行;后续单元/H2 CI 结果见上文。原始 776 项尝试中的 10 失败/4 错误及所有后续记录均保留,没有用孤立的通过覆盖历史失败。

MySQL Session schema 组在预算截止时被中断,专门的消息分页/EXPLAIN 组没有开始。retained-artifact 的 24 项 H2/MySQL 通过报告早于三项加强夹具,只证明其旧状态。ToolPublication 证据仅含两项已列出的方法,不是整类。三项 H2 删除回归的原生资源引用夹具只证明 schema/回收隔离;原生 journal 发布/恢复的部分证据来自独立原生测试组。

共享本地 Java 额度已经关闭在 596.235/600 秒,包含 SDK/Maven 准备、测试、MySQL 启动及清理。本次发布、新 SHA 或后续检查都不重置额度。临时 MySQL 服务和数据已清理,现有预览和用户数据库未改动。较早 74142dd 源码单元/H2(含上方列出的 API/schema/加强负例)及 Checkstyle 已有注明来源的 CI 证据,跳过项继续明示;SpotBugs/完整 verify、完整 MySQL 分页/并发/EXPLAIN 及适用 Hosted/fault/传输 profile 仍待 CI;没有实时 HTTP、浏览器、模型、Linux 物理 CSI 或生产/部署验收声明。

基线只做了源码探针,没有实时前后对比。#15865 已合并,用户授权的转 Ready 依赖条件已满足;Ready 仅表示可评审,不表示上述门禁已经通过。

Use bounded live message pages for public history and exports, remove the public snapshot schema and background lifecycle, and retain native recovery history.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC
doudouOUC force-pushed the refactor/managed-remove-public-snapshots branch from 3acf733 to 6851d1a Compare October 29, 2026 16:22
@github-actions

Copy link
Copy Markdown
Contributor

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)为单个提交。

@doudouOUC
doudouOUC changed the base branch from feat/managed-live-message-pages to main October 29, 2026 16:22
@doudouOUC
doudouOUC marked this pull request as ready for review October 29, 2026 16:23
@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 已完成 —— 查看运行。结果见本线程中的各阶段评论。

@doudouOUC
doudouOUC enabled auto-merge (squash) October 29, 2026 16:34
@doudouOUC doudouOUC self-assigned this Oct 29, 2026
yiliang114
yiliang114 previously approved these changes Oct 29, 2026

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review Summary

Default-depth (/review) of refactor(managed): Remove persisted public message snapshots at head 6851d1a8c10c46fca4cbf08d4c5f51997c784753.

No P0/P1 findings. The removal is thorough and correct: ManagedSnapshotStore deleted (921 lines), ma_snapshot table removed from the canonical V1 schema, all public reads unified through direct message paging, while native journal snapshots, recovery, and CSI protection are preserved.

Verified

  • Dependency #15865 merged at ca8970b8 — the base 89d3aaea covers it
  • All ma_snapshot references in added production lines are documentation or negative test assertions only — zero production SQL references to the removed table or columns
  • SQL parameter binding in findMessagePage is correct for both numericBoundary (afterSequence > 0, blank cursor → afterSequence injected before position params) and regular cursor paths
  • afterSequence < 0 throws BAD_REQUEST; afterSequence == 0 is the non-numeric default — no off-by-one
  • Native journal snapshots retained: NATIVE_SNAPSHOT owner, manifest/page resources, collection, and recovery checks untouched
  • snapshotThroughSequence wire field retained with changed semantics (membership bound → not frozen content), documented in OpenAPI descriptions
  • CSI inventory correctly removes public SNAPSHOT owner kinds, managed-snapshot-page, and managed-snapshot-manifest resource kinds; schema/structural/content checks tightened — unknown objects still rejected
  • ReplayFloorAdvancer now reads covered_sequence from the Session event-stream row; floor advance never exceeds readable projection coverage; pager returns retryable pending when covered_sequence < replay_floor_sequence
  • WebShell provider and generated types aligned — view: "messages" removed, exportSnapshot and listTranscriptItems now use the unified message path

P3 (non-blocking)

  • Test file naming: ManagedSnapshotNumericPagingTest.java and ManagedSnapshotPoolTest.java still carry "Snapshot" in their names while now testing message paging behavior — cosmetic, rename opportunistically
  • CI pending: The PR body acknowledges final-source compilation, complete MySQL paging/concurrency, Checkstyle, SpotBugs, and full CI profiles remain required gates; not a code defect but explicit pre-merge requirement

Not checked

No live build/typecheck/Maven run performed; relied on code review of the diff and the author's stated partial-evidence results (834/835 H2, 140/141 MySQL).

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

COMMENT, not an approval. The reason is an incomplete code-review gate on a large deletion refactor, compounded by the fact that no executed evidence of any kind exists at this head. I am not filing a Critical — I found none — but I cannot certify a 2,725-line removal I could not finish reading and that nothing has yet compiled.

Reviewed at head 6851d1a8c10c46fca4cbf08d4c5f51997c784753.

No code-executing check has run at this head

I read the full check list rather than a pass/fail tally, because for this diff the distinction between "green" and "absent" is the whole question. Twenty entries: 5 pass, 0 fail, 1 pending, 14 skipping. The five passes are assign, authorize, label, Remind on force-push and API contract version uniqueness (latest main). The fourteen skips are all review-bot and verification lanes. The single pending entry is triage.

What is not in the list at all: Lint & Static, Test (ubuntu-latest, Node 22.x), Build and verify reference distribution, SDK Java (fast) / ubuntu-latest / Java 21, Select the Managed Agent tier, Managed Agent fast tier, Integration Tests, and SDK Java (fast) / Flyway migration version uniqueness. I confirmed their absence rather than inferring it from a count — these lanes are not present in a skipped state, they have not been dispatched, which is consistent with triage still pending after the force-push at 16:22.

So the only substantive gate that has evaluated this head checks that the OpenAPI version number is unique against main. Nothing has compiled a Java source file, run a test, or booted the archive to validate the managed schema.

That matters more than usual here because of what the diff is. Removing a table and a 921-line class while touching five schema-contract pins (ManagedSchemaCatalog, ManagedSchemaContract, ManagedSchemaProjection, ManagedSchemaRows, legacy-table-map.tsv), the canonical business-table count, the OpenAPI document and the generated client has one dominant defect class: a surviving reference to a removed identifier, or a count pin that disagrees with the DDL. Both are compile-time or boot-time failures, caught instantly by exactly the two lanes that have not run — the Java compile and Build and verify reference distribution, which validates the schema catalog on boot. I am not treating pending CI as a blocker on its own. I am recording that there is currently no substitute evidence from any source.

What I did verify, and the author's own disclosure

Two concrete checks came back clean. ManagedSnapshotStore.java is genuinely absent at this head — the contents endpoint returns 404 — so the deletion is real rather than staged. And the two snapshot-named test files that survive the change, ManagedSnapshotPoolTest.java and ManagedSnapshotNumericPagingTest.java, contain zero references to ManagedSnapshotStore, so the most obvious dangling reference is not present. That is two files of roughly thirty Java files in the diff, which is a data point and not a census; a complete one needs every file at this head, and the compiler does it for free.

The description is unusually explicit that the final source has never been executed, and I want to quote it rather than paraphrase, because it is the strongest evidence in either direction on this PR: collected unit/H2 reports show "835 cases with 834 passing and one API fixture error" and MySQL "141 cases with 140 passing and one schema fixture error", with "both fixtures were corrected without a rerun"; three strengthened CSI negative fixtures and the final generated-column validator correction are "uncompiled and unrun"; those aggregates "are not passing final-source gates"; "earlier local results do not prove that the complete rebased tree passes"; the macOS row reads "historical focused evidence only; rebased tree unrun"; and the shared local Java budget closed at 596.235/600 seconds and was not reopened. The listed CI requirements — final-source compilation, the corrected and strengthened regressions, full unit/H2, Checkstyle, SpotBugs, complete MySQL paging and concurrency, and the applicable Hosted/fault profiles — are all still outstanding, with the MySQL Session-schema group interrupted and the message-paging group never started.

That is an honest account, and it is also a statement that no one has yet observed this tree compile.

What I could not read

Roughly the whole diff. I did not scan ManagedAgentStore.java (+45/−145), ManagedAgentService.java (+12/−99), WorkspaceCsiApplicationInventory.java (+29/−194), ManagedProjectionResourceCollector.java (+3/−104), ManagedSessionRetirementStore.java (+2/−34), the schema DDL (+2/−41), the OpenAPI and generated-client deltas, the replay-floor and cursor-expiry changes, or any of the ~25 test files including the new 168-line ManagedMessageSnapshotRemovalTest. In particular I did not verify the two claims most likely to matter behaviourally: that transcript resumes SSE from actual materialized coverage without skipping the unprojected tail, and that removing the optional message-view selector and the old snapshot cursors breaks no consumer that remains in the tree.

The public-contract narrowing is also worth a human eye rather than mine. Routes disappear from WebShellAgentController, fields from ApiModels and StoreModels, and the OpenAPI document changes by +48/−37. The PR's position is that the canonical V1 schema changes in place under the pre-release fresh-catalog policy, with development catalogs recreated and no in-place upgrade — which is a policy call about compatibility, not something I can settle from the diff.

History

There is no blocking finding to reconcile. The PR has zero reviews and zero inline review comments, so there is no ledger and no earlier Critical. The only bot comment is triage announcing that it is still running; it has posted no stage result. The stated dependency #15865 is merged, and this branch replays only the removal increment on top of main. My COMMENT is therefore not a disagreement with any prior reviewer — it is the first review the PR has had, and it is incomplete.

What would make this approvable

Let the dispatched lanes land and confirm three things on this exact head: the Java compile is clean, Build and verify reference distribution boots and validates the schema catalog at 38 business tables, and Test (ubuntu-latest, Node 22.x) passes with the regenerated web-shell client. Those three close the dangling-reference and count-pin classes outright, which is most of the risk in a deletion of this shape. After that a pass over the behavioural claims above — SSE resume from materialized coverage, and the cursor/selector removal having no surviving consumer — would be the remaining work, and I would expect it to be quick given how much of the diff is deletion.

qqqys
qqqys previously approved these changes Oct 29, 2026

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

Critical-only scan at 6851d1a8c10c46fca4cbf08d4c5f51997c784753 — no blocking defect found. This is a −2725-line deletion, so the scan concentrated on the two ways such a change breaks: dangling references to removed code, and a guard that quietly stops guarding.

No collision with the route that landed six hours earlier

fa7421bdc (#15839, merged 11:34Z today) is an ancestor of this head — the branch baseline is 89d3aaea62, not a pre-#15839 main. That matters because #15839 added ManagedSnapshotStore.recentPage, AgentStateStore.findRecentSnapshotPage and POST /transcript/items/query, and this PR deletes ManagedSnapshotStore.java outright. A branch based on the older main would have merged into a tree where those callers dangle, with no git conflict and green branch CI. It does not: the route survives (WebShellAgentController:184) and is now served from live message paging through the shared private messageExportPage(…, backward=true).

Dangling-reference census

At this head, across all of packages/:

  • ManagedSnapshotStore — zero references anywhere, main or test. The two test files still named after it (ManagedSnapshotNumericPagingTest, ManagedSnapshotPoolTest) no longer mention the class.
  • ma_snapshot, current_snapshot_id, findSnapshotPage, findSnapshotCoveredSequences, SnapshotRecord — zero references in production code. The only four occurrences in the tree are assertions of absence: the new ManagedMessageSnapshotRemovalTest:62,65 (.doesNotContain("ma_snapshot"), .doesNotContain("current_snapshot_id", "snapshot_stale_since")) and Issue13181QueryBudgetTest:131,177.

The budget guard got stricter, not weaker

Issue13181QueryBudgetTest loses 318 lines and gains 83, which reads like a weakened gate until you look at what replaced the accounting: assertThat(fixture.ledger.count("ma_snapshot")).isZero(). The test no longer budgets snapshot writes, it forbids them. That is the right shape for this PR.

The replacement read path is scoped and bounded

findMessagePage (ManagedAgentStore:5316-5337) opens with requireSession(tenantId, sessionId), keeps ManagedLegacySessionGuard.requireLegacyMutation(csi_guard), and then throws invalid_limit unless 1 <= limit <= 100. So the service passing requestedLimit through unclamped — transcript(), messageExportPage() — cannot produce an unbounded query; an oversized limit is a 400. listPublicItems still clamps with limit(requestedLimit) on the public route. findMessageCoveredSequences (:5495), replacing findSnapshotCoveredSequences, reads covered_sequence from ma_event_stream scoped by tenant plus an explicit session list.

Retirement and CSI attestation

The three largest unread deletions are coherent with the removal rather than a loss of evidence:

  • ManagedProjectionResourceCollector narrows KINDS to the single literal X'6d616e616765642d6d6573736167652d7061727473' ("managed-message-parts"), dropping the snapshot-page collection branch.
  • ManagedSessionRetirementStore drops the snapshot deletion batch and now sets covered_sequence = last_sequence on the SESSION stream at retirement, which is the correct statement of coverage once no snapshot can lag.
  • WorkspaceCsiApplicationInventory loses its snapshot-page carriers and gains validation on the message-part path: messages.size() <= 1; on empty, retention_until != null and no resource references; a four-part resource_id identity whose sha256 segment must equal the row's sha256; tenant/session equality with parts_json == "[]"; partCoverage(...) over first/last sequence and timestamps; and every reference required to be owner_kind == "MESSAGE" with a matching owner key and revision. ma_message is added to the otherOwner table classification.

Schema-wise, dropping the SNAPSHOT arm from ck_ma_ref_owner is safe only if nothing still writes that owner_kind, and the census above plus the retirement-inventory requirement that refs be MESSAGE are what establish that.

Client-visible behaviour worth a second look (not a blocker)

Two changes are intended by this PR but are observable to existing callers: view=messages is no longer a distinct dispatch on /transcript/query, /sessions/export/query or /transcript/items/query, and those web-shell routes now answer limit > 100 with 400 invalid_limit instead of the old eventLimit(...) clamping. The route paths are unchanged, which is why capability-parity/managed-surface.txt legitimately needs no edit and its sha256 header still holds.

CI at this head

No check fails, but the head was force-pushed at 16:22Z and only orchestration jobs had reported when I published: API contract version uniqueness (latest main), assign, authorize, label, Remind on force-push pass, triage pending. SDK Java (fast) / ubuntu-latest / Java 21, Test (ubuntu-latest, Node 22.x) and Lint & Static had not started, so nothing has yet compiled this tree. My dangling-reference census is the substitute for that evidence, not a replacement for it — please confirm those two lanes go green before merge.

Not covered by this approval

I read the controller, service, the two ManagedAgentStore methods above, the schema delta, the parity surface, and the added lines of the three retirement/inventory/collector files. I did not read the OpenAPI diff (+48/−37), the regenerated TypeScript client (+20/−21), ApiModels/StoreModels, the schema catalog/projection/contract/rows deltas, the new 168-line removal test, or most of the test-file reductions (ManagedSchemaSessionStoreTest −291/+154, ManagedSchemaTest −95/+22, ReplayFloorRetractionTest +52/−16). The triage run had produced no stage verdict yet, so no bot or maintainer finding exists to re-check — this review is not inheriting anyone's conclusion.


中文说明

在 6851d1a8 上执行 Critical-only 扫描,未发现阻塞合入的缺陷。这是一次删除 2725 行的改动,因此扫描集中在两类破坏方式:对已删代码的悬挂引用,以及某个守卫悄悄失去作用。

与六小时前合并的改动不冲突:fa7421bdc(#15839,今日 11:34 合并)是当前 head 的祖先,分支基线为 89d3aaea62。这一点很关键,因为 #15839 刚新增了 ManagedSnapshotStore.recentPage、findRecentSnapshotPage 与 /transcript/items/query,而本 PR 整文件删除了 ManagedSnapshotStore.java。若分支基于更早的 main,合并后这些调用方会悬挂,且不会有 Git 冲突、分支 CI 仍然是绿的。实际不是:该路由保留,并改由共享的私有方法经实时消息分页提供服务。

悬挂引用普查:在整个 packages/ 下,ManagedSnapshotStore 零引用;ma_snapshot、current_snapshot_id、findSnapshotPage、findSnapshotCoveredSequences、SnapshotRecord 在生产代码中零引用,全树仅存的四处都是「断言其不存在」——新增的移除测试与查询预算测试。

预算守卫是变严而非变松:Issue13181QueryBudgetTest 删 318 行、增 83 行,看起来像削弱,但替代原有计数的是 count("ma_snapshot") 必须为零,即不再为快照写入编列预算而是直接禁止。

替代读路径有隔离且有界:findMessagePage 开头即校验会话归属,保留旧会话守卫,并在 limit 不在 1 到 100 之间时抛 400。因此服务层直接透传 requestedLimit 不会产生无界查询,超限是被拒绝而非被静默放大;公开列表路由仍走钳制。替代覆盖度查询按租户加显式会话列表读取。

退役与 CSI 存证:三处最大的未读删除与本次移除是一致的,而非证据缺失——资源收集器把种类收窄为单一的 message-parts 字面量;退役存储去掉快照删除批次,并在退役时把覆盖序列置为最后序列,这在不存在滞后快照后是正确表述;应用清单失去快照页分支,同时在 message-part 路径上新增多项校验(至多一条消息、空消息时要求保留期非空且无资源引用、资源标识四段且末段等于该行 sha256、租户与会话一致且 parts 为空、覆盖区间校验、每条引用必须是 MESSAGE 且属主键与修订号匹配),并把 ma_message 加入属主分类。表结构上从 ck_ma_ref_owner 去掉 SNAPSHOT 分支,只有在无人再写入该属主种类时才安全,上面的普查与清单中「引用必须为 MESSAGE」的要求共同确立了这一点。

两处对调用方可见的行为变化(本 PR 有意为之,非阻塞):view=messages 不再是三个路由上的独立分支;这些 Web Shell 路由对大于 100 的 limit 返回 400 而不再钳制。路由路径未变,因此能力清单文件无需修改,其摘要行仍然成立。

本 head 的 CI:无失败项,但 head 于 16:22 强推,我发布时只有编排类任务出结果,Java 快档、Node 测试与 Lint 尚未开始,也就是说这棵树还没有被编译过。我的悬挂引用普查是这一证据的替代而非等价物,合并前请确认这两条任务跑绿。

本次批准未覆盖:我读了控制器、服务层、上述两个存储方法、表结构差异、能力清单以及退役/清单/收集器三个文件的新增行;未读契约差异、重新生成的 TypeScript 客户端、两个模型类、schema 目录与投影的差异、新增的 168 行移除测试,以及大部分测试文件的删减。本轮 triage 尚无阶段结论,因此不存在需要复核的机器人或维护者意见,本评审未继承任何人的结论。

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓ — every required heading is present, the Tested-on table is filled in honestly, and the English and Chinese bodies match.

Problem: observed, not theoretical. The dependency (#15865, merged as 89d3aae) is this PR's base, and the only in-repo consumer of these routes was already asking for the live path: java-managed-agent-provider.ts sent view: 'messages' on both the transcript and export calls. So the persisted snapshot copy was already bypassed by its own client — this removes a second copy of conversation history that nothing reads any more, plus the background build/refresh/collect work that kept it alive. That is a real cost (repeated whole-history copies, obsolete SQL, extra CSI surface), not a hypothetical.

Direction: aligned. Net −1636 lines, and it removes surface rather than adding it. The part a reviewer should focus on is that this does touch a public contract: the OpenAPI version moves 1.97.0 → 1.98.0, the optional view selector disappears from two WebShell request schemas, the public Items route gains 413 and 503 responses, and snapshot_through_sequence / the snapshots capability are kept as wire names with redefined meaning. That is legitimate under this module's written policy (edit the canonical V1 baseline and the first-release contract in place before the first formal Managed Agent release, no V2 migration, no schema-version bump). On the version I checked both spec files directly — main is at 1.97.0, this head at 1.98.0 — and the scheduled SDK Java Contract Open PRs scan reports the same thing ("1.98.0 is unique against main"); note that scan runs against main on a timer, it is not a check on this commit. I am not escalating the contract surface as a direction question: the author holds admin on this repo and the change follows the documented policy. But it is where a reviewer's attention is best spent.

Size: the core-path check applies (changes span packages/managed-agent-server and packages/web-shell). Breakdown of the 3814 changed lines:

  • production Java/TS logic: 1693 (1690 under src/main/java, 3 in the WebShell provider)
  • SQL baseline + OpenAPI contract: 128 (43 + 85)
  • tests: 1766 (Java src/test, one TS test, one TSV fixture)
  • generated: 41 (web-shell/.../generated/managed-agent-api.ts)
  • docs: 186 (two new design docs ×2 languages, README, two supersession notes)

Production logic is above the 1000-line advisory, so noting it as the skill requires — but splitting is not feasible here: a partial removal is exactly the state the design doc says must not exist (readers, writers, retention jobs and CSI checks still referring to an absent object). Tier 1's large-refactor hard block does not apply because the PR is maintainer-authored (doudouOUC has admin on this repo), and the fork-refactor approval guardrail does not apply because it is a same-repository branch.

Approach: the scope feels right and I did not find a materially simpler path — you cannot drop the table without dropping its readers, writers, retention paths and integrity branches. No drive-by refactors or unrelated churn; every file I traced is there because the removal requires it. Two judgment calls worth naming before the code review:

  1. ManagedSchemaCatalog.validateGeneratedColumns loses its OR-commutation tolerance. That follows from projection_pending losing its OR term, so it is in scope — but the design doc records this validator change and its new diagnostic tests as uncompiled and unrun.
  2. WebShellTranscriptRequest gains @Size/@Min/@Max, and the published transcript limit ceiling drops from 1000 to 100 (the contract test's limit:1000 case was changed to limit:100). It is coherent with the pager's own 1..100 guard, and the new cursor bound closes a drift the spec already promised — but a 1000 → 100 ceiling on a public route is a contract narrowing that the "Breaking changes / migration notes" bullet does not currently mention.

Risk: no elevated risk signals — none of the changed files match the revert-correlated high-risk paths. Not a TUI surface, so the terminal-capture lane is not the relevant one here.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓ —— 所有必需标题都在,测试平台表格如实填写,中英文正文一致。

问题: 是已观测到的问题,不是理论性加固。依赖 #15865(以 89d3aae 合并)就是本 PR 的 base,而仓库内唯一的调用方本来就已经在走实时路径:java-managed-agent-provider.ts 在 transcript 和 export 两处都传了 view: 'messages'。也就是说持久化快照副本早已被它自己的客户端绕过——本 PR 移除的是一份没人再读的历史副本,以及维持它的后台构建/刷新/回收逻辑。这是真实成本(反复复制完整历史、残留 SQL、多余的 CSI 校验面),不是假设。

方向: 对齐。净减少 1636 行,是在减少接口面而不是增加。评审最该关注的地方是它确实动了公开契约:OpenAPI 版本 1.97.0 → 1.98.0,两个 WebShell 请求 schema 里的可选 view 选择项消失,公开 Items 路由新增 413 和 503 响应,snapshot_through_sequence 和 snapshots 能力位保留为线格式名称但含义重定义。按本模块成文政策这是允许的(首次正式发布前原地修改 canonical V1 基线和首发契约,不加 V2 迁移、不提升 schema 版本)。版本这一点我直接对比了两份 spec 文件——main 是 1.97.0,本 head 是 1.98.0——定时任务 SDK Java Contract Open PRs 也给出同样结论("1.98.0 is unique against main");但要说明该扫描是定时针对 main 跑的,不是本 commit 上的检查。我不会把契约面作为方向问题上报:作者在本仓库持有 admin 权限,改动也符合成文政策。但这确实是评审精力最该放的地方。

规模: 触发核心路径检查(改动跨 packages/managed-agent-server 和 packages/web-shell)。3814 行改动构成:

  • 生产 Java/TS 逻辑:1693(src/main/java 1690,WebShell provider 3)
  • SQL 基线 + OpenAPI 契约:128(43 + 85)
  • 测试:1766(Java src/test、一个 TS 测试、一个 TSV 夹具)
  • 生成文件:41(web-shell/.../generated/managed-agent-api.ts)
  • 文档:186(两篇新设计文档的双语版本、README、两处替代说明)

生产逻辑超过 1000 行建议阈值,按要求说明一下——但这里不适合拆分:部分移除恰好是设计文档明确不允许出现的状态(读方、写方、保留任务和 CSI 校验仍引用一个已不存在的对象)。Tier 1 的大规模 refactor 硬拦截不适用,因为本 PR 由维护者提交(doudouOUC 在本仓库持有 admin);fork-refactor 审批护栏也不适用,因为这是同仓库分支。

方案: 范围合理,我也没找到更简的路径——删表就必须删掉它的读方、写方、保留路径和校验分支。没有顺手重构或无关改动;我追踪到的每个文件都是移除本身所必需的。进入代码审查前点名两个判断:

  1. ManagedSchemaCatalog.validateGeneratedColumns 去掉了 OR 交换容差。这是 projection_pending 丢掉 OR 项的必然结果,属于范围内——但设计文档记录了该校验器改动及其新增诊断测试尚未编译、尚未运行。
  2. WebShellTranscriptRequest 新增 @Size/@Min/@Max,且公开的 transcript limit 上限从 1000 降到 100(契约测试里的 limit:1000 用例改成了 limit:100)。这与分页器自身 1..100 的约束一致,新增的 cursor 约束也补上了 spec 早已承诺但实现缺失的部分——但公开路由上 1000 → 100 的上限收窄属于契约变更,目前"兼容变化与迁移说明"里没有提到。

风险: 无升级风险信号——改动文件均未命中与回滚相关的高风险路径。不是 TUI 界面,因此终端截图不是这里对应的验证通道。

进入代码审查 🔍

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

Reviewed at 6851d1a8c10c46fca4cbf08d4c5f51997c784753 · re-run with @qwen-code /triage

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Code review

I read the whole diff statically and cross-checked it against the base tree. No PR code was built or executed — this run is unattended CI, so everything below comes from the diff, the base tree, and the post-PR files fetched read-only through the API at 6851d1a8.

Blocking

1. Unused import will redden this module's Checkstyle gate. @doudouOUC

packages/managed-agent-server/src/main/java/com/alibaba/qwen/code/managedagent/persistence/WorkspaceCsiApplicationInventory.java line 4 still imports com.alibaba.qwen.code.managedagent.model.StoreModels. Its only use in that file was StoreModels.ItemRecord previous = null; inside the snapshot(Row manifestRow) method this PR deletes; at the reviewed head a word-boundary search for StoreModels matches line 4 and nothing else (ItemRecord no longer appears in the file at all). The other StoreModels-looking hits are ManagedSessionStoreModels, a different type.

That is a UnusedImports violation, and it is enforced on this file:

  • packages/sdk-java/qwencode/qwen-code-checks.xml:98 declares <module name="UnusedImports" /> inside the TreeWalker.
  • packages/managed-agent-server/pom.xml points the main checkstyle execution at that config with includeTestSourceDirectory=true and excludes only com/alibaba/qwen/code/runtimebroker/**, so managedagent/persistence is in scope. (The lighter checkstyle.xml used for the runtimebroker execution is not the one that applies here.)
  • .github/workflows/sdk-java.yml runs mvn checkstyle:check checkstyle:check@runtime-broker-checkstyle in its "Run Managed Agent Server Checkstyle" step, gated on matrix.os == 'ubuntu-latest' && matrix.java == '21' — and the fast tier's matrix is exactly [{"os":"ubuntu-latest","java":"21"}], so the tier that managed-agent-gate.yml selects for a pull_request hits it.

Fix is one line: delete the import. Removing it leaves the * group alphabetically ordered and correctly separated, so ImportOrder stays happy.

I scanned all 42 surviving changed Java files at head for the rest of the Checkstyle surface rather than assuming this was the only one: UnusedImports, FileTabCharacter, trailing whitespace, CR, blank-line-after-{, blank-line-before-}, three-or-more consecutive blank lines, and newline-at-EOF. This is the only violation.

Non-blocking

2. The transcript limit ceiling narrows from 1000 to 100 on a public route, and the migration notes don't say so. The head spec sets WebShellTranscriptRequest.limit.maximum to 100 where main has 1000, ApiModels adds the matching @Min(1) @Max(100), and ManagedAgentApiContractTest changes its limit:1000 case to limit:100. It is the right call — findMessagePage already throws invalid_limit outside 1..100, so leaving the spec at 1000 would just move the 400 from bean validation to the store — but a caller that legitimately sent limit: 1000 yesterday now gets rejected. Worth one line under "Breaking changes / migration notes". The @Size(max = 4096) added to cursor is the opposite case: the spec already promised maxLength: 4096 and the implementation didn't enforce it, so that one closes a real drift.

3. A client still sending "view": "messages" now gets it silently ignored rather than the old @Pattern-driven 400 (Spring doesn't fail on unknown properties by default, while the schema says additionalProperties: false). For migration that is arguably the friendlier behavior — the removed test asserted the 400 for view: "unknown" and was correctly deleted — but the spec and the runtime now disagree about unknown fields. Fine either way; just make sure it is a decision rather than an accident.

4. Stale references in historical docs. ma_snapshot / ManagedSnapshotStore / snapshot_stale_since / current_snapshot_id still appear in docs/design/2026-10-20-automation-stream-gap.md (+ zh), 2026-10-13-managed-schema-consolidation.md (+ zh), 2026-10-26-managed-native-journal-snapshots.md (+ zh), 2026-10-19-managed-session-bounded-retention.md (+ zh), 2026-10-02-managed-agent-query-amplification.md (+ zh), managed-agent-delivery-ledger.md (+ zh), and docs/archive/managed-agent-schema/sql/V38__managed_snapshot_deferral_marker.sql. Those are point-in-time records and the archive is intentionally frozen, so leaving them is defensible — and this PR does add reciprocal supersession notes to the 2026-10-29-managed-live-message-pages pair, which is the right precedent. Not asking for a sweep.

What I verified as clean

Worth writing down, because for a 54-file removal the natural worry is dangling references and I checked them exhaustively rather than sampling:

  • No untouched code file references any removed symbol. I resolved every removed identifier against the whole base tree and subtracted the changed-file list: ManagedSnapshotStore, ma_snapshot, snapshot_stale_since, current_snapshot_id, snapshot_page_ordinal|first_sequence|last_sequence, managed-snapshot-page, managed-snapshot-manifest, SnapshotPage, SnapshotRecord, ResourceOwnerKind.SNAPSHOT, ManagedSchemaProjection.SNAPSHOT, findSnapshot, findSnapshotPage, findRecentSnapshotPage, findSnapshotCoveredSequences, SNAPSHOT_REFRESH_EVENTS, CURSOR_LIFETIME_MILLIS, decodePage, snapshotRefreshRequired, tailEvents, transcriptCursor, plus every dropped constraint and index name. The only remaining hits are the historical docs above, the frozen archive SQL, and two unrelated TypeScript symbols that share a name (findSnapshot( in packages/core/src/services/fileHistoryService.ts, transcriptCursor in packages/cli/src/serve/routes/session.ts).
  • The narrowed ck_ma_ref_owner CHECK is safe. Every "SNAPSHOT" owner-kind literal is gone from production (ManagedProjectionResourceCollector.release, WorkspaceCsiApplicationInventory) and from all three tests that used it (WorkspaceCsiRetainedArtifactsTest, WorkspaceSchemaConsolidationTest, ManagedSchemaBusinessStoreTest), so nothing can still try to insert a value the constraint no longer accepts. NATIVE_SNAPSHOT is retained everywhere it belongs, including the new test's positive assertion.
  • The interface and its implementor agree. AgentStateStore declares both findMessagePage overloads, so both @Overrides in ManagedAgentStore are valid, and ManagedAgentStore is the interface's only implementor — no test double is left implementing removed methods.
  • The rebuilt dynamic SQL in findMessagePage is correct. The pageArguments order (scope, tenant, session, position.through(), optional afterSequence, position.sequence() ×2, item identity, limit + 1) matches the placeholder order in the query exactly, including the conditional AND m.first_sequence > ? that only exists when numericBoundary is true. afterSequence < 0 is rejected with invalid_event_cursor, and cursor precedence over numeric after matches what the spec now says. The 5-arg overload carries the same @Transactional(readOnly = true, REPEATABLE_READ) as the 6-arg it delegates to, so self-invocation bypassing the proxy does not silently drop the isolation level.
  • Replay-floor semantics survived the removal. advanceReplayFloor still clamps to readable coverage (now ma_event_stream.covered_sequence instead of the published snapshot's) and to the active-Turn start; dropping the retained-published-snapshot clamp is correct precisely because nothing retains a snapshot any more. findReplayWindow and findMessageCoveredSequences now read a NOT NULL column, and the 404-on-empty path is preserved.
  • projection_pending is consistent in all three places that encode it: the DDL expression, findMaterializationTargets (which also dropped the now-unbound snapshot_stale_since parameter), and validateGeneratedColumns (whose OR-commutation tolerance is now unreachable, so removing it is a tightening, not a weakening).
  • The table count is right. The head V1__managed_schema.sql has exactly 38 CREATE TABLE statements against 39 on main, ManagedSchemaContract's business list has 38 entries, and the README's stale "32-table baseline" is corrected to 38 in all three places it appears. Nice catch on the pre-existing doc drift.
  • The contract file is coherent. It parses (121 paths), no view or ma_snapshot survives anywhere in it, and the #/components/responses/PayloadTooLarge that the public Items route now $refs for its new 413 does exist.
  • WebShell is consistent. Generated types were regenerated rather than hand-edited, the provider stops sending view: 'messages' in both places, its test was updated, and the untouched java-managed-agent-client.ts only uses the two request types as parameter types and never set view — so it still typechecks. SurfaceRegistry needs no change: it declares method, path, capability and rule class only, not request fields, so SurfaceRegistryGateTest is unaffected.
  • The new regression test compiles against real API shapes and is load-bearing. Its 6-arg ManagedAgentStore call matches the single public constructor exactly, CommittedEventPublisher is a one-method interface so the ignored -> {} lambda is valid, and ManagedSchemaJdbcTemplate exists. The three cases actually pin the change: schema absence plus ManagedSchema.validate, materialization/replay coverage with no snapshot copies, and the collector reclaiming a replaced message body while preserving a NATIVE_SNAPSHOT reference. ManagedAgentApiContractTest already imports Duration and awaitility.await, so the new await() fixture is fine, and its two rewritten sentence assertions match the head spec's description text verbatim.
  • Residual snapshot strings inside changed files are all negative assertions (doesNotContain, count(...) isZero) — intentional, and exactly what a removal test should say.

The new default read path

The flow change is the part most worth a picture, since the transcript's first page changes meaning (whole retained history → at most limit recent Items) and the SSE handoff now keys off real projection coverage:

sequenceDiagram
    participant P1 as Client (WebShell or public API)
    participant P2 as WebShellAgentController
    participant P3 as ManagedAgentService
    participant P4 as ManagedAgentStore
    participant P5 as ma_message and ma_event_stream
    P1->>P2: transcript or export or items (limit 1 to 100)
    P2->>P3: transcript / exportPage / listPublicItems
    P3->>P3: requireReadableSession (authorization on every page)
    P3->>P4: findMessagePage(cursor, limit, backward, afterSequence)
    P4->>P5: bounded keyset page plus projection generation check
    P5-->>P4: items, coveredSequence, throughSequence
    P4-->>P3: MessagePage
    P3-->>P1: items plus resume watermark (first request fixes the membership bound)
    P1->>P2: events/stream afterSequence = watermark
    P2-->>P1: SSE resumes from actual projected coverage
    Note over P3,P1: coverage below the replay floor, or a lagging initial projection, returns retryable message_projection_pending
Loading
Files changed (30 of 54 shown)

…/managedagent/ stands for packages/managed-agent-server/src/{main,test}/java/com/alibaba/qwen/code/managedagent/.

File What changed
…/resources/db/managed-schema/V1__managed_schema.sql Drops the ma_snapshot table, its two indexes, its FK to ma_resource and the stream FK; removes current_snapshot_id and snapshot_stale_since from ma_event_stream; removes the four snapshot page columns, their unique key, their CHECK and their lookup index from ma_resource; narrows ck_ma_ref_owner; simplifies the projection_pending generated column.
…/resources/openapi/managed-agent-public-api.openapi.json Contract 1.97.0 to 1.98.0. Removes the view selector, adds 413 and 503 to the public Items route, rewrites the transcript, export and recent-Items descriptions to live-paging semantics, and re-documents the retained snapshot-named fields as coverage or membership bounds.
…/managedagent/persistence/ManagedSnapshotStore.java Deleted outright, 921 lines: building, publishing, paging, recent paging, manifest and page codec, cursor signing and lifetime.
…/managedagent/persistence/ManagedAgentStore.java The substantive change. Removes the snapshot delegate and refresh thresholds, replaces findSnapshotPage and findRecentSnapshotPage with a new afterSequence-aware findMessagePage overload, repoints covered-sequence and replay-window reads at ma_event_stream, drops the protected-snapshot clamp from the floor advance, and removes the snapshot branches from materialization, rebuild and retirement.
…/managedagent/persistence/WorkspaceCsiApplicationInventory.java Removes the ma_snapshot declaration and its whole validation branch, the snapshot resource kinds, the SNAPSHOT owner allowance, the four dropped columns from the absent-field checks, and the two switch cases. Carries the unused import flagged above.
…/managedagent/persistence/ManagedProjectionResourceCollector.java Collector now handles message-part bodies only: drops the snapshot kinds, the removeSnapshot path and the whole expireSnapshots scan. Retains lease, recovery and active-operation protection unchanged.
…/managedagent/persistence/ManagedSessionRetirementStore.java Removes the snapshot batch from retirement deletion and the snapshot_stale_since reset from the coverage update.
…/managedagent/session/ManagedAgentService.java Repoints public Items, export, transcript and recent Items at the message pager, folds messageTranscript into transcript and makes messageExportPage private, drops the tail-event walk and the transcript cursor parser, and renames the covered-sequence call.
…/managedagent/session/AgentStateStore.java Interface follows: removes the two snapshot page methods and findSnapshot, adds the afterSequence overload, renames the covered-sequence method, re-documents the floor contract.
…/managedagent/session/ReplayFloorAdvancer.java Comment and javadoc now describe projection coverage instead of snapshot proof; the MAX_VALUE request is unchanged and still clamped by the store.
…/managedagent/session/ReplayCursorExpired.java Javadoc only: resynchronization now means reloading the live projection, with a retry while it rebuilds.
…/managedagent/api/WebShellAgentController.java Deletes the three view=messages branches so the message path is the only path.
…/managedagent/model/ApiModels.java Drops the view field and the convenience constructors from both request records, and adds the cursor and limit bounds to the transcript request.
…/managedagent/model/StoreModels.java Removes SnapshotPage and SnapshotRecord; re-documents ReplayWindow's retained field name.
…/runtimebroker/managedschema/ManagedSchemaContract.java ma_snapshot out of the business table list, SNAPSHOT out of ResourceOwnerKind.
…/runtimebroker/managedschema/ManagedSchemaProjection.java Removes the SNAPSHOT projection and the dropped columns from the EVENT_STREAM and RESOURCE column lists.
…/runtimebroker/managedschema/ManagedSchemaCatalog.java Removes the projection_pending OR-commutation tolerance from generated-column validation.
…/runtimebroker/managedschema/ManagedSchemaRows.java Drops snapshot_id and current_snapshot_id from the identity column set.
packages/managed-agent-server/README.md Rewrites the paging and cursor prose, corrects the GC owner list to native journal snapshots, notes the collector's public-body exception, and fixes the stale 32-table baseline to 38 in three places.
packages/web-shell/client/components/managed/generated/managed-agent-api.ts Regenerated: view removed from both request schemas, snapshot-named fields re-described, transcript and export operation docs updated.
packages/web-shell/client/components/managed/java-managed-agent-provider.ts Two lines: stops sending view on the export and transcript calls now that it is the default.
packages/web-shell/client/components/managed/java-managed-agent-provider.test.ts Drops the view expectation from the matching assertion.
…/managedagent/persistence/ManagedMessageSnapshotRemovalTest.java New, 168 lines, three H2 cases: schema absence plus validate, materialization and replay coverage without snapshot copies, and collector behavior against a preserved native snapshot reference.
…/managedagent/ManagedAgentApiContractTest.java Renames and rewrites the pinned transcript sentence, waits for the message query before the export drift case, drops the unknown-view 400, and moves the transcript limit case from 1000 to 100.
…/managedagent/persistence/ManagedSchemaSessionStoreTest.java Largest test rewrite (154/291): snapshot-backed expectations replaced with message-paging and coverage expectations.
…/managedagent/session/Issue13181QueryBudgetTest.java Query budgets recomputed (83/318) now that snapshot reads and writes are gone; asserts zero ma_snapshot traffic.
…/managedagent/persistence/WorkspaceCsiRetainedArtifactsTest.java CSI retained-artifact expectations rebuilt around message and native owners (92/60).
…/runtimebroker/managedschema/ManagedSchemaTest.java Schema expectations updated and the new generated-column diagnostics added (22/95).
docs/design/2026-10-29-managed-message-snapshot-removal.md New design doc: scope, proposed behavior per subsystem, affected components, validation status, decisions and boundaries.
docs/design/2026-10-29-managed-message-snapshot-removal.zh-CN.md Chinese counterpart, same structure and same candid validation-status section.
…and 24 more files Remaining Java test updates (paging, pool, lock order, retirement, replay floor, schema and MySQL ITs), the legacy table map fixture, and the two superseded live-message-pages design docs.

Test evidence

What this section carries: the PR's own CI, read through the API for the reviewed commit. Nothing was built, run or checked out here — this is an unattended pull_request_target run, so per the gate's rules PR-derived code is never executed. Real-scenario tmux testing is not applicable on this path and was not attempted.

The result is the main problem with this PR right now: there is no PR CI on the reviewed commit at all. 6851d1a8c10c46fca4cbf08d4c5f51997c784753 was force-pushed at 2026-10-29T16:20:47Z, and every one of the 30 check-runs attached to it belongs to a pull_request_target bot workflow — this triage run, the review run, authorization, assignment, labeling and the force-push reminder, plus 19 skipped bot jobs. Querying workflow runs for the head SHA returns zero runs with event == "pull_request", so neither Qwen Code CI nor Managed Agent gate has fired on this tree. The previous head 3acf733ef1f8 did get two pull_request runs ("Managed Agent reference PR #15870 dry run" and "tui-parity", both success), and neither of those two workflows compiles this module — so no revision of this PR has ever had the Java gate run against it.

That matters concretely: the Managed Agent gate fast tier is what runs mvn clean test and mvn checkstyle:check for packages/managed-agent-server, and it is the check that would have caught finding 1 before a human read the diff.

Not verified, with reasons:

  • not verified: compilation of the reviewed tree — no pull_request run exists on this SHA, and the gate does not build PR code. My import, signature and interface checks above are static reasoning, which is strong for the things I could enumerate and no substitute for javac on the whole module.
  • not verified: unit/H2 suite, Checkstyle, SpotBugs, and the MySQL paging/concurrency profiles — same reason. The design doc itself records the MySQL Session-schema group as interrupted and the dedicated message-paging group as never started.
  • not verified: the validateGeneratedColumns tightening and its new diagnostics in ManagedSchemaTest. The author states these are uncompiled and unrun, and whether H2 and MySQL both normalize last_sequence > covered_sequence to a token stream that matches the DDL exactly is precisely the kind of thing only a real run settles.
  • not verified: live Managed HTTP, browser and end-to-end behavior. The PR body explicitly claims none, which I think is the right call.

For the record, the PR body reports historical local numbers (build/typecheck/bundle passing, 318 WebShell cases, 835 unit/H2 cases with one fixture error, 141 MySQL cases with one fixture error, both fixtures corrected without a rerun). Those are the author's own claim about earlier attempts on an earlier tree, not evidence for this commit, and the body says so itself — it states plainly that they do not prove the rebased tree passes and that the closed local Java budget was not reopened. I am not treating them as test results.

Per this module's own policy, acceptance is pending: the required CI gates have not run on the revision under review.

Checks attached to 6851d1a8 at review time. None of them is PR CI — every row is pull_request_target bot orchestration, and 19 further bot jobs reported skipped:

Check Conclusion
triage ⏳ in progress (this bot)
review-pr ⏳ in progress (this bot)
authorize ✅ success
assign ✅ success
label ✅ success (one superseded run cancelled)
Remind on force-push ✅ success
Qwen Code CI ⛔ no run on this commit
Managed Agent gate ⛔ no run on this commit

Sandboxed verification would settle this: @qwen-code /verify — the central claim is behavioural, and nothing above substantiates it. Specifically, that the first transcript page now returns at most limit recent Items with coveredSequence equal to real projection coverage (so an SSE client cannot skip an unmaterialized tail), that a lagging initial projection returns retryable message_projection_pending instead of an incomplete page, that the numeric after boundary excludes first_sequence == after while equal-sequence Items still appear on later pages, and that a projection rebuild invalidates message cursors without lowering the replay floor. None of that is observable from the diff, and with no CI on this head there is not even a green suite to question. The author has write access, so /verify runs directly; /tmux is the wrong lane here since nothing in this change is a TUI surface.

中文说明

代码审查

我静态读完了整个 diff,并与 base 代码树交叉核对。没有构建或执行任何 PR 代码——本次是无人值守 CI 运行,以下结论来自 diff、base 代码树,以及通过 API 只读获取的 6851d1a8 版本文件。

阻塞项

1. 一个未使用的 import 会让本模块的 Checkstyle 门禁变红。 @doudouOUC

WorkspaceCsiApplicationInventory.java 第 4 行仍然 import 了 StoreModels。该文件中它唯一的使用点是本 PR 删除的 snapshot(Row manifestRow) 方法里的 StoreModels.ItemRecord previous = null;;在受审 head 上按单词边界搜索 StoreModels 只命中第 4 行(ItemRecord 在文件中已完全不出现)。其他看起来像的命中是 ManagedSessionStoreModels,属于不同类型。

这构成 UnusedImports 违规,且该文件确实在检查范围内:qwen-code-checks.xml:98 在 TreeWalker 中声明了该模块;模块 pom 的主 checkstyle execution 指向这份配置、includeTestSourceDirectory=true,且只排除 com/alibaba/qwen/code/runtimebroker/**;CI 的 "Run Managed Agent Server Checkstyle" 步骤执行 mvn checkstyle:check,其条件是 ubuntu-latest + Java 21,而 fast tier 的 matrix 正好就是这一组合,即 pull_request 选中的那一档会跑到它。

修复只需一行:删掉该 import。删除后 * 分组仍按字母序且分隔正确,ImportOrder 不受影响。

我没有假定只有这一处,而是对 head 上全部 42 个存留的改动 Java 文件扫描了其余 Checkstyle 面(UnusedImports、FileTabCharacter、行尾空格、CR、{ 后空行、} 前空行、连续三行空行、文件末尾换行)。只有这一处违规。

非阻塞项

2. transcript 的 limit 上限在公开路由上从 1000 收窄到 100,迁移说明里没写。 head spec 把 WebShellTranscriptRequest.limit.maximum 设为 100(main 是 1000),ApiModels 加了对应的 @Min(1) @Max(100),契约测试的 limit:1000 用例改成了 limit:100。这个方向是对的——findMessagePage 本来就会在 1..100 之外抛 invalid_limit,spec 留在 1000 只会把 400 从参数校验挪到 store 层——但昨天还合法发送 limit: 1000 的调用方现在会被拒。建议在"兼容变化与迁移说明"里补一行。cursor 新增的 @Size(max = 4096) 是相反情况:spec 早已承诺 maxLength: 4096 而实现没约束,这一处补上了真实的契约漂移。

3. 客户端如果仍然发送 "view": "messages",现在会被静默忽略,而不再触发原来 @Pattern 的 400(Spring 默认不因未知属性失败,而 schema 写的是 additionalProperties: false)。就迁移而言这也许更友好——被删掉的测试断言的正是 view: "unknown" 返回 400,删得对——但 spec 与运行时在未知字段上现在不一致。两种选择都可以,只希望这是有意识的决定。

4. 历史文档中的过期引用。 ma_snapshot / ManagedSnapshotStore / snapshot_stale_since / current_snapshot_id 仍出现在 2026-10-20-automation-stream-gap、2026-10-13-managed-schema-consolidation、2026-10-26-managed-native-journal-snapshots、2026-10-19-managed-session-bounded-retention、2026-10-02-managed-agent-query-amplification、managed-agent-delivery-ledger(均含中文版)以及 docs/archive/managed-agent-schema/sql/V38__managed_snapshot_deferral_marker.sql 中。它们是时点记录,archive 是刻意冻结的,保留可以理解——而且本 PR 已给 2026-10-29-managed-live-message-pages 双语两篇加了互相指向的替代说明,这是正确的先例。不要求做一轮清扫。

已核对为干净的部分

值得写下来,因为 54 文件的删除最怕悬挂引用,而我是穷举核对而非抽样:

  • 没有任何未改动的代码文件引用被删符号。 我把每个被删标识符在整棵 base 树上解析后减去改动文件清单:ManagedSnapshotStore、ma_snapshot、snapshot_stale_since、current_snapshot_id、三个 snapshot_page_*、两种 managed-snapshot-* 资源 kind、SnapshotPage、SnapshotRecord、ResourceOwnerKind.SNAPSHOT、ManagedSchemaProjection.SNAPSHOT、findSnapshot/findSnapshotPage/findRecentSnapshotPage、findSnapshotCoveredSequences、SNAPSHOT_REFRESH_EVENTS、CURSOR_LIFETIME_MILLIS、decodePage、snapshotRefreshRequired、tailEvents、transcriptCursor,以及所有被删的约束和索引名。剩余命中只有上述历史文档、冻结的 archive SQL,以及两个同名的无关 TypeScript 符号。
  • 收窄后的 ck_ma_ref_owner CHECK 是安全的。 生产代码和三个相关测试里的 "SNAPSHOT" owner kind 字面量全部消失,不会再有代码尝试插入约束已不接受的值;NATIVE_SNAPSHOT 在应在的地方都保留,新测试里也有正向断言。
  • 接口与实现一致。 AgentStateStore 声明了两个 findMessagePage 重载,ManagedAgentStore 两处 @Override 都成立,且它是该接口唯一实现,没有测试替身残留已删方法。
  • findMessagePage 重建后的动态 SQL 正确。 pageArguments 的顺序与查询占位符顺序完全对应,包括仅在 numericBoundary 为真时存在的 AND m.first_sequence > ?;afterSequence < 0 会以 invalid_event_cursor 拒绝;cursor 优先于数字 after,与 spec 新表述一致。5 参重载带有与 6 参相同的 @Transactional(readOnly = true, REPEATABLE_READ),因此自调用绕过代理不会悄悄丢掉隔离级别。
  • replay floor 语义在移除后仍然成立。 advanceReplayFloor 仍夹在可读水位(现在是 ma_event_stream.covered_sequence)与活跃 Turn 起点之间;去掉"受保护已发布快照"这一夹取是正确的,因为已无快照需要保护。findReplayWindow 与 findMessageCoveredSequences 现在读的是 NOT NULL 列,空结果 404 的路径保留。
  • projection_pending 在三处编码保持一致:DDL 表达式、findMaterializationTargets(同时去掉了不再绑定的参数)、validateGeneratedColumns(其 OR 交换容差已不可达,删除是收紧而非放松)。
  • 表数正确。 head 的 V1 恰好 38 个 CREATE TABLE(main 是 39),ManagedSchemaContract 业务表列表 38 项,README 中三处陈旧的"32-table baseline"都改成了 38。顺手修掉了既有的文档漂移,很好。
  • 契约文件自洽。 可解析(121 个 path),全文再无 view 或 ma_snapshot,公开 Items 路由新增 413 所 $ref 的 PayloadTooLarge 响应组件确实存在。
  • WebShell 一致。 生成类型是重新生成而非手改;provider 两处都不再发送 view;对应测试已更新;未改动的 java-managed-agent-client.ts 只把两个请求类型当参数类型用、从未设置 view,因此仍能通过类型检查。SurfaceRegistry 无需改动:它只声明 method、path、capability 和 rule class,不声明请求字段,SurfaceRegistryGateTest 不受影响。
  • 新回归测试能对着真实 API 形状编译,且是有承载力的。 它的 6 参 ManagedAgentStore 调用与唯一的公开构造器完全匹配,CommittedEventPublisher 是单方法接口所以 ignored -> {} 合法,ManagedSchemaJdbcTemplate 存在。三个用例确实钉住了变更:schema 缺失加 ManagedSchema.validate、无快照副本下的物化与重放水位、以及在保留 NATIVE_SNAPSHOT 引用前提下回收被替换的消息正文。ManagedAgentApiContractTest 本就 import 了 Duration 和 awaitility.await,新增的 await() 夹具没问题;两处改写的句子断言与 head spec 的描述文本逐字相符。
  • 改动文件中残留的 snapshot 字符串全部是反向断言(doesNotContain、count(...) isZero)——是刻意的,也正是移除类测试应该说的话。

测试证据

本节承载的内容: 通过 API 读取的、针对受审 commit 的 PR 自身 CI。这里没有构建、运行或 checkout 任何东西——本次是无人值守 pull_request_target 运行,按门禁规则绝不执行 PR 代码。真实场景 tmux 测试在此路径不适用,也未尝试。

结论是这个 PR 目前最大的问题:受审 commit 上完全没有 PR CI。 6851d1a8c10c46fca4cbf08d4c5f51997c784753 于 2026-10-29T16:20:47Z 强推,其上 30 个 check-run 全部属于 pull_request_target 机器人工作流——本次 triage、review、授权、指派、打标签、强推提醒,外加 19 个 skipped 的机器人 job。按 head SHA 查询 workflow run,event == "pull_request" 的运行数为 0,即 Qwen Code CI 和 Managed Agent gate 都没有在这棵树上触发。上一个 head 3acf733ef1f8 确实有两个 pull_request 运行("Managed Agent reference PR #15870 dry run" 与 "tui-parity",均 success),但这两个工作流都不编译本模块——所以本 PR 的任何修订都从未跑过 Java 门禁。

这一点的具体影响是:Managed Agent gate 的 fast tier 才是对 packages/managed-agent-server 执行 mvn clean test 和 mvn checkstyle:check 的那一档,也正是本可在人类读 diff 之前就抓到第 1 条问题的检查。

未验证项及原因:

  • 未验证: 受审代码树能否编译——该 SHA 上不存在 pull_request 运行,且门禁不构建 PR 代码。上文的 import、签名与接口检查都是静态推理,对我能穷举的部分很强,但替代不了整个模块的 javac。
  • 未验证: 单元/H2 套件、Checkstyle、SpotBugs、MySQL 分页/并发 profile——原因同上。设计文档自己也记录了 MySQL Session-schema 组被中断、专门的消息分页组未开始。
  • 未验证: validateGeneratedColumns 的收紧及 ManagedSchemaTest 中新增的诊断。作者说明它们未编译未运行,而 H2 与 MySQL 是否都会把 last_sequence > covered_sequence 归一化成与 DDL 完全一致的 token 序列,正是只有真实运行才能定论的事。
  • 未验证: 实时 Managed HTTP、浏览器与端到端行为。PR 正文明确未声明这些,我认为这个处理是对的。

需要说明的是,PR 正文报告了历史本地数据(build/typecheck/bundle 通过、318 项 WebShell、835 项单元/H2 含一项夹具错误、141 项 MySQL 含一项夹具错误,两处夹具修正后未重跑)。这些是作者对更早代码树上更早尝试的自述,不构成本 commit 的证据,正文自己也是这么说的——它明确指出这些结果不能证明重放后的代码树通过,且已关闭的本地 Java 额度未重开。我没有把它们当作测试结果。

按本模块自身政策,验收处于待定状态:受审修订上所需 CI 门禁尚未运行。

沙箱验证可以定论这件事:@qwen-code /verify——本 PR 的核心主张是行为性的,而上文没有任何东西能证实它。具体要验的是:transcript 首页现在最多返回 limit 条最近 Item 且 coveredSequence 等于真实投影水位(因此 SSE 客户端不会跳过未物化尾部);初始投影落后时返回可重试的 message_projection_pending 而不是不完整的一页;数字 after 边界排除 first_sequence == after,同时相同序号的 Item 仍会出现在后续页;投影重建会使消息游标失效但不降低 replay floor。这些都无法从 diff 看出,而当前 head 连一份可供质疑的绿色套件都没有。作者有写权限,/verify 可直接触发;/tmux 在这里不是合适通道,因为本次改动没有任何 TUI 界面。

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

Reviewed at 6851d1a8c10c46fca4cbf08d4c5f51997c784753 · re-run with @qwen-code /triage

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Confidence: 2/5 — the design is right and the removal is unusually thorough, but as of this commit it cannot merge: one verified Checkstyle failure that will redden the module's own Java gate, and no PR CI has run on this tree at all.

Stepping back. Before reading the diff I wrote down what I would do given only the title and the "Why it's needed" section: drop the table and its DDL objects, delete the snapshot store, repoint the three public read paths at the message pager that #15865 already landed, narrow the owner-kind enum and the CSI declarations, simplify projection_pending and the floor/materialization queries that consulted snapshot state, regenerate the WebShell types, bump the contract version, add a removal regression test. That is essentially this PR. I did not find a materially simpler path, and the one tradeoff I would have flagged up front — the transcript's first page stops meaning "whole retained history" and starts meaning "at most limit recent Items" — is handled: the spec, the README, the pinned contract sentence and the client all moved together, and the client was already requesting the message view, so no consumer is surprised.

The removal discipline is the part I'd thank the author for in six months. I went looking for the failure mode these PRs usually have — a symbol deleted here and still referenced in a file nobody touched — and there isn't one. Every removed identifier resolves cleanly against the base tree; the only survivors are point-in-time design docs and the frozen archive migration. The narrowed ck_ma_ref_owner constraint has no remaining writer of the removed value, the interface and its single implementor agree, and the rebuilt dynamic SQL has its placeholders in the right order including the conditional boundary clause. Whoever wrote this actually finished it.

So why not approve. Two things, and neither is a matter of taste:

The unused StoreModels import in WorkspaceCsiApplicationInventory is a one-line fix, but it is not a nit — mvn checkstyle:check runs in the fast tier that a pull_request selects for this module, so this commit fails its own gate. I'd rather name it now than have it cost a CI cycle and a re-review later.

The absence of CI is the bigger problem, and it is not the author's fault. This head has zero pull_request-event workflow runs; all 30 attached checks are bot orchestration. Nothing has compiled this tree, run its unit suite, or executed Checkstyle. The author is candid about that — the body says outright that the historical local numbers do not prove the rebased tree passes, that two fixture corrections were never rerun, that the generated-column validator change and its new diagnostics are uncompiled, and that the local Java budget is closed. I believe that account, and it is exactly why I can't attest to correctness here: the parts most in need of a real run are the ones flagged as never having had one. Whether H2 and MySQL both normalize the simplified projection_pending expression to a token stream that matches the DDL is not something I can settle by reading, and the tightened validator is the code that would find out.

Worth a maintainer's attention separately from this PR: Qwen Code CI and Managed Agent gate have not fired on either head of this PR, which is unusual for a same-repository branch targeting main. Retargeting the base produces an edited action that on: pull_request ignores, and the later force-push should have produced a synchronize that does not — so something in that sequence looks worth a glance, because it affects the evidence available on any PR that gets retargeted, not just this one.

What would move me to approve: the import deleted, a pull_request run on the new head showing the fast tier green (compile, unit/H2, Checkstyle), and — since the contract narrowing in finding 2 is real — one line about the transcript limit ceiling under the migration notes. If the full MySQL and Hosted profiles stay CI-only per this module's budget policy, that's fine; say so and leave them pending rather than substituting H2.

I'm requesting changes rather than deferring, because the blocker is concrete and the author can act on it directly.

中文说明

信心度:2/5 —— 方向正确、移除工作异常彻底,但就当前 commit 而言不能合并:有一处已确认的 Checkstyle 失败会让本模块自己的 Java 门禁变红,而且这棵代码树上完全没有跑过 PR CI。

退一步看。读 diff 之前,我只根据标题和"为什么需要"写下了自己的做法:删掉表及其 DDL 对象、删除快照 store、把三条公开读取路径指向 #15865 已经落地的消息分页器、收窄 owner-kind 枚举和 CSI 声明、简化 projection_pending 以及查询快照状态的水位/物化逻辑、重新生成 WebShell 类型、提升契约版本、补一个移除回归测试。这基本就是本 PR。我没有找到更简的路径;而我本来会提前点出的唯一取舍——transcript 首页不再意味着"完整保留历史",而是"最多 limit 条最近 Item"——处理得很到位:spec、README、被钉住的契约句子和客户端是一起改的,且客户端本来就在请求 messages 视图,所以没有调用方会被打个措手不及。

移除的彻底程度是六个月后我会感谢作者的地方。我专门去找这类 PR 常见的失败模式——符号在这里删掉、却在某个没人动的文件里仍被引用——结果一处都没有。每个被删标识符对着 base 树都能干净收敛,幸存者只有时点性设计文档和冻结的 archive 迁移。收窄后的 ck_ma_ref_owner 约束已无写入被删值的代码,接口与其唯一实现一致,重建后的动态 SQL 占位符顺序正确、包含那个条件性边界子句。写这个的人是真正把它做完了的。

那为什么不批。两件事,都不是口味问题:

WorkspaceCsiApplicationInventory 里未使用的 StoreModels import 是一行就能修的问题,但不是小事——mvn checkstyle:check 就在本模块 pull_request 会选中的 fast tier 里跑,所以这个 commit 过不了它自己的门禁。与其让它白白消耗一轮 CI 和一次复审,不如现在点出来。

CI 缺失是更大的问题,而且不是作者的错。这个 head 上 pull_request 事件的 workflow 运行数为 0,30 个附属检查全是机器人编排。没有任何东西编译过这棵树、跑过它的单元测试、执行过 Checkstyle。作者对此很坦白——正文明确说历史本地数据不能证明重放后的代码树通过、两处夹具修正从未重跑、生成列校验器改动及其新增诊断尚未编译、本地 Java 额度已关闭。我相信这个说明,而这恰恰是我无法在此背书正确性的原因:最需要真实运行的部分,正是被标注为从未运行过的部分。H2 与 MySQL 是否都会把简化后的 projection_pending 表达式归一化成与 DDL 一致的 token 序列,不是靠读代码能定论的事,而那个被收紧的校验器正是会去发现问题的代码。

另有一点值得维护者单独关注,且与本 PR 无关:Qwen Code CI 和 Managed Agent gate 在本 PR 的两个 head 上都没有触发,这对一个面向 main 的同仓库分支来说不正常。改 base 会产生 on: pull_request 忽略的 edited 动作,而之后的强推本应产生不会被忽略的 synchronize——所以这个序列里有东西值得看一眼,因为它影响的是任何被改过 base 的 PR 所能获得的证据,不只是这一个。

能让我转向批准的条件:删掉该 import;新 head 上有一次 pull_request 运行且 fast tier 全绿(编译、单元/H2、Checkstyle);以及——因为第 2 条的契约收窄是真实的——在迁移说明里补一行关于 transcript limit 上限的说明。如果按本模块额度政策,完整 MySQL 和 Hosted profile 仍只留给 CI,那没问题;说明清楚并让它们保持待定,而不是用 H2 替代。

我选择 request changes 而不是 defer,因为阻塞点很具体,作者可以直接处理。

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

Reviewed at 6851d1a8c10c46fca4cbf08d4c5f51997c784753 · 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.

Needs one fix before this can go green — details in my review comment above. 🙏

WorkspaceCsiApplicationInventory.java:4 still imports StoreModels, whose only use was inside the snapshot(Row) method this PR deletes. UnusedImports is enforced by qwen-code-checks.xml on that package, and the Managed Agent gate fast tier runs mvn checkstyle:check for it, so this commit fails its own Java gate. Deleting the line is the whole fix.

Separately: this head has no pull_request CI at all (all 30 attached checks are bot orchestration), so nothing has compiled or tested the rebased tree — including the generated-column validator change the design doc records as uncompiled and unrun. Please get a fast-tier run on the new head, and consider adding the transcript limit ceiling change (1000 → 100) to the migration notes.

The removal itself is thorough and I could not find a dangling reference in it — that part is genuinely well done.

中文说明

合并前需要修一处 —— 详见上方审查评论。🙏

WorkspaceCsiApplicationInventory.java:4 仍然 import 了 StoreModels,而它唯一的使用点就在本 PR 删除的 snapshot(Row) 方法里。qwen-code-checks.xml 对该包启用了 UnusedImports,且 Managed Agent gate 的 fast tier 会为其执行 mvn checkstyle:check,所以这个 commit 过不了它自己的 Java 门禁。删掉这一行就是全部修复。

另外:这个 head 上完全没有 pull_request CI(30 个附属检查全是机器人编排),因此重放后的代码树没有被编译或测试过——包括设计文档记录为未编译未运行的生成列校验器改动。请在新 head 上跑一次 fast tier,并考虑把 transcript limit 上限变化(1000 → 100)补进迁移说明。

移除工作本身很彻底,我没能找到任何悬挂引用——这部分做得确实好。

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

Remove two obsolete imports, align three schema witnesses with 38 business tables plus Flyway, and document transcript limit compatibility.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC
doudouOUC dismissed stale reviews from qqqys and yiliang114 via 44b2f5c October 29, 2026 17:35
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Thanks — agreed with the blocking import finding. Fixed in 44b2f5c78ea8f2eb27ffdd3a545e63a558e525a0: removed both obsolete imports (the second was independently identified in the CI log), and corrected three physical-table-count witnesses to 39 = 38 business tables + Flyway. No assertion, recovery guard or test case was removed. The migration-note suggestion is also addressed in both designs and the PR body: default transcript accepts 1–100 messages per page instead of 1–1000 events; default remains 100.

The removed selector is deliberately no longer interpreted; existing unknown-property handling is retained, and clients should omit view. Historical designs/archive SQL remain point-in-time records; no broad documentation sweep or strict-deserialization change was introduced.

The CI concern remains a real acceptance condition. Approval-triggered full run 40915271041 did compile the prior 6851d1a8 tree, but failed on the imports and ten stale-count unit failures; it was not rerun as a flake. This new push against the existing main base has actual pull_request runs: Managed Agent gate, Qwen Code CI and reference distribution. These are pending evidence, not a green gate. Local Java budget remains closed.

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Thanks @yiliang114 and @qqqys. Deferring the cosmetic snapshot-named test-file renames to keep the removal focused; their test coverage and selectors remain intact. The executed-evidence concern is valid and is not replaced by static review or historical local counts.

44b2f5c78ea8f2eb27ffdd3a545e63a558e525a0 fixes two Checkstyle imports and the three stale table-count witnesses identified by the now-available full CI logs, and documents the limit change. Current-source CI is running; the existing validation report retains the original failures, exact source/tree provenance and missing MySQL/Hosted qualification. No claim that the latest source is accepted, and no local Java budget reset.

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Hourly review follow-up pushed as 44b2f5c78ea8f2eb27ffdd3a545e63a558e525a0.

Item Action
Blocking unused import and matching CI failure Removed StoreModels from the CSI inventory and ManagedAgentStore from the service; both were unused.
Ten unit failures in the full MySQL lane Corrected three count pins from 40 to 39 (38 business tables plus Flyway); retained all behavior and rollback assertions.
Transcript limit migration Documented 1–100 messages, previously 1–1000 events, unchanged default 100 and rejection of 101–1000.
Removed view / historical docs / cosmetic test names Kept existing unknown-property handling; documented selector omission; retained historical/archive records and deferred cosmetic renames.
Missing current-head executable gates Actual pull-request Managed Agent, Qwen Code CI and reference-distribution runs now exist for this new head. Results remain pending.

The prior full run failed with two Checkstyle violations and 5971 unit cases / 10 failures / 0 errors / 17 skips, before its MySQL integration phase. Its tested synthetic merge abe373a3 has exactly the same tree as 6851d1a8 (8c3df7ebb2911e57ecf2c20e2d2082827733285e). Selected schema/API/paging/retained-artifact regressions passed on that prior tree; this does not clear the failed run or validate the new commit. No failed code workflow was blindly rerun, no full workflow was manually dispatched, and local Java remains CLOSED 596.235/600 seconds. The old cancelled label job has unavailable logs and was not restarted. There were zero inline review threads (0/0 to resolve); review findings were answered in the PR conversation. Formal review/CI gates remain pending.

中文说明

本轮按小时跟进的修正已推送为 44b2f5c78ea8f2eb27ffdd3a545e63a558e525a0。删除 CSI 清单和服务中的两条未使用 import;把三处物理表数从 40 调整为 39(38 张业务表加 Flyway),保留全部行为、回滚和保护断言;补齐 transcript 从 1–1000 事件改为 1–100 消息、默认仍为 100、101–1000 请求拒绝的兼容说明。保持未知属性处理及历史/归档记录,说明客户端应省略旧 view,暂缓纯外观测试文件重命名。

当前新 head 已有真实的 Managed Agent、Qwen Code CI 和 reference-distribution pull-request 运行,结果仍待完成。旧 full run 因两条 Checkstyle 违规,以及 MySQL lane 的 5971 项单元阶段中 10 失败/0 错误/17 跳过而失败,尚未进入该 lane 的 MySQL 集成阶段。实际 checkout 的合成 merge abe373a3 与旧 head 6851d1a8 的 tree 摘要一致;该旧树的部分 schema/API/分页/保留产物回归通过,不能清除完整失败,也不能验证新提交。没有把代码失败当 flake 重跑,没有手动派发完整工作流,本地 Java 额度仍关闭在 596.235/600 秒。旧 label 取消任务日志不可用,没有重启。没有行级审查线程(0/0);已在 PR 会话中回复相关意见。正式评审和 CI 门禁仍待完成。

yiliang114
yiliang114 previously approved these changes Oct 29, 2026

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review at head 44b2f5c7 (delta from 6851d1a8)

The incremental commit fix(managed): Align snapshot removal verification resolves the two blockers the review bot identified on the prior head:

  1. Unused imports: Removed StoreModels from WorkspaceCsiApplicationInventory.java and ManagedAgentStore from ManagedAgentService.java — both have zero remaining code references at this head (verified via live source read).
  2. Stale table counts: Changed three physical-table witnesses from 40 → 39 (BackfillWitnessesTest, WorkspaceCsiNativeActivationGateTest, WorkspaceCsiSqlWorkerMySqlIT), correctly reflecting 38 business tables plus Flyway's schema_version after the ma_snapshot table removal.
  3. Design docs: Both English and Chinese design documents now document the transcript limit ceiling change (1–1000 → 1–100) and record the CI evidence from run 40915271041.

My previous APPROVE at 6851d1a8 confirmed all the substantive mechanisms — the ma_snapshot table drop (39→38 business tables), findMessagePage numeric afterSequence parameter ordering, view=="messages" controller branch removal, CSI inventory narrowing, and full diff absence of production ma_snapshot references. None of those mechanisms changed in this follow-up.

P2 (non-blocking)

  • CI compile lane (SDK Java (fast) / ubuntu-latest / Java 21) is still in_progress at this head. The fix commit is trivially correct (2 import removals + 3 numeric changes), but a compiler witness for the post-fix tree has not completed yet.

P3 (non-blocking)

  • Test files ManagedSnapshotNumericPagingTest and ManagedSnapshotPoolTest still carry "Snapshot" in their names despite now testing message paging, not snapshots.
  • labels: [] — content labels not yet added.

The fix commit is correct and no P0/P1 issues remain, but the compile lane is still pending. APPROVE with the note that compile verification should finish before merge.

qqqys
qqqys previously approved these changes Oct 29, 2026

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

Critical-only scan at 44b2f5c78ea8f2eb27ffdd3a545e63a558e525a0 — no blocking defect found. The one blocking finding from the previous review round is fixed at this head.

The head moved from 6851d1a8 (which dismissed the two approvals standing there), so this is a fresh review of the new head rather than a restatement. The delta 6851d1a8..44b2f5c7 is 7 files / +17 / −11 and contains no new production logic.

Previous blocking finding — fixed

The CHANGES_REQUESTED round named one blocker: WorkspaceCsiApplicationInventory.java still imported StoreModels after the snapshot(Row) method that used it was deleted, and UnusedImports is enforced by Checkstyle on that package. Verified at this head:

  • The import line is gone, and a word-boundary search for StoreModels. in that file returns zero hits. The four remaining substring matches are all ManagedSessionStoreModels.MAX_INLINE_RESOURCE_BYTES / MAX_AGENT_INSTRUCTIONS_BYTES / MAX_AGENT_SKILLS_BYTES (lines 849, 851, 1555-1556) — a different class, so nothing dangles.
  • The second obsolete import the design doc attributes to that Checkstyle run is also gone: ManagedAgentService no longer imports persistence.ManagedAgentStore. Its only two occurrences in the file are inside comments (lines 2001, 2015), and the injected field is typed AgentStateStore (line 114), which is imported separately. Comment-only references are precisely what UnusedImports flags, so both deletions are correct and neither removes a needed type.

The three test-count changes are the other half of that CI failure and are internally consistent: ma_snapshot is dropped, so the physical base-table count goes 40 → 39 (38 business tables plus Flyway) in BackfillWitnessesTest, WorkspaceCsiNativeActivationGateTest and WorkspaceCsiSqlWorkerMySqlIT — the three stale assertions the design doc says produced ten unit failures in run 40915271041.

Both non-blocking asks from that round

  • The transcript limit ceiling is now documented: the design doc records the move from a 1–1000 event limit to a 1–100 message limit, that omission still defaults to 100, that limits 101–1000 now receive a parameter error, and that the removed view selector relies on existing JSON unknown-property handling rather than a new global strict-deserialization policy.
  • A real fast-tier run is now attached to this head, though the decisive lanes had not finished when I published.

Carried forward from the 6851d1a8 scan

The rest of the production content is unchanged, so my earlier findings stand: fa7421bdc (#15839) is an ancestor of this branch, so the /transcript/items/query route added there survives and is re-served from live message paging rather than left dangling against the deleted ManagedSnapshotStore; that deleted class has zero references anywhere in packages/; ma_snapshot, current_snapshot_id, findSnapshotPage, findSnapshotCoveredSequences and SnapshotRecord have zero production references, with the only occurrences being new assertions of their absence; findMessagePage opens with requireSession plus the legacy-session guard and throws invalid_limit outside 1..100, so an unclamped requestedLimit cannot produce an unbounded query; and Issue13181QueryBudgetTest replaced its snapshot-write accounting with count("ma_snapshot") == 0, which is a stronger gate than the one it replaced.

Not covered by this approval

  1. Nothing has compiled this head yet. SDK Java (fast) / ubuntu-latest / Java 21 and Test (ubuntu-latest, Node 22.x) were still pending when I published; Lint & Static, contract-version uniqueness and Flyway uniqueness are green. The previous head's run is what exposed both defects this commit fixes, so the Java lane going green here is load-bearing rather than formal — please confirm it before merge.
  2. The design doc states that the generated-expression validator change (the removed normalization branch that assumed an OR in projection_pending) with its new missing/changed-expression diagnostic tests, and three strengthened CSI negative fixtures, were never compiled or run locally. Those are in WorkspaceCsiApplicationInventory and its tests, which I read only at the added-line level; their first execution is that pending Java lane.
  3. I did not read the OpenAPI diff, the regenerated TypeScript client, ApiModels/StoreModels, the schema catalog/projection deltas, or the new 168-line removal test. Client-visible changes worth the author's confirmation remain: view=messages is no longer dispatched, and web-shell /transcript/query and /sessions/export/query now answer limit > 100 with a parameter error instead of clamping.

中文说明

在 44b2f5c7 上执行 Critical-only 扫描,未发现阻塞合入的缺陷;上一轮唯一的阻塞问题在本 head 已修复。head 已由 6851d1a8 前进(该次推送使当时两条批准失效),因此这是针对新 head 的重新评审。两个 head 之间的差异为 7 个文件、+17/−11,不含新的生产逻辑。

上一轮阻塞问题已修复:评审要求修改的是清单类中残留的 StoreModels 导入——其唯一使用点在本 PR 删除的方法内,而该包启用了未使用导入检查。在当前 head 上,该导入已删除,按词边界搜索 StoreModels. 零命中;剩余四处子串匹配都是另一个类 ManagedSessionStoreModels 的常量,不构成悬挂。设计文档所述第二处过时导入同样已删除:服务类不再导入 ManagedAgentStore,该符号在文件中仅出现于两处注释,注入字段的类型是另行导入的 AgentStateStore;仅被注释引用正是未使用导入检查会报的情形,因此两处删除都正确,也没有误删所需类型。三处测试计数由 40 改为 39 与删除该表一致(38 张业务表加 Flyway),正是设计文档所记录的那次 CI 中产生十项失败的三处陈旧断言。

该轮两项非阻塞要求也已落实:设计文档已写明默认 transcript 的 limit 上限由 1–1000 变为 1–100、缺省仍为 100、101–1000 将返回参数错误,并说明被移除的 view 选择子沿用既有的未知属性处理而非新增全局严格反序列化策略;本 head 也已附上真实的快档运行,只是关键任务尚未跑完。

上一轮扫描的结论继续成立:分支基线包含今早合并的那个新增路由,因此该路由保留并改由实时消息分页提供,不会因删除快照存储而悬挂;被删类在整个 packages 下零引用;被删表与相关列、方法、记录在生产代码中零引用,仅存的出现位置是断言其不存在的新测试;替代读路径先校验会话归属并保留旧会话守卫,limit 不在 1 到 100 之间时抛错,因此服务层透传未钳制的 limit 不会造成无界查询;查询预算测试把原有的快照写入计数改为断言快照 SQL 为零,比原先更严。

本次批准不覆盖三点:一是本 head 尚未被编译,Java 快档与 Node 测试在我发布时仍在运行,而上一 head 的运行正是暴露这两处缺陷的原因,因此这条任务跑绿是实质性的而非形式性的,合并前请确认;二是设计文档明确记录生成表达式校验器改动(移除假设 projection_pending 含 OR 的归一化分支)及其新增诊断测试、以及三处被加强的 CSI 反向夹具,均未在本地编译或运行,它们的首次执行就是那条待运行的 Java 任务;三是我未读契约差异、重新生成的 TypeScript 客户端、两个模型类、schema 目录与投影差异,以及新增的 168 行移除测试。仍需作者确认的对外可见变化是:view=messages 不再分支派发,Web Shell 的两个查询路由对大于 100 的 limit 返回参数错误而不再钳制。

Return required projection coverage and terminal metadata in the recovery browser fixture, and type-check the response without changing recovery or privacy assertions.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC
doudouOUC dismissed stale reviews from qqqys and yiliang114 via 74142dd October 29, 2026 18:40
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Fixed the deterministic WebShell smoke failure in 74142dd2ba94cdf5e8dbed649880afe8a0c549ec.

Item Result
Root cause The recovery browser mock omitted required coveredSequence; the existing coverage guard rejected its transcript, leaving a deliberately incomplete handoff with no loaded history. The same stale fixture existed in merged parent #15865.
Minimal fix Add coverage6, correct required terminal metadata, and check the mock with satisfies JavaAgentTranscript. Production coverage/recovery behavior is unchanged.
Focused reproduction Original single case RED matched CI; corrected final fixture GREEN: all3 recovery Chromium cases passed in13.6s, retries0. Narrow fixture typecheck passed; the first typecheck exposed the missing terminal metadata and is retained.
Safety assertions Private-answer exclusion, editable/preselected handoff, original-session cancellation and no automatic send all remain. No timeouts, retries or assertions were weakened.
Reruns / qualification No blind CI rerun or manual full dispatch. Current-head CI remains pending. The existing Java budget remains closed; no Java command, database, model or protected preview was used.

The prior 44b2f5c7 Java fast run 40922766539 reported5971 unit/H2 cases with0failures/0errors/17skips and both Checkstyle executions reported0violations. It actually checked out merge 2baec9fc (PR head44b2f5c7 plus main70be140e); its tree differs from the branch only in release scripts/workflows/docs, with no Java/SDK/Core/CLI/WebShell source differences. Node unit, lint/static and no-AK integration jobs also passed on44b2f5c7. Overall Qwen CI still failed the recovery smoke case (413 passed,1 failed across its original attempt plus retries); that failure is preserved and was not treated as a flake. Full MySQL/Hosted qualification remains pending.

No new inline comments were present (0/0 threads). Existing human approvals and the older formal bot request are left to their reviewers; no review was dismissed or approval manufactured. Cosmetic suggestions already answered last cycle are not duplicated.

中文说明

确定性的 WebShell smoke 失败已修复为 74142dd2ba94cdf5e8dbed649880afe8a0c549ec。恢复浏览器 mock 漏了必填覆盖水位,触发既有校验而无法加载历史;交接因此正确显示为不完整草稿。合并依赖 #15865 中已有同一旧夹具。本轮只补覆盖水位6、正确 terminal 元数据及响应类型约束,没有修改生产恢复或水位保护。

原单例 RED 与 CI 一致;最终夹具的3个 Chromium 场景全部 GREEN,13.6秒、0重试。窄范围类型检查通过;首次类型检查发现缺少 terminal 的失败记录保留。私有回答排除、可编辑/预选、原会话取消和禁止自动发送断言均保留,没有增加超时/重试或删断言,没有盲重跑或手动派发完整 CI。

旧44b2f5c7 的 fast 门禁在实际合成 merge2baec9fc 上报告5971项单元/H2(0失败/0错误/17跳过)及两条 Checkstyle零违规;相对分支的差异仅是发布脚本/工作流/文档,不涉及 Java、SDK、Core、CLI 或 WebShell 源码。该 head 的 Node单元、Lint/Static、无AK集成也通过。但 Qwen CI 因恢复 smoke 用例失败,原413通过/1失败及重试记录仍保留,不当作flake。新 head CI及完整 MySQL/Hosted 资格仍待完成。本轮未运行 Java、数据库、模型或受保护预览,本地 Java额度不变。

没有新的行级评论(0/0线程);不替审阅者撤销旧请求或生成批准,也不重复回复上轮已处理的外观建议。

@qwen-code-review-bot qwen-code-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partially reviewed — gaps disclosed. Suggestions are inline.

Not reviewed: reverse audit — the loop was stopped after round 4 of a 5-round cap without reaching two consecutive dry rounds, so later rounds may still surface further suggestions.

Not reviewed: inventory query budget — the chunk covering WorkspaceCsiApplicationInventory ran out of its tool budget before compiling or running the Maven/H2 suites there.

Not explored to full depth (tool budget reached): "agent reverse-audit (round 2)": did not trace whether the ma_message → body_resource_key=resourceKeys referential predicate (WorkspaceCsiApplicationInventory.java:2187) still has any witness…; "agent reverse-audit (round 4)": did not compile or run the Java suite ( ManagedAgentSchemaStore /Checkstyle), so the finding is source-traced only.; "agent reverse-audit (round 4)": did not walk chunks 1-6 of the diff (other agents' territory); the retention producer-side checks above were read to the depth needed for this chunk's assertion…; chunk 19: did not run the Maven/H2 suites ( Issue13181QueryBudgetTest , ManagedEventReplayTest , ReplayFloorAdvancerTest ) — the Spring Boot + H2 harness needs a full w….

中文说明

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

未审查(原文为英文):reverse audit — the loop was stopped after round 4 of a 5-round cap without reaching two consecutive dry rounds, so later rounds may still surface further suggestions.

未审查(原文为英文):inventory query budget — the chunk covering WorkspaceCsiApplicationInventory ran out of its tool budget before compiling or running the Maven/H2 suites there.

未探索到全部深度(达到工具调用预算):"agent reverse-audit (round 2)":did not trace whether the ma_message → body_resource_key=resourceKeys referential predicate (WorkspaceCsiApplicationInventory.java:2187) still has any witness…;"agent reverse-audit (round 4)":did not compile or run the Java suite ( ManagedAgentSchemaStore /Checkstyle), so the finding is source-traced only.;"agent reverse-audit (round 4)":did not walk chunks 1-6 of the diff (other agents' territory); the retention producer-side checks above were read to the depth needed for this chunk's assertion…;chunk 19:did not run the Maven/H2 suites ( Issue13181QueryBudgetTest , ManagedEventReplayTest , ReplayFloorAdvancerTest ) — the Spring Boot + H2 harness needs a full w…。

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

Comment thread packages/managed-agent-server/README.md Resolved
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Review follow-up at 505d1fa9c285f72590d0d5716d3804cc71bcb1c2: 19 suggestions independently checked; 10 fixed, 4 partially fixed, 2 pushed back, 3 deferred. No production Java logic changed.

Thread Action Topic
#4417403567 fixed Message pager error contract
#4417403576 fixed Export cursor invalidation
#4417403587 partial Body-read bound
#4417403631 fixed Read path resource writes
#4417403643 partial Live refs and native preservation
#4417403654 pushed-back Private-session guard
#4417403664 deferred Deferred-lambda parser cleanup
#4417403678 fixed Coverage versus membership
#4417403690 partial Bounded control events
#4417403705 fixed Production read isolation
#4417403720 partial CSI message-window negative
#4417403729 pushed-back Quiet projection and stable identity
#4417403739 deferred Unused event-reader cleanup
#4417403762 fixed Superseded history design
#4417403772 deferred Additional two-page wire witness
#4417403782 fixed Legacy view tolerance
#4417403801 fixed MySQL literal drift
#4417403814 fixed Broker baseline count
#4417403822 fixed Fixture timestamp fidelity

Fixed scope: message-page error/recovery documentation and generated response aliases; live history/Broker docs; stronger body-read, no-write, reference, coverage/control, transaction-attribute, legacy-selector and MySQL literal-drift witnesses; fixture millisecond fidelity. The private-session exclusion fixture stays unreferenced so it still detects a missing privacy guard; no unsupported manual projection rewind was added. Additional parser/interface cleanup and a service-level paging matrix are deferred.

Validation: API types regenerated; WebShell package typecheck passed in 15.27s; formatting/ESLint hook and diff/reference checks passed; test-engineer performed source review and an in-memory timestamp precision observation. Changed Java tests were not compiled or run locally because the shared Java allocation remains CLOSED596.235/600. Prior green fast CI belongs to 74142dd and its documented integration merge; it does not qualify these new test inputs. New-head CI, full MySQL/Hosted/fault/transport and SpotBugs remain pending. Historical failures are retained; no blind rerun, manual full dispatch or preview/database operation.

中文说明

本次后续提交 505d1fa9c285f72590d0d5716d3804cc71bcb1c2 逐条核实 19 条建议:10 条修正、4 条部分修正、2 条有理由不采纳、3 条延期。上表逐项给出链接与处理结果,没有改变生产 Java 逻辑。

修正范围:消息分页错误/恢复说明及生成响应类型、实时历史与 Broker 文档;正文读取、零写入、引用、水位/控制事件、事务属性、旧选择参数及 MySQL 字面量漂移见证;夹具毫秒精度。私有会话排除夹具继续保持无引用,确保能发现隐私守卫丢失;没有增加脱离协议的手动投影回退。额外解析器/接口清理及服务层分页矩阵延期。

验证:已重新生成 API 类型,WebShell 包类型检查 15.27 秒通过,格式/ESLint 提交钩子及差异/引用检查通过;test-engineer 完成源码复核及内存时间精度观察。共享 Java 额度保持 CLOSED596.235/600,改动的 Java 测试未在本地编译或运行。先前绿色 fast CI 只属于 74142dd 及记录的集成 merge,不能证明本次新测试输入通过。新 head CI、完整 MySQL/Hosted/fault/传输与 SpotBugs 仍待。保留历史失败,没有盲重跑、手动完整派发或预览/数据库操作。

@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 2193d51. Only screenshots that changed are shown (flows below, if any, are head-only) — refreshes on every push.

Screenshots · before / after

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

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

— Qwen Code · web-shell visuals

@qwen-code-review-bot qwen-code-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partially reviewed — gaps disclosed. Suggestions are inline.

Not reviewed: reverse audit — stopped at the round cap (3 rounds) without reaching two consecutive dry rounds, so later rounds may still surface further suggestions.

Not reviewed: build-and-test — the "SDK Java (fast) / Runtime Broker and Managed Agent MySQL / Java 21" check was skipped in CI and its MySQL suites (ManagedAgentMySqlIT, ManagedSchemaSessionMySqlIT, WorkspaceCsiSqlWorkerMySqlIT, ManagedSchemaMySqlIT) did not run locally either, on a PR that rewrites the V1 schema baseline.

Not explored to full depth (tool budget reached): "agent reverse-audit (round 3)": probe-verifying each of the 13 new fault cases reds when its guard is removed — no test run was made, so the pinning of the ten body-* /ref cases other than th…; "agent reverse-audit (round 1)": whether App.tsx:6754 's workspace.client resolves to the managed REST client (rather than the ACP client) for trajectory paging was not traced end-to-end bef…; "agent reverse-audit (round 2)": did not trace the web-shell client consumers of snapshotThroughSequence / olderCursor to confirm they tolerate the now-live bodies and projection-invalidated …; "agent reverse-audit (round 2)": whether SurfaceAdmissionAcceptanceTest.graph() 's new forward read findMessagePage(ARTIFACT_TENANT, ARTIFACT_SESSION, null, 100, false) is legal at that poin….

Mechanism health: this round did not close cleanly, so it withholds the incremental anchor — and the round it recovered had no anchor this round could use either — none at all, one with no certifier, one certified by an identity other than the one this round runs under, or one this round's fetch refused or resolved to the head — so the next review re-reads the whole diff unless recovery grafts an earlier own anchor that the round running it can use onto the complete work list this round leaves behind, and keeps doing so until a round's marker carries an anchor again or a graft lands that the round running it can use. (Stated, not acted on — this changes nothing about what the round posts.)

中文说明

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

未审查(原文为英文):reverse audit — stopped at the round cap (3 rounds) without reaching two consecutive dry rounds, so later rounds may still surface further suggestions.

未审查(原文为英文):build-and-test — the "SDK Java (fast) / Runtime Broker and Managed Agent MySQL / Java 21" check was skipped in CI and its MySQL suites (ManagedAgentMySqlIT, ManagedSchemaSessionMySqlIT, WorkspaceCsiSqlWorkerMySqlIT, ManagedSchemaMySqlIT) did not run locally either, on a PR that rewrites the V1 schema baseline.

未探索到全部深度(达到工具调用预算):"agent reverse-audit (round 3)":probe-verifying each of the 13 new fault cases reds when its guard is removed — no test run was made, so the pinning of the ten body-* /ref cases other than th…;"agent reverse-audit (round 1)":whether App.tsx:6754 's workspace.client resolves to the managed REST client (rather than the ACP client) for trajectory paging was not traced end-to-end bef…;"agent reverse-audit (round 2)":did not trace the web-shell client consumers of snapshotThroughSequence / olderCursor to confirm they tolerate the now-live bodies and projection-invalidated …;"agent reverse-audit (round 2)":whether SurfaceAdmissionAcceptanceTest.graph() 's new forward read findMessagePage(ARTIFACT_TENANT, ARTIFACT_SESSION, null, 100, false) is legal at that poin…。

机制健康:本轮未能干净收尾,因而扣留了增量锚点,而它恢复到的那一轮也没有留下本轮可用的锚点——要么完全没有、要么没有认证者、要么由本轮运行身份之外的身份认证、要么被本轮的获取拒绝或解析为头提交——因此下一次评审将重读整个 diff,除非恢复流程把本轮能使用的更早自有锚点嫁接到本轮留下的完整工作清单上;并会一直如此,直到某一轮的标记重新带上锚点,或落地的嫁接能被运行该轮的评审使用。(仅陈述,不据此行动——这不改变本轮发布的任何内容。)

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

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

Copy link
Copy Markdown
Collaborator Author

Review follow-up 2193d519765ddec86bb4069f67830088e2dd8e13: three new suggestions fixed; three repeated suggestions remain deferred with links to their existing decisions.

Thread Action Topic
#4418536951 fixed Production release marker
#4418536959 fixed Released-body identity clauses
#4418536965 fixed Decimal transcript cursor migration
#4418536970 deferred Existing parser cleanup deferral
#4418536975 deferred Existing event-interface cleanup deferral
#4418536981 deferred Existing wire-matrix deferral

The release test now observes the producer's own DB retention marker instead of overriding it; its independent current-body reference guard and native-snapshot assertions remain. Three released-body identity faults preserve a valid resource key and payload while isolating the hex segment, positive ordinal and digest-id relationship. Both design languages and migration notes now document default transcript decimal-to-opaque cursors and invalid_cursor-to-invalid_message_cursor. Parser plumbing, residual event-interface cleanup and an additional wire mutation matrix remain deferred; their new threads link the earlier decisions. The mock visual-preview comment reports no screenshot change and needs no code action.

Validation: scoped formatting/reference checks and two clean source-audit passes; test-engineer reviewed both Java files, including FK/metadata ordering. No local Java compilation, tests, DB/toolchain operation or mutation run occurred; the allocation remains CLOSED596.235/600. This increment changes no TypeScript/schema/dependency/runtime inputs, so applicable prior TypeScript evidence is reused. Prior505 fast unit/H2, Checkstyle and 414-case smoke belong to their recorded inputs, not the two newly changed Java tests. New-head compilation/test and full MySQL/Hosted/fault/transport/SpotBugs qualification remain pending. No CI rerun/manual dispatch or preview5196 operation.

中文说明

本次后续提交修正 3 条新建议,3 条重复建议沿用已有延期决定,并在新线程链接此前理由。

回收测试改为观察生产路径自己的数据库保留标记,不再人工覆盖旧正文;独立的当前正文引用守卫及原生快照断言保留。三个释放后正文身份负例保持合法资源键及原始 payload,分别隔离十六进制段、正序号及摘要与身份的关系。英中设计和迁移说明补充默认 transcript 从十进制到不透明游标,以及 invalid_cursor 到 invalid_message_cursor 的变化。解析器内部清理、残留事件接口清理和额外 wire 变异矩阵继续延期,新线程链接原决定。模拟视觉预览评论报告截图无变化,无需代码处理。

验证:范围内格式/引用检查及两轮干净源码审阅完成,test-engineer 复核两个 Java 文件的 FK/metadata 检查顺序。没有运行本地 Java 编译、测试、数据库/工具链或变异验证,额度保持 CLOSED596.235/600。没有改变 TypeScript/schema/依赖/运行输入,复用仍适用的 TypeScript 证据。此前505 fast 单元/H2、Checkstyle 和 414 项 smoke 只证明其已记录输入,不能证明本次两个新改动的 Java 测试。新 head 编译/测试及完整 MySQL/Hosted/fault/传输/SpotBugs 资格仍待。没有 CI 重跑、手动派发或预览5196操作。

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Delta review at head 2193d51 (since my APPROVE 5702497456 at 44b2f5c7)

Three incremental commits strengthen tests, contracts, and docs on top of the refactoring:

  • 74142dd test(web-shell): Repair Managed recovery transcript fixture — adds coveredSequence + terminal to the E2E mock to match the real transcript shape.
  • 505d1fa test(managed): Strengthen snapshot removal contracts — rewrites query-budget, replay-floor, contract-test, and schema-IT assertions to exercise the message-only path; legacy view:"messages" still tolerated (200).
  • 2193d51 test(managed): Pin released message body ownership — the message-page reader now rejects stale cursors (409 message_projection_changed); adds a floor-advance-and-resync race test.

OpenAPI delta (v1.97.0 → v1.98.0)

  • view:"messages" selector removed from request schemas (single-mode now).
  • CursorExpired → TaskCursorExpired (task-scoped, not snapshot-cursor).
  • Three new typed responses: MessageProjectionPending (503 retryable), MessagePageTooLarge (413), InvalidMessagePage (400).
  • snapshotThroughSequence retains its wire name for backward compatibility; coveredSequence + lastSequence now document "actual message projection coverage for SSE handoff."
  • Generated managed-agent-api.ts mirrors these changes and the contract version bump CI check passed.

No P0/P1 findings

The delta is well-aligned: every removed assertion (snapshotWrites array, trickleTicksDoNotRewriteTheSnapshotPerTick, snapshot finds) has a corresponding message-page counterpart. The tests correctly exercise the message-only path and verify that old cursor shapes are rejected after a projection rebuild.

The CI reviewDecision: CHANGES_REQUESTED is stale — it's from review-bot 5701800526 pinned to superseded head 6851d1a8, whose two blockers were resolved in follow-up commit 44b2f5c7. No new blocking review exists on the current head.

The CI failure "Flyway migration version uniqueness (latest main)" is a pre-existing merge-target V1 collision between V1__core.sql and V1__managed_schema.sql — not caused by this PR.

LGTM.

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

COMMENT, not an approval — and the reason is narrow. The one blocking finding ever filed on this PR is fixed and stays fixed at this head, and I found no Critical in anything I read. What I could not do inside budget is scan this head's own delta, so I am not certifying it unread.

Reviewed at head 2193d519765ddec86bb4069f67830088e2dd8e13.

The historical blocker is closed, and I re-verified rather than accepted it

The CHANGES_REQUESTED still showing on this PR was filed at 6851d1a8c and named one blocker: WorkspaceCsiApplicationInventory.java still imported StoreModels, whose only use was inside the deleted snapshot(Row) method, and UnusedImports is enforced on that package with mvn checkstyle:check in the fast tier. 44b2f5c78 removed it plus a second unused ManagedAgentStore import in ManagedAgentService.java.

I checked both at that head by fetching the whole files and confirming their sizes against the contents metadata, so the greps were not reading truncated fetches. A raw occurrence count looks damning and is worth recording, because it reads exactly like a compile error: StoreModels appears four times and ManagedAgentStore twice. Reading the lines resolves it — all four are ManagedSessionStoreModels.MAX_* constants, a different class that merely contains the substring, and both ManagedAgentStore hits are inside // comments. Zero remaining code references to either removed import.

That fix persists here: the compare from 44b2f5c78 to this head is ahead 3, behind 0, so the current head is a descendant and carries it. Lint & Static and Managed Agent fast tier both pass at this head, which is the gate the finding was filed against. So the standing CHANGES_REQUESTED rests on a finding that is fixed, at a head three commits back.

The red Flyway lane is not this PR's, and I proved that rather than assuming it

Flyway migration version uniqueness (latest main) fails with "Version collision when merged into main: V1 = V1__core.sql + V1__managed_schema.sql". A duplicate Flyway version would be a boot failure, so I did not wave it through on the name alone.

Both live main and this head contain exactly one file in packages/managed-agent-server/src/main/resources/db/managed-schema/ — V1__managed_schema.sql — and neither has a db/migration directory at all. Searching main for V1__* returns two files: the live one, and docs/archive/managed-agent-schema/sql/V1__managed_agent_core.sql. That archived copy is the annotation's V1__core.sql; it is already on main, it sits under docs/archive/ on no Flyway classpath, and this PR does not touch it — its only migration-surface changes are V1__managed_schema.sql (+2/−41, dropping ma_snapshot) and legacy-table-map.tsv (+1/−1). It adds and renames no migration.

The sibling lane that inspects this PR's own tree, SDK Java (fast) / Flyway migration version uniqueness, passes. So the failure is a pre-existing archived artefact being counted alongside the live migration, surfaced now because this PR is what touches a migration file — not a defect introduced here, and not a duplicate that would reach a database.

Why I am still not approving

This head is three commits and 18 files past the head I last verified, and I did not read them. All three are test work — repairing the Managed recovery transcript fixture, strengthening the snapshot-removal contracts, and pinning released message body ownership — and the author reports that this head fixes three Suggestions from the latest round while deferring three others with links to existing decisions.

That placement is what makes me unwilling to certify it unread. The three Suggestions this head says it fixed sit on exactly the mechanisms that decide whether the new tests can fail: a test that supplies by hand the state its subject is meant to produce, an unpinned released-body identity guard, and a transcript cursor wire-format change. A test-only commit that strengthens contracts is the right kind of change, but it is also the kind where a well-intentioned edit can pin the wrong thing, and I have not looked. My budget went to the blocker re-verification and the Flyway attribution above, both of which needed primary evidence rather than a summary.

For the same reason I am recording scope honestly on the bulk of the PR. Across three passes I verified directly that ManagedSnapshotStore.java is genuinely absent at head, that the two surviving snapshot-named test files carry zero references to it, that both unused imports are clean, and that the three physical-table witnesses moved 40 → 39, which is the correct arithmetic for 38 business tables plus Flyway's schema_version. I have not read the whole 61-file, −2,823-line removal myself. What substitutes for that reading is now real rather than promised: Build and verify reference distribution passes, which builds and boots the archive and so compiles the production tree and validates the schema catalog; SDK Java (fast) / ubuntu-latest / Java 21 and Managed Agent fast tier pass, which execute the module's unit and H2 suites; and Test (ubuntu-latest, Node 22.x), Integration Tests (no-AK, No Sandbox), web-shell E2E Smoke and TUI parity snapshots pass. On my first pass over this PR none of those had been dispatched at all, and that absence was the substance of my earlier COMMENT; it is now closed by evidence rather than by more reading.

Both of the review bot's rounds are COMMENTED with every ledger entry graded S — nineteen findings in the first, six in the second, three of them carried forward — so there is no Critical in the history for me to reconcile, and per this channel's rules Suggestions do not gate an approval. I am not restating them as objections. Worth noting for whoever picks this up: both rounds stopped at their round cap without reaching two consecutive dry rounds, and both disclosed chunks they never compiled or ran, including the MySQL suites on a PR that rewrites the V1 schema baseline. SDK Java (fast) / Runtime Broker and Managed Agent MySQL is among the 38 skipping here, so the real-database evidence for the rewritten baseline still arrives after review rather than before it.

CI at this head: 61 checks, 21 pass, 1 fail, 1 pending, 38 skipping. The one fail is the Flyway lane attributed above; the pending entry is review-pr, which is not a gate in any state.

What would make this approvable

One pass over the three test commits at this head — specifically whether the strengthened contracts assert against state the subject produces rather than state the fixture supplies, and whether the transcript cursor's changed wire format is pinned in both the migration notes and the regenerated client. If those hold, the blocker is already closed, the red lane is already attributed to main, and the compile and test census is already green, so I would expect nothing else to be outstanding. Separately, the CHANGES_REQUESTED on this PR should be cleared or re-run, since the finding behind it was fixed three commits ago and it currently misstates the PR's position.

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

Critical-only scan at 2193d519765ddec86bb4069f67830088e2dd8e13 — no blocking defect found. The one blocking finding ever filed on this PR is fixed, and the single red check is not attributable to this diff.

Historical blocking finding — fixed and now CI-confirmed

The CHANGES_REQUESTED round at 6851d1a8 had exactly one blocker: the unused StoreModels import in WorkspaceCsiApplicationInventory.java, which UnusedImports Checkstyle would fail. Fixed at 44b2f5c7 and still fixed here — git diff --stat 44b2f5c7..2193d5197 contains no src/main/java file at all, so the production Java is unchanged since I verified the fix (word-boundary search for StoreModels. in that file returns zero; the surviving substring hits are ManagedSessionStoreModels.MAX_*, a different class; the second deleted import, ManagedAgentStore in ManagedAgentService, appears there only inside two comments, the injected field being typed AgentStateStore). SDK Java (fast) / ubuntu-latest / Java 21, Lint & Static and Managed Agent fast tier are all green at this head, which is the gate that finding predicted would fail.

Every other finding across the two later bot rounds is graded [Suggestion] inline (R1-1…R1-9, R2-1…R2-3 and the "still standing" repeats). Those do not gate this review, and I did not adjudicate them.

The red check is not this PR's

Flyway migration version uniqueness (latest main) fails with: "Version collision when merged into main: V1 = V1__core.sql + V1__managed_schema.sql". Attribution evidence at this head:

  • git diff --name-status <main>..<head> -- "*.sql" returns exactly one line: M packages/managed-agent-server/src/main/resources/db/managed-schema/V1__managed_schema.sql. This PR adds, renames and deletes no migration file, so the version set it merges into main is identical to main's.
  • V1__core.sql does not exist in either tree. A whole-tree git ls-tree -r at main (70be140e148f8fc7527cc51717603a6dd84abc19) and at this head both return a single match for the pair of names: V1__managed_schema.sql. The file the collision is reported against is not in the repository.
  • The in-workflow SDK Java (fast) / Flyway migration version uniqueness check passes on the same head, so the two contexts disagree about the same tree.

That makes this a defect in the "latest main" comparison context rather than a regression introduced here, and it is worth raising with whoever owns that check — it will otherwise read as a merge blocker on any PR that touches the managed schema. I am not treating it as a Critical because the evidence says this diff cannot have caused it.

What changed since the head I approved at 44b2f5c7

18 files / +239 / −114, and none of it is production Java or hand-written production TypeScript: four design docs, docs/runtime-broker.md, the OpenAPI contract (~104 lines), the regenerated client, ten Java test files and managed-recovery.spec.ts. The three commits are titled test(...) and that matches the content.

So the load-bearing conclusions from my earlier scan carry forward unchanged: fa7421bdc (#15839) is an ancestor, so /transcript/items/query survives and is re-served from live message paging instead of dangling against the deleted ManagedSnapshotStore; that class has zero references anywhere in packages/; ma_snapshot, current_snapshot_id, findSnapshotPage, findSnapshotCoveredSequences and SnapshotRecord have zero production references, their only occurrences being assertions of absence; findMessagePage opens with requireSession plus the legacy-session guard and throws invalid_limit outside 1..100, so the unclamped requestedLimit in transcript() and messageExportPage() cannot produce an unbounded read; and Issue13181QueryBudgetTest replaced snapshot-write accounting with count("ma_snapshot") == 0, a stronger gate than the one it replaced.

The contract side is now CI-verified rather than only read: API contract version uniqueness (latest main) reports 1.98.0 is unique against main, ManagedAgentApiContractTest runs inside the green Java lane, and Test (ubuntu-latest, Node 22.x) plus web-shell E2E Smoke and Capture web-shell visuals are green, so the regenerated client typechecks against the edited contract.

Two client-visible points I checked myself

  • Legacy view payloads. view is gone from ApiModels (zero hits at this head), so an un-upgraded client sends an unknown property. There is no spring.jackson.deserialization.fail-on-unknown-properties setting anywhere in the server module, and every FAIL_ON_UNKNOWN_PROPERTIES mapper I found is an internal persistence mapper (WorkspaceCsiApplicationJson, WorkspaceCsiCheckpointSnapshotStore, ManagedSessionStore, the resident-workspace and retirement stores, ExternalStorageRegistrationController) rather than the MVC request-body mapper. The design doc's "retain the existing JSON unknown-property handling" therefore describes Spring Boot's default: the selector is ignored, not rejected. Nothing pins that with a test (the bot's R1-6), which is a coverage gap rather than a defect.
  • Cursor wire format. /transcript/query moves from a decimal event cursor to the message pager's cursor, and old snapshot cursors are rejected rather than reinterpreted — the design doc states this, but the migration-notes paragraph added in the last round covers only the limit ceiling (1–1000 → 1–100) and the view selector. Worth one sentence there, since a stored client cursor is the one thing a caller cannot regenerate.

Not covered by this approval

I did not read the ~104-line OpenAPI delta line by line, the regenerated client body, the strengthened test bodies, or managed-recovery.spec.ts; the contract's consistency is resting on the green contract test and uniqueness context rather than on my reading. The design doc still records that the generated-expression validator change and three strengthened CSI negative fixtures were never run locally — their first execution is the Java lane, which is green here, so that gap is now closed by CI rather than by me. The bot's two COMMENTED rounds both say "Partially reviewed — gaps disclosed … Not reviewed: reverse audit", so no reviewer has yet claimed a complete pass over this diff, mine included.


中文说明

在 2193d5197 上执行 Critical-only 扫描,未发现阻塞合入的缺陷。本 PR 历史上唯一的阻塞问题已修复,唯一一条红色检查不是本改动造成的。

历史阻塞问题已修复并有 CI 佐证:那轮要求修改的是清单类中残留的未使用导入。44b2f5c7 之后的差异中不含任何 src/main/java 文件,因此生产 Java 自我上次核实修复后未再变化——按词边界搜索该文件中的 StoreModels. 零命中,剩余子串匹配属于另一个类;另一处被删导入在服务类中仅出现于两处注释,注入字段的类型是另行导入的接口。Java 快档、Lint 与 Managed Agent 快档任务在本 head 全部通过,而那正是该问题预言会失败的门禁。其后两轮机器人意见在行内一律标注为建议级,不影响本次结论,我未逐条裁定。

红色检查不归属本 PR:其描述为「合并入 main 后版本冲突:V1 = V1__core.sql + V1__managed_schema.sql」。在当前 head 上,本 PR 对 SQL 的全部改动只有一行——修改既有的 V1__managed_schema.sql,没有新增、重命名或删除任何迁移文件,因此并入 main 的版本集合与 main 完全相同;而 V1__core.sql 在两棵树中都不存在,对 main(70be140e)与本 head 分别做全树列举,这两个文件名只匹配到 V1__managed_schema.sql 一个。同一 head 上工作流内的 Flyway 唯一性任务是通过的,两个检查对同一棵树给出了相反结论。因此这是那条「对比最新 main」检查自身的缺陷,而非本改动引入的回归,建议反馈给该检查的维护者,否则任何触及 managed schema 的 PR 都会被它读成合并阻塞。我不将其作为 Critical,因为证据表明本差异不可能造成它。

自我上次批准的 head 以来的变化为 18 个文件、+239/−114,其中没有生产 Java,也没有手写的生产 TypeScript:四份设计文档、一份模块文档、契约(约 104 行)、重新生成的客户端、十个 Java 测试文件与一个端到端用例;三个提交的标题都是 test,与内容一致。因此上次扫描的承重结论原样成立:分支基线包含今早合并的那个新增路由,该路由保留并改由实时消息分页提供,不会因删除快照存储而悬挂;被删类在整个 packages 下零引用;被删表、列、方法与记录在生产代码中零引用,仅存的出现位置是断言其不存在;替代读路径先校验会话归属并保留旧会话守卫,limit 超出 1 到 100 即抛错,因此服务层透传未钳制的 limit 不会造成无界读取;查询预算测试把快照写入计数改为断言快照 SQL 为零,比原先更严。

契约一侧现在由 CI 佐证而不仅靠阅读:契约版本唯一性报告 1.98.0 相对 main 唯一,契约测试在通过的 Java 任务内执行,Node 测试、Web Shell 端到端与视觉捕获均为绿,说明重新生成的客户端与修改后的契约可以通过类型检查。

两处对外可见的变化我自行核实过。其一,view 字段已从模型中移除(当前 head 零命中),因此未升级的客户端会发送一个未知属性;服务端模块内不存在全局严格反序列化配置,我找到的每一处启用未知属性失败的映射器都是内部持久化用途而非 MVC 请求体映射器,所以设计文档所说「沿用既有的未知属性处理」正是框架默认行为:该选择子被忽略而不是被拒绝;没有测试钉住这一点,属覆盖缺口而非缺陷。其二,/transcript/query 的 cursor 由十进制事件游标改为消息分页游标,旧快照游标被拒绝而非被重新解释,设计文档已说明,但上一轮新增的迁移说明段落只覆盖了 limit 上限与 view 选择子,建议补一句,因为客户端已保存的游标是唯一无法自行重建的东西。

本次批准未覆盖:我未逐行阅读约 104 行的契约差异、重新生成的客户端正文、被加强的测试正文与端到端用例,契约一致性依赖的是通过的契约测试与唯一性检查而非我的阅读。设计文档记录的生成表达式校验器改动与三处加强的反向夹具此前未在本地运行,其首次执行就是这条 Java 任务,现已由 CI 关闭而非由我关闭。两轮机器人评审都自述为「部分评审、缺口已披露、未做反向审计」,因此包括我在内,尚无评审者声称完整读过这份差异。

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Current-head clarification for the reviews by @yiliang114 and @qqqys (2193d519765ddec86bb4069f67830088e2dd8e13):

  • The MVC compatibility test already sends legacy view: messages to the three shared message-read routes, checks HTTP 200 and validates each response. It deliberately keeps the removed selector outside the canonical request schema.
  • The English migration note and Chinese equivalent already state that default transcript decimal cursors change to opaque message cursors, old cursors return 400 invalid_message_cursor instead of invalid_cursor, and clients must discard them and reload the first page. Numeric Public Items after and SSE afterSequence keep their semantics.
  • The current latest-main Flyway status is successful. The complete job log explicitly lists this PR as “No collision with main”. The prior bot failure status is retained; its run-7 link returns 404, so its claimed collision is not verified by an available execution log. No workflow change or rerun was made here.

Both approvals are on this head. The original formal bot CHANGES_REQUESTED remains untouched; all 25 inline threads are resolved. The approval-triggered full gate is still running, so this is not a complete-acceptance claim. No source change is needed for these already-addressed requests.


针对 @yiliang114 和 @qqqys 本轮评审的当前提交核实:

  • 上述 MVC 兼容测试已对三个共用消息读取路由发送旧 view: messages,断言 HTTP 200 并校验各自响应;已移除的选择参数不重新纳入规范请求 schema。
  • 英中迁移说明已明确默认 transcript 十进制游标改为不透明消息游标、旧游标返回 400 invalid_message_cursor(替代 invalid_cursor),客户端需丢弃后重读首个消息页;公开 Items 的数字 after 和 SSE afterSequence 语义保留。
  • 当前 latest-main Flyway 状态已成功,完整日志明确记录本 PR 与 main 无冲突。保留较早的机器人失败状态;其 run-7 链接返回 404,无法用执行日志核实所称版本冲突。本轮没有修改工作流或重跑 CI。

两次批准均针对当前 head。此前机器人的正式 CHANGES_REQUESTED 保持不动;全部 25 个行内线程均已解决。审批事件触发的完整 gate 尚在运行,不代表完整验收通过。上述要求已经具备,无需再改源码。

@doudouOUC
doudouOUC dismissed qwen-code-review-bot’s stale review October 30, 2026 00:56

Already have 2 approves

@doudouOUC
doudouOUC merged commit 619a601 into main Oct 30, 2026
307 of 314 checks passed
@doudouOUC
doudouOUC deleted the refactor/managed-remove-public-snapshots branch October 30, 2026 00:56
@github-actions

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 40979340577 · commit 2193d519765d

Failing tests

  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9dCancelledSendsDeliverOnlyWhatTheRelaySettledOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9cHarnessCrashesNeverMintARelayStepTwiceOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9bRefusedJournalCommitsHealOnlyThroughTheOriginalCommandOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9fPartialBroadcastAnswersHonestlyUnderAmbiguityOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9aLostRepliesResolveThroughOriginalIdentityOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7aLostAdapterRepliesRecoverByIdentityOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7dChannelCancellationsSettlePhysicallyOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7fUnknownDeliveryStaysHonestOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7bChannelStoreFailuresLeaveNoExternalEffectOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7eDeliveryReadsStayContinuousAcrossGapsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedProcessCrashIT.processCrashesNeverReplayHostedToolsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedProcessCrashIT.coordinatorRestartReattachesTheResidentTurnOnMySql
  • com.alibaba.qwen.code.managedagent.HostedMcpRestartFaultGatesIT.ownerReleaseRefusedThenSpringRestartReleasesTheHolderOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkflowFaultGatesIT.fg10aDigestIntegrityHoldsAcrossTamperAndFractionalArgsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.lostBrokerRepliesNeverReplayEffectsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.disconnectedObserversResumeWithoutReplayingTheToolOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.malformedShellUnicodeIsCorrectableBeforeAcquisition(String)[2]
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.sessionStoreFailuresNeverReplayEffectsOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.providerRetriesKeepContractsAndCloseAdmissionOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.cancellationRequiresPhysicalSettlementOnMySql
  • …and 22 more

Tracking issue

@github-actions

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 40979828462 · commit 2193d519765d

Failing tests

  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9dCancelledSendsDeliverOnlyWhatTheRelaySettledOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9cHarnessCrashesNeverMintARelayStepTwiceOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9bRefusedJournalCommitsHealOnlyThroughTheOriginalCommandOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9fPartialBroadcastAnswersHonestlyUnderAmbiguityOnMySql
  • com.alibaba.qwen.code.managedagent.HostedSessionRelayFaultGatesIT.fg9aLostRepliesResolveThroughOriginalIdentityOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7aLostAdapterRepliesRecoverByIdentityOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7dChannelCancellationsSettlePhysicallyOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7fUnknownDeliveryStaysHonestOnMySql
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7bChannelStoreFailuresLeaveNoExternalEffectOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedChannelFaultGatesIT.fg7eDeliveryReadsStayContinuousAcrossGapsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedProcessCrashIT.processCrashesNeverReplayHostedToolsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedProcessCrashIT.coordinatorRestartReattachesTheResidentTurnOnMySql
  • com.alibaba.qwen.code.managedagent.HostedMcpRestartFaultGatesIT.ownerReleaseRefusedThenSpringRestartReleasesTheHolderOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkflowFaultGatesIT.fg10aDigestIntegrityHoldsAcrossTamperAndFractionalArgsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.lostBrokerRepliesNeverReplayEffectsOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.disconnectedObserversResumeWithoutReplayingTheToolOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.malformedShellUnicodeIsCorrectableBeforeAcquisition(String)[2]
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.sessionStoreFailuresNeverReplayEffectsOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.providerRetriesKeepContractsAndCloseAdmissionOnMySql
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.cancellationRequiresPhysicalSettlementOnMySql
  • …and 22 more

Tracking issue

yiliang114 added a commit that referenced this pull request Oct 30, 2026
#15910)

* test(managed-agent): retry the items read through a lagging projection

The public reader answers 503 message_projection_pending while projection
catches up, and #15870 documents that as retryable. The crash fixture asserted
200 on the first response, so a coordinator restart -- exactly when projection
lags -- failed the gate with 'expected: 200' instead of polling (#15909).

Poll the read through that one response and widen the await budget to 60s;
every other status still fails the way it did.

* test(managed-agent): preserve projection retry bounds and wire contract

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Released in v0.26.5.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants