Skip to content

fix: prevent startup races in Gateway plugin tests - #181700

Merged
shakkernerd merged 1 commit into
mainfrom
gateway-public-startup-test-barrier
Oct 23, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
gateway-public-startup-test-barrier

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

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 UNAVAILABLE and reason: startup-sidecars instead 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

startupSettled owns sidecar and startup-log settlement, while public request admission can remain closed until main-session orphan preparation finishes. The existing waitForGatewayStartup helper already observes that later contract through /startupz and 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

  • Scheduled CI run 39962152091, job 120443065716, failed six cases across the four changed files with the same startup-sidecars rejection at their first intended admitted request.
  • Focused remote validation passed on the exact candidate: changed-file formatting/oxlint, the canonical core-test-gateway-server type graph, and all 92 tests across the four changed files plus the existing post-attach startup owner test.
  • Independent calibrated review and the separate canonical autoreview found no defect on the exact head. Exact-head hosted checks observed before landing were non-failing; broad CI remained in progress.
  • Source inspection confirms the intentionally early startup rejection controls and the oversized-payload transport rejection are unchanged; no timeout, retry, sleep, assertion, production, configuration, database, dependency, permission, or user-state behavior changed.

The exact focused validation proves this fixture correction; it does not claim whole-CI health or a live user-environment result.

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@shakkernerd shakkernerd self-assigned this Oct 23, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 23, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 23, 2026
@shakkernerd
shakkernerd merged commit 7e3c658 into main Oct 23, 2026
116 of 117 checks passed
@shakkernerd
shakkernerd deleted the gateway-public-startup-test-barrier branch October 23, 2026 15:06
@shakkernerd

Copy link
Copy Markdown
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant