Repository navigation
chore: add a backfill that gives legacy toolset aliases explicit endpoints - #8254
Open
daviddanialy wants to merge 9 commits into
Open
daviddanialy wants to merge 9 commits into
daviddanialy wants to merge 9 commits into
Conversation
…oints Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: ac8e3f1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Contributor
Author
|
E2E on 12aa7ca650 (later commits: audit actor display name and a rebase), local lane; 17 alias fixtures across 6 orgs plus a 600-alias bulk org; tool run through its CLI.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 22 files
This PR changes a database schema or migrates data. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alias-endpoint-backfill
…alias-endpoint-backfill
…alias-endpoint-backfill
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.
AIM-821
Summary
Adds
go run ./cmd/tools/migrations legacy-alias-endpoints(run fromserver/), a one-off backfill that gives each hosted MCP server an explicit endpoint for every address its legacy toolset alias still serves and no live endpoint holds.private_onlynetwork mode, organization drift or missing metadata. Disabled servers still get endpoints.checkHostedNewAddress: slug length, verified and activated org domain, private ingress) and slug availability, under the same locks and order, with the organization's custom domain also locked so the lockdown read is consistent. A rejected address is askipwith its reason; one held by another server's endpoint or alias is aconflictand never taken.slugPrefixExemptLegacyAlias, so an unprefixed slug the alias already serves keeps its URL. API creates still passslugPrefixRequired.mcpEndpoints.updateandUpdateMcpEndpointAddressInTransactionnow check the prefix against the locked endpoint row and only when the address changes, so a grandfathered endpoint can be re-saved.create/already_heldor its domain was deleted, so it never leaves a pending, unverified, foreign or ingress-rejected domain. Every move is printed and journaled.ListCanonicalHostingByToolsetIDs),mcpmetadataexport and assistant connections (LoadAssistantMcpServers, hosted rows) now pick endpoints inendpointaddr.PrimaryEndpoint's order (live custom domain first), as plugin generation already does. Without this the backfill's new platform endpoints would switch those surfaces from a customer's custom domain to the platform URL.mcp-endpoint:createaudit rows bysystem:legacy-alias-endpoint-backfillviaaudit.WithoutOutbox(); no plugin attachment or publication.-applyneeds-environment/-confirm-environment,-confirm-target,-confirm-apply=legacy-alias-endpointsand a new 0600-journal. A failed commit is reported ascommit_outcome_unknown; the exit is non-zero while any server failed. Reruns reportalready_held.server/cmd/tools/migrations/LEGACY_ALIAS_ENDPOINTS_BACKFILL.md(dev first, verification, journal-driven rollback).Motivation
AIM-670 (#8248) deletes the alias and its
/mcp/{slug}fallback. Applying this first keeps every stored client URL working and the slugs reserved. Once this has run in prod, #8248 must also deleteserver/internal/mcpendpoints/alias_backfill.go, theslugPrefixExemptLegacyAliasbranch and the three backfill queries inlegacyalias/queries.sql.🤖 Generated with Claude Code
Summary by cubic
Adds
legacy-alias-endpoints, a one-off backfill that creates an explicit MCP endpoint for every address a hosted server's legacy toolset alias still serves and no live endpoint holds, so stored client URLs keep working once the alias is removed (prerequisite for AIM-670). The run defaults to a dry run and needs explicit confirmations plus a journal to apply.Backfill
private_onlynetwork mode, org drift, and missing metadata.toolset:move_legacy_aliasevent for each alias move, and reports a failed commit ascommit_outcome_unknowninstead of failing the rerun.Advertised URLs
endpointaddr.PrimaryEndpointorder: live custom domain first), matching the URL plugins already use instead of preferring the platform URL.Written for commit ac8e3f1. Summary will update on new commits.