Define and enforce case-only name collision policy for GitHub server identities

未关闭
#1,805 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, postgresql

调研方向

Start by tracing the persistence path that keys versions and publish locks by server_name, then inspect the database constraints and tests around publishing. Audit existing io.github.* records and decide how uniqueness treats owner casing while preserving stored names; add coverage for legacy collisions, aliases, distinct owners, version updates, and concurrent publishes. Done means the chosen policy is enforced transactionally without changing other namespace behavior.

由索引模型根据 Issue 内容生成。

描述

Summary

Follow-up to #1788 and the discussion in #689.

GitHub user and organization identifiers are case-insensitive, while the Registry preserves mixed-case server names. #1788 addresses authorization by matching the GitHub owner portion of io.github.<owner>/* grants without regard to case. It deliberately does not canonicalize persisted server identities.

The persistence path currently keys versions and publish locks by the supplied server_name. Depending on the storage constraints and existing data, this can allow io.github.Foo/tool and io.github.foo/tool to become independent records, even though they refer to the same GitHub owner. Simply lowercasing existing names would break stable registry identities and existing publishers.

Proposed investigation / acceptance criteria

  • Audit existing io.github.* records for names that differ only by case before introducing a constraint; decide how existing collisions should be treated.
  • Specify which portions of a GitHub server name should be case-insensitive for uniqueness (owner only vs. complete name) without silently changing existing stored names or URL identities.
  • Preserve the exact stored name across subsequent versions; avoid rewriting published records.
  • Prevent publishing a new case-only alias for an existing identity, including concurrent publishes. Consider canonicalized advisory lock keys and a transaction-safe database constraint/check, not an application-only pre-check.
  • Add tests covering legacy mixed-case records, new case-only aliases, distinct owners, normal version updates, and concurrent publication.
  • Keep other namespace types' uniqueness/matching behavior unchanged unless explicitly designed otherwise.

Scope

This issue concerns storage-level identity and concurrency, not the publish authorization 403 resolved in #1788. As requested in the PR review, the storage policy should be considered separately rather than delaying that compatibility fix.

References: #689, #1788, #1623.

主要语言
Go
星标
7.4k
派生
1k
平均合并
17 小时 57 分钟
30 天内合并 PR
68

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/registry 的其他 Issue

查看 modelcontextprotocol/registry 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。