Fix case sensitivity bug: S-expression node types are lowercase

Bug: S-expression plans produce lowercase node types (source, compound)
but code was checking uppercase (SOURCE, COMPOUND).

Fix: Use .upper() for node type comparisons.

Add TestNodeTypeCaseSensitivity tests to catch this regression.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-13 01:58:34 +00:00
parent bfe96a431c
commit be4d0da84f
2 changed files with 57 additions and 2 deletions

View File

@@ -732,7 +732,7 @@ def execute_recipe(self, recipe_sexp: str, input_hashes: Dict[str, str], run_id:
input_paths.append(Path(input_path))
# Handle SOURCE nodes
if step.node_type == "SOURCE":
if step.node_type.upper() == "SOURCE":
source_cid = step.config.get("cid")
# If source has :input true, resolve CID from input_hashes
@@ -772,7 +772,7 @@ def execute_recipe(self, recipe_sexp: str, input_hashes: Dict[str, str], run_id:
raise ValueError(f"SOURCE step has no cid and no :input flag: {step.config}")
# Handle COMPOUND nodes (collapsed effect chains)
if step.node_type == "COMPOUND":
if step.node_type.upper() == "COMPOUND":
import subprocess
import tempfile