Skip to content

fix(plugins): preserve response-body transport failures - #5661

Merged
t0saki merged 8 commits into
volcengine:mainfrom
ktz03:fix/plugin-body-transport
Oct 9, 2026
Merged

t0saki merged 8 commits into
volcengine:mainfrom
ktz03:fix/plugin-body-transport

Conversation

@ktz03

@ktz03 ktz03 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

When a server sends successful headers and then stalls or resets the response body, the shared HTTP client treats response.json()'s transport rejection as an empty JSON body. Default callers receive false success; strict callers receive a non-retryable HTTP 200 failure. The public message path consequently does not preserve the request in its pending queue.

Only completed JSON parsing failures retain the existing fallback. Abort and body-transport errors reach the existing status-0 envelope and retry classification.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #5658. The issue was filed before implementation.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Catch only SyntaxError when parsing a completed response body. Other errors use the existing outer transport-error handler.
  • Add four real loopback HTTP cases to the existing shared HTTP test file: body timeout and body reset, each with default and strict JSON handling.
  • Regenerate the three committed HTTP runtime copies and bump the six affected plugin releases, including their companion manifests, DSH runtime version and lock-file root versions.

Testing

Current verification — main 961fb46 synchronization (2026-10-08)

Current head af42c6c686190cddb9f7c12553c3a92fe9dbcc21 normally merges main 961fb4639505cff3051cc8faf74c757d50e085f0 into 566b6201e48caa1e9826794c173080f80fe72b10. The original fix and regressions are retained, including the upstream #5738 usage/configuration changes and #5733 dependency ranges and lock entries. Beyond the automatic merge, only 13 version fields in 12 metadata files advance the five affected releases. Versions are Claude 0.7.6, Codex 0.11.5, agent hooks 0.5.14, OpenCode 0.5.8, DSH 0.5.20, and Pi 0.4.13; paired/config/lock versions align and all six strictly exceed main. DSH 0.5.20 is unchanged by this second refresh.

Windows/WSL Node 24.21.0: HTTP transport/synchronization 32 passed, DSH 95 passed / 1 opt-in live-recall skip, shared config/sync 74 passed, and current Codex config/marketplace/usage 72 passed on each platform. Existing dependency installations were reused. Full plugin/installer/OpenClaw/server suites were not repeated for this scoped refresh.

The generator and version gate on the real committed HEAD pass. Matrices overlap and are not added together. Eight full-plugin skips mean one live recall, four optional Pi SessionManager cases, and three optional Pi transcript-helper cases. No full local server/API, live authentication/models, deployed OpenViking server, real host UI/IM, macOS or performance validation is claimed.

Current official CI

Official checks rechecked at 2026-10-08T11:58:00.697067+00:00 for head af42c6c686190cddb9f7c12553c3a92fe9dbcc21: 5 SUCCESS / 4 SKIPPED / 0 failures. All 2 parent runs and all actual jobs are completed.

  • Plugin job 113262516347: 1280 passed / 8 skipped / 0 failed; installer 22 passed / 0 skipped / 0 failed. The eight plugin skips are one opt-in live recall, four optional Pi SessionManager cases and three optional Pi transcript-helper cases.
  • API/CLI job 113262515900: filesystem 14 passed; basic API 54 passed / 1 skipped; released CLI 0.4.4 compatibility 16 passed; source CLI 25 passed / 21 skipped. The basic Find test skips after a 401 because embedding credentials are unavailable. Source CLI skips are 19 upstream-authentication cases, one existing timeout-parameter mismatch, and one missing show-skill fixture.
  • OpenClaw job 113266067438: 42 files / 746 tests passed. The official command excludes architecture-boundaries.test.ts; it was not executed.
  • check-deps 113262516541 and plugin-versions 113262516658 succeed; these are static dependency/version checks.

Conditional skips: build, cuvs-tests, langchain-tests, sdk-python-tests. These jobs were not executed.

All 5 completed non-skipped job logs / 896,329 bytes were read in full and verified against fresh complete run/job metadata. Every log records checkout 69340242dce647468f9e313ef5ca7fa016bd3a97; its REST-confirmed parents are main 961fb4639505cff3051cc8faf74c757d50e085f0 and head af42c6c686190cddb9f7c12553c3a92fe9dbcc21, and tree 45d1eda5fb2148238f35d09363f718cc83203913 exactly matches the reviewed/committed tree.

