Skip to content

Feat/daemon and index replace - #316

Closed
ple1n wants to merge 2 commits into
VeraTools:masterfrom
ple1n:feat/daemon-and-index-replace
Closed

ple1n wants to merge 2 commits into
VeraTools:masterfrom
ple1n:feat/daemon-and-index-replace

Conversation

@ple1n

@ple1n ple1n commented Nov 14, 2026 •

Copy link
Copy Markdown
  • vera daemon starts a daemon server that allows vera search to act as light clients (no repeated index loading)
  • vera index now requires --replace to discard an existing index because LLM sometimes tried to remove my index (expensive to build)

Summary by cubic

Adds an optional vera daemon that keeps search models and open index stores resident so repeated vera search commands reuse them, and makes vera index refuse to overwrite existing index data unless --replace is passed.

  • Daemon
    • vera daemon runs a foreground Unix-socket server; vera search connects to it automatically and falls back to the one-shot local path when no daemon is running.
    • Stop the daemon with Ctrl-C; the socket is removed on clean shutdown. Daemon mode is Unix-only.
  • Index replace
    • vera index now errors if index data already exists and --replace is not given, preventing accidental rebuilds.
    • --dry-run still works without replacing; vera update is unchanged.

Written for commit c542c1a. Summary will update on new commits.

View guided diff

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ple1n

ple1n commented Nov 14, 2026

Copy link
Copy Markdown
Author

code has been tested by real use in my dev work but code has not been reviewed.

I will continue to use it

@ple1n

ple1n commented Nov 15, 2026

Copy link
Copy Markdown
Author

@lemon07r

@revera-lr7

revera-lr7 Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Revera review

Status: partial — no accepted findings, 4 unconfirmed

Review incomplete: semantic retrieval unavailable; one or more validations were inconclusive. Absence of findings is not evidence the change is clean; rerun or inspect the parts listed as not checked.

Semantic retrieval unavailable (vera update . --json --exclude .env --exclude .env.* --exclude **/.env --exclude */.env. --exclude .pem --exclude **/.pem --exclude .key --exclude **/.key --exclude .p12 --exclude **/.p12 --ex); repository-wide lookups used lexical search only.

Checked: Reviewed all changed files and traced daemon transport/lifecycle, search contexts and consumers, provider configuration, index replacement/locking, tests, and updated documentation using lexical repository searches.

Timing: total 1298s · index 1140s · lanes 156s · validation 1.1s (p50 1.1s, p95 1.1s, first candidate at 1297s) · 5 phase(s) incomplete · 1 phase(s) skipped

revera · strategy baseline · models: investigator=factory/gpt-6.1-sol@high

@lemon07r

Copy link
Copy Markdown
Collaborator

Thanks for putting this together and testing it in your workflow, @ple1n.

I'm closing this PR rather than merging it for a few reasons:

  1. It bundles two unrelated features into one diff.
  2. On vera daemon: opening an index on disk (SearchStores::open) takes around 1 ms and the OS page cache already keeps vectors.f32 warm across one-shot CLI calls. If you want to keep slower-loading local ONNX models resident across invocations, vera serve --idle-timeout -1 with API mode already handles search, index, update, watch, and mcp across Linux, macOS, and Windows (with optional idle eviction), and vera mcp already caches SearchContext and SearchStores for persistent sessions. The daemon implementation here also prints vera: local / vera: daemon to stderr on every search, reads EMBEDDING_MODEL_*, RERANKER_MODEL_*, and VERA_COMPLETION_* from the daemon's startup environment instead of the caller's, processes connections serially without socket timeouts (blocking Ctrl-C while a client is active or stalled), and loses client-side fallback warnings.
  3. Guarding existing indexes against accidental rebuilds is genuinely useful (especially for avoiding unnecessary re-embedding on API backends or overwriting with --full-text-only), though checking raw .vera existence before recovery also blocks vera setup --index and rejects empty or incomplete .vera directories.

I'm opening a small standalone PR to add --replace protection for usable indexes.

@lemon07r lemon07r closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants