feat(executor): node pinned_input overrides upstream byPort on manual runs
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user