Skip to content

fix(gateway): prevent approval E2E startup timeout - #120195

Merged
steipete merged 2 commits into
mainfrom
codex/autoqa-approval-runtime-authority-20260806
Aug 7, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/autoqa-approval-runtime-authority-20260806

Conversation

@steipete

@steipete steipete commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #120194

AI-assisted: yes

What Problem This Solves

Fixes an issue where maintainers running the isolated operator-approval Gateway E2E would wait several minutes for a deterministic 120-second startup timeout. The current-main file completes only 1/2 tests and exits red after about 244 seconds.

Why This Change Was Made

Manual real-Gateway approval suites now share one test-owned startup scope that keeps unrelated browser, provider, channel, cron, Gmail, Canvas, and bundled-plugin background work disabled. The same helper owns the complete environment snapshot key list, so both the operator-approval and plugin-approval sibling suites restore exactly what they configure.

The real core Gateway and approval RPC paths remain active. No timeout, assertion, production runtime, protocol, auth, config, dependency, migration, or persistent-state behavior changes.

User Impact

There is no end-user behavior change. Maintainers and CI get fast, deterministic approval RPC coverage instead of a multi-minute timeout.

Evidence

Before on current main 5a913fa453c2078a586b23f7d3fa6577f9d8a741:

  • node scripts/run-vitest.mjs src/gateway/operator-approvals-client.e2e.test.ts
  • 1/2 tests; uses runtime authority only for generated local gateway URLs timed out at 120 seconds.
  • File duration: 243.93 seconds; nonzero exit.

After on exact head 98dab4b4c982ab:

Test Plan

  • exact-current-main timeout reproduction
  • paired operator/plugin approval suites
  • 10 fresh-process stress runs
  • whole-branch AutoReview
  • exact Node 24 changed gate on Blacksmith Testbox
  • exact-head hosted PR CI
  • exact-head ClawSweeper review

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 7, 2026
@steipete
steipete marked this pull request as ready for review August 7, 2026 08:44
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 98dab4b4c982ab411a3cb0b07af1094197cd87a3.

Current-main reproduction at 5a913fa453c2078a586b23f7d3fa6577f9d8a741: operator-approvals-client.e2e.test.ts completed 1/2; uses runtime authority only for generated local gateway URLs timed out at 120 seconds, and the file exited nonzero after 243.93 seconds.

Root cause: the manual approval RPC servers started unrelated Gateway background owners. The fix keeps the real core Gateway and approval RPC paths, but centralizes the background-suppression environment and its complete cleanup key list for both operator-approval and plugin-approval sibling suites. No timeout or production behavior changes.

Proof:

The earlier Testbox attempt never reached the command because sync timed out; the wrapper stopped that lease, and the supported retry above synchronized and passed.

@steipete
steipete merged commit 2dd0e9b into main Aug 7, 2026
191 checks passed
@steipete
steipete deleted the codex/autoqa-approval-runtime-authority-20260806 branch August 7, 2026 09:01
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 8, 2026
* test(gateway): isolate approval client startup

* test(gateway): share manual RPC startup scope
tomorrowflow pushed a commit to tomorrowflow/openclaw that referenced this pull request Aug 16, 2026
* test(gateway): isolate approval client startup

* test(gateway): share manual RPC startup scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Operator approval Gateway E2E times out during startup

1 participant