@devries-cameron20 / t3code-1 / commits / 68aa7aa830
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

refactor(server): keep telemetry identity errors private (#10032)

Julius Marminge committed Sep 5, 2026 at 01:20 UTC 68aa7aa8305e9dfc0d98543f607d88bd37fb66e2
2 files changed +2 -22
apps/server/src/telemetry/Identify.test.ts
-20
@@ -33,26 +33,6 @@ const findIdentityLog = (
33 errorTag: string,
34 ) => logs.find((log) => log.annotations.source === source && log.annotations.errorTag === errorTag);
35
36 -it("preserves exact telemetry identity causes without deriving messages from them", () => {
37 - const decodeCause = new Error("private nested decode details");
38 - const decodeError = new Identify.TelemetryIdentityDecodeError({
39 - source: "codex",
40 - filePath: "/tmp/auth.json",
41 - cause: decodeCause,
42 - });
43 - const readCause = new Error("private nested read details");
44 - const readError = new Identify.TelemetryIdentityReadError({
45 - source: "anonymous",
46 - filePath: "/tmp/anonymous-id",
47 - cause: readCause,
48 - });
49 -
50 - assert.strictEqual(decodeError.cause, decodeCause);
51 - assert.strictEqual(readError.cause, readCause);
52 - assert.notInclude(decodeError.message, decodeCause.message);
53 - assert.notInclude(readError.message, readCause.message);
54 -});
55 -
36 it.layer(NodeServices.layer)("telemetry identity", (it) => {
37 it.effect("uses the persisted anonymous id when provider identities are absent", () =>
38 Effect.gen(function* () {
apps/server/src/telemetry/Identify.ts
+2 -2
@@ -23,7 +23,7 @@ const ClaudeJsonSchema = Schema.Struct({
23 export const TelemetryIdentitySource = Schema.Literals(["codex", "claude", "anonymous"]);
24 export type TelemetryIdentitySource = typeof TelemetryIdentitySource.Type;
25
26 -export class TelemetryIdentityReadError extends Schema.TaggedErrorClass<TelemetryIdentityReadError>()(
26 +class TelemetryIdentityReadError extends Schema.TaggedErrorClass<TelemetryIdentityReadError>()(
27 "TelemetryIdentityReadError",
28 {
29 source: TelemetryIdentitySource,
@@ -36,7 +36,7 @@ export class TelemetryIdentityReadError extends Schema.TaggedErrorClass<Telemetr
36 }
37 }
38
39 -export class TelemetryIdentityDecodeError extends Schema.TaggedErrorClass<TelemetryIdentityDecodeError>()(
39 +class TelemetryIdentityDecodeError extends Schema.TaggedErrorClass<TelemetryIdentityDecodeError>()(
40 "TelemetryIdentityDecodeError",
41 {
42 source: Schema.Literals(["codex", "claude"]),