fix: register platform deprecation flags in serve.py lifespan#1289
Conversation
Ensures `beforeDeprecationCutoffAbv2` and `afterDeprecationCutoffAbv2` are always included in `writer.Config.feature_flags` after the user app loads. This causes the LaunchDarkly client to evaluate these flags on every agent builder session, so the builder deprecation banner in BuilderApp.vue receives the correct flag values. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDuring FastAPI startup, ChangesLaunchDarkly deprecation flag registration
Builder deprecation UI updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Problem
The deprecation banner in
BuilderApp.vue(introduced in PR #1288) checks:However,
writer.Config.feature_flagsdefaults to an empty list incore.py, and PR #1288 didn't add the deprecation flag keys there. This means the LaunchDarkly client never registers those flags for evaluation, sofeatureFlags.valuein the Vue frontend never includes them — the banner never shows.Fix
After
app_runner.load()in thelifespancontext manager inserve.py, we now merge the two platform-level deprecation flags intowriter.Config.feature_flags:This runs after the user's
main.pyexecutes (so user-defined flags are preserved), and ensures the LaunchDarkly client evaluates the deprecation flags for every agent builder session.Out of scope
x-is-org-adminheader injection still needs a platform/proxy configuration change to correctly populatewf.isOrganizationAdmin.valuein the frontend. That is a separate infrastructure task.Made with Cursor
Summary by CodeRabbit