| author | |
| committer | |
| log | 68aa7aa8305e9dfc0d98543f607d88bd37fb66e2 |
| tree | c45cc4a6d29db93ee481e7e1cefa230fd018b606 |
| parent | 86f079964b9c3d2a087907d2ef8273c3dbcb960b |
| signature | Signed by PGP key B5690EEEBB952194 |
2 files changed, 2 insertions(+), 22 deletions(-)
apps/server/src/telemetry/Identify.test.ts-20| ... | ... | @@ -33,26 +33,6 @@ const findIdentityLog = ( |
| 33 | 33 | errorTag: string, |
| 34 | 34 | ) => logs.find((log) => log.annotations.source === source && log.annotations.errorTag === errorTag); |
| 35 | 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 | ||
| 56 | 36 | it.layer(NodeServices.layer)("telemetry identity", (it) => { |
| 57 | 37 | it.effect("uses the persisted anonymous id when provider identities are absent", () => |
| 58 | 38 | Effect.gen(function* () { |
apps/server/src/telemetry/Identify.ts+2-2| ... | ... | @@ -23,7 +23,7 @@ const ClaudeJsonSchema = Schema.Struct({ |
| 23 | 23 | export const TelemetryIdentitySource = Schema.Literals(["codex", "claude", "anonymous"]); |
| 24 | 24 | export type TelemetryIdentitySource = typeof TelemetryIdentitySource.Type; |
| 25 | 25 | |
| 26 | export class TelemetryIdentityReadError extends Schema.TaggedErrorClass<TelemetryIdentityReadError>()( | |
| 26 | class TelemetryIdentityReadError extends Schema.TaggedErrorClass<TelemetryIdentityReadError>()( | |
| 27 | 27 | "TelemetryIdentityReadError", |
| 28 | 28 | { |
| 29 | 29 | source: TelemetryIdentitySource, |
| ... | ... | @@ -36,7 +36,7 @@ export class TelemetryIdentityReadError extends Schema.TaggedErrorClass<Telemetr |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | export class TelemetryIdentityDecodeError extends Schema.TaggedErrorClass<TelemetryIdentityDecodeError>()( | |
| 39 | class TelemetryIdentityDecodeError extends Schema.TaggedErrorClass<TelemetryIdentityDecodeError>()( | |
| 40 | 40 | "TelemetryIdentityDecodeError", |
| 41 | 41 | { |
| 42 | 42 | source: Schema.Literals(["codex", "claude"]), |