feat(forgejo): enable zoekt instance-wide code search (#76) #97

Sammanfogat
supernaut sammanfogade 1 incheckning från feat/76-zoekt-code-search in i main 2026-07-18 19:49:27 +00:00
Ägare

Closes #76 — v16's embedded zoekt (in-process, no sidecar) turned on via [indexer] in app.ini.j2, behind a forgejo_repo_indexer_enabled toggle (set false + apply = rollback to per-repo search).

Verified in the local preview (same template, Forgejo 16)

  • Created a repo + file with a needle string via API; /explore/code finds it; shard files (*.zoekt, zoekt_meta.json) present on disk.
  • Path gotcha caught: REPO_INDEXER_PATH is relative to WORK_PATH (/data/gitea/indexers/repos.zoekt), not APP_DATA_PATH — comments document the verified location. Either way it's on the forgejo-data volume (ADR 0025), covered by the disk alerts.
  • Drive-by fix: local/vars.local.yml was missing v16's forgejo_reverse_proxy_trusted_proxies, so every local render has been broken since the v16 upgrade; fixed + indexer vars mirrored.

Issue checkboxes

  • Sizing: shards live on the data volume; ~6× repo footprint guidance documented in the runbook bullet; generic disk alerts cover the mountpoint. No resize needed at current corpus size.
  • Config: done (toggle + type + path).
  • bleve comparison: post-apply task — zoekt is the expected keeper; if latency/quality disappoints, flip forgejo_repo_indexer_type: bleve and compare (index rebuilds automatically).
  • First-index load: runbook says apply off-peak; expect CPU/IO while the corpus indexes.

Apply-day

site.yml --tags forgejo off-peak (app.ini change → forgejo restart via handler). Watch journalctl --user -u forgejo for indexer progress; verify a cross-repo hit on /explore/code.

Product follow-up (not this PR)

Instance-wide code search is a visible paying-user feature — worth a site/docs mention once live on prod (bitborg-web/bitborg-docs).

Closes #76 — v16's embedded zoekt (in-process, no sidecar) turned on via `[indexer]` in `app.ini.j2`, behind a `forgejo_repo_indexer_enabled` toggle (set false + apply = rollback to per-repo search). ## Verified in the local preview (same template, Forgejo 16) - Created a repo + file with a needle string via API; `/explore/code` finds it; shard files (`*.zoekt`, `zoekt_meta.json`) present on disk. - **Path gotcha caught**: `REPO_INDEXER_PATH` is relative to `WORK_PATH` (`/data/gitea/indexers/repos.zoekt`), not `APP_DATA_PATH` — comments document the verified location. Either way it's on the forgejo-data volume (ADR 0025), covered by the disk alerts. - Drive-by fix: `local/vars.local.yml` was missing v16's `forgejo_reverse_proxy_trusted_proxies`, so **every** local render has been broken since the v16 upgrade; fixed + indexer vars mirrored. ## Issue checkboxes - Sizing: shards live on the data volume; ~6× repo footprint guidance documented in the runbook bullet; generic disk alerts cover the mountpoint. No resize needed at current corpus size. - Config: done (toggle + type + path). - bleve comparison: post-apply task — zoekt is the expected keeper; if latency/quality disappoints, flip `forgejo_repo_indexer_type: bleve` and compare (index rebuilds automatically). - First-index load: runbook says apply off-peak; expect CPU/IO while the corpus indexes. ## Apply-day `site.yml --tags forgejo` off-peak (app.ini change → forgejo restart via handler). Watch `journalctl --user -u forgejo` for indexer progress; verify a cross-repo hit on `/explore/code`. ## Product follow-up (not this PR) Instance-wide code search is a visible paying-user feature — worth a site/docs mention once live on prod (bitborg-web/bitborg-docs).
supernaut tvångsskickade feat/76-zoekt-code-search från b608a1a42d
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m26s
till 681d41b40c
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m10s
2026-07-18 14:58:37 +00:00
Jämför
supernaut tvångsskickade feat/76-zoekt-code-search från 681d41b40c
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m10s
till f1dd55afe2
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m18s
2026-07-18 15:23:43 +00:00
Jämför
supernaut tvångsskickade feat/76-zoekt-code-search från f1dd55afe2
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m18s
till e39e14c01c
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m32s
2026-07-18 19:42:17 +00:00
Jämför
supernaut sammanfogade incheckning 64c6c3589e till main 2026-07-18 19:49:27 +00:00
supernaut tog bort grenen feat/76-zoekt-code-search 2026-07-18 19:49:27 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!97
Ingen beskrivning angiven.