fix(desktop): keep Bestie experiment default off

Signed-off-by: Arjun Mahanti <arjun@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Arjun Mahanti
2026-08-28 12:19:07 -04:00
parent 63c8866321
commit 73085c8ce6
2 changed files with 5 additions and 3 deletions

View File

@@ -6,7 +6,6 @@ export const protectedFeatureDefinitions: FeatureDefinition[] = [
id: "bestie",
name: "Bestie",
description: "Try a personal agent that is always close at hand",
defaultEnabled: true,
platforms: ["desktop"],
},
];

View File

@@ -1,6 +1,7 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import { resolveEnabled } from "../shared/features/resolveEnabled.ts";
import { protectedFeatureDefinitions as internalDefinitions } from "./internal.ts";
import { protectedFeatureDefinitions as publicDefinitions } from "./public.ts";
@@ -9,11 +10,13 @@ describe("protected feature build variants", () => {
assert.deepEqual(publicDefinitions, []);
});
it("adds Bestie only through the internal module", () => {
it("adds Bestie as a default-off experiment only through the internal module", () => {
assert.deepEqual(
internalDefinitions.map((feature) => feature.id),
["bestie"],
);
assert.equal(internalDefinitions[0]?.defaultEnabled, true);
const bestie = internalDefinitions[0];
assert.ok(bestie);
assert.equal(resolveEnabled(bestie.id, {}, bestie.defaultEnabled), false);
});
});