githttp: hide ephemeral refs from the persistent remote and refuse pushes to them, as the docs say
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- git, go
- 领域
- backend, networking
调研方向
Start by mapping every reader of refs/namespaces/ listed in the issue, including the sync worker, push-upstream, forward_pushes, S3-WAL hydration, repack, LFS reclaim reachability, orphan sweep, and the +ephemeral remote. Record the design check in a comment before coding; if any reader requires the persistent remote, report that finding to the desk. Otherwise inspect where every git child is configured, then verify the persistent remote hides these refs and rejects pushes with per-ref ng; include the required breaking-change notice.
由索引模型根据 Issue 内容生成。
描述
Problem
The persistent git remote (/<repo>.git) advertises the API's ephemeral branches (refs/namespaces/ephemeral/...) and accepts pushes to them. Two docs say the opposite:
docs/explanation/git-protocol-and-namespaces.md:38-39: "persistent remotes must not see ephemeral refs (git namespaces or separate ref stores)".- The wire-compatibility table: ephemeral state "does not cross surfaces".
No hideRefs setting exists in internal/ today. A token still needs the same scope on both paths, so nobody gains access they lack, but a user who relies on the docs gets a wrong result. One edge case from #797 also depends on this: after someone pushes a branch named HEAD into that namespace over the persistent remote, the API cannot delete it by the name the list shows.
Found by a verifier on #798 (owner report, 2026-11-11).
Desk decision: Option A (make the code match the docs)
- Design check first, recorded as a comment here before any code: list every reader of
refs/namespaces/that goes through the git transport (sync worker, push-upstream andforward_pushes, S3-WAL hydration, repack, LFS reclaim reachability, orphan sweep, the+ephemeralremote itself, tests and verification skills). Hiding refs must not change any of them. Internal readers that open the repository directly are not affected by transport settings, but prove each one. - Hide
refs/namespaces/from the persistent remote's upload-pack and receive-pack advertisements, and refuse a push torefs/namespaces/*on the persistent remote with a per-refngand a clear message. Do it once, where the server configures every git child (as theGIT_NO_REPLACE_OBJECTSrule in AGENTS.md does), not per call. - A client that today fetches or pushes those refs through the persistent remote sees a change, so the PR is breaking:
fix(githttp)!:with aBREAKING CHANGE:line. - If the design check finds a reader that needs these refs on the persistent remote, stop and report it to the desk before coding.
Severity
Medium: documented isolation does not hold.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium
- 主要语言
- Go
- 星标
- 0
- 派生
- 0
- 平均合并
- 6 小时 16 分钟
- 30 天内合并 PR
- 243
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/openstorage 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
coder/openstorage#807 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 49/100
coder/openstorage#806 ·
维护者通常 1 天内回复
-
api: merge/preview ignores strategy, squash and allow_unrelated_histories可能已有人在做 @ThomasK33 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
coder/openstorage#805 ·
维护者通常 1 天内回复
-
githttp: +import remote serves clone and fetch, and its pushes stay out of the normal branch list可能已有人在做 @ThomasK33 今天认领。 未关闭
难度 5/5 一周以上 新手友好度 20/100
coder/openstorage#804 · 2 条评论 ·
维护者通常 1 天内回复
-
api: branches/create ignores expected_target_sha, so a guarded create or move can overwrite a branch可能已有人在做 @ThomasK33 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
coder/openstorage#803 ·
维护者通常 1 天内回复
查看 coder/openstorage 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
coder/coder-logstream-kube#255 · 1 条评论 ·
-
kind/features
难度 2/5 1-3 小时 新手友好度 73/100
TencentBlueKing/bk-nodemgr#3991 ·
维护者通常 1 天内回复
-
meta
难度 2/5 1-3 小时 新手友好度 62/100
last9/last9-mcp-server#554 ·
维护者通常 1 天内回复