Un-namespace platform SDK groups (glean.agents.search())#119
Closed
travis-hoover-glean wants to merge 1 commit into
Closed
Un-namespace platform SDK groups (glean.agents.search())#119travis-hoover-glean wants to merge 1 commit into
travis-hoover-glean wants to merge 1 commit into
Conversation
Platform endpoints currently generate under a redundant `platform` namespace (glean.platform.agents.search()). Strip the leading `platform.` segment when deriving `x-speakeasy-group` from the `x-glean-sdk.group` source contract so Speakeasy emits top-level SDK namespaces instead (glean.agents.search()). - src/source-spec-transformer.js: drop the `platform.` prefix from the derived x-speakeasy-group. scio keeps sending the platform-prefixed group as the source contract; only the SDK grouping is un-namespaced. - Regenerate generated_specs/platform.yaml and the overlayed merged / platform specs. Regeneration also drops the stale `skills` endpoints that were removed from source in #118 but never regenerated. - Update transformer + smoke tests to expect the un-namespaced groups.
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.
What
Downstream SDKs currently generate platform endpoints under a redundant
platformnamespace, e.g.glean.platform.agents.search()(see gleanwork/api-client-typescript#130). This makes them top-level instead:glean.agents.search().Why
The
platformnamespace comes entirely from thex-speakeasy-groupextension (platform.agents,platform.search, ...), which Speakeasy turns into a nested SDK namespace. That group is derived insource-spec-transformer.jsfrom thex-glean-sdk.groupsource contract that scio provides.Changes
src/source-spec-transformer.js— strip the leadingplatform.segment when derivingx-speakeasy-group(sdk.group.replace(/^platform\./, '')). scio still sendsplatform.agentsas the source contract; only the derived SDK grouping is un-namespaced. The existing validation pattern guarantees at least one segment remains afterplatform..generated_specs/platform.yaml,overlayed_specs/glean-merged-spec.yaml,overlayed_specs/glean-platform-api-specs.yaml) soplatform.agents→agents,platform.search→search.source-spec-transformer.test.js,post_transform_smoke.test.js).Notes
glean.platform.*→glean.*); should land with an SDK major bump / changelog and coordinated downstream regeneration.client.*, indexing underindexing.*, so top-levelagents/searchdon't clash.skillsendpoints that were removed from source in Remove skills operations from post-transform smoke test #118 but never regenerated in the committed artifacts. CI would remove these on the next transform regardless.