Repository navigation
Client contract test; 1.x clients in the 2.0 plan (#277) - #309
Merged
Merged
Conversation
shared/test/test_client_contract.py makes the calls a live client makes, against the real app: the OpenAI API with a personal access token, the widget, and /run_sse through the proxy with admin credentials. Phases 1 and 2 of 2.0 are done only when it passes unchanged. The 2.0 plan says what 2.0 changes for those clients with one workspace (nothing they have to change) and how to upgrade an installation that serves them: deploy from a release tag while 2.0 lands on main, set MATE_SECRET_KEY on 1.6, and run 2.0 on a copy of the production database first.
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.
Groundwork for 2.0 (#277). Before phase 1 lands, this pins down what 2.0 must not change for clients that already use a 1.x installation.
What changes
shared/test/test_client_contract.py(12 tests) runs the real auth server on an in-memory database, with a fake agent server. It makes the calls a live client makes and checks the status, the shape of the answer and what reaches the agent server:GET /v1/models;POST /v1/chat/completions, streamed and not streamed;/widget/api/chatstreams the session event, then the reply;widget_<key>_<user>;/run_sseon any user id, with Basic auth and with the/auth/tokenbearer;/list-apps;documents/design/2.0-plan.md:main;MATE_SECRET_KEYon 1.6;Notes
RATE_LIMIT_ENABLEDon and off.gen_docs.py --checkOK, no guide drift.Testing
python -m unittest discover -s shared/test -p "test_*.py": 1733 tests OK (1 skipped).