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.
Start an experiment.
Goal
Begin collecting data for an experiment.
Context
Called when ready to run 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 StartExperimentContract = defineCommand({
meta: {
key: 'experiment.start',
version: '1.0.0',
stability: 'stable',
owners: ['platform.feature-flags'],
tags: ['feature-flags', 'experiment', 'start'],
description: 'Start an experiment.',
goal: 'Begin collecting data for an experiment.',
context: 'Called when ready to run an A/B test.',
},
io: {
input: StartExperimentInput,
output: ExperimentModel,
errors: {
EXPERIMENT_NOT_FOUND: {
description: 'Experiment does not exist',
http: 404,
gqlCode: 'EXPERIMENT_NOT_FOUND',
when: 'Experiment ID is invalid',
},
EXPERIMENT_ALREADY_RUNNING: {
description: 'Experiment is already running',
http: 409,
gqlCode: 'EXPERIMENT_ALREADY_RUNNING',
when: 'Cannot start an experiment that is already running',
},
},
},
policy: {
auth: 'admin',
},
});