The best way to control Claude Code, Codex and more from any computer or phone
fix(server): block updates under legacy service launchers (#11940)
Guillermo Casanova committed
Sep 15, 2026 at 19:21 UTC
b84f63bb13f13b1d0ee8537c4d244d6f1efdb987
2 files changed
+13
-5
apps/server/src/cloud/servicePreflight.test.ts
+10
-3
@@ -3,15 +3,22 @@ import { expect, it } from "@effect/vitest";
3
import { runServicePreflight } from "./servicePreflight.ts";
4
import { SERVICE_LAUNCHER_PROTOCOL } from "./serviceProtocol.ts";
5
6
-it("requires the database-snapshot launcher protocol", () => {
6
+it.each([1, 2])("blocks legacy launcher protocol %i", (launcherProtocol) => {
7
expect(
8
runServicePreflight({
9
databasePath: "/missing/state.sqlite",
10
- launcherProtocol: SERVICE_LAUNCHER_PROTOCOL - 1,
10
+ launcherProtocol,
11
version: "1.2.3",
12
}),
13
- ).toMatchObject({ status: "blocked", version: "1.2.3" });
13
+ ).toEqual({
14
+ status: "blocked",
15
+ version: "1.2.3",
16
+ reason:
17
+ "This release requires a newer T3 Code service launcher. Update it on the server machine.",
18
+ });
19
+});
20
21
+it("accepts the current launcher protocol", () => {
22
expect(
23
runServicePreflight({
24
databasePath: "/missing/state.sqlite",
apps/server/src/cloud/serviceProtocol.ts
+3
-2
@@ -1,7 +1,8 @@
1
import type { ServerSelfUpdateOutcome } from "@t3tools/contracts";
2
3
-/** Protocol 2 snapshots SQLite before trials so migrations can be rolled back safely. */
4
-export const SERVICE_LAUNCHER_PROTOCOL = 2 as const;
3
+// Protocol 3 requires the standalone executable layout. Bump when runtimePaths
4
+// or the installed runtime tree changes incompatibly; launchers survive self-updates.
5
+export const SERVICE_LAUNCHER_PROTOCOL = 3 as const;
6
export const SERVICE_LAUNCHER_CONTEXT_ENV = "T3_SERVICE_LAUNCHER_CONTEXT";
7
export const SERVICE_STATE_FILE = "service-state.json";
8
/** Written by the launcher just before an explicit stop kills its child, so