Repository navigation
fix(plugins): normalize host engine stream URLs - #554
Draft
silvertakana wants to merge 2 commits into
Draft
silvertakana wants to merge 2 commits into
silvertakana wants to merge 2 commits into
Conversation
… engine host The plugin host globals carried their own engine defaults and their own /stream suffix logic, separate from the resolver that plugin routing uses. Two consequences: __WWV_ENGINE_URL__ and __WWV_WS_ENGINE_URL__ pointed at a retired engine host, and an explicit NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL that already ended in /stream produced a doubled /stream/stream stream URL. Both globals now derive from the canonical CLOUD_ENGINE_URL constant and the existing toWsStreamUrl normalizer, which the resolver exports. Explicit env overrides still win unchanged, the HTTP base global keeps mirroring the raw env value, and the http/https to ws/wss scheme pairing is preserved. Added contract tests for the defaults, the override path, the trailing slash, and the schemes. Version bumped to 2.68.26 (patch, per the repo release policy).
toWsStreamUrl checked `endsWith("/stream")` before stripping trailing
slashes, so an engine env value of "https://engine.example.test/stream/"
was not recognized as already carrying the stream path and the host globals
injected "wss://engine.example.test/stream/stream". The same applied to a
value ending in repeated slashes.
Trailing slashes are now stripped first, then the suffix is checked, so
"…/stream/" yields "…/stream" and "…/" yields "…/stream" for http, https,
ws and wss. Explicit env overrides still win, the HTTP base global still
mirrors the raw env value verbatim, the scheme substitutions and the
malformed/query policy are unchanged, and repeated injection still leaves
the established globals untouched.
Added real-injection regressions for the /stream/ and repeated-slash forms
across all four supported schemes, the verbatim REST override, and a second
injection after the env changes. The test file's header no longer claims
proven out-of-tree consumers; it now says external plugins may consume the
globals and no consumer is proven.
Version bumped to 2.68.27 (patch, per the repo release policy).
Contributor
|
Left for a person rather than auto-merged: not a Dependabot pull request. Patch and minor updates merge themselves once every check has completed green; this one is listed in the weekly dependency digest. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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
Use one canonical engine default and one stream URL normalizer for plugin routing and host globals. Avoid repeated
/streamsuffixes, including an existing suffix followed by trailing slashes. Preserve explicit HTTP-global overrides verbatim and keep repeat injection idempotent.Verification
This PR stays draft while CI and deployment safety are assessed.