diff --git a/harness/tht/cli/vector_cmd.py b/harness/tht/cli/vector_cmd.py index 3b3754e4..ce228f29 100644 --- a/harness/tht/cli/vector_cmd.py +++ b/harness/tht/cli/vector_cmd.py @@ -14,7 +14,12 @@ vector_app = typer.Typer(help="Indice semantico Qdrant (derivato, rigenerabile)" def _artifact_digest(path: Path) -> str: - return "sha256:" + hashlib.sha256(path.read_bytes()).hexdigest() + try: + contents = path.read_bytes() + except FileNotFoundError: + # An absent annotations file is valid (empty curation); digest the empty artifact. + contents = b"" + return "sha256:" + hashlib.sha256(contents).hexdigest() def _emit_json(payload: dict) -> None: