OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Stop an experiment.
Goal
End an experiment and optionally declare a winner.
Context
Called when concluding an A/B test.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const StopExperimentContract = defineCommand({
meta: {
key: 'experiment.stop',
version: '1.0.0',
stability: 'stable',
owners: ['platform.feature-flags'],
tags: ['feature-flags', 'experiment', 'stop'],
description: 'Stop an experiment.',
goal: 'End an experiment and optionally declare a winner.',
context: 'Called when concluding an A/B test.',
},
io: {
input: StopExperimentInput,
output: ExperimentModel,
errors: {
EXPERIMENT_NOT_FOUND: {
description: 'Experiment does not exist',
http: 404,
gqlCode: 'EXPERIMENT_NOT_FOUND',
when: 'Experiment ID is invalid',
},
EXPERIMENT_NOT_RUNNING: {
description: 'Experiment is not running',
http: 409,
gqlCode: 'EXPERIMENT_NOT_RUNNING',
when: 'Cannot stop an experiment that is not running',
},
},
},
policy: {
auth: 'admin',
},
});