@devries-cameron20 / t3code Mirror · read-only / commits / 912276bcd9
Fork 0

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 24, 10:15 UTC

test(server): run the Antigravity install harness for the host platform (#9574)

Co-authored-by: Claude Code <noreply@anthropic.com>

Julius Marminge committed Sep 4, 2026 at 13:33 UTC 912276bcd9ca258ad9309727df8e279e5ab698f8
1 file changed +32 -25
apps/server/src/provider/AntigravityInstallation.test.ts
+32 -25
@@ -55,9 +55,24 @@ const zipFixtures = {
55 "UEsDBBQAAAAIAAAAIl1zEy/oFAAAABQAAAASAAAAYWd5X2FjcF9zZXJ2ZXIuZXhlS8wryUwvSizLLKlUKCoFcnJTuQBQSwMEFAAAAAgAAAAiXV9yAykQAAAADgAAABkAAABsb2NhbGhhcm5lc3NfZXh0ZXJuYWwuZXhly8lPTsxRyEgsykstLuYCAFBLAQIUAxQAAAAIAAAAIl1zEy/oFAAAABQAAAASAAAAAAAAAAAAAADtgQAAAABhZ3lfYWNwX3NlcnZlci5leGVQSwECFAMUAAAACAAAACJdX3IDKRAAAAAOAAAAGQAAAAAAAAAAAAAA7YFEAAAAbG9jYWxoYXJuZXNzX2V4dGVybmFsLmV4ZVBLBQYAAAAAAgACAIcAAACLAAAAAAA=",
56 };
57
58 -const completeArchive = Buffer.from(zipFixtures.complete, "base64");
58 +// The installation checks POSIX exec bits off the real filesystem unless the
59 +// platform is win32, so a linux platform mock cannot pass on NTFS. Default to
60 +// the host and let the fixture names follow; the suite is about install
61 +// mechanics, which are the same on every platform.
62 +const hostPlatform: NodeJS.Platform =
63 + HostProcessPlatform.defaultValue() === "win32" ? "win32" : "linux";
64 +const completeArchive = Buffer.from(
65 + hostPlatform === "win32" ? zipFixtures.windows : zipFixtures.complete,
66 + "base64",
67 +);
68 +const executableName = hostPlatform === "win32" ? "agy_acp_server.exe" : "agy_acp_server.par";
69 +const harnessName =
70 + hostPlatform === "win32" ? "localharness_external.exe" : "localharness_external";
71
60 -function releaseAsset(archive: Uint8Array = completeArchive, platform: NodeJS.Platform = "linux") {
72 +function releaseAsset(
73 + archive: Uint8Array = completeArchive,
74 + platform: NodeJS.Platform = hostPlatform,
75 +) {
76 return {
77 version: "fixture-new",
78 url: "https://dl.google.com/antigravity-test.zip",
@@ -128,7 +143,7 @@ const makeHarness = Effect.fn("test.makeAntigravityInstallation")(function* (
143 const path = yield* Path.Path;
144 const baseDir =
145 options.baseDir ?? (yield* fs.makeTempDirectoryScoped({ prefix: "t3-agy-test-" }));
131 - const platform = options.platform ?? "linux";
146 + const platform = options.platform ?? hostPlatform;
147 const archive = options.archive ?? completeArchive;
148 const asset = options.asset === undefined ? releaseAsset(archive, platform) : options.asset;
149 const managedDirectory = path.join(baseDir, "tools", "antigravity-acp", `${platform}-x64`);
@@ -472,7 +487,7 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
487 ...fs,
488 sink: (target, options) =>
489 (stage === "download" && target.endsWith("download.zip")) ||
475 - (stage === "extract" && target.endsWith("agy_acp_server.par"))
490 + (stage === "extract" && target.endsWith(executableName))
491 ? fs.sink(target, options).pipe(Sink.mapInputEffect(() => Effect.fail(noSpace)))
492 : fs.sink(target, options),
493 writeFileString: (target, content, options) =>
@@ -525,7 +540,7 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
540 fileSystem: FileSystem.FileSystem.of({
541 ...fs,
542 sink: (target, options) =>
528 - phase === "extracting" && target.endsWith("agy_acp_server.par")
543 + phase === "extracting" && target.endsWith(executableName)
544 ? fs
545 .sink(target, options)
546 .pipe(
@@ -691,8 +706,8 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
706 const path = yield* Path.Path;
707 const baseDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-agy-path-test-" });
708 const externalDirectory = path.join(baseDir, "external");
694 - const externalExecutable = path.join(externalDirectory, "agy_acp_server.par");
695 - const externalHarness = path.join(externalDirectory, "localharness_external");
709 + const externalExecutable = path.join(externalDirectory, executableName);
710 + const externalHarness = path.join(externalDirectory, harnessName);
711 yield* fs.makeDirectory(externalDirectory);
712 yield* fs.writeFileString(externalExecutable, "external server", { mode: 0o755 });
713 yield* fs.writeFileString(externalHarness, "external harness", { mode: 0o755 });
@@ -711,7 +726,7 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
726 source: "override",
727 managedVersionDirectory: null,
728 });
714 - expect(yield* installation.resolve("agy_acp_server.par")).toMatchObject({
729 + expect(yield* installation.resolve(executableName)).toMatchObject({
730 source: "override",
731 });
732 yield* fs.remove(externalHarness);
@@ -741,7 +756,7 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
756 executablePath: externalExecutable,
757 });
758 expect(
744 - yield* isolated.installation.resolve("agy_acp_server.par", { PATH: externalDirectory }),
759 + yield* isolated.installation.resolve(executableName, { PATH: externalDirectory }),
760 ).toMatchObject({ source: "override", executablePath: externalExecutable });
761 }),
762 );
@@ -774,20 +789,12 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
789 yield* fs.remove(previous.harnessPath);
790 const externalDirectory = path.join(baseDir, "external");
791 yield* fs.makeDirectory(externalDirectory);
777 - yield* fs.writeFileString(
778 - path.join(externalDirectory, "agy_acp_server.par"),
779 - "external server",
780 - {
781 - mode: 0o755,
782 - },
783 - );
784 - yield* fs.writeFileString(
785 - path.join(externalDirectory, "localharness_external"),
786 - "external harness",
787 - {
788 - mode: 0o755,
789 - },
790 - );
792 + yield* fs.writeFileString(path.join(externalDirectory, executableName), "external server", {
793 + mode: 0o755,
794 + });
795 + yield* fs.writeFileString(path.join(externalDirectory, harnessName), "external harness", {
796 + mode: 0o755,
797 + });
798 const restarted = yield* makeHarness({ baseDir, path: externalDirectory });
799 expect(yield* restarted.installation.state).toMatchObject({
800 phase: "failed",
@@ -824,8 +831,8 @@ it.layer(NodeServices.layer)("Antigravity installation", (it) => {
831 const profileDirectory = path.join(baseDir, "providers", "antigravity", "profile");
832 yield* fs.makeDirectory(externalDirectory);
833 yield* fs.makeDirectory(profileDirectory, { recursive: true });
827 - const externalExecutable = path.join(externalDirectory, "agy_acp_server.par");
828 - const externalHarness = path.join(externalDirectory, "localharness_external");
834 + const externalExecutable = path.join(externalDirectory, executableName);
835 + const externalHarness = path.join(externalDirectory, harnessName);
836 const profilePath = path.join(profileDirectory, "preferences.json");
837 yield* fs.writeFileString(externalExecutable, "external server", { mode: 0o755 });
838 yield* fs.writeFileString(externalHarness, "external harness", { mode: 0o755 });