feat(platform): Add automated EA features sync to update EA features doc#17011
feat(platform): Add automated EA features sync to update EA features doc#17011
Conversation
Add automation to detect when EA features change in Flagpole: - src/data/ea-features.json: Mapping file that maps feature flags to display names, documentation links, and categories - scripts/sync-ea-features.ts: Script that parses Flagpole YAML and compares against our mapping file - .github/workflows/sync-ea-features.yml: Weekly GitHub Action that runs the sync and creates issues when new EA features are detected The workflow: 1. Runs weekly on Mondays at 9am UTC (or manually) 2. Clones sentry-options-automator and parses flagpole.yaml 3. Extracts EA features (enabled, rollout > 0, user-visible) 4. Compares against our mapping file 5. Creates/updates a GitHub issue if new features are found Usage: pnpm ts-node scripts/sync-ea-features.ts [--check-only] Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Changes: - Script now supports --update flag to auto-add new features and remove old ones from the mapping file - Script regenerates the MDX documentation page from the mapping - MDX generation deduplicates features with same name/URL - GitHub Action now creates a PR (instead of issue) when changes detected - PR includes review checklist and sync output for easy review Usage: pnpm ts-node scripts/sync-ea-features.ts # Check only pnpm ts-node scripts/sync-ea-features.ts --update # Update files The weekly workflow will: 1. Run the sync with --update 2. If files changed, create a PR for review 3. PR includes counts of new/removed/documented/undocumented features
1. Branch name collision: Add timestamp (HHMMSS) to branch name to avoid collision if workflow runs multiple times on the same day 2. Silent category omission: Add warning when features have categories not in CATEGORY_ORDER, so they won't be silently omitted from MDX
- Extract undocumented features list to separate file - Display list prominently in PR with explanation that these won't appear on docs page until docsUrl is added - Move full sync output to collapsible details section
1. Add 'set -o pipefail' to workflow so script failures aren't masked by piping to tee 2. Only regenerate MDX when mapping file actually changes, preventing spurious PRs every week when nothing changed
Updated the EA feature detection logic to exclude features that have both EA and GA segments. A feature is now only considered EA-exclusive if it does NOT have any segment that grants access to non-EA orgs. GA segments are identified as: - Segments with empty conditions (applies to everyone) - Segments with only exclusion-based conditions (not_in, not_equals) This fixes false positives like: - Query Injection Detection (has GA segment with empty conditions) - Replay AI Summaries (GA for self-serve, only excluded for enterprise) The updated logic ensures the EA features page only lists features that are truly exclusive to Early Adopter organizations.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
The traces-page-cross-event-querying flag still exists in Flagpole with an EA segment, but Trace Explorer itself is GA. Marking docsUrl as null so it won't appear on the EA features page.
1. Grep pattern now uses emoji prefixes to avoid matching UNDOCUMENTED
when extracting DOCUMENTED count (e.g., ✅ DOCUMENTED vs 📝 UNDOCUMENTED)
2. Sed command now uses -E flag for extended regex so {60} is interpreted
as a quantifier, not literal characters
3. MDX is now always regenerated when --update is passed, ensuring metadata
changes (docsUrl, displayName, category) are reflected even when no
features are added/removed. Git detects actual changes.
Resolved merge conflict by using the more specific anchor link from master for the Seer Slack Workflows documentation.
Now checks that EA segments have: - property: organization_is-early-adopter - operator: equals - value: true This prevents false positives if a segment ever uses value: false to target non-EA orgs.
| "If you're interested in being an Early Adopter, you can turn your organization's Early Adopter status on/off in **Settings > General Settings**. This will affect all users in your organization and can be turned back off just as easily.", | ||
| '', | ||
| '', | ||
| '', | ||
| 'This page lists the features that you\'ll have access to when you opt-in as "Early Adopter". Note that features are sometimes released to early adopters in waves, so you may not see a feature immediately upon enabling the "Early Adopter" setting.', | ||
| '', | ||
| 'Limitations:', | ||
| '', | ||
| '- This list does not include new features that aren\'t controlled by the "Early Adopter" setting, such as alphas, closed betas, or limited availability features that require manual opt-in.', |
There was a problem hiding this comment.
Bug: The sync-ea-features.ts script uses a stale, hard-coded template that will overwrite manual edits to the index.mdx file, such as a hyperlink and improved wording.
Severity: MEDIUM
Suggested Fix
Update the hard-coded template within the generateMDX function in scripts/sync-ea-features.ts to match the current, correct content of index.mdx. This includes adding the hyperlink to the settings page and updating the wording. Alternatively, refactor the script to only update the auto-generated list of features, leaving the introductory text untouched.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: scripts/sync-ea-features.ts#L345-L353
Potential issue: The `sync-ea-features.ts` script, when run weekly with the `--update`
flag, regenerates the `index.mdx` documentation file. The `generateMDX` function uses a
hard-coded template for the file's header which is out of date. It lacks a hyperlink to
the settings page and uses older wording compared to the current, manually-improved
`index.mdx` file. Consequently, each time the script runs, it will overwrite these
manual improvements, remove the link, and create a spurious pull request to revert the
documentation to the stale version, causing developer noise and degrading the quality of
the documentation.

Summary
Adds full automation to keep the Early Adopter features documentation in sync with Flagpole configuration. The weekly workflow detects changes, updates the mapping file, regenerates the docs page, and creates a PR for review.
What's Added
Maps feature flags to:
Command What it does
pnpm ts-node scripts/sync-ea-features.ts Check only - shows report, no changes
pnpm ts-node scripts/sync-ea-features.ts --update Updates mapping file and regenerates MDX
The script:
Schedule: Weekly on Mondays at 9am UTC (or manual trigger)
Workflow:
How It Works
Weekly Schedule (Monday 9am UTC)
↓
Clone sentry-options-automator
↓
Parse flagpole.yaml for EA features
↓
Update ea-features.json (add new, remove old)
↓
Regenerate index.mdx (only features with docsUrl)
↓
If changes → Create PR for review
What Requires Manual Review
When a PR is created, reviewers should:
Notes