Repository navigation
Restore hosted Subrouter CLI configuration - #9638
Merged
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe CLI config route now resolves a hosted Subrouter URL from environment configuration or a default. It returns hosted Subrouter and tenant-exchange endpoints and reports ChangesCLI configuration contract
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Restores the
subrouterblock in/api/cli/configalongside the Vercel-nativecoderouterblock. Releasedsrclients require this block to exchange Stack auth and POST hosted credentials.Regression coverage was committed before the fix and fails on current main.
Related: manaflow-ai/subrouter#164
Related: manaflow-ai/subrouter#165
Tests:
SKIP_ENV_VALIDATION=1 bun test tests/cli-config-route.test.tsSKIP_ENV_VALIDATION=1 bun run typecheckbunx eslint app/api/cli/config/route.ts tests/cli-config-route.test.tsNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Restore the
subrouterblock in/api/cli/configalongsidecoderouterto keep releasedsrclients working for hosted creds POST and Stack auth exchange. Adds URL derivation fromSUBROUTER_HOSTED_URLwith a safe default and updates tests to cover the contract.subrouter.urlviahostedSubrouterBaseURLusingSUBROUTER_HOSTED_URLordefaultHostedSubrouterURL(); return 503 if invalid.subrouter.exchangeUrlat/api/subrouter/tenant-exchangeand extend tests to assert bothcoderouterandsubrouterfields.Written for commit 46ab06b. Summary will update on new commits.
Summary by CodeRabbit
503 cli_auth_unavailableresponse when the hosted Subrouter URL cannot be resolved.