chore: remove POWER_STEERING experiment remnants (#10980)

This commit is contained in:
Hannes Rudolph 2026-01-26 15:26:47 -07:00 • committed by GitHub
parent 953c7773c0
commit 7534e19c60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 24 deletions

View file

@ -7,7 +7,6 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
*/
export const experimentIds = [
"powerSteering",
"preventFocusDisruption",
"imageGeneration",
"runSlashCommand",
@ -24,7 +23,6 @@ export type ExperimentId = z.infer<typeof experimentIdsSchema>
*/
export const experimentsSchema = z.object({
powerSteering: z.boolean().optional(),
preventFocusDisruption: z.boolean().optional(),
imageGeneration: z.boolean().optional(),
runSlashCommand: z.boolean().optional(),

View file

@ -5,50 +5,47 @@ import type { ExperimentId } from "@roo-code/types"
import { EXPERIMENT_IDS, experimentConfigsMap, experiments as Experiments } from "../experiments"
describe("experiments", () => {
describe("POWER_STEERING", () => {
describe("PREVENT_FOCUS_DISRUPTION", () => {
it("is configured correctly", () => {
expect(EXPERIMENT_IDS.POWER_STEERING).toBe("powerSteering")
expect(experimentConfigsMap.POWER_STEERING).toMatchObject({
expect(EXPERIMENT_IDS.PREVENT_FOCUS_DISRUPTION).toBe("preventFocusDisruption")
expect(experimentConfigsMap.PREVENT_FOCUS_DISRUPTION).toMatchObject({
enabled: false,
})
})
})
describe("isEnabled", () => {
it("returns false when POWER_STEERING experiment is not enabled", () => {
it("returns false when experiment is not enabled", () => {
const experiments: Record<ExperimentId, boolean> = {
powerSteering: false,
preventFocusDisruption: false,
imageGeneration: false,
runSlashCommand: false,
multipleNativeToolCalls: false,
customTools: false,
}
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.PREVENT_FOCUS_DISRUPTION)).toBe(false)
})
it("returns true when experiment POWER_STEERING is enabled", () => {
it("returns true when experiment is enabled", () => {
const experiments: Record<ExperimentId, boolean> = {
powerSteering: true,
preventFocusDisruption: false,
preventFocusDisruption: true,
imageGeneration: false,
runSlashCommand: false,
multipleNativeToolCalls: false,
customTools: false,
}
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(true)
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.PREVENT_FOCUS_DISRUPTION)).toBe(true)
})
it("returns false when experiment is not present", () => {
const experiments: Record<ExperimentId, boolean> = {
powerSteering: false,
preventFocusDisruption: false,
imageGeneration: false,
runSlashCommand: false,
multipleNativeToolCalls: false,
customTools: false,
}
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.PREVENT_FOCUS_DISRUPTION)).toBe(false)
})
})
})

View file

@ -1,7 +1,6 @@
import type { AssertEqual, Equals, Keys, Values, ExperimentId, Experiments } from "@roo-code/types"
export const EXPERIMENT_IDS = {
POWER_STEERING: "powerSteering",
PREVENT_FOCUS_DISRUPTION: "preventFocusDisruption",
IMAGE_GENERATION: "imageGeneration",
RUN_SLASH_COMMAND: "runSlashCommand",
@ -18,7 +17,6 @@ interface ExperimentConfig {
}
export const experimentConfigsMap: Record<ExperimentKey, ExperimentConfig> = {
POWER_STEERING: { enabled: false },
PREVENT_FOCUS_DISRUPTION: { enabled: false },
IMAGE_GENERATION: { enabled: false },
RUN_SLASH_COMMAND: { enabled: false },

View file

@ -233,10 +233,6 @@ describe("mergeExtensionState", () => {
...baseState,
apiConfiguration: { modelMaxThinkingTokens: 456, modelTemperature: 0.3 },
experiments: {
powerSteering: true,
marketplace: false,
disableCompletionCommand: false,
concurrentFileReads: true,
preventFocusDisruption: false,
imageGeneration: false,
runSlashCommand: false,
@ -254,10 +250,6 @@ describe("mergeExtensionState", () => {
})
expect(result.experiments).toEqual({
powerSteering: true,
marketplace: false,
disableCompletionCommand: false,
concurrentFileReads: true,
preventFocusDisruption: false,
imageGeneration: false,
runSlashCommand: false,