Skip to content

test(serve): share clamp fixture and pin socket pruning - #17841

Merged
yiliang114 merged 1 commit into
mainfrom
test/17781-serve-shutdown-pins
Nov 19, 2026
Merged

yiliang114 merged 1 commit into
mainfrom
test/17781-serve-shutdown-pins

Conversation

@yiliang114

Copy link
Copy Markdown
Collaborator

What this PR does

This test-only change removes the duplicated Local Control / remote-access clamp drive and adds the missing delete-on-close coverage requested by items 1–2 of #17781.

  • A single listener-kind-parameterized fixture now drives both pairing listeners through 51 admitted streams, the listener-scoped 52nd-stream 503, access-log attribution, primary-listener independence, per-listener occupancy/limits, plain and deep health checks, and slot release.
  • The lifecycle and Local Control suites now close one real socket, retain a second live connection, and assert that the already-closed socket is not revisited by the subsequent shutdown/disable force-close sweep. This observes registry pruning through the real consumer rather than exposing tracker internals.

There are no production-code, wire-protocol, CLI, TUI, or Web UI changes.

Why it's needed

The two clamp tests had drifted in both assertions and teardown, making future listener fixes easy to apply inconsistently. Both socket trackers already destroyed surviving connections at shutdown, but neither test suite proved that a normally closed connection left its tracker; removing the close-handler deletion therefore leaked one retained entry per connection without failing any pin.

Reviewer Test Plan

How to verify

Run from packages/cli unless noted otherwise:

  • npx vitest run src/serve/serve-app-lifecycle.test.ts src/serve/local-control/service.test.ts --coverage.enabled=false — 41 tests passed.
  • npx vitest run src/serve/server.test.ts --coverage.enabled=false -t 'Unified SSE admission/occupancy' — 13 tests passed, including both migrated clamp cases.
  • From the repository root: npx prettier --check packages/cli/src/serve/server.test.ts packages/cli/src/serve/serve-app-lifecycle.test.ts packages/cli/src/serve/local-control/service.test.ts and npx eslint packages/cli/src/serve/server.test.ts packages/cli/src/serve/serve-app-lifecycle.test.ts packages/cli/src/serve/local-control/service.test.ts --max-warnings 0 — both passed.
  • NODE_OPTIONS='--max-old-space-size=6144' npm run build --workspace @qwen-code/qwen-code and NODE_OPTIONS='--max-old-space-size=6144' npm run typecheck --workspace @qwen-code/qwen-code — both passed.
  • Mutation controls: temporarily removing this.openSockets.delete(socket) and sockets.delete(socket) from their respective socket close handlers made each new pruning test fail with one unexpected destroy call on the already-closed socket; restoring the production files restored the green focused tests.

The full server.test.ts file was also run twice. The final run passed 1,514 of 1,518 tests but retained four unrelated failures: two idempotency-ring cases, one session-organization error case, and one #17502 cleanup-hook timeout. The #17502 case passed when rerun in the smaller isolated selection; the other three hit their explicit long-suite timeouts when grouped in that selection. Neither clamp case failed in this final full run, and the complete 13-test unified section passes independently.

Pre-push self-review: separate read-only correctness/test-integrity and simplicity passes both returned no findings. Local CI review-gate: UNVERIFIED. The full qwen review run attempt returned completed: false after 773,695 ms with no composed report; a bounded diagnostic timed out without a verdict, the wrapper rejected the direct --auth-type alignment flag, and a final configured-provider attempt was stopped before producing a verdict. These attempts do not provide a CI-engine approval and are not presented as one.

Evidence (Before & After)

N/A — this is a test-only refactor and coverage change. UI verification: N/A because there is no changed reachable user surface to exercise: the inspected runQwenServe / LocalControlService consumers remain byte-for-byte unchanged in the candidate, and the new checks observe those existing paths through Vitest rather than changing CLI, TUI, Web UI, API, or wire behavior.

Mutation evidence is discriminating rather than coverage-only: each new pin fails only after its corresponding production delete-on-close statement is removed.

Tested on

OS Status
🍏 macOS ✅
🪟 Windows ⚠️
🐧 Linux ⚠️

Environment (optional)

Node.js v22.23.4 on macOS, using repository workspace dependencies and built workspace prerequisites. Runtime/TUI verification N/A for the test-only reason above.

Risk & Scope

  • Main risk or tradeoff: the pruning pins use real loopback connections, so teardown is explicit and the wait/force-close operations are bounded; no production timing or lifecycle behavior is changed.
  • Not validated / out of scope: Windows and Linux were not run locally; the final full-server run's four residual failures are reported above instead of being omitted. Per the assigned scope, this covers only items 1–2 of test(serve): cover the deferred shutdown-tracker and clamp-fixture gaps from #17737 review #17781; the issue's separate waitForClosingListener() upgraded-socket item and the thread's drain-dispose discussion are unchanged, so this PR references rather than auto-closes the issue.
  • Breaking changes / migration notes: none; no public API or behavior changes.

Linked Issues

Refs #17781. Follows #17737.

中文说明

这个 PR 做了什么

这个仅测试变更按 #17781 第 1–2 项要求,移除 Local Control / remote-access 钳制驱动的重复实现,并补上缺失的 close 删除覆盖。

  • 一个按 listener kind 参数化的共享夹具现在驱动两个配对 listener 完成相同流程:51 条准入流、第 52 条 listener 范围 503、访问日志归因、主 listener 独立性、逐 listener 占用/上限、普通与 deep health 检查,以及槽位释放。
  • lifecycle 与 Local Control 套件现在先关闭一个真实 socket,再保留第二个活跃连接,并断言后续 shutdown/disable 强制关闭扫描不会再次访问已关闭 socket。这里通过真实消费者观察注册表剪枝,而不暴露 tracker 内部状态。

没有生产代码、线路协议、CLI、TUI 或 Web UI 变更。

为什么需要

两份钳制测试的断言与清理逻辑已经漂移,后续 listener 修复很容易只应用到一份。两个 socket tracker 都会在 shutdown 时销毁幸存连接,但此前没有任何测试证明正常关闭的连接会离开 tracker;因此删除 close 处理器中的删除语句会让每个连接永久多保留一项,而现有测试仍会通过。

评审测试计划

如何验证

除非另有说明,均在 packages/cli 下运行:

  • npx vitest run src/serve/serve-app-lifecycle.test.ts src/serve/local-control/service.test.ts --coverage.enabled=false——41 项测试通过。
  • npx vitest run src/serve/server.test.ts --coverage.enabled=false -t 'Unified SSE admission/occupancy'——13 项测试通过,包括迁移后的两个钳制用例。
  • 在仓库根目录运行:npx prettier --check packages/cli/src/serve/server.test.ts packages/cli/src/serve/serve-app-lifecycle.test.ts packages/cli/src/serve/local-control/service.test.ts 与 npx eslint packages/cli/src/serve/server.test.ts packages/cli/src/serve/serve-app-lifecycle.test.ts packages/cli/src/serve/local-control/service.test.ts --max-warnings 0——均通过。
  • NODE_OPTIONS='--max-old-space-size=6144' npm run build --workspace @qwen-code/qwen-code 与 NODE_OPTIONS='--max-old-space-size=6144' npm run typecheck --workspace @qwen-code/qwen-code——均通过。
  • 变异对照:分别从对应 socket close 处理器中临时删除 this.openSockets.delete(socket) 与 sockets.delete(socket),两个新剪枝用例均按预期失败,并各自观察到对已关闭 socket 的一次意外 destroy 调用;恢复生产文件后,聚焦测试恢复通过。

完整 server.test.ts 文件也运行了两次。最后一轮 1,518 项测试中 1,514 项通过,仍有四个无关失败:两个幂等环用例、一个会话组织错误用例,以及一个 #17502 清理 hook 超时。#17502 用例在更小的隔离选择中重跑通过;另外三个在该选择中一起运行时达到了各自显式的长套件超时。最后一轮完整运行中两个钳制用例均未失败,完整的 13 项 unified section 独立运行通过。

推送前自审:独立的只读正确性/测试完整性检查与简洁性检查均未发现问题。本地 CI review-gate:UNVERIFIED(未验证)。 完整的 qwen review run 尝试在 773,695 ms 后返回 completed: false,没有 composed 报告;有界诊断运行超时且没有 verdict;wrapper 拒绝了直接对齐的 --auth-type 参数;最后一轮使用已配置 provider 的尝试在产生 verdict 前停止。这些尝试不构成 CI 引擎批准,本文也不将其表述为批准。

证据(前后对比)

N/A——这是仅测试的重构与覆盖变更。UI 验证:N/A,因为没有已改变的可达用户表面可供验证:候选中的 runQwenServe / LocalControlService 消费者保持逐字节不变,新检查通过 Vitest 观察这些现有路径,未改变 CLI、TUI、Web UI、API 或线路行为。

变异证据具有判别力,而非只提供行覆盖:每个新用例仅在对应生产 close 删除语句被移除后失败。

测试平台

操作系统 状态
🍏 macOS ✅
🪟 Windows ⚠️
🐧 Linux ⚠️

环境(可选)

macOS 上的 Node.js v22.23.4,使用仓库 workspace 依赖与已构建的 workspace 前置产物。运行时/TUI 验证因上述仅测试原因 N/A。

风险与范围

  • 主要风险或取舍:剪枝用例使用真实 loopback 连接,因此清理显式执行,等待与强制关闭操作均有界;没有改变生产时序或生命周期行为。
  • 未验证/范围外:未在本地运行 Windows 和 Linux;最后一轮完整 server 测试的四个残余失败已在上文报告,而非省略。按分配范围,本 PR 只覆盖 test(serve): cover the deferred shutdown-tracker and clamp-fixture gaps from #17737 review #17781 第 1–2 项;issue 中另列的 waitForClosingListener() 已升级 socket 项与讨论串中的 drain-dispose 讨论均未改变,因此本 PR 只引用 issue,不自动关闭它。
  • 破坏性变更/迁移说明:无;没有公开 API 或行为变更。

关联 Issue

Refs #17781。承接 #17737。

- Share the pairing-listener clamp drive and harmonize its assertions.
- Pin pruning of normally closed sockets through the existing shutdown and disable sweeps.
@qwen-code-review-bot

qwen-code-review-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Qwen Triage finished — CI landed green on ddb92f1 and the deferred approval was posted. finalize run

✅ Qwen Triage 已完成 —— ddb92f1 的 CI 全绿,延迟审批已提交。查看 finalize 运行

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓ — all sections present, including the Chinese translation and an honest "Tested on" matrix.

Problem: observed, not theoretical. This is the test-coverage gap recorded in #17781 (items 1–2), filed by a maintainer from the #17737 review: the two clamp drives had drifted (67 of 87 lines identical), and neither socket tracker's delete-on-close half had a pin — removing it would leak one retained entry per connection with every test still green. The PR's mutation controls demonstrate exactly that failure mode.

Direction: aligned — this is deferred review debt being paid down, requested by the issue itself. No CHANGELOG signal needed for a test-only change. Scope is honest: item 3 (waitForClosingListener() upgraded-socket pin) is explicitly left out, and the issue is referenced rather than auto-closed.

Size: test-only — 0 production lines, 252 test lines (+139/−113) across 3 files, no generated/schema changes. No core paths touched, no maintainer escalation needed.

Approach: the scope feels right. One listener-kind-parameterized fixture replaces the two drifted copies (net −67 lines in server.test.ts), and the two new pruning pins observe the trackers through the real shutdown/disable consumers instead of exposing internals — which is what the issue asked for. Nothing drive-by in the diff.

Risk: no elevated risk signals — all changed files are tests, and the production consumers are byte-for-byte unchanged.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓ —— 各节齐全,含中文翻译与如实标注的测试平台矩阵。

问题:已观测,非理论性。这是 #17781(第 1–2 项)记录的测试覆盖缺口,由维护者从 #17737 评审中立 issue:两份钳制驱动已漂移(87 行中 67 行相同),且两个 socket 跟踪器的 close 剪枝半都没有钉——删掉它会每连接泄漏一项而所有测试仍绿。PR 的变异对照正好演示了这一失败模式。

方向:对齐——这是按 issue 要求偿还的评审延后项。仅测试变更无需 CHANGELOG 信号。范围诚实:第 3 项(waitForClosingListener() 已升级 socket 钉)明确不做,issue 只引用不自动关闭。

规模:仅测试——0 行生产代码,3 个文件共 252 行测试(+139/−113),无生成/schema 改动。未触及核心路径,无需维护者升级。

方案:范围合理。一个按 listener kind 参数化的夹具取代两份漂移副本(server.test.ts 净 −67 行),两个新剪枝钉通过真实 shutdown/disable 消费者观察跟踪器,而非暴露内部状态——正是 issue 的要求。diff 无夹带改动。

风险:无升级风险信号——改动文件均为测试,生产消费者逐字节不变。

进入代码审查 🔍

— Qwen Code · qwen4-max

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

@qwen-code-review-bot

qwen-code-review-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Code review — no blockers. I checked the new pins against the production code they observe, and the oracles hold:

  • Both trackers (serve-app-lifecycle.ts and local-control/service.ts) add on 'connection' and prune via socket.once('close', …delete…), and both force-close sweeps (forceCloseConnections / the close() helper) call socket.destroy() unconditionally on every tracked survivor. So spying on the already-closed socket's destroy and asserting it is never called during the sweep is a discriminating oracle: drop the delete-on-close line and the sweep revisits the closed socket, tripping the spy. The production prune listener is attached at connection time, before the test's close-resolve listener, so there is no race between "closed" and "pruned".
  • The shared fixture is sound for both kinds: both helpers return handle/lanBase/lanAuth/restore, handle.server.address() yields the primary port for both, and await pair.restore() covers the pairing fixture's async restore and the remote fixture's sync one. The unified drive actually strengthens the remote-access variant — it now asserts the full per-listener occupancy map, the limits map, and plain /health, which previously only the pairing copy checked. Teardown keeps the bounded rm retries and the corrected ENOTEMPTY comment.
  • Conventions are fine: collocated tests, no new imports needed in service.test.ts (all already present), the one added import in the lifecycle test is used, comments only where the why is non-obvious, and the finally blocks make teardown explicit and idempotent.

Not verified: the mutation controls are the author's claim, not independently re-run — triage never executes PR code. Static review above confirms the oracles discriminate, but a green suite alone proves the pins pass, not that they fail when the production delete is removed. Also not verified: Windows/Linux behavior — the author ran macOS only, and CI's Windows/macOS unit matrices are skipped for this PR, so the new real-socket pins get Linux CI coverage.

Sandboxed verification would settle this: @qwen-code /verify — that each new pruning pin actually fails with its production delete-on-close statement removed (mutation discrimination), which the green suite cannot show.

CI evidence (fetched once at review time; the finalize workflow updates the table below when CI settles): 40 check runs on the reviewed commit — 8 success, 22 skipped, 9 in progress, 1 waiting, zero failures. The checks that matter most here (Lint & Static, the Linux unit-test tree, Serve A/B) are still running, so the suites that actually execute these tests have not reported yet. The Windows/macOS matrices and integration lanes are skipped, not failed.

Final CI results for ddb92f1 (auto-updated by the triage finalize job after CI completed):

Check Conclusion
Build unit-test tree (Linux, Node 22.x) ✅ success
Check TUI impact ✅ success
Classify PR ✅ success
Integration Tests (no-AK, No Sandbox) ✅ success
Integration Tests (no-AK, shard 1/2) ✅ success
Integration Tests (no-AK, shard 2/2) ✅ success
Lint & Static (ubuntu-latest, Node 22.x) ✅ success
Linux unit tests (shard 1/2) ✅ success
Linux unit tests (shard 2/2) ✅ success
Managed Agent fast tier ✅ success
Managed loop (kernel) ✅ success
Managed loop (shared) ✅ success
SDK Java (fast) / Flyway migration version uniqueness ✅ success
SDK Java (fast) / Real daemon E2E / Java 11 ✅ success
SDK Java (fast) / ubuntu-latest / Java 21 ✅ success
Select the Managed Agent tier ✅ success
Serve A/B (ubuntu-latest, Node 22.x) ✅ success
Test (ubuntu-latest, Node 22.x) ✅ success
TUI parity snapshots (ink vs opentui) ✅ success
web-shell E2E Smoke (shard 1/2) ✅ success
web-shell E2E Smoke (shard 2/2) ✅ success
web-shell E2E Smoke (ubuntu-latest, Node 22.x) ✅ success

One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。

Real-scenario testing: N/A — test-only change, no CLI/TUI/Web UI/wire surface touched; the production consumers are unchanged.

中文说明

代码审查——无阻断项。我把新钉与其观察的生产代码逐一核对,oracle 成立:

  • 两个跟踪器都在 'connection' 时加入、'close' 时剪枝,两处强制关闭扫描都对集合中每个幸存 socket 无条件调用 destroy()。因此对已关闭 socket 的 destroy 做 spy 并断言扫描期间不被调用,是具有判别力的 oracle:删掉 close 剪枝语句,扫描就会再次访问已关闭 socket,触发 spy。生产剪枝监听器在连接时注册,早于测试的 close-resolve 监听器,"已关闭"与"已剪枝"之间无竞态。
  • 共享夹具对两种 listener 都成立:两个 helper 返回相同的 handle/lanBase/lanAuth/restore 形状,handle.server.address() 对两者都能取到主端口,await pair.restore() 兼容配对夹具的异步 restore 与远程夹具的同步 restore。统一驱动实际上强化了 remote-access 变体——现在断言完整的逐 listener 占用表、上限表与普通 /health,此前只有配对副本检查这些。清理保留了有界的 rm 重试与修正后的 ENOTEMPTY 注释。
  • 规范无问题:测试同目录放置,service.test.ts 无需新增导入(均已存在),lifecycle 测试新增的一条导入有使用,注释只在 why 不显然处出现,finally 使清理显式且幂等。

未验证:变异对照是作者自述,未独立重跑——triage 从不执行 PR 代码。上述静态审查确认 oracle 有判别力,但绿套件只证明钉通过,不证明移除生产删除语句后钉会失败。另未验证:Windows/Linux 行为——作者仅在 macOS 运行,且本 PR 的 CI Windows/macOS 单元矩阵被跳过,新真实 socket 钉只有 Linux CI 覆盖。

沙箱验证可以补齐:@qwen-code /verify——验证每个新剪枝钉在对应生产 close 删除语句被移除后确实失败(变异判别力),这是绿套件无法展示的。

CI 证据(审查时一次性拉取,CI 落定后由 finalize 工作流更新下表):审查提交上共 40 个 check——8 成功、22 跳过、9 进行中、1 等待,零失败。最关键的检查(Lint & Static、Linux 单元测试树、Serve A/B)仍在运行,真正执行这些测试的套件尚未出结果。Windows/macOS 矩阵与集成通道为 CI 跳过,并非失败。

真实场景测试:N/A——仅测试变更,未触及 CLI/TUI/Web UI/线路表面,生产消费者不变。

— Qwen Code · qwen4-max

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

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

Confidence: 4/5 — clean test-only change that does exactly what the maintainer-filed issue asked; the two open items are procedural (CI still landing) and the author-reported mutation evidence, not doubts about the code.

Stepping back: my independent proposal before reading the diff was "one kind-parameterized clamp helper plus two close-then-sweep pins that spy on the closed socket's destroy" — the PR is precisely that, and it goes slightly further by strengthening the remote-access variant's assertions to match the pairing copy. The pins observe pruning through the real consumers rather than exposing tracker internals, which is the harder but more durable choice the issue explicitly preferred. Net −67 lines in the clamp section, honest scope (item 3 deferred, issue referenced not closed), and teardown that is explicit and bounded. In six months this is the fixture I would want to extend, not curse.

Non-blocking notes, for the record: the mutation-discrimination claim rests on the author's controls plus my static confirmation of the oracles — @qwen-code /verify can settle it independently if desired; and with the Windows/macOS matrices skipped, the new real-socket pins ride on Linux CI (the author verified macOS locally).

Verdict: approve. Five PR CI workflow runs are still in flight on ddb92f1cddeb3354d30a36d0d0df99db3fcac8bb, so approval is deferred until CI lands green on that commit — the finalize workflow posts the commit-pinned approval automatically, and withholds it if anything lands red or the head moves.

中文说明

置信度:4/5——干净的仅测试变更,完全按维护者所立 issue 的要求执行;两个未决项是程序性的(CI 尚未落定)与作者自述的变异证据,而非对代码的疑虑。

回顾:读 diff 前我的独立方案是"一个按 kind 参数化的钳制 helper,加两个先关闭再扫描、对已关闭 socket 的 destroy 做 spy 的钉"——PR 正是如此,且更进一步把 remote-access 变体的断言强化到与配对副本一致。新钉通过真实消费者观察剪枝而非暴露跟踪器内部,这是 issue 明确倾向的更难但更耐久的选择。钳制段净 −67 行,范围诚实(第 3 项延后,issue 只引用不关闭),清理显式且有界。半年后这是我会愿意扩展而非抱怨的夹具。

非阻断记录:变异判别力的结论依赖作者的对照实验加我对 oracle 的静态确认——如需独立验证可用 @qwen-code /verify;Windows/macOS 矩阵被跳过,新真实 socket 钉依赖 Linux CI(作者已在本地验证 macOS)。

结论:批准。该提交上仍有 5 个 PR CI 工作流在运行,批准延后至 CI 在该提交上全绿——finalize 工作流会自动提交绑定该提交的批准;若有检查变红或 head 移动则不予批准。

— Qwen Code · qwen4-max

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

@qwen-code-review-bot

Copy link
Copy Markdown
Collaborator

🩺 serve daemon A/B

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

health-deep-with-session

field PR base (before) this PR (after)
activeWorkStaleMs 80 78

— Qwen Code · serve A/B

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

LGTM, looks ready to ship — CI landed green after the review. ✅

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

Code review — approved

Scope: the three test files at ddb92f1 (base 933497a). Production consumers are untouched — the diff is 0 production lines.

Checked (both oracles against the production code they observe)

  • serve-app-lifecycle.ts:77-79 adds on 'connection' and prunes via socket.once('close', …); forceCloseConnections() destroys every tracked survivor first thing in the sweep (closeAllConnections() + unconditional destroy()), so a retained-but-closed socket is observable only as an extra destroy() call. Same shape in local-control/service.ts:274-276 / close() at 553-561. The production prune listener registers at connection time, i.e. before the test's close-resolve listener, so "closed" and "pruned" cannot race.
  • Shared fixture is equivalent for both kinds: both helpers return handle/lanBase/lanAuth/restore, handle.server.address() is the same port the remote fixture used to return as primaryPort, and await pair.restore() covers the async pairing restore and the sync remote one. The unified drive is stricter for remote-access: full per-listener occupancy map, limits map and plain /health were previously asserted only in the pairing copy.
  • byListener is a Record<ListenerKind, number> initialised with all three keys (sse-occupancy.ts:52-57), and maxSseConnectionsPerListener comes from sseListenerCapsForStatus(opts), which is kind-independent — so the exact-equality assertions are safe in both modes.

Ran (Node 22, standalone replication of the tracker + force-close sweep, since no repo checkout exists here — the vitest suites themselves were not executed): with prune-on-close, 0 extra destroy() calls on the already-closed socket; with the delete line withheld, 1. The probe discriminates, which is the property the two new pins rely on.

No blocking findings. Approval blockers: none.

Not covered: the author's vitest runs and mutation controls were not re-executed here; Windows/Linux local runs remain untested (macOS only per the PR). One non-blocking nit at most — in the new service.test.ts case service.enable()/first connect sit just outside the try, so a connect failure would leave the listener enabled for the rest of the file; low impact and consistent with the file's other failure-only paths, so I am not asking for a change.

Cross-check: the prior qwen-code-review-bot review reaches the same conclusions; nothing in it that I missed. Its one open caveat — that mutation discrimination is the author's claim — is narrowed here to the mechanism level by the probe above. Its note that Windows/macOS matrices were skipped stands.

Reviewed with AI assistance.

@github-actions

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 44530563021 · commit ddb92f1cddeb

Failing tests

  • com.alibaba.qwen.code.managedagent.ManagedWorkspaceArtifactMySqlIT.theWorkspacePagePredicateHasAnIndexAccessPath
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.sessionStoreFailuresNeverReplayEffectsOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.shellOutputFailuresNeverReplayEffectsOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[1]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[2]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.durableCloseStopsOriginalWorkersAndRetainsHistoryAndFiles(boolean)[2]
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2ScannerFiresOneOccurrenceOnMySql
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2SpringKillBeforeAnswerNeverFiresTwice
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2TwoScannerRaceFiresOnce
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2SpringKillBeforeWatermarkNeverFiresTwice
  • com.alibaba.qwen.code.runtimebroker.BrokerRenewalPinningTest.renewalGuardMustNotPinCarriersWhileTheHandleWriteBlocks
  • com.alibaba.qwen.code.runtimebroker.ExternalShellWorkerProtocolTest.copiesALargeCaptureBlockByBlockWithoutLosingOrReorderingBytes

Tracking issue

@github-actions

Copy link
Copy Markdown
Contributor

Managed Agent gate failed

Run 44536298590 · commit ddb92f1cddeb

Failing tests

  • com.alibaba.qwen.code.runtimebroker.ExternalShellWorkerProtocolTest.copiesALargeCaptureBlockByBlockWithoutLosingOrReorderingBytes
  • com.alibaba.qwen.code.runtimebroker.provisioning.local.LocalProcessExecutorTest.readerRejectionSpawnsNothingAndCapacityRecovers
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.sessionStoreFailuresNeverReplayEffectsOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedWorkspaceToolTurnIT.shellOutputFailuresNeverReplayEffectsOnMySql(CapturedOutput)
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[1]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.publicShellReceiptFaultsNeverRepeatEffects(String)[2]
  • com.alibaba.qwen.code.managedagent.HostedPublicWorkspaceIT.durableCloseStopsOriginalWorkersAndRetainsHistoryAndFiles(boolean)[2]
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2ScannerFiresOneOccurrenceOnMySql
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2SpringKillBeforeAnswerNeverFiresTwice
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2TwoScannerRaceFiresOnce
  • com.alibaba.qwen.code.managedagent.HostedAutomationSpringCrashIT.fg11c2SpringKillBeforeWatermarkNeverFiresTwice
  • com.alibaba.qwen.code.managedagent.ManagedWorkspaceArtifactMySqlIT.theWorkspacePagePredicateHasAnIndexAccessPath

Tracking issue

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants