Repository navigation
feat(experiments): manage draft and running lifecycle - #180
Open
joshdholtz wants to merge 17 commits into
Open
joshdholtz wants to merge 17 commits into
joshdholtz wants to merge 17 commits into
Conversation
joshdholtz
added this pull request to stack #182
September 25, 2026 14:26
This was referenced Sep 25, 2026
joshdholtz
force-pushed
the
feat/experiments-lifecycle
branch
4 times, most recently
from
September 25, 2026 19:58
e36d06b to
fc06edb
Compare
joshdholtz
force-pushed
the
feat/experiments-lifecycle
branch
from
September 28, 2026 17:52
fc06edb to
17890ca
Compare
joshdholtz
marked this pull request as ready for review
September 28, 2026 17:56
JZDesign
requested changes
Sep 29, 2026
JZDesign
reviewed
Oct 6, 2026
JZDesign
reviewed
Oct 6, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4550e5a. Configure here.
JZDesign
reviewed
Oct 7, 2026
JZDesign
reviewed
Oct 7, 2026
| if create { | ||
| return map[string]any{"type": "object", "properties": fields, "required": []string{"display_name", "enrollment_percentage", "offering_a_id", "offering_b_id"}} | ||
| } | ||
| audience["description"] = "Omit to keep current targeting unless targeting_conditions is supplied. Set null to clear the audience and conditions, or supply targeting_conditions to replace them. A string selects an audience and cannot be combined with targeting_conditions." |
There was a problem hiding this comment.
Sorry, My null parameter comment caused you to mark this one omitable/nullable too, but this one returns a 422 when omitted
JZDesign
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Let humans and agents create, duplicate, and manage experiments with clear review before enrollment changes.
Second PR in the stack: #179 → #180 → #181.
Changes
rc schema experiments create|updatedescribes config fields, placements, duration, conditions, and enums.--yesbefore start, pause, resume, running updates, stop, and delete.Review notes
Verification
go test ./...,go vet ./...,make gen, andmake previewpassed locally after rebasing onto current main.Note
Medium Risk
Changes affect live customer enrollment and offering assignment when experiments are started, paused, resumed, or updated; guards and
--yesgates reduce accidental mutation but the operational impact is still significant.Overview
Adds full experiment lifecycle management to
rc experiments: create, duplicate, update, delete, start, pause, resume, and stop, wired to new development v2 API routes and documented in the command surface, CLI coverage map, and beta OpenAPI overlay.Create/update accept simple flags or a JSON
--config(stdin/file);rc schema experiments create|updateexposesconfig_fieldsfor agents (metrics, placements, targeting, duration, etc.). Duplicate copies configuration into a new draft via get+create (no results/status). Local validation covers enrollment 1–100%, mutual exclusion ofaudience_idvstargeting_conditions, and placements rules (fallback offering IDs require at least oneplacement_offeringsentry).Lifecycle mutations show the current experiment configuration first and require confirmation or
--yes(start, pause, resume, running enrollment updates, stop, delete). Updates are status-gated: drafts accept partial JSON; running experiments onlyenrollment_percentage; paused/stopped cannot be edited; delete is draft-only. The API client gains create/update/delete and action endpoints; human output tweaks include a consolidated conflicts line and sanitized notices/confirmations. Broad API, CLI, schema, and snapshot test coverage accompanies the change.Reviewed by Cursor Bugbot for commit b772a60. Bugbot is set up for automated code reviews on this repo. Configure here.