From c46fcd2308617d0bdf96bed9c5f6cef594aa23d1 Mon Sep 17 00:00:00 2001 From: gilesb Date: Tue, 13 Jan 2026 04:17:34 +0000 Subject: [PATCH] Make IPFS upload failures fatal - no local hash fallback IPFS CIDs are the primary identifiers. If IPFS upload fails, the operation must fail rather than silently using local hashes. Co-Authored-By: Claude Opus 4.5 --- cache_manager.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cache_manager.py b/cache_manager.py index 839278c..f825769 100644 --- a/cache_manager.py +++ b/cache_manager.py @@ -286,9 +286,7 @@ class L1CacheManager: # Upload to IPFS first to get the CID (primary identifier) cid = ipfs_client.add_file(source_path) if not cid: - # Fallback to local hash if IPFS unavailable - cid = file_hash(source_path) - logger.warning(f"IPFS unavailable, using local hash: {cid[:16]}...") + raise RuntimeError(f"IPFS upload failed for {source_path}. IPFS is required.") # Use CID as node_id if not provided if node_id is None: