fix(gateway): avoid default provider auth startup prewarm#100667
Merged
Conversation
Co-authored-by: Vincent Koc <[email protected]>
Contributor
Author
|
Land-ready proof for exact head
Known proof boundary: I did not repeat native Windows on the replay head. Original #88514 carries native Windows and WSL2 live foreground Gateway RPC proof for the same default-off scheduling contract; this replay additionally proves current-main cleanup and exact-head Linux/Testbox behavior. No remaining blocker. Ready to merge. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 6, 2026
…00667) * fix(gateway): avoid default provider auth startup prewarm Co-authored-by: Vincent Koc <[email protected]> * docs(changelog): credit provider auth startup fix --------- Co-authored-by: Vincent Koc <[email protected]>
giodl73-repo
pushed a commit
to giodl73-repo/openclaw
that referenced
this pull request
Jul 8, 2026
…00667) * fix(gateway): avoid default provider auth startup prewarm Co-authored-by: Vincent Koc <[email protected]> * docs(changelog): credit provider auth startup fix --------- Co-authored-by: Vincent Koc <[email protected]>
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
Gateway startup still schedules a broad provider-auth discovery sweep by default. On Docker/WSL2 and macOS reports, that work consumed enough CPU and event-loop capacity to delay local RPCs and channel timers. The worker-thread mitigation reduced main-thread blocking but retained the unsolicited startup sweep.
Closes #86752.
Closes #86512.
Supersedes #88514 with a current-main replay that preserves its behavior and removes the later QA-only workaround.
Why This Change Was Made
The provider-auth prepared map is an optimization, not the source of truth: auth checks already fall through to the canonical on-demand path when no prepared state exists. This change therefore keeps the gateway lifetime sidecar and auth-profile-failure rewarm, but makes the broad startup sweep explicit opt-in.
Current main added
OPENCLAW_SKIP_PROVIDER_AUTH_PREWARMsolely to protect QA from startup contention. Default-off behavior makes that environment surface and its parser/tests redundant, so this replay removes them instead of leaving two controls for the same behavior.The patch preserves Vincent Koc's original fix and co-authorship while reducing production/test surface by 30 lines net.
User Impact
Evidence
statusRPC returned runtime2026.6.11, and the startup log remained free ofprovider auth state pre-warmedafter crossing the former five-second timer.pnpm check:changed: passed in 9m33s, including core/extension typechecks, lint, import-cycle, state, sidecar-loader, webhook, and pairing guards.Known scope: this removes the implicated default startup sweep; it does not claim to resolve every broader context-size or runtime-latency symptom reported in the linked issues.