Repository navigation
fix(gateway): prevent approval E2E startup timeout - #120195
Conversation
|
Land-ready proof for exact head Current-main reproduction at 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. |
|
Merged via squash.
|
* test(gateway): isolate approval client startup * test(gateway): share manual RPC startup scope
* test(gateway): isolate approval client startup * test(gateway): share manual RPC startup scope
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
main5a913fa453c2078a586b23f7d3fa6577f9d8a741:node scripts/run-vitest.mjs src/gateway/operator-approvals-client.e2e.test.tsuses runtime authority only for generated local gateway URLstimed out at 120 seconds.After on exact head
98dab4b4c982ab:check:changed: green on Blacksmith Testboxtbx_01kzdnfknxf07d9pqfnzmgfs0n, run https://github.com/openclaw/openclaw/actions/runs/31161936140. The preceding attempt never reached the command because Testbox sync timed out; the wrapper stopped that lease and the supported retry synchronized successfully.Test Plan