cloudflare / cloudflare/artifact-fs
Repos seeded from shallow pushes carry a permanent server-side shallow boundary that clients cannot clear
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
**Setup**: A repo was originally seeded by fetching a source repo with --depth 1 and pushing that single commit as main. The server appears to have permanently recorded that commit as a shallow boundary for the repo.
**Observed behavior:**
A plain full git clone (no --depth flags) returns a shallow repository — the server sends shallow lines unprompted, and .git/shallow is populated.
git fetch --unshallow and git fetch --depth 2147483647 complete as silent no-ops — the server never serves ancestry past the boundary, even though the boundary commit's parents exist in another repo on the same account.
Pushing the complete missing ancestry to the repo (locally verified fully connected via git fsck) succeeds without error, but a fresh clone is still shallow, and the pushed ancestor objects are absent afterward (git cat-file -e fails) — objects beyond the recorded boundary appear to be discarded on receive.
Ref updates that interact with the boundary from a shallow client fail with rejected … shallow roots are not allowed to be updated / error: Could not read .
**Impact**: every clone of such a repo is permanently shallow, and normal git workflows intermittently fail with the errors in (4). Repos seeded with full history behave correctly — the issue is confined to shallow-seeded repos, which cannot be repaired from the client side by any push or fetch we've found.
**Ask**: is there (or could there be) a server-side way to clear or backfill a recorded shallow boundary on an existing repo? If delete-and-recreate is the intended remediation, confirming that would also help.
Contributor guide
Research direction
No source files, tests, or entry points are named. Start by reproducing the plain clone, git fetch --unshallow, and git fetch --depth 2147483647 behavior described in the report, then trace how the server handles shallow boundaries and pushed ancestry. Done means the repository can be repaired server-side, or the supported delete-and-recreate remediation is confirmed and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100