These results cover the recorded main 961fb463 checkout. They do not establish results for a later complete main merge, full authentication/VLM/Embedding, a deployed OpenViking service, real-host UI/IM, online-model behavior, macOS or performance. Historical results below remain attached to their named heads.

Historical local validation — before head af42c6c

Historical verification — 566b620 before main 961fb46

Current head 566b6201e48caa1e9826794c173080f80fe72b10 is an ordinary merge of main 57a6ea5fdef4f62456996d3dac5583ba36fe1420 into 73622dd1f6965550bc03aefe360e6d9bc913fdd4. The original implementation, regressions and generated copies are unchanged; upstream changes, including #5733 dependency ranges and lock entries, are retained. Beyond the automatic merge, only the four DSH version fields in config/package/lock metadata advance from 0.5.19 to 0.5.20. The six releases are Claude Code 0.7.5, Codex 0.11.4, agent hooks 0.5.13, OpenCode 0.5.7, DSH 0.5.20, and Pi 0.4.12, with paired/config/lock versions aligned and all six strictly newer than main. Generator, syntax and the version gate on the real committed HEAD pass.

On Windows and WSL with Node 24.21.0, HTTP transport and synchronization: 32 passed on each platform; DSH: 95 passed / 1 opt-in live-recall skip on each; shared plugin-config and synchronization: 74 passed on each. Existing locked dependencies were reused, without a fresh installation. These scopes overlap and are not added together. Full plugin/installer/OpenClaw/server suites were not repeated for this release synchronization; their earlier results below belong to the named historical heads. This scoped check does not establish Windows-wide success, live authentication/models, real host UI/IM, a deployed OpenViking server, macOS or performance coverage.

Latest main 35fa35bea39cd60503060f0f82de111e21a50844 differs only in .github/workflows/docs-tos.yml. The actual merge is clean and the product scopes match this reviewed/tested tree; the complete later main merge tree was not tested locally. A later landing still needs a fresh version comparison.

Historical official CI — 566b620 before main 961fb46

Actual jobs collected at 2026-10-08T09:27:35.718147+00:00 for head 566b6201e48caa1e9826794c173080f80fe72b10: 4 SUCCESS / 1 IN_PROGRESS / 4 SKIPPED. 1 parent run(s) completed; 1 remain unfinished. The individual actual jobs and completed full-log results are separated below.

The completed plugin job's full log shows 1279 passed / 8 skipped / 0 failed, then installer 22 passed / 0 failed. Its eight plugin skips are one live recall, four optional Pi SessionManager cases and three optional Pi transcript-helper cases.
The completed OpenClaw job's full log shows 42 files / 746 tests passed. architecture-boundaries.test.ts is excluded by the official command and was not executed.
These 4 completed non-skipped job logs were read in full (318,977 bytes), after their parent runs completed. Their log-recorded checkout is 683a5a0611bf6725a38aee1b8d284d46e8457933, merging this head into 35fa35bea39cd60503060f0f82de111e21a50844. Dependency/version checks are static checks.

API/CLI is still unfinished, so current-head API/released-CLI/source-CLI pass counts are not claimed. Other successful job metadata without a completed parent run and full log does not establish test counts. Earlier full logs and successful API/CLI counts below remain historical and do not establish this new head's results.

Historical verification — 73622dd / 55c3493 (2026-10-08)

Current head 73622dd1f6965550bc03aefe360e6d9bc913fdd4 normally merges official main 55c34934e7b61a8755303e0df1da7a4d4cffcc53. The original fix, regressions and generated copies are unchanged; upstream #5733 and #5737 are retained. Releases are Claude Code 0.7.5, Codex 0.11.4, agent hooks 0.5.13, OpenCode 0.5.7, DSH 0.5.19, and Pi 0.4.12, each strictly above this main with paired/configuration/lock versions aligned. The real committed-head version gate and generator pass. A contribution landing later still needs a fresh comparison against then-current main.

Local Windows/WSL Node 24.21 validation of this exact committed tree:

  • Original focus, HTTP transport and synchronization: 32 passed on each platform.
  • DSH 95 passed / 1 opt-in live-recall skip, and Codex configuration 16 passed, on each platform.
  • Six related shared files plus eight Claude test files: WSL 223 passed; Windows 221 passed / 2 failed. The two capture-state ENOENT failures also occur on untouched exact main 55c34934 using the same command, assertions and fresh temporary directory. They are not counted as passing tests. These overlapping scopes are not added together.

Official current-head checks collected at 2026-10-08T06:32:39.639098+00:00: 5 successful / 4 conditional skips / 0 failures, with no running jobs. The current head remains draft.

  • Plugin job 113169820662: 1279 passed / 8 skipped / 0 failed, then installer 22 passed. Skips are one live-recall, four optional Pi SessionManager and three optional Pi transcript-helper tests.
  • OpenClaw job 113169909023: 42 files / 746 tests passed. The command excludes architecture-boundaries.test.ts; that file was not executed. Version/dependency checks also succeed. These completed jobs' full logs were read.
  • API/CLI job 113169820063 completed SUCCESS at 2026-10-08T06:18:22Z. Its full 578,053-byte log shows filesystem 14 passed, basic API 54 passed / 1 skipped, released CLI 0.4.4 compatibility 16 passed, and source CLI 25 passed / 21 skipped. The basic Find case skips after a 401 with unavailable embedding credentials; source CLI skips are 19 upstream-authentication cases, one existing timeout-parameter mismatch, and one missing show-skill fixture. This run uses minimal VLM/Embedding configuration and does not establish full authentication, online-model or real-host coverage.

The API job checked out 327568588a88e5d1bc9f727e4e6f2a8f5f36007d, with actual parents main 55c34934e7b61a8755303e0df1da7a4d4cffcc53 and this head, tree db514be9a3cda9e651c049702fd5c0fdfa4e644d equal to the committed/reviewed tree. Older successful API counts in named historical sections remain attached to those old heads.

The completed plugin job checked out 327568588a88e5d1bc9f727e4e6f2a8f5f36007d with actual parents main 55c34934e7b61a8755303e0df1da7a4d4cffcc53 and this head; its tree db514be9a3cda9e651c049702fd5c0fdfa4e644d equals the reviewed/committed tree. This local check did not run a full server or repository suite, real host UI/IM, deployed OpenViking, online models, macOS or performance validation. Official skips do not establish full VLM/Embedding/authentication coverage.

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux (Ubuntu WSL, native Linux Node 24.21.0)
    • macOS
    • Windows (Node 24.21.0)

Current head 62c20cf9 normally merges official main 36ee31ab. The existing fix, regressions and generated runtime copies are unchanged; only the paired Claude manifest/package release advances to 0.7.3. All six affected release versions are strictly newer than this main, and unrelated upstream files are preserved.

  • Node 24.21.0: the original focused regressions pass 32/32 on Windows and Ubuntu WSL. The 12 related shared contract files plus eight Claude .mjs suites pass all 219 observations on WSL. Windows passes 217, with two capture-fixture ENOENT failures; an independent exact-main 36ee31ab comparison under fresh TEMP/TMP has the same two failures (51 passed out of 53 Claude observations). Their causes were not investigated in this synchronization.
  • The official post-commit version gate, generated-copy consistency, changed-module syntax and staged diff checks pass. The Claude-specific mods/usage/sources.test.ts host suite was not run because claude plugin test is unavailable. The newly merged context-gateway/server changes, real-host integration, online model behavior and performance were not tested locally.

New-head official CI snapshot at 2026-10-06T09:18:42.865672+00:00: 1 IN_PROGRESS / 3 SUCCESS / 1 FAILURE / 4 SKIPPED. API/CLI job 112196930830 is in_progress at Install dependencies using uv sync. Current-head plugin job 112196931733 passes 1472 tests with 28 skips (one opt-in live recall and 27 optional Pi runtime/helper cases); its installer step passes 22 with no skips. Version and dependency checks succeed. OpenClaw job 112197514958 passes 718 and fails the unchanged Experience skill-copy equality (OpenCode, pi versus OpenCode); the assertion and both skill inputs are byte-identical to main. The official checkout add4afba has parents 36ee31ab + 62c20cf9 and the tested head tree. API/CLI tests have not run yet, so no API/CLI pass or skip counts are claimed for this head. The following earlier-head CI and local results remain historical and are not attributed to this new head.

