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 <noreply@anthropic.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user