Fix #200: deleted repos vanish from explore #202
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!202
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-200"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #200. A deleted repo kept showing in /explore because of THREE stacked layers (all fixed here):
Layer 1 — backend listing (ROOT CAUSE):
repoRegistry.Repos/Owners(cmd/walhub/serve.go) did a RAW prefix listing.Registry.Deletesweeps every listed object, but the filesystem CAS.locksidecars persist BY DESIGN (invisible toList, yet their directory keeps the name behindListPrefixes). Reproduced live: after DELETE,manifest.pbgone butmanifest.pb.lock+social.json.lockremain \u2192GET /api/v1/owners/ghost/repos\u2192["demo"]with summary 404. Fix: listings are MANIFEST-gated (parallel Heads, limit 8, mirroringwal.refreshList; fail-closed like it). This also hides unborn fork-provisioned prefixes (#150, still tolerated row-side as a race).Exists/create/delete were already manifest-gated \u2192 re-create/re-import after delete sees a clean name (verified: PUT\u2192201, push works).Layer 2 — browser HTTP cache: the endpoints answer SWR (
max-age=0, stale-while-revalidate=60), so Chrome served the pre-delete list up to 60s (reproduced: server returned[]while the page still rendered the row). Fix: SDKowners.list()/repos()always sendcache: no-store(web/sdk/src/core.js); data-layer 5s TTL still bounds repeats.Layer 3 — app cache: delete/import now invalidate
owners+repos:{owner}(+ repo keys on delete); repo shell renders 'repository not found' on 404 summary instead of 'loading\u2026' forever.Tests: new Go tests (TestRepoRegistryHidesManifestlessPrefixes/UnknownOwnerEmpty/DeleteVanishesAndRecreates), new node pin (listings no-store);
go vet+go test ./cmd/walhubclean; node suite 396 pass (smoke.test.js excluded: hangs fetching :8080 in isolation too, pre-existing env flake, file untouched). Browser (headless CDP): full UI delete\u2192/explore empty immediately, re-create\u2192row back, dark+light, no app errors. Docs 07 \u00a714 + 12 decisions appended. No new deps.