@@ -261,22 +261,26 @@ describe('the object/field unknown-key warnings survive the generalization', ()
261261 //
262262 // The open-collection fixture was `views` until #10039 established that the
263263 // parse had been REFUSING those keys all along, then `connectors` until its
264- // root closed too. No open ROOT is left, so the open half is now a nested
265- // strip site under a closed root — `connectors[].retryConfig`, which the
266- // walk still visits per node — carried alongside two closed collections so
267- // the "must not contaminate" property still has something to be true about.
264+ // root closed too. No open ROOT is left, so the open half is a nested strip
265+ // site under a closed root, which the walk still visits per node. It was
266+ // `connectors[].retryConfig` until the authored connector entry closed its
267+ // nested shapes as well; it is now `apis[].objectParams`, and the connector
268+ // fixture stays as a third closed collection (its hand-off is asserted
269+ // below), so the "must not contaminate" property still has something to be
270+ // true about.
268271 const findings = lintAuthoring ( {
269272 objects : [ { name : 'a' , label : 'A' , indexes : [ { fields : [ 'a' ] , zzz : 1 } ] } ] ,
270273 views : [ { name : 'v' , object : 'a' , zzz : 1 } ] ,
271274 connectors : [ { name : 'c' , retryConfig : { zzz : 1 } } ] ,
275+ apis : [ { name : 'e' , objectParams : { zzz : 1 } } ] ,
272276 } ) ;
273277 // NOT deduped. This assertion used to run through a `new Set(...)` because
274278 // the walk emitted every union-root finding twice (#10039) — a mask over a
275279 // defect, inside the test that would otherwise have caught it. The raw list
276280 // is asserted now, so a re-introduced duplicate fails here rather than
277281 // being absorbed on the way to the assertion.
278282 expect ( findings . map ( ( f ) => `${ f . surface } :${ f . path } ` ) . sort ( ) ) . toEqual ( [
279- 'connector:connectors.c.retryConfig .zzz' ,
283+ 'api:apis.e.objectParams .zzz' ,
280284 ] ) ;
281285 // The hand-off half for the view fixture: not unreported — rejected, by the
282286 // strict container that made the old warning a contradiction.
@@ -289,6 +293,14 @@ describe('the object/field unknown-key warnings survive the generalization', ()
289293 name : 'a' , label : 'A' , fields : { x : { type : 'text' , label : 'X' } } ,
290294 indexes : [ { fields : [ 'a' ] , zzz : 1 } ] ,
291295 } ) . success ) . toBe ( false ) ;
296+ // The hand-off half for the connector fixture: refused at `retryConfig`.
297+ const connector = ObjectStackDefinitionSchema . safeParse ( {
298+ manifest : { id : 'com.example.t' , version : '1.0.0' , type : 'app' , name : 'T' } ,
299+ connectors : [ { name : 'c' , label : 'C' , type : 'api' , retryConfig : { zzz : 1 } } ] ,
300+ } ) ;
301+ expect ( connector . success ) . toBe ( false ) ;
302+ expect ( connector . success ? [ ] : connector . error . issues . map ( ( i ) => [ i . code , i . path . join ( '.' ) ] ) )
303+ . toContainEqual ( [ 'unrecognized_keys' , 'connectors.0.retryConfig' ] ) ;
292304 } ) ;
293305
294306 it ( 'hands off to the parse for the roots that closed' , ( ) => {
@@ -605,15 +617,16 @@ describe('one voice, and a single report per record', () => {
605617 // The key is unique to this test: `warnedUnknownAuthoringKeys` is a
606618 // MODULE-level set, so a path any other test already warned on would make
607619 // this one read zero warnings and pass vacuously.
608- // A nested strip site (`retryConfig`) since the connector root closed —
609- // see 'reports across collections in one walk' above.
610- const connectorStack = {
611- manifest : { ...MANIFEST , id : 'com.example.connectors' } ,
612- connectors : [ { name : 'c1' , retryConfig : { zzz_once_probe_key : 1 } } ] ,
620+ // A nested strip site (`apis[].objectParams`) since the connector root and
621+ // then its nested shapes closed — see 'reports across collections in one
622+ // walk' above.
623+ const apiStack = {
624+ manifest : { ...MANIFEST , id : 'com.example.apis' } ,
625+ apis : [ { name : 'e1' , objectParams : { zzz_once_probe_key : 1 } } ] ,
613626 } ;
614- const findings = lintAuthoring ( connectorStack ) ;
627+ const findings = lintAuthoring ( apiStack ) ;
615628 expect ( findings . map ( ( f ) => `${ f . surface } :${ f . path } ` ) ) . toEqual ( [
616- 'connector:connectors.c1.retryConfig .zzz_once_probe_key' ,
629+ 'api:apis.e1.objectParams .zzz_once_probe_key' ,
617630 ] ) ;
618631
619632 const warned : string [ ] = [ ] ;
@@ -622,7 +635,7 @@ describe('one voice, and a single report per record', () => {
622635 try {
623636 // `strict: false` skips the parse; the pre-parse warning pass runs either
624637 // way, which is the door under test here.
625- defineStack ( { ...viewStack , ...connectorStack } as never , { strict : false } ) ;
638+ defineStack ( { ...viewStack , ...apiStack } as never , { strict : false } ) ;
626639 } finally {
627640 console . warn = realWarn ;
628641 }
0 commit comments