@@ -165,7 +165,10 @@ export interface ExprIssue {
165165 * [#26858] The judged slot's key path in the stack, in the spelling the other
166166 * rules' findings carry (`flows[0].edges[1].condition`), beside the human
167167 * `where`. Set only where the slot has one: a top-level flow edge's
168- * `condition`, and (#27643) an object validation rule's `condition` / `when`
168+ * `condition`, (#27828) a top-level flow node's judged config value
169+ * (`flows[0].nodes[1].config.fields.status`, a sibling block's
170+ * `flows[0].nodes[2].connectorConfig.input.customerId`), and (#27643) an
171+ * object validation rule's `condition` / `when`
169172 * (`objects[0].validations[1].condition`), a nested branch's included
170173 * (`objects[0].validations[1].then.condition`). Absent, the finding is
171174 * located by `where` alone.
@@ -2722,7 +2725,13 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
27222725 // that guarantee stops, through the file's one home for it.
27232726 for ( const node of recordsOf ( graph . nodes ) ) {
27242727 const cfg = ( node . config ?? { } ) as AnyRec ;
2728+ // [#27828] Each site below names the key it judged beside its `where`;
2729+ // after the walk, this node's findings carry that key path (see the
2730+ // stamp at the end of this body).
2731+ const nodeFirst = issues . length ;
2732+ const nodeSlotKeys = new Map < string , string > ( ) ;
27252733 const nodeCondWhere = `${ at } · node '${ node . id } ' (${ node . type } ) condition` ;
2734+ nodeSlotKeys . set ( nodeCondWhere , 'config.condition' ) ;
27262735 if ( ! checkStructuralCondition ( nodeCondWhere , cfg . condition ) . refused ) {
27272736 const from = issues . length ;
27282737 check ( nodeCondWhere , cfg . condition , objectName ) ;
@@ -2762,8 +2771,10 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
27622771 || ( configRefusal . code === 'node-config-refused-by-contract' && configRefusal . path === 'functionName' )
27632772 ) ) ) ;
27642773 for ( const configRefusal of configRefusals ) {
2774+ const configWhere = `${ at } · node '${ node . id } ' (${ nodeType } ) config.${ configRefusal . path } ` ;
2775+ nodeSlotKeys . set ( configWhere , `config.${ configRefusal . path } ` ) ;
27652776 issues . push ( {
2766- where : ` ${ at } · node ' ${ node . id } ' ( ${ nodeType } ) config. ${ configRefusal . path } ` ,
2777+ where : configWhere ,
27672778 message : configRefusal . message ,
27682779 source : configRefusal . source ,
27692780 severity : 'error' ,
@@ -2774,6 +2785,7 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
27742785 // `connectorConfig.input` — and names the block it is in.
27752786 for ( const found of resolveFlowNodeExpressions ( nodeType , cfg , node ) ) {
27762787 const slotWhere = `${ at } · node '${ node . id } ' (${ nodeType } ) ${ found . entry . label } at ${ found . block } .${ found . path } ` ;
2788+ nodeSlotKeys . set ( slotWhere , `${ found . block } .${ found . path } ` ) ;
27772789 // [#15137] `value` slots are checkable too, by their own rule — see
27782790 // `checkDeclaredValue`. Not shadowing-checked: the shadow diagnostic is
27792791 // about a bare identifier resolving to a variable instead of a field,
@@ -2832,8 +2844,10 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
28322844 // and the two legacy `assignment` shapes, so build and registration
28332845 // give one verdict, and each refusal names the token's CEL spelling.
28342846 for ( const templateRefusal of flowNodeValueTemplateRefusals ( nodeType , cfg , node ) ) {
2847+ const templateWhere = `${ at } · node '${ node . id } ' (${ nodeType } ) ${ templateRefusal . label } at ${ templateRefusal . block } .${ templateRefusal . path } ` ;
2848+ nodeSlotKeys . set ( templateWhere , `${ templateRefusal . block } .${ templateRefusal . path } ` ) ;
28352849 issues . push ( {
2836- where : ` ${ at } · node ' ${ node . id } ' ( ${ nodeType } ) ${ templateRefusal . label } at ${ templateRefusal . block } . ${ templateRefusal . path } ` ,
2850+ where : templateWhere ,
28372851 message : templateRefusal . message ,
28382852 source : templateRefusal . source ,
28392853 severity : 'error' ,
@@ -2850,6 +2864,7 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
28502864 // throw at the node mid-run.
28512865 for ( const slot of flowNodeTextSlotSources ( nodeType , cfg ) ) {
28522866 const slotWhere = `${ at } · node '${ node . id } ' (${ nodeType } ) ${ slot . label } at config.${ slot . path } ` ;
2867+ nodeSlotKeys . set ( slotWhere , `config.${ slot . path } ` ) ;
28532868 const tokenRefusal = textSlotTemplateRefusal ( slot . source ) ;
28542869 if ( tokenRefusal !== undefined ) {
28552870 issues . push ( { where : slotWhere , message : tokenRefusal , source : slot . source , severity : 'error' } ) ;
@@ -2879,6 +2894,8 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
28792894 const action = typeof cfg . actionType === 'string' ? cfg . actionType . trim ( ) : '' ;
28802895 const retired = [ 'actionType' , 'template' , 'recipients' , 'variables' , 'script' ]
28812896 . filter ( ( k ) => cfg [ k ] != null ) ;
2897+ // The first retired key the author wrote, or the `function` to write.
2898+ nodeSlotKeys . set ( `${ at } · node '${ node . id } ' (script) callable` , `config.${ retired [ 0 ] ?? 'function' } ` ) ;
28822899 if ( retired . length > 0 ) {
28832900 issues . push ( {
28842901 where : `${ at } · node '${ node . id } ' (script) callable` ,
@@ -2914,6 +2931,20 @@ export function runStackExpressionPasses(stack: AnyRec, options: StackExpression
29142931 } ) ;
29152932 }
29162933 }
2934+ // [#27828] A top-level node's findings also carry the judged slot's key
2935+ // path, the #26858 edge shape (`flows[0].nodes[1].config.fields.status`),
2936+ // indexed over the list the author wrote (the coerced one drops `null`
2937+ // members and would renumber). A nested region's node keeps `where`, as
2938+ // its edges do.
2939+ const nodeIndex = flowIndex >= 0 && graph . path . length === 0 && Array . isArray ( flow . nodes )
2940+ ? flow . nodes . indexOf ( node )
2941+ : - 1 ;
2942+ if ( nodeIndex >= 0 ) {
2943+ for ( let k = nodeFirst ; k < issues . length ; k ++ ) {
2944+ const key = nodeSlotKeys . get ( issues [ k ] ! . where ) ;
2945+ if ( key !== undefined ) issues [ k ] = { ...issues [ k ] ! , path : `flows[${ flowIndex } ].nodes[${ nodeIndex } ].${ key } ` } ;
2946+ }
2947+ }
29172948 }
29182949 // `recordsOf`, not `as unknown as AnyRec[]` (#16910) — the same reason as
29192950 // the `graph.nodes` reader above: a NESTED region's edge list is only
0 commit comments