Add explicit EFFECT node handling with case-insensitive lookup

- EFFECT nodes now handled explicitly like SOURCE, COMPOUND, SEQUENCE
- Case-insensitive node type matching throughout
- Fallback executor lookup tries both upper and original case

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-13 02:21:30 +00:00
parent 164f1291ac
commit ad15ef1ce7

View File

@@ -912,13 +912,48 @@ def execute_recipe(self, recipe_sexp: str, input_hashes: Dict[str, str], run_id:
logger.info(f"SEQUENCE step {step.step_id}: {len(input_paths)} clips -> {content_cid[:16]}...")
continue
# Get executor for this step type
executor = get_executor(step.node_type)
if not executor:
# Try effect executor
# Handle EFFECT nodes
if step.node_type.upper() == "EFFECT":
effect_name = step.config.get("effect")
if effect_name:
executor = get_executor(f"effect:{effect_name}")
if not effect_name:
raise ValueError(f"EFFECT node missing 'effect' in config: {step.config}")
executor = get_executor(f"effect:{effect_name}")
if not executor:
raise ValueError(f"No executor for effect: {effect_name}")
if len(input_paths) != 1:
raise ValueError(f"EFFECT expects 1 input, got {len(input_paths)}")
output_dir = CACHE_DIR / "nodes" / step.cache_id
output_dir.mkdir(parents=True, exist_ok=True)
output_path = output_dir / "output.mkv"
logger.info(f"EFFECT: Running {effect_name} on input")
result_path = executor.execute(step.config, input_paths, output_path)
cached, content_cid = cache_manager.put(
result_path,
node_type="EFFECT",
node_id=step.cache_id,
)
step_results[step.step_id] = {
"status": "executed",
"path": str(result_path),
"cache_id": step.cache_id,
"cid": content_cid,
"effect": effect_name,
}
cache_id_to_path[step.cache_id] = result_path
total_executed += 1
logger.info(f"EFFECT step {step.step_id}: {effect_name} -> {content_cid[:16]}...")
continue
# Fallback: try to get executor for unknown node types
executor = get_executor(step.node_type.upper())
if not executor:
executor = get_executor(step.node_type)
if not executor:
raise ValueError(f"No executor for node type: {step.node_type}")