← Back to PRs

#11864: fix: add missing methods to BASE_METHODS for client discovery

by Yida-Dev open 2026-02-08 13:01 View on GitHub →
gateway stale
## Summary - Several gateway handler methods (`sessions.resolve`, `sessions.usage`, `sessions.usage.timeseries`, `sessions.usage.logs`, `web.login.start`, `web.login.wait`, `chat.inject`, `poll`) have registered handlers in `coreGatewayHandlers` but were not listed in `BASE_METHODS` - This means clients never see these methods in the `features.methods` field of the hello-ok handshake response, so they cannot discover that the gateway supports them - Adds a regression test verifying all core handler methods (except the internal `connect` handshake handler) are included in `listGatewayMethods()` ## Test plan - [x] New test `server-methods-list.test.ts` passes — verifies no handler methods are missing from `BASE_METHODS` - [x] Existing gateway tests unaffected Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the gateway method discovery list by adding several core RPC methods (notably `sessions.resolve`, `sessions.usage*`, `web.login.*`, `chat.inject`, and `poll`) to `BASE_METHODS` so they appear in the `features.methods` handshake response. It also adds a regression test that asserts every method registered in `coreGatewayHandlers` (except the internal `connect` handshake handler) is present in `listGatewayMethods()`, preventing future drift between handler registration and the advertised method list. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - The change is a straightforward extension of a static allowlist (`BASE_METHODS`) to match already-registered core handlers, plus a regression test that enforces consistency going forward. No behavior changes to handlers themselves; the new test is deterministic and only checks for missing method advertisement. - No files require special attention <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs