Node debugger cannot resolve upstream outputs in manual evaluations #28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The node debugger's Test tab could not evaluate any node whose configuration reads an earlier step's output. Pressing Evaluate node failed before running:
NodeDebugCodec.manualPortsbuilt itsNodeDebugInputwithupstreamOutputs = emptyMap(), andNodeDebuggerpassed that straight intoNodeExecutionContext.outputs, so everyOutputValue(nodeId, portId, path)reference was unresolvable. Retained run inputs worked, becausedecodeInputrestores the capturedupstreammap; manual inputs never did.This affected any node with an output binding, not only Switch. #12 made output-based comparisons the norm for switch branches, which is what surfaced it.
Scope
rulesliteral that no generic template walk can see into.Non-goals
FixtureWorkflowRunnerdoes would fire real Read effects on pressing Evaluate node, against the panel's own promise that only this step runs.Resolution
Fixed on
maininabcf262.ValueTemplateEvaluator.outputReferencesanswers which upstream port a value comes from, beside the existingdependencies, which answers only which nodes must run first. It lives there because the evaluator already owns the reference syntax.WorkflowNode.upstreamReferencesis the single reader of what a node reads upstream, folding in switch conditions explicitly. The compiler, authoring validation and the debugger now cannot disagree about which references exist.Seeding logic sits in its own file rather than the composable so it can be tested — this module has no Compose test harness. Covered by
NodeDebuggerUpstreamTest,UpstreamReferencesTestandUpstreamSkeletonTest, including the before/after pair pinning the original failure. Verified on a Pixel 9 emulator: the same switch node that failed now evaluates tocase:healthy · 0 records,case:critical · 0 records,fallback · 1 record.