Repository navigation
fix(plugins): release retired callers after source recovery - #200571
Merged
Merged
Conversation
Co-authored-by: RomneyDa <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
RomneyDa
enabled auto-merge (squash)
November 17, 2026 11:43
RomneyDa
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 234be12)
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 18, 2026
…#200571) Co-authored-by: RomneyDa <[email protected]>
RomneyDa
added a commit
that referenced
this pull request
Nov 19, 2026
…200374) * fix(plugins): keep reload recovery metadata off the Gateway thread Move the complete asynchronous recovery copy into the existing capture broker, including root creation, copy filtering, native link validation, and cleanup. Reuse one physical copy algorithm for the retained sync fork. Follow up on #198262 and Wes (@akmad)'s original #181491 recovery work. Preserve the independent native leases established by #200320. A synthetic two-second create delay reduces the median MAIN heartbeat gap from 2010 to 10 ms. Cold owner time rises 94.750 to 124.388 ms; that cost and the remaining synchronous fork/import contracts are recorded in the PR evidence. No configuration or schema changes. * fix(tooling): include recovery imports in the PR wrapper * test: prepare runtime build graph workers before test launch A cold full Vitest worker compilation took 76 seconds inside the first 60-second heartbeat build-graph test. Enroll this selection in the existing runner preparation owner; preserve graph selection, test limits and assertions. Direct and projects runner regressions fail before the correction and all 55 runner cases pass afterward. Changed checks retain only the previously attributed Slack/UI dead exports. * test: provide compiler artifacts for eager tooling admission Use the existing controlled compiler for the unrestricted tooling selection. The eight-case admission table reproduces the missing manifest before this fixture migration and passes after it; retain the compiler count, receipt and selection assertions. No production behavior or timeout changes. (cherry picked from commit 5275f43) Co-authored-by: RomneyDa <[email protected]> Release adaptation: apply after #200320 native capture owner prerequisite; retain source recovery copy and regression contracts unchanged. Follow-up #200571 detaches the independent owner from retired caller context.: (cherry picked from commit b1d97f0a472874e12bbfb3a0e429f97f509d3710)
RomneyDa
added a commit
that referenced
this pull request
Nov 19, 2026
Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 234be12) (cherry picked from commit 30ae600da1aaebb06df60250603c8c6d0ce30a64)
RomneyDa
added a commit
that referenced
this pull request
Nov 19, 2026
Co-authored-by: vincentkoc <[email protected]> (cherry picked from commit 2ea3a17) Co-authored-by: RomneyDa <[email protected]> Release adaptation: complete #200571 retention fix by detaching both native source descriptor and owner ports from all caller async context.: (cherry picked from commit 58ba944c504995114aca3b7c358aeb22263b1fd8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Recovering a plugin's captured source can leave its retired instance and registry alive after disposal. This was hit by the Bun recovery-source retention test during beta qualification and reproduced on main.
User Impact
Plugin recovery can release the previous instance while its successor continues using the captured source. No configuration, storage format, permission, or revocation policy changes.
Why This Change Was Made
The independent recovery host outlives the plugin call that creates it. Its transport inherited that call's invocation context, retaining the old instance through a live socket and timer. Construct the independent host outside the plugin invocation using the existing context exit operation. Capture the retained worker source in the original caller context first; preserve the other execution scopes and existing source custody.
Self-simplification: one production file, +4/-3 lines; no new helper, state, fallback, or cleanup policy. The existing end-to-end retention regression already exercises the failure, so its assertions and GC budget are unchanged.
Evidence
5fb231527f4f14d83bc27067879370debe4d2b7a: retired instance remains alive.RuntimeFrame.invocationretaining the retired instance through the independent transport. Temporary probes removed.Commands:
OPENCLAW_VITEST_RUNTIME=bun pnpm test src/plugins/runtime.retention.test.ts src/plugins/plugin-native-admission-recovery.test.ts src/plugins/plugin-generation-artifact.native-reference.test.ts --maxWorkers=1;node scripts/run-oxlint.mjs --tsconfig tsconfig.core.json src/plugins/plugin-generation-source-lookup.ts;NODE_OPTIONS=--max-old-space-size=12288 pnpm tsgo:core.