feat(executor): node pinned_input overrides upstream byPort on manual runs

This commit is contained in:
Claude
2026-08-30 14:22:01 +00:00
parent e24bdb012b
commit 16a5225ee3
2 changed files with 82 additions and 0 deletions

View File

@@ -183,6 +183,16 @@ public sealed class Executor
}
var byPort = BuildInputsByPort(portMap, allowFailurePlaceholders: false);
// Manual runs honor the node's pinned_input — replaces byPort[0] with the
// pinned items. Node's own logic still runs (we intentionally don't skip
// upstream ancestors; their output is discarded for THIS node's byPort).
if (triggerKind == "manual" && node.PinnedInputJson is { } nodePinJson)
{
using var pinDoc = JsonDocument.Parse(nodePinJson);
byPort = new IReadOnlyList<Item>[] { WrapPin(pinDoc.RootElement) };
}
var typ = _nodes.Get(node.TypeId);
if (typ is not IActionNode action)
throw new InvalidOperationException($"Node {nid} is not an action type.");