Skip to content

feat: add per-project batch flow, quota docs, and variant safety#55

Open
vahidlazio wants to merge 1 commit into
mainfrom
feat/batch-execution-and-quota-awareness
Open

feat: add per-project batch flow, quota docs, and variant safety#55
vahidlazio wants to merge 1 commit into
mainfrom
feat/batch-execution-and-quota-awareness

Conversation

@vahidlazio

Copy link
Copy Markdown
Collaborator

Summary

Lessons from the real 946-flag Nike migration, building on the batch tools and telemetry from #53.

Per-project batch flow

  • Process each project end-to-end: create batch → rules batch → update plan → spot-check
  • Don't create all flags across all projects first — interleave for resumability
  • Update plan file after each batch so sessions can resume

Quota documentation (discovered during migration)

  • Flags quota: hit at 100 flags, needed manual increase
  • Segments quota: 200 limit — each targeting rule with audience conditions creates a segment internally. Catch-all rules (no payload) don't consume segments. Strategy: request increase before large migrations.

Variant name mismatch prevention

  • ALWAYS pass explicit variants from the export data to batchCreateFlags
  • Without custom variants, flags get default disabled/enabled but rules reference on-flag/off-flagbatchAddTargetingRules fails with "Variant 'on-flag' does not exist"
  • Documents the onon-flag, offoff-flag transform (Confidence 4-char minimum)

Test plan

  • Verified during real migration: variant mismatch caused 6 rule failures
  • Verified during real migration: segment quota hit at 200
  • Full migration after quota increase

🤖 Generated with Claude Code

Lessons from a real 946-flag Nike migration:

- Per-project processing: create batch → rules batch → plan update
  instead of all-flags-first across projects
- Document flags quota (hit at 100) and segments quota (200 limit,
  each targeted rule creates a segment internally)
- Variant name mismatch prevention: always pass explicit variants
  from export data, never rely on default disabled/enabled
- Plan file updates after each batch for session resume

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant