From 45f1c9691fa23c788558f036286ed21ac514d4f0 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 24 Apr 2026 15:18:11 +0100 Subject: [PATCH] Clarify source hook resync timing --- README.md | 9 +++++++++ docs/architecture/overview.md | 1 + 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 97655c3..e241ac1 100644 --- a/README.md +++ b/README.md @@ -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/.json` diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index d950a2e..6d996ae 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -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`.