The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 04:15 UTC
fix(antigravity): keep the runtime version learned from ACP (#20980)
Co-authored-by: Paul <paul@local>
Paul Jones committed
Oct 18, 2026 at 19:20 UTC
4c52938fdb2cc9dd76265e94adee14adcccb8033
2 files changed
+66
-1
apps/server/src/provider/AntigravityProvider.test.ts
+62
@@ -430,6 +430,68 @@ it.layer(layerTest)("Antigravity provider snapshots", (it) => {
430
),
431
);
432
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
+
495
it.effect("replaces one account's catalog instead of combining accounts", () =>
496
Effect.scoped(
497
Effect.gen(function* () {
apps/server/src/provider/AntigravityProvider.ts
+4
-1
@@ -177,6 +177,7 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
177
);
178
const initialized =
179
Result.isSuccess(result) && Option.isSome(result.success) ? result.success.value : undefined;
180
+ const version = initialized?.agentInfo?.version;
181
const failure = Result.isFailure(result) ? result.failure : undefined;
182
const missingInstallation = failure !== undefined && isMissingInstallation(failure);
183
const errorMessage =
@@ -210,7 +211,9 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
211
draft: {
212
...draft,
213
installed: !missingInstallation,
213
- version: initialized?.agentInfo?.version || draft.version,
214
+ // Custom launchers have no static version; their lightweight probe
215
+ // must not erase the version learned from a real ACP handshake.
216
+ version: version === "unknown" ? draft.version : version || draft.version,
217
status: errorMessage ? "error" : authenticated ? "ready" : "warning",
218
checkedAt: updatedAt,
219
usageLimits: missingInstallation