Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

AI provider and MCP create adoption: use a secret nonce instead of the object UID

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, kubernetes
领域
backend, security

调研方向

Start by reading #423 and #253 to understand lost-create recovery and current adoption via coder-k8s:<object UID>. Locate the CoderAIProvider and CoderMCPServer create paths and the cleanup ConfigMap in the operator namespace. Implement nonce generation before create, store it only in cleanup record, restrict adoption to matching nonce; done when UID adoption is replaced and tests pass.

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

描述

Follow-up from #423 (#422 item 1), maintainer decision "Option A" on that PR.

Gap. After a lost create answer, the CoderAIProvider and CoderMCPServer create paths adopt a Coder resource whose display name is the operator's temporary display name coder-k8s:<object UID>. The operator records that resource's ID, applies the spec to it, and later deletes it by that ID. The object UID is visible to anyone who can read the Kubernetes object. A Coder user who creates a resource with that exact display name inside the window can therefore get it adopted, overwritten, and later deleted. The window normally ends at the next successful read, about 5 s after the lost answer. It stays open while the object stalls with NameConflict or SlugConflict.

Why it was kept in #423. Adoption is the only recovery for a lost create answer (#253) and for a late commit after the marker was cleared. Removing it would make every lost create answer stall with a false conflict on the object's own resource.

Proposal (Option C). Replace the UID in the temporary display name with a random secret nonce. Generate it before the create, store it only in the cleanup record (ConfigMap in the operator namespace, which users cannot read), and adopt only a resource whose display name carries that nonce. Migration: records without a nonce keep today's behavior until their object is next created.

Refs #422, #423, #253


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

主要语言
Go
星标
5
派生
3
平均合并
2 小时 56 分钟
30 天内合并 PR
185

环境准备

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

从这里开始

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

coder/coder-k8s 的其他 Issue

查看 coder/coder-k8s 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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