Make release manifest shortNames legal install slugs - #397
Draft
Maximo-Guk wants to merge 1 commit into
Draft
Conversation
The deploy wizard sends a gatekeeper's manifest shortName as the install slug verbatim, and the deploy service turns that slug into a GATEKEEPER_<SLUG> binding name, so it rejects anything outside /^[a-z][a-z0-9]*$/. gatekeeper-mcp-portal was the only installable gatekeeper whose shortName carried a hyphen, so installing Mcp-Portal failed zod validation on the first line of install() — before the workflow was ever created, surfacing to users as a redacted "Something unexpected went wrong on our side." with no workflow logs. Fold the release manifest's shortName into the slug charset via a new releaseShortName(), leaving gatekeeperShortName() alone: staging and preview bind gatekeepers as GATEKEEPER_<PKG_NAME> and the router maps _ back to -, so a hyphen does round-trip there and folding globally would point their BASE_URL at a 404. Assert in the generator test that every emitted shortName is a legal slug. The client passes shortName through unfolded, so this is what turns the next hyphenated gatekeeper into a release-build failure instead of a runtime 500. mcp-portal's deployed path becomes /gatekeeper/mcpportal, which stays self-consistent end to end; it registers no external redirect URI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| * bindings (underscores, router maps _ -> -) where a hyphen does round-trip. | ||
| */ | ||
| export function releaseShortName(pkgName: string): string { | ||
| return gatekeeperShortName(pkgName).replace(/[^a-z0-9]/g, ""); |
There was a problem hiding this comment.
[P2] Guard against normalized short-name collisions
This transformation is lossy: for example, gatekeeper-foo-bar and gatekeeper-foobar both emit foobar. The deploy service then gives both installs the same GATEKEEPER_FOOBAR binding and the router can expose only one at /gatekeeper/foobar. The new manifest test checks validity per entry but not uniqueness, so such a release would pass. Please reject duplicate emitted shortNames (or use an explicit exceptional mapping) when assembling the manifest.
|
Posted 1 actionable inline finding. |
Preview:
|
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.
WIP