Repository navigation
fix: prevent startup races in Gateway plugin tests - #181700
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Contributor
Author
|
Fixed: Gateway hook and plugin tests now wait for public startup admission before issuing requests that require a ready Gateway. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 24, 2026
Gateway hook and plugin test fixtures now wait for public startup admission before successful HTTP and WebSocket requests, preventing startup-sidecar races without changing production startup behavior.
amittell
added a commit
to amittell/openclaw
that referenced
this pull request
Oct 24, 2026
Merge upstream main at 1d9da0d to pick up the startup readiness fixtures from openclaw#181700 and openclaw#181816 and the current test runtime.
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 Gateway hook and plugin integration tests that can issue their first successful HTTP or WebSocket request after sidecar startup settles but before the Gateway publishes its public startup-admission signal. In that interval, the intended hook, reload, reader, channel, or plugin-error scenario can fail early with
UNAVAILABLEandreason: startup-sidecarsinstead of reaching the behavior under test.User Impact
There is no user-visible product change. The affected CI cases now begin from the same admitted Gateway state that a successful client request requires, while production startup and recovery ordering, hook and plugin behavior, existing assertions, fixture timeouts, and intentional rejection paths remain unchanged.
Why This Change Was Made
startupSettledowns sidecar and startup-log settlement, while public request admission can remain closed until main-session orphan preparation finishes. The existingwaitForGatewayStartuphelper already observes that later contract through/startupzand returns only for{ ok: true, status: "started" }.The four affected fixtures now await that established signal at each boundary that must start from an admitted Gateway. The helper, shared connection code, production readiness owners, and test scenarios themselves are unchanged.
Evidence
39962152091, job120443065716, failed six cases across the four changed files with the samestartup-sidecarsrejection at their first intended admitted request.core-test-gateway-servertype graph, and all 92 tests across the four changed files plus the existing post-attach startup owner test.The exact focused validation proves this fixture correction; it does not claim whole-CI health or a live user-environment result.