Skip to content

feat(experiments): add read commands and development API routes - #179

Open
joshdholtz wants to merge 7 commits into
mainfrom
feat/experiments-read
Open

joshdholtz wants to merge 7 commits into
mainfrom
feat/experiments-read

Conversation

@joshdholtz

@joshdholtz joshdholtz commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Why

Expose the existing development v2 experiment reads to humans and agents. The endpoints stay in the development OpenAPI overlay.

First PR in the stack: #179 → #180 → #181.

Changes

  • Add typed list, show, and results API reads and rc experiments list|show|results.
  • Render variants, audience, placements, and a chronological timeline in show.
  • Render total-segment metrics plus Chance to Win and 95% lift intervals in human results; preserve the full response in --json.
  • Normalize documented platform aliases, warn on unknown platforms, and document exposure-status values.
  • Add output snapshots and API/CLI coverage.

Review note

The shared table-width fix measures visible Unicode width. It also changes spacing in existing app-list snapshots and previews; those files are included so the output stays aligned.

Verification

go test ./..., go vet ./..., make gen, and make preview passed locally after rebasing onto current main.


Note

Medium Risk
Read-only API surface, but touches shared CLI output formatting and permission-sensitive show fallback; development-gated endpoints may differ from production behavior.

Overview
Adds read-only rc experiments list|show|results against development v2 experiment endpoints, wired through a new ExperimentsService and registered on the normal CLI surface (with overlay/coverage docs updated).

show renders variants (up to four offerings), audience/targeting, placements, setup, and a chronological timeline; it prefers expand=offering.paywall and falls back to a plain GET with a warning when offerings read is forbidden. results prints total-segment metric tables, chance-to-win / lift intervals, and predicted LTV in human mode, with full sections/segments in --json; filters normalize platform aliases and country/currency casing, validate exposure-status, and warn on unknown platforms.

Also fixes table/card padding to use Unicode display width (lipgloss.Width), which updates a few existing app-list snapshots; snapshot harness now runs root with a shared stdout/stderr writer for stable ordering.

Reviewed by Cursor Bugbot for commit b44495e. Bugbot is set up for automated code reviews on this repo. Configure here.

@joshdholtz
joshdholtz force-pushed the feat/experiments-read branch from 8bcff62 to 9aa0229 Compare September 28, 2026 17:52
@joshdholtz
joshdholtz marked this pull request as ready for review September 28, 2026 17:56
Copilot AI lite review requested due to automatic review settings September 28, 2026 17:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread internal/cli/experiments.go
Comment thread internal/cli/experiments.go Outdated
Comment thread internal/cli/experiments.go
Comment thread internal/cli/experiments.go
Comment thread internal/cli/experiments.go
Comment thread internal/api/experiments.go
Comment thread internal/cli/experiments.go
@joshdholtz
joshdholtz requested a review from JZDesign October 6, 2026 22:23
Comment thread internal/cli/experiments.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants