Clarify source hook resync timing

This commit is contained in:
Meta Vens 2026-04-24 15:18:11 +01:00
commit 45f1c9691f
2 changed files with 10 additions and 0 deletions

View file

@ -317,6 +317,15 @@ npm run rag:install-push-hooks
Git does not provide a client-side `post-push` hook, so VoidBot installs a chained `pre-push` hook instead. That hook returns quickly, launches a detached incremental reindex for the pushed repo, and preserves any existing `pre-push` hook by backing it up to `pre-push.voidbot.prev` and running it first.
What that actually means:
- the resync starts on your local machine during `git push`, from the hooked repo's `pre-push` hook
- it updates the local source archive plus the source-side vector store (`Qdrant` if enabled, otherwise the local JSON shard backend)
- it only reindexes the repo being pushed, not every repo in `SOURCE_REPO_ROOT`
- it does not wait for the remote push to succeed, because Git does not give us a real client-side `post-push`
- pushes from some other machine do nothing here unless that machine also has the hook installed
- if a resync for that repo is already running, the hook records `already_running` in the status file and does not start a second one
Progress for those detached runs lives here:
- status: `.voidbot/status/source-hooks/<repo>.json`

View file

@ -31,6 +31,7 @@ Discord Gateway
- `VECTOR_STORE_KIND=local_json` keeps the zero-service path available for local development, but `VECTOR_STORE_KIND=qdrant` is now supported for a proper vector database.
- Discord history vectors and source-tree/lore vectors stay in separate physical partitions so source indexing no longer rewrites the entire history corpus.
- The bot live-ingests every message that matches the configured indexing rule and can also backfill from exported log files.
- Source and lore indexing can also be kicked off by local repo `pre-push` hooks, which launch a detached incremental resync of the pushed repo into the source archive and source-side vector store.
- The owner Codex flow can perform repeated read-only history searches through a bounded tool loop instead of relying on a single retrieval snapshot.
- Stock Discord replies are loaded from `config/system-messages.json` and rotated through shuffled variants to avoid repetitive canned responses.
- Changing embedding models requires a full vector rebuild from the archived messages, which is handled by `npm run rag:rebuild`.