惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
博客园 - 聂微东
M
MIT News - Artificial intelligence
The Hacker News
The Hacker News
AI
AI
Hacker News: Ask HN
Hacker News: Ask HN
Cloudbric
Cloudbric
GbyAI
GbyAI
B
Blog RSS Feed
S
Secure Thoughts
O
OpenAI News
S
Schneier on Security
Latest news
Latest news
C
Check Point Blog
Know Your Adversary
Know Your Adversary
T
Tenable Blog
J
Java Code Geeks
The Cloudflare Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
WordPress大学
WordPress大学
P
Proofpoint News Feed
雷峰网
雷峰网
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
H
Hacker News: Front Page
www.infosecurity-magazine.com
www.infosecurity-magazine.com
美团技术团队
博客园 - 司徒正美
Security Latest
Security Latest
Forbes - Security
Forbes - Security
W
WeLiveSecurity
Webroot Blog
Webroot Blog
Last Week in AI
Last Week in AI
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
月光博客
月光博客
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Help Net Security
Help Net Security
H
Help Net Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
V2EX - 技术
V2EX - 技术
阮一峰的网络日志
阮一峰的网络日志
SecWiki News
SecWiki News
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Standardizing Feature Flags Is Easy to Agree On. Migrating Safely Is the Hard Part.
Krishan Shar · 2026-05-28 · via DEV Community

Why I built FlagLint, an open-source CLI for moving direct LaunchDarkly Node.js usage behind an OpenFeature boundary

Feature flags usually begin as a simple engineering decision.

A team needs to release gradually. A developer adds a flag. The application evaluates it through the provider SDK. The rollout succeeds.

Then the pattern repeats.

One feature becomes ten. One service becomes dozens. Over time, application code starts to accumulate direct calls to a provider-specific API:

const enabled = await ldClient.boolVariation(
  "checkout-v2",
  context,
  false
);

Enter fullscreen mode Exit fullscreen mode

There is nothing wrong with that call by itself. LaunchDarkly is doing exactly what it is supposed to do: providing feature-flag management and evaluation.

The problem appears later, when a platform team wants a consistent application-facing abstraction across services.

Maybe the organization wants to standardize on OpenFeature, the CNCF-incubating, vendor-agnostic feature-flag API. Maybe teams want feature-flag instrumentation, governance, or shared patterns implemented once at a platform boundary instead of separately inside each service.

At that point, the difficult question is no longer:

Should we standardize feature-flag evaluation?

The difficult questions are:

Where are all the direct SDK calls? Which ones can be migrated safely? Which ones require human review? And how do we stop new direct calls from returning after migration?

That is the problem I built FlagLint to solve.


OpenFeature Does Not Mean Replacing LaunchDarkly

A common misconception in migration conversations is that introducing OpenFeature means replacing the current feature-flag provider.

It does not.

OpenFeature standardizes the evaluation API that application code uses. A provider still performs the actual evaluation. LaunchDarkly offers an official OpenFeature provider for its Node.js server-side SDK, so a Node.js service can continue using LaunchDarkly as its feature-flag provider while application code evaluates flags through OpenFeature.

Conceptually, the change looks like this:

// Direct provider-specific application usage
await ldClient.boolVariation("checkout-v2", context, false);

Enter fullscreen mode Exit fullscreen mode

becoming:

// Standard application-facing evaluation API
await openFeatureClient.getBooleanValue("checkout-v2", false, context);

Enter fullscreen mode Exit fullscreen mode

LaunchDarkly remains behind the provider boundary. The application code moves toward a standard interface.

That distinction matters. Platform standardization should not require an unnecessary provider replacement project.


Why This Migration Is More Dangerous Than It Looks

At first glance, this appears to be a simple codemod problem: find a method call and rename it.

But feature-flag migrations carry runtime behavior. An incorrect transformation can change what users see in production.

For example, the LaunchDarkly and OpenFeature method signatures differ in argument order:

// LaunchDarkly
ldClient.boolVariation(key, context, fallback)

// OpenFeature
openFeatureClient.getBooleanValue(key, fallback, context)

Enter fullscreen mode Exit fullscreen mode

A careless rewrite can silently swap the fallback value and context.

There are additional complications:

  • a flag key may be a dynamic expression rather than a static string;
  • a call may request evaluation details rather than only a flag value;
  • code may use bulk flag-state APIs;
  • a fallback type may not be statically clear;
  • a service may import a shared platform-owned OpenFeature client using a local alias;
  • the provider bootstrap file may legitimately reference LaunchDarkly directly;
  • asynchronous behavior must be preserved exactly.

In a migration involving feature flags, “we rewrote most of it automatically” is not enough. The important question is whether the automation knows when not to rewrite code.


The Design Principle Behind FlagLint: Conservative Automation

FlagLint is an open-source CLI focused on a specific workflow:

Help Node.js teams inventory direct LaunchDarkly server SDK evaluations, migrate only provably safe call sites to OpenFeature, and enforce the new boundary in CI.

Its scope is deliberately narrow today. FlagLint supports JavaScript and TypeScript code using the LaunchDarkly Node.js server-side SDK package forms:

  • @launchdarkly/node-server-sdk
  • launchdarkly-node-server-sdk

It is not trying to claim every language, every SDK, or every feature-flag lifecycle problem.

FlagLint uses AST-based analysis to identify direct LaunchDarkly Node.js evaluation calls. It can automatically transform typed static evaluations only when the important parts are explicit:

  • the flag key;
  • the fallback value and type;
  • the evaluation context;
  • a proven OpenFeature client binding.

For example:

