@@ -158,11 +158,26 @@ describe('lintLivenessProperties', () => {
158158 expect ( ruleOf ( findings , 'nodes.outputSchema' ) ) . toBeUndefined ( ) ;
159159 } ) ;
160160
161- // #29442 — `flow.variables[].objectName` is declared before any start door
162- // reads it, so its row is `planned` + `authorWarn`. Pinned through the SHIPPED
161+ /**
162+ * A stack authoring a drilled row the shipped ledger still holds `planned` +
163+ * `authorWarn` (an app navigation entry's `dataSource`): the control that
164+ * the walk below reaches a planned row at all.
165+ */
166+ const PLANNED_NAV_DATA_SOURCE = {
167+ apps : [ {
168+ name : 'crm' ,
169+ label : 'CRM' ,
170+ navigation : [ { id : 'accounts' , type : 'object' , label : 'Accounts' , objectName : 'crm_account' , dataSource : { provider : 'api' , read : { url : '/api/v1/crm/summary' } } } ] ,
171+ } ] ,
172+ } ;
173+
174+ // #29442 declared `flow.variables[].objectName` before any start door read
175+ // it (`planned` + `authorWarn`, pinned here as a warning). #29425 gave it its
176+ // reader, every door that starts a flow by name, and flipped the drilled row
177+ // to `live`, so the SAME input now draws nothing. Pinned through the SHIPPED
163178 // ledger and an array of variables, so the drill (`variables.objectName`)
164- // and the array fan-out both have to hold for the author to be told .
165- it ( 'warns on a flow input declared a record reference — planned, nothing reads it yet ' , ( ) => {
179+ // and the array fan-out both have to hold.
180+ it ( 'no longer warns on a flow input declared a record reference — live since the start doors read it (#29425) ' , ( ) => {
166181 const findings = lintLivenessProperties ( {
167182 flows : [ {
168183 name : 'close_account' ,
@@ -173,18 +188,16 @@ describe('lintLivenessProperties', () => {
173188 nodes : [ { id : 'start' , type : 'start' } ] ,
174189 } ] ,
175190 } ) ;
176- const warned = findings . filter ( ( f ) => f . message . includes ( 'sets `variables.objectName`' ) ) ;
177- expect ( warned ) . toHaveLength ( 1 ) ;
178- expect ( warned [ 0 ] . rule ) . toBe ( 'liveness-planned-property' ) ;
179- expect ( warned [ 0 ] . hint ) . toContain ( 'nothing reads it yet' ) ;
180- // The live siblings the drill graded stay silent.
191+ expect ( findings . filter ( ( f ) => f . message . includes ( 'variables.objectName' ) ) ) . toEqual ( [ ] ) ;
192+ expect ( ruleOf ( findings , 'variables.objectName' ) ) . toBeUndefined ( ) ;
193+ // The live siblings the drill graded stay silent too.
181194 for ( const key of [ 'name' , 'type' , 'isInput' , 'isOutput' , 'defaultValue' ] ) {
182195 expect ( ruleOf ( findings , `variables.${ key } ` ) , key ) . toBeUndefined ( ) ;
183196 }
184- // And a flow that writes no `objectName` draws nothing about it.
185- expect ( lintLivenessProperties ( {
186- flows : [ { name : 'f2' , variables : [ { name : 'note' , type : 'text' , isInput : true } ] , nodes : [ ] } ] ,
187- } ) . filter ( ( f ) => f . message . includes ( 'objectName' ) ) ) . toEqual ( [ ] ) ;
197+ // CONTROL: the same walk still warns on a drilled `planned` + authorWarn
198+ // row elsewhere in the shipped ledger, so the silence above is this row's
199+ // verdict, not a walk that reaches nothing.
200+ expect ( ruleOf ( lintLivenessProperties ( PLANNED_NAV_DATA_SOURCE ) , 'navigation.dataSource' ) ) . toBe ( 'liveness-planned-property' ) ;
188201 } ) ;
189202
190203 // #30259 declared `action.params[].widget` before any reader (`planned` +
@@ -211,14 +224,7 @@ describe('lintLivenessProperties', () => {
211224 // CONTROL: the same walk still warns on a drilled `planned` + authorWarn
212225 // row elsewhere in the shipped ledger, so the silence above is the
213226 // widget row's verdict, not a walk that reaches nothing.
214- const flow = lintLivenessProperties ( {
215- flows : [ {
216- name : 'close_account' ,
217- variables : [ { name : 'accountId' , type : 'text' , isInput : true , objectName : 'crm_account' } ] ,
218- nodes : [ { id : 'start' , type : 'start' } ] ,
219- } ] ,
220- } ) ;
221- expect ( ruleOf ( flow , 'variables.objectName' ) ) . toBe ( 'liveness-planned-property' ) ;
227+ expect ( ruleOf ( lintLivenessProperties ( PLANNED_NAV_DATA_SOURCE ) , 'navigation.dataSource' ) ) . toBe ( 'liveness-planned-property' ) ;
222228 } ) ;
223229
224230 it ( 'warns on an experimental prop with no authorWarn of its own (tool.outputSchema)' , ( ) => {
0 commit comments