Skip to content

Conversation

@fsarachu
Copy link

Summary

  • Adds 4 new optional parameters to create_experiment tool to support per-environment experiment configuration (Addresses Feature: Create per‑environment experiment rules #29 )
  • Enables users to override hashAttribute for custom user bucketing (e.g., userId instead of default id)
  • Allows custom trackingKey for analytics integration instead of auto-generated keys
  • Introduces enabledEnvironments to control which environments receive experiment rules
  • Adds environmentConditions for per-environment targeting conditions (e.g., {"targeting_attribute": true} for production only)

Test plan

  • Run npm test - all 36 tests pass (12 new + 24 existing)
  • Run npm run build - TypeScript compiles successfully
  • Manual test: Create experiment with hashAttribute: "userId" and verify API payload includes it
  • Manual test: Create experiment with custom trackingKey and verify it's used instead of auto-generated
  • Manual test: Create experiment with enabledEnvironments: ["staging"] and verify rule only added to staging
  • Manual test: Create experiment with environmentConditions: { "production": "{"targeting_attribute": true}" } and verify condition is set

@royalfig
Copy link
Collaborator

royalfig commented Feb 2, 2026

Hey @fsarachu! This is looking good. Lmk when you're ready for a review.

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.

2 participants