@@ -235,68 +235,6 @@ describe("Antigravity model catalog", () => {
235235} ) ;
236236
237237it . layer ( layerTest ) ( "Antigravity provider snapshots" , ( it ) => {
238- it . effect ( "does not guess a version before a custom launcher's first handshake" , ( ) =>
239- Effect . scoped (
240- Effect . gen ( function * ( ) {
241- const harness = yield * makeHarness ( ) ;
242- yield * Deferred . succeed ( harness . initialProbe , {
243- ...initializeResult ,
244- agentInfo : { ...initializeResult . agentInfo , version : "unknown" } ,
245- } ) ;
246- yield * harness . initialUpdate ;
247- expect ( ( yield * harness . provider . snapshot . getSnapshot ) . version ) . toBeNull ( ) ;
248- } ) ,
249- ) ,
250- ) ;
251-
252- it . effect ( "accepts a known version from a later installation probe" , ( ) =>
253- Effect . scoped (
254- Effect . gen ( function * ( ) {
255- const harness = yield * makeHarness ( ) ;
256- yield * harness . initialize ;
257- yield * harness . provider . onSessionStarted ( {
258- ...started ,
259- initializeResult : {
260- ...initializeResult ,
261- agentInfo : { ...initializeResult . agentInfo , version : "1.3.0" } ,
262- } ,
263- } ) ;
264- yield * Ref . set (
265- harness . probe ,
266- Effect . succeed ( {
267- ...initializeResult ,
268- agentInfo : { ...initializeResult . agentInfo , version : "1.4.0" } ,
269- } ) ,
270- ) ;
271- expect ( ( yield * harness . provider . snapshot . refresh ) . version ) . toBe ( "1.4.0" ) ;
272- } ) ,
273- ) ,
274- ) ;
275-
276- it . effect ( "does not replace a handshake version with an unknown custom-launcher probe" , ( ) =>
277- Effect . scoped (
278- Effect . gen ( function * ( ) {
279- const harness = yield * makeHarness ( ) ;
280- yield * harness . initialize ;
281- yield * harness . provider . onSessionStarted ( {
282- ...started ,
283- initializeResult : {
284- ...initializeResult ,
285- agentInfo : { ...initializeResult . agentInfo , version : "1.4.0" } ,
286- } ,
287- } ) ;
288- yield * Ref . set (
289- harness . probe ,
290- Effect . succeed ( {
291- ...initializeResult ,
292- agentInfo : { ...initializeResult . agentInfo , version : "unknown" } ,
293- } ) ,
294- ) ;
295- expect ( ( yield * harness . provider . snapshot . refresh ) . version ) . toBe ( "1.4.0" ) ;
296- } ) ,
297- ) ,
298- ) ;
299-
300238 it . effect ( "does not probe or run helper safety checks while disabled" , ( ) =>
301239 Effect . scoped (
302240 Effect . gen ( function * ( ) {
@@ -492,6 +430,68 @@ it.layer(layerTest)("Antigravity provider snapshots", (it) => {
492430 ) ,
493431 ) ;
494432
433+ it . effect ( "does not guess a version before a custom launcher's first handshake" , ( ) =>
434+ Effect . scoped (
435+ Effect . gen ( function * ( ) {
436+ const harness = yield * makeHarness ( ) ;
437+ yield * Deferred . succeed ( harness . initialProbe , {
438+ ...initializeResult ,
439+ agentInfo : { ...initializeResult . agentInfo , version : "unknown" } ,
440+ } ) ;
441+ yield * harness . initialUpdate ;
442+ expect ( ( yield * harness . provider . snapshot . getSnapshot ) . version ) . toBeNull ( ) ;
443+ } ) ,
444+ ) ,
445+ ) ;
446+
447+ it . effect ( "accepts a known version from a later installation probe" , ( ) =>
448+ Effect . scoped (
449+ Effect . gen ( function * ( ) {
450+ const harness = yield * makeHarness ( ) ;
451+ yield * harness . initialize ;
452+ yield * harness . provider . onSessionStarted ( {
453+ ...started ,
454+ initializeResult : {
455+ ...initializeResult ,
456+ agentInfo : { ...initializeResult . agentInfo , version : "1.3.0" } ,
457+ } ,
458+ } ) ;
459+ yield * Ref . set (
460+ harness . probe ,
461+ Effect . succeed ( {
462+ ...initializeResult ,
463+ agentInfo : { ...initializeResult . agentInfo , version : "1.4.0" } ,
464+ } ) ,
465+ ) ;
466+ expect ( ( yield * harness . provider . snapshot . refresh ) . version ) . toBe ( "1.4.0" ) ;
467+ } ) ,
468+ ) ,
469+ ) ;
470+
471+ it . effect ( "does not replace a handshake version with an unknown custom-launcher probe" , ( ) =>
472+ Effect . scoped (
473+ Effect . gen ( function * ( ) {
474+ const harness = yield * makeHarness ( ) ;
475+ yield * harness . initialize ;
476+ yield * harness . provider . onSessionStarted ( {
477+ ...started ,
478+ initializeResult : {
479+ ...initializeResult ,
480+ agentInfo : { ...initializeResult . agentInfo , version : "1.4.0" } ,
481+ } ,
482+ } ) ;
483+ yield * Ref . set (
484+ harness . probe ,
485+ Effect . succeed ( {
486+ ...initializeResult ,
487+ agentInfo : { ...initializeResult . agentInfo , version : "unknown" } ,
488+ } ) ,
489+ ) ;
490+ expect ( ( yield * harness . provider . snapshot . refresh ) . version ) . toBe ( "1.4.0" ) ;
491+ } ) ,
492+ ) ,
493+ ) ;
494+
495495 it . effect ( "replaces one account's catalog instead of combining accounts" , ( ) =>
496496 Effect . scoped (
497497 Effect . gen ( function * ( ) {
0 commit comments