githttp: hide ephemeral refs from the persistent remote and refuse pushes to them, as the docs say

Aperta
#799 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ThomasK33 ci sta già lavorando.

Dal 11/11/2026.

  • #800 di @ThomasK33 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, go

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)

  1. 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 and forward_pushes, S3-WAL hydration, repack, LFS reclaim reachability, orphan sweep, the +ephemeral remote 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.
  2. Hide refs/namespaces/ from the persistent remote's upload-pack and receive-pack advertisements, and refuse a push to refs/namespaces/* on the persistent remote with a per-ref ng and a clear message. Do it once, where the server configures every git child (as the GIT_NO_REPLACE_OBJECTS rule in AGENTS.md does), not per call.
  3. A client that today fetches or pushes those refs through the persistent remote sees a change, so the PR is breaking: fix(githttp)!: with a BREAKING CHANGE: line.
  4. 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

Lingua principale
Go
Stelle
0
Fork
0
Merge medio
6h 16m
PR unite (30g)
243

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/openstorage

Tutte le issue di coder/openstorage

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.