Add COMPOUND node handling and fix cache lookups by code-addressed hash
- Add COMPOUND node handling in execute_recipe for collapsed effect chains - Index cache entries by node_id (cache_id) when different from IPFS CID - Fix test_cache_manager.py to unpack put() tuple returns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -325,6 +325,12 @@ class L1CacheManager:
|
||||
self._set_content_index(cid, node_id)
|
||||
logger.info(f"put: Set content index {cid[:16]}... -> {node_id[:16]}...")
|
||||
|
||||
# Also index by node_id itself (for code-addressed cache lookups)
|
||||
# This allows get_by_cid(cache_id) to work when cache_id != IPFS CID
|
||||
if node_id != cid:
|
||||
self._set_content_index(node_id, node_id)
|
||||
logger.debug(f"Self-indexed: {node_id[:16]}... -> {node_id[:16]}...")
|
||||
|
||||
# Also index by local hash if cid is an IPFS CID
|
||||
# This ensures both IPFS CID and local hash can be used to find the file
|
||||
if local_hash and local_hash != cid:
|
||||
|
||||
Reference in New Issue
Block a user