Historical local revision 79eee9fef2e1865c23f8b72bc5491b0b034d3540 merges main 62ac99f5, retaining the original HTTP implementation and regressions. Claude manifest/package versions are paired at 0.7.2; the other five release versions remain strictly newer than main.

  • node --test --test-concurrency=1 over the 12 related shared contract files and eight Claude .mjs test files: Ubuntu WSL Node 24.21.0 passes all 219 observations. Windows passes 217, with two capture-fixture ENOENT failures. An independent, identical eight-file Windows comparison with fresh TEMP/TMP gives 51 passed / the same two failures on both untouched main 40906c10 and this revision. The fixtures set TMPDIR, while Windows os.tmpdir() uses TEMP/TMP.
  • node --test --test-concurrency=1 examples/memory-plugin-shared/install-agent-hooks.test.mjs examples/memory-plugin-shared/release-marketplace.test.mjs: 22 passed on WSL, no failures or skips.
  • The original version-bump gate, strict increasing versions, paired/runtime/lock versions, generated-copy parity, changed-module syntax and six installer shell syntax checks pass.
  • The Claude-specific mods/usage/sources.test.ts suite requires claude plugin test; the Claude test runtime is unavailable locally. A direct Node attempt failed on the missing claude-code/testing package and is not counted as a test pass. The inherited source-card files match main byte for byte.
  • Later main ee2bb95e merges cleanly; examples, agent-plugins and .github in that merge match the tested revision. The full later merge tree and its server changes were not tested locally. Official checks must be evaluated on this new head; earlier CI results below remain historical.

Historical official CI on 79eee9fe: 4 SUCCESS / 4 non-applicable SKIPPED / 1 known FAILURE. Plugin job 112127107303 is 1472 passed / 28 skipped / 0 failed, followed by installer 22 passed / 0 skipped / 0 failed. The 28 plugin skips are one opt-in live-recall case and 27 optional Pi-runtime/helper cases. Version and dependency checks succeed. OpenClaw job 112127186738 remains 718 passed / 1 failed at the unchanged canonical Experience skill-copy mismatch (OpenCode, pi versus OpenCode). API/CLI job 112127106898 completed SUCCESS: filesystem 14 passed; basic API 54 passed / 1 skipped; released CLI 0.4.4 compatibility 16 passed; source CLI 25 passed / 21 skipped. The basic-API skip is Find401 with unavailable embedding credentials. Source-CLI skips are 19 upstream-authentication cases, one existing timeout-parameter mismatch, and one missing skill fixture. VLM/Embedding keys were unavailable, so full authentication, model, and real-host behavior are not covered. The official jobs checked out synthetic merge 40ec5bf0 (ee2bb95e + 79eee9fe); these are that earlier head's logs, separate from current-head local validation.

Historical local validation on original head 0e723275 against official main d9352f2a8bac78cbf4ed08b26543d22adcdd4c93:

  • The four new HTTP subcases fail before the fix and pass afterward. The complete shared HTTP file passes 23 test observations, including the parent rollup.
  • Windows: 12 related shared contract files pass 166 tests, with no skips.
  • Linux: 1,472 passed / 28 skipped / 0 failed (1 opt-in live recall and 27 optional Pi runtime/helper cases). The same official plugin file set is run with --test-concurrency=1, retaining all cases and assertions. The 22 official installer cases pass separately, with no skips. Default cross-file parallel runs on this filesystem encountered missing generated modules while staging rebuilt the shared directories; those runs are not reported as passed.
  • A separate real loopback HTTP matrix moves from 8 passed / 4 failed to 12 passed. An actual makeAgentFetchJSON → addAgentMessage → pending-file matrix moves from 4 passed / 4 failed to 8 passed: timeouts and resets are queued; normal responses and completed invalid JSON keep their previous behavior. These observations overlap the committed regression cases and are not added into a combined total.
  • The original version-bump gate passes against the committed head and official main, with all six affected hosts reporting a newer version. Companion versions, changed-module syntax, six installer shell scripts and the official generator were also checked locally.

No real host UI, deployed OpenViking server, model inference, pending-queue replay or performance validation was run. Existing completed invalid/empty JSON handling and retry-queue behavior are preserved; only transport failures during body reads reach the existing retry path.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable.

Additional Notes

The six shared-runtime releases are Claude Code 0.7.6, Codex 0.11.5, agent hooks 0.5.14, OpenCode 0.5.8, DSH 0.5.20 and Pi 0.4.13. The second of concurrent shared-runtime PRs to land must use versions newer than the then-current main.

@ZaynJarvis ZaynJarvis added the agent-plugins Agent harness and plugin integrations label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-plugins Agent harness and plugin integrations

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Plugin HTTP client swallows response-body transport failures

3 participants