fix(openclaw): persistent anonymous telemetry ID, flush fix, and email resolution (#4790)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Saket Aryan
2026-04-11 20:57:14 +05:30
committed by GitHub
co-authored by Claude Opus 4.6
parent 9d82e2329d
commit d39ebad09f
10 changed files with 215 additions and 11 deletions
+4
View File
@@ -61,6 +61,7 @@ describe("providerToBackend — search", () => {
keyword_search: true,
reranking: true,
filters: { category: "preference" },
source: "OPENCLAW",
});
expect(results).toHaveLength(1);
expect((results[0] as any).id).toBe("m1");
@@ -79,6 +80,7 @@ describe("providerToBackend — search", () => {
keyword_search: undefined,
reranking: undefined,
filters: undefined,
source: "OPENCLAW",
});
});
});
@@ -173,6 +175,7 @@ describe("providerToBackend — listMemories", () => {
expect(provider.getAll).toHaveBeenCalledWith({
user_id: DEFAULT_USER,
page_size: 50,
source: "OPENCLAW",
});
expect(results).toHaveLength(1);
});
@@ -186,6 +189,7 @@ describe("providerToBackend — listMemories", () => {
expect(provider.getAll).toHaveBeenCalledWith({
user_id: DEFAULT_USER,
page_size: undefined,
source: "OPENCLAW",
});
});
});
+2 -2
View File
@@ -24,7 +24,7 @@ describe("telemetry", () => {
});
it("exports PLUGIN_VERSION", () => {
expect(PLUGIN_VERSION).toBe("1.0.4");
expect(PLUGIN_VERSION).toBe("1.0.6");
});
it("captureEvent does not throw", () => {
@@ -51,7 +51,7 @@ describe("telemetry", () => {
expect(() => captureEvent("test_event")).not.toThrow();
});
it("falls back to anonymous-openclaw when no apiKey", () => {
it("falls back to a generated anonymous id when no apiKey", () => {
(readPluginAuth as ReturnType<typeof vi.fn>).mockReturnValueOnce({});
expect(() => captureEvent("test_event", {}, {})).not.toThrow();
});