Repository navigation
fix: bound outbound bootstrap state and preserve workspace locks - #120939
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 9, 2026 06:03
Contributor
Author
|
Land-ready proof for exact head
The initial exact-head validation failure was Known proof gaps: none. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 10, 2026
…nclaw#120939) * fix(outbound): bound channel bootstrap outcomes * fix(cloud-workers): preserve workspace lock controller ownership
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
Fixes an issue where long-running gateways resolving many distinct unknown outbound channel IDs could retain an unbounded number of bootstrap outcomes within one config and registry generation.
Also fixes a current-
mainCI blocker discovered during exact-head validation: a workspace mutation contender could reclaim a drained receiver group's lock in the brief interval before the still-live controller released it.Why This Change Was Made
Bounds each per-config bootstrap outcome cache to a 64-entry LRU while preserving successful handles and failed-attempt suppression. Config changes and active registry generation changes still invalidate the owning cache, and eviction permits a later retry.
Workspace lock identities now carry both authoritative lifetimes: the controller PID that owns final release and the detached receiver process-group PID whose descendants must remain fenced. Reclamation waits until both are dead, while strict release ownership checks remain unchanged.
This change was AI-assisted and manually reviewed.
User Impact
Gateways keep outbound bootstrap memory bounded under invalid, mistyped, or highly dynamic channel traffic without repeating plugin discovery for resident unavailable channels. Cloud-worker workspace publication and retry cleanup no longer fail when a receiver group drains immediately before controller release.
Evidence
node scripts/run-vitest.mjs src/infra/outbound/channel-bootstrap.runtime.test.ts src/infra/outbound/channel-resolution.test.ts— 33 tests passed.node scripts/check-changed.mjs -- src/infra/outbound/channel-bootstrap.runtime.ts src/infra/outbound/channel-bootstrap.runtime.test.ts— passed via Testboxtbx_01kzjgf0b5qq6rgsr8qdx9es8v.node scripts/check-changed.mjs -- src/gateway/worker-environments/workspace-mutation-lock-remote-script.ts src/gateway/worker-environments/workspace-mutation-remote-script.test.ts src/gateway/worker-environments/workspace-sync-scripts.test.ts— passed via Testboxtbx_01kzjm4g1f4cwpa2aa22ypsyaa.git diff --checkand targetedoxfmt --check— passed.checks-node-compact-large-5from run31298027433.