[bug] Repository sync silently succeeds but indexed content is stale after branch rename/deletion
Maintainer antworten meist innerhalb von 1 Tag
@brendan-kellam arbeitet bereits daran.
Seit 23.3.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Describe the bug
After renaming or deleting a branch on the remote (GitHub/GitLab), Sourcebot's
next sync cycle completes without any errors in the logs, but the old branch
name continues to appear in the code search UI and the file explorer. The stale
branch remains fully searchable and navigable as if it still exists, with no
indication to the user that it has been removed upstream.
This is different from #248 (token rotation not reflected in cached remotes) —
here authentication is fine, the sync job runs successfully, but the
branch-level index is not pruned after a remote ref disappears.
Logs: Backend logs during the affected sync cycle (no errors shown despite stale
branch remaining):
[backend] | 2025-12-10T08:22:11.412Z info: [main] Fetching my-org/my-repo...
[backend] | 2025-12-10T08:22:12.103Z info: [main] Successfully fetched my-org/my-repo
[backend] | 2025-12-10T08:22:12.110Z info: [zoekt] Indexing my-org/my-repo...
[backend] | 2025-12-10T08:22:14.887Z info: [zoekt] Successfully indexed my-org/my-repo
To reproduce
- Deploy Sourcebot via
docker compose upwith a GitHub connection indexing
at least one repo that has multiple branches configured. - Confirm the branch (e.g.
feature/old-name) is visible and searchable in
the Sourcebot UI. - On GitHub/GitLab, rename or delete that branch.
- Wait for the next sync cycle to complete (or trigger a manual re-index).
- Observe the logs — sync completes with no errors.
- Return to the Sourcebot UI and search for content that only exists on the
deleted/renamed branch.
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): latest (v4.10.30)
Additional information
- The issue persists across container restarts — the stale branch is still
indexed after a full restart of the stack. - Workaround: manually deleting the Zoekt index data under the
/data/.sourcebotvolume and allowing a full re-index clears the stale
branch, but this is disruptive for large repos. - This may be related to how
git fetchis called during sync — if
--pruneis not passed, deleted remote refs are not removed from the
local clone's ref list, and Zoekt re-indexes whatever refs it finds locally.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.9k
- Forks
- 374
- Ø Merge
- 2 T. 21 Std.
- Gemergte PRs (30 T.)
- 43
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sourcebot-dev/sourcebot
-
[bug] Search result hydration performs duplicate repository lookups within the same chunkEvtl. wieder frei @Abhishek-Sonje hat das vor 20 Tagen übernommen, und es ist kein Pull Request offen. Offenbug triage needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
sourcebot-dev/sourcebot#1681 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Linux ctags build instructions in CONTRIBUTING.md are missing build dependenciesEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
sourcebot-dev/sourcebot#1633 ·
Maintainer antworten meist innerhalb von 1 Tag
-
MCP ask_codebase rejects explicit languageModel: getLanguageModelKey includes displayName which the MCP schema doesn't exposeEvtl. wieder frei @Harsh23Kashyap hat das vor 103 Tagen übernommen, und es ist kein Pull Request offen. Offenask_sb bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
sourcebot-dev/sourcebot#1137 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
[FR] Support file-based and Azure Key Vault token sources alongside env and googleCloudSecretEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 64/100
sourcebot-dev/sourcebot#1704 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[bug] Local repositories with a space or non-ASCII character in the path cannot be indexedEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
sourcebot-dev/sourcebot#1689 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sourcebot-dev/sourcebot
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
better-auth/better-auth#11723 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: docs difficulty: easy documentation good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden abEvtl. vergeben @KajoVanBuyten hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
AgentSystemLabs/agent-office#367 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
pierrecomputer/pierre#1187 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: frontend bug
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
snapotter-hq/SnapOtter#2425 ·
Maintainer antworten meist innerhalb von 1 Tag