// Before
return await ldClient.boolVariation("checkout-v2", ctx, false);

Enter fullscreen mode Exit fullscreen mode

can safely become:

// After
return await openFeatureClient.getBooleanValue("checkout-v2", false, ctx);

Enter fullscreen mode Exit fullscreen mode

But FlagLint does not automatically rewrite uncertain patterns. Dynamic keys, detail evaluation methods, bulk calls, unknown fallbacks, browser or React SDK usage, and ambiguous bindings remain visible for human review.

This is not a limitation to hide. It is the safety model.

A migration tool should automate the obvious cases and make uncertainty impossible to ignore.


The Workflow: Scan, Migrate, Enforce

FlagLint is designed around three steps.

1. Inventory direct SDK coupling

Before a migration starts, teams need to understand what exists in the codebase:

npx flaglint scan ./src

Enter fullscreen mode Exit fullscreen mode

The scan identifies direct LaunchDarkly Node.js server SDK evaluation calls, their files, flag keys, call types, and patterns that need manual review. Reports can be emitted in formats including Markdown, JSON, HTML, and SARIF.

This is useful for both developers and platform teams. Before changing code, you can see whether a service is mostly straightforward or full of patterns that require careful migration planning.

2. Preview and apply safe transformations

Next, teams can generate a migration plan and inspect diffs before touching source code:

npx flaglint migrate ./src --dry-run

Enter fullscreen mode Exit fullscreen mode

FlagLint generates reviewable before/after diffs. When a file already contains a proven OpenFeature client binding, including an approved imported shared client binding, the preview uses that exact binding.

For example, a service may already import a platform-owned client with an alias:

import { openFeatureClient as flags } from "../platform/feature-flags.js";

Enter fullscreen mode Exit fullscreen mode

FlagLint preserves that architecture and previews the migration using flags.getBooleanValue(...) rather than inventing a new local client.

When ready, safe transformations can be applied:

npx flaglint migrate ./src --apply

Enter fullscreen mode Exit fullscreen mode

The apply mode is guarded. It requires a proven OpenFeature client binding, refuses to write into a dirty Git working tree unless explicitly overridden, does not insert provider bootstrap setup automatically, and does not rewrite uncertain patterns.

3. Prevent the migration from reversing

Migration is not complete if new direct provider SDK calls can quietly appear in future pull requests.

Once a service has completed the boundary migration, FlagLint can enforce it in CI:

npx flaglint validate ./src --no-direct-launchdarkly

Enter fullscreen mode Exit fullscreen mode

Validation can emit SARIF findings so direct LaunchDarkly policy violations can appear as annotations in code scanning and pull-request review flows.

This turns a one-time refactor into an enforceable engineering standard.


An Important Boundary: FlagLint Is Not a Stale-Flag Platform

There is a broader category of feature-flag debt: flags that are fully rolled out, inactive, unused at runtime, or ready for deletion in the provider platform.

That is an important problem, but it requires lifecycle and runtime information that source code alone cannot prove.

FlagLint does not currently claim to delete stale flags, inspect production evaluations, replace LaunchDarkly lifecycle tooling, or reduce feature-flag billing.

Its current problem is more precise:

Where is application code directly coupled to the LaunchDarkly Node.js SDK, what can move safely behind OpenFeature, and can we enforce that boundary afterward?

That focus is intentional. Tools earn trust by being accurate about what they know and what they do not know.


What I Learned Building the First Release

The technical work was only one part of the project. The harder part was defining safe behavior.

A migration CLI for application infrastructure cannot be aggressive by default. It needs to be explainable. Every automated rewrite should be reviewable. Every skipped pattern should make sense to the engineer reading the report.

During post-release validation of FlagLint v0.5.0, I found a good example of why that matters. A dry-run using a proven aliased OpenFeature client binding correctly previewed a safe transformation, but the CLI still printed global guidance implying provider setup was required. The transformation itself was correct, but the message was contradictory.

That mattered because trust in migration tools is not only about whether they edit code correctly. It is also about whether their explanations match their behavior.

In v0.5.1, I fixed that messaging so proven bindings are described accurately, missing bindings still receive setup guidance, and mixed cases clearly scope guidance only to diffs that need it.

No safety boundary was weakened to make the tool appear more capable.

That is the standard I want FlagLint to maintain as it grows.


What Comes Next

The next challenge is not just transforming code. It is helping real teams adopt the boundary incrementally.

In a small service, a team may be able to migrate all direct SDK calls and enable strict CI enforcement immediately.

In an established codebase, that may not be realistic. A platform team may find hundreds of existing direct evaluations spread across services. They still need a way to prevent new vendor-coupled access while reducing existing usage over time.

That leads to the next direction for FlagLint: team adoption and governance workflows, including the ability to measure migration readiness across services and support gradual CI rollout without requiring a big-bang refactor.

The goal remains simple:

Make the safer architecture easier to adopt than the shortcut.


Try FlagLint

FlagLint is open source and available today as v0.5.1.

Run it against a Node.js service using the LaunchDarkly server-side SDK:

npx flaglint scan .

Enter fullscreen mode Exit fullscreen mode

Then explore a reviewable migration preview:

npx flaglint migrate --dry-run

Enter fullscreen mode Exit fullscreen mode

Resources:

I would especially value feedback from Node.js backend engineers and platform teams already using LaunchDarkly:

  • What direct SDK patterns exist in your repositories?
  • Do you use internal wrappers or shared feature-flag clients?
  • What would make an OpenFeature migration safe enough to evaluate in a real service?

The best developer tools are shaped by the real codebases they have to survive.

devops #typescript #javascript #opensource #featureflags