Repository navigation
feat(gateway): point the client at another codev-backend with CODEV_BACKEND_URL - #329
Merged
Merged
Conversation
…ACKEND_URL Testing a codev-backend change end-to-end meant editing the baked BACKEND_URL and remembering to put it back — and a localhost URL that slips into a commit points every user's client at their own machine, which is a silent, total sign-in outage. Unset, the baked URL is what ships, so this is inert in every real install. SSO is deliberately not overridable: a locally-run backend still verifies tokens against the real provider, so the login flow has to mint a real one. Only the exchange moves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Adds an env override so a developer can point CoDev Code at a
codev-backendrunning somewhere else — a local one (bun devin that repo serveshttp://127.0.0.1:8787), or a staging deploy.Why an override rather than editing the URL
Testing a backend change end-to-end previously meant editing the baked
BACKEND_URLand remembering to put it back. A127.0.0.1that slips into a commit points every user's client at their own machine — a silent, total sign-in outage, and one that would look like a network problem rather than a bad deploy. Unset, this is inert: the baked URL is exactly what ships.SSO is deliberately not overridable
Only the exchange moves. A locally-run backend still verifies tokens against the real
SSO_USERINFO_URL, so the login flow has to mint a genuine token from the real provider — pointing SSO at localhost would just break sign-in.Where it applies
@codev/gatewayis Node-only (TUI, desktop main process,@codev/upload, the CLI); nothing inpackages/appor the renderer imports it at runtime, soprocess.envis always available where this is read. For the desktop app the variable must be exported before launching — the main process reads it, so a renderer reload won't pick it up.Pairs with the same override in CoDev Hub, so both clients can be aimed at one backend for a single test run.
Notes
DIVERGENCES.mdrow:packages/codev-gateway/is a fork-only package, and the file is fork-only. (The one mention of@codev/gatewayin that file is a dependency line inpackages/tui/package.json, untouched here.)CHANGELOG.mdentry: this is a developer testing knob, not user-facing behaviour.const.tsreads the variable at module load, so pinning it would mean re-importing the module under a mutated env — more machinery than the one-line expression is worth.bun typecheckclean inpackages/codev-gateway.