Skip to content

mig: drop the toolset MCP hosting columns - #8252

Open
daviddanialy wants to merge 6 commits into
daviddanialy/aim-670-retire-legacy-aliasfrom
daviddanialy/aim-671-drop-toolset-hosting-columns
Open

daviddanialy wants to merge 6 commits into
daviddanialy/aim-670-retire-legacy-aliasfrom
daviddanialy/aim-671-drop-toolset-hosting-columns

Conversation

@daviddanialy

@daviddanialy daviddanialy commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

AIM-671

Summary

  • Drop toolsets.mcp_slug, mcp_is_public, mcp_enabled, custom_domain_id and user_session_issuer_id. Dropping them also removes the mcp_slug check, the custom domain and session issuer foreign keys, the two mcp_slug unique indexes, the issuer index and the column comments.
  • Remove the five toolset statements from server/database/sqlc_retired_columns.sql. The okta entry stays, so the file and its sqlc.yaml references stay too. Regenerated sqlc output does not change, because every package already compiled against the retired columns.
  • .mise-tasks/project/reset.sh: delete the NOT EXISTS check on toolsets.user_session_issuer_id. A toolset's issuer now lives on its hosted mcp_servers row, which the existing mcp_servers check already covers. mig: drop the unused MCP collection tables #8011 set the precedent for this kind of edit.

Do not merge until #8248 (AIM-670) is deployed to prod and past its rollback window. Merged commits are promoted to prod together, so this must not ship in the same promotion as #8248: pods older than #8248 still read these columns. The column values are discarded; every live row is already mirrored on mcp_servers.

Motivation

The hosted MCP server and its endpoints now own hosting state. AIM-670 removed the last code that read these columns and moved them into sqlc_retired_columns.sql. This PR is the contract step.

Atlas lint gives warnings only: BC104, CD102, and PG103 for the indexes that go away with the columns. Destructive statements carry -- atlas:nolint DS103, as in #8011 and #8020.

🤖 Generated with Claude Code


Summary by cubic

Drops the retired toolset MCP hosting columns from toolsets; hosted MCP servers now own this state.

  • Drops mcp_slug, mcp_is_public, mcp_enabled, custom_domain_id, and user_session_issuer_id, along with the mcp_slug check, the foreign keys to custom_domains and user_session_issuers, the two mcp_slug unique indexes, the issuer index, and their column comments.
  • Removes the five toolset statements from sqlc_retired_columns.sql; the okta statement stays.
  • Removes the NOT EXISTS check on toolsets.user_session_issuer_id from reset.sh; the existing mcp_servers check already covers issuers.
  • Reworks the migration to land after main's latest migrations.

Migration
Do not merge until #8248 (AIM-670) is deployed to prod and past its rollback window; older pods still read these columns. The values are already mirrored on mcp_servers, so no data is lost.

Written for commit ceb048c. Summary will update on new commits.

View guided diff Turn on auto-fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@daviddanialy
daviddanialy requested a review from a team as a code owner October 28, 2026 22:52
@linear-code

linear-code Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

AIM-671

@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ceb048c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
server Patch

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

@daviddanialy

Copy link
Copy Markdown
Contributor Author

E2E on the same migration SQL (regenerated since with a later timestamp; byte-identical), local lane. Old binary = #8248's head, since this ships after it.

  • Drop on populated columns: 5 columns, check, both FKs, 3 indexes and the FK triggers on custom_domains / user_session_issuers gone; toolsets intact; statement 7.8ms. PASS
  • Rolling deploy: chore: retire the legacy toolset MCP address #8248 binary under 60s of load with the migration applied mid-run, 8,312/8,312 requests 200, 0 missing-column errors. PASS
  • Rollback: chore: retire the legacy toolset MCP address #8248 binary on the migrated DB matches baseline. PASS
  • project:reset gets past the edited step (fails later on an existing, unrelated psql-variable bug in a DO block). PASS
  • Deleting a custom domain and a sign-in provider formerly referenced by the columns: PASS
  • Regression vs unmigrated baseline on both binaries: management RPCs across 26 resource families, MCP on every auth path, Platform MCP and Admin MCP, 113-page dashboard sweep, demo and app seeds. No diffs. PASS

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

atlas migrate lint on server/migrations

Status Step Result
1 new migration file detected 20261030090500_drop-toolset-mcp-hosting-columns.sql
ERD and visual diff generated View Visualization
Analyze 20261030090500_drop-toolset-mcp-hosting-columns.sql
3 reports were found in analysis
Constraint deletion detected
Dropping check constraint "toolsets_mcp_slug_check" (CD102)
Backward incompatible changes detected
Clients using column "toolsets"."mcp_slug" will fail (BC104)
Clients using column "toolsets"."mcp_is_public" will fail (BC104)
Clients using column "toolsets"."custom_domain_id" will fail (BC104)
Clients using column "toolsets"."mcp_enabled" will fail (BC104)
Clients using column "toolsets"."user_session_issuer_id" will fail (BC104)
Concurrent index violations detected
Indexes cannot be created or deleted concurrently within a transaction. Add the `atlas:txmode none` directive to the header to prevent this file from running in a transaction. (PG103)
Read the full linting report on Atlas Cloud

@github-actions

Copy link
Copy Markdown
Contributor

atlas migrate lint on clickhouse/migrations

Status Step Result
No migration files detected  
ERD and visual diff generated View Visualization
No issues found View Report
Read the full linting report on Atlas Cloud

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 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

…cy-alias' into daviddanialy/aim-671-drop-toolset-hosting-columns
…cy-alias' into daviddanialy/aim-671-drop-toolset-hosting-columns

# Conflicts:
#	server/migrations/atlas.sum
@blacksmith-sh

This comment has been minimized.

daviddanialy and others added 3 commits October 30, 2026 16:32
…ialy/aim-671-drop-toolset-hosting-columns

# Conflicts:
#	server/database/sqlc_retired_columns.sql
#	server/migrations/atlas.sum
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant