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 則留言 ·
-
[FEATURE]: 录入 AIDEV Agent Package v1 接入参考文档可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉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 天內回覆