test: regression guard for rent(mode=...) WS forwarding (task 399)#4
Merged
Conversation
Diagnosed by main on 2026-06-04: CLI 'ceki rent --mode main' and SDK client.rent(mode='main') were reported not forwarding the flag to POST /api/sessions. Investigation showed _client.rent() already puts mode in the WS rent payload (_client.py:187), the CLI already passes args.mode to client.rent() (cli.py:73), the relay schema already validates + forwards it to back (browser-relay agentRouter rentSchema/handleRent), and back's SessionController honors it. So end-to-end is wired — the original report was traced to an older SDK version pinned on the calling side (PyPI has 2.17.1; 2.15.1 was installed somewhere). Lock the wire format with an explicit test so any future refactor that drops the mode field from the rent message fails CI immediately. Refs: task 399 / #310
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.
Summary
Adds a regression test that locks the WS wire format for
rent(mode=...)— guards against silent renames or accidental drops on themodefield travelling from SDK call through to the relayrent_requestedpayload.Test plan