fix(evidence): bind corpus to workspace identity

This commit is contained in:
2026-07-12 05:57:23 +02:00
parent 78ff360882
commit db35ddb041
6 changed files with 109 additions and 10 deletions
+1
View File
@@ -113,6 +113,7 @@ def gc_from_config(config: Path, *, dry_run: bool = False):
pipeline_version="evidence-v1",
retain_published_generations=cfg.vector.retain_published_generations,
)
pipeline.workspace_id = config.stem.lower().replace(".", "-").replace("_", "-")
with pipeline.store.writer_lock():
return pipeline.gc(workspace_root=corpus_root.parent, dry_run=dry_run)
+8 -2
View File
@@ -53,7 +53,10 @@ def search_cmd(
require_vector_cfg(cfg)
from tht.search.evidence import active_searcher
runtime_searcher = active_searcher(cfg, open_searcher(cfg))
runtime_searcher = active_searcher(
cfg, open_searcher(cfg),
workspace_id=config.stem.lower().replace(".", "-").replace("_", "-"),
)
if kind is not None and kind not in KIND_MAP:
typer.secho(
f"ERRORE: --kind sconosciuto: {kind} (validi: {', '.join(KIND_MAP)})",
@@ -260,7 +263,10 @@ def pack_cmd(
try:
from tht.search.evidence import active_searcher
searcher = active_searcher(cfg, open_searcher(cfg))
searcher = active_searcher(
cfg, open_searcher(cfg),
workspace_id=config.stem.lower().replace(".", "-").replace("_", "-"),
)
embedder = make_embedder(cfg.embeddings)
vec = embedder.embed_query(question)
except degrade as e: