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

推荐订阅源

Martin Fowler
Martin Fowler
Project Zero
Project Zero
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
S
Security Affairs
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
C
Cisco Blogs
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
T
Tenable Blog
Latest news
Latest news
I
InfoQ
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
Spread Privacy
Spread Privacy
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
J
Java Code Geeks
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Troy Hunt's Blog
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
H
Hacker News: Front Page
H
Heimdal Security Blog
H
Help Net Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园_首页
C
Check Point Blog
K
Kaspersky official blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 热门话题
Vercel News
Vercel News
V
Visual Studio Blog
美团技术团队
I
Intezer
P
Proofpoint News Feed
月光博客
月光博客
P
Proofpoint News Feed
F
Full Disclosure
L
LINUX DO - 最新话题
SecWiki News
SecWiki News
B
Blog RSS Feed

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
Are you really doing CI/CD?
Nat Young · 2026-05-21 · via DEV Community

No. There's no such thing as 'CI/CD'. CI and CD are two distinct things, and you're probably not doing them either. This is Part 1: how to actually do trunk-based development.

What it is

Everyone commits directly to trunk (master or main). Short-lived branches that last for hours are acceptable, long-lived feature branches that live for days are not.

This is the foundation for continuous integration (CI). You cannot integrate continuously if you are not frequently integrating to the same place.

Trunk-based development using TDD and small batch sizes greatly simplifies code integration.

Feature branching compared with trunk-based development

On feature branches. Open source projects accept contributions from unknown parties. There is, and should be, zero trust. Feature branching and pull requests make sense in that context.

Many closed-source teams have adopted the same workflow under a completely different context. In a team where everyone is trusted, long-lived feature branches simply add integration pain with no real benefit. They are an isolation chamber. The longer a branch lives, the further it drifts from trunk, and the more painful the merge. It's a form of safety theatre that disguises deferred pain.

How to actually do it

Commit to trunk at least once a day. If you use branches, keep them short-lived. The head of master stays deployable at all times.

This requires three things:

  1. Strategies that decouple the act of deploying code from the act of releasing the code
  2. A test suite that is fast, and gives you the confidence that every commit is releasable
  3. Small, incremental changes instead of large batch deliveries

Deploy-Release Decoupling strategies

To commit incomplete work to trunk without breaking what is already there, you need ways to decouple deployments from releases. These are the techniques that make trunk-based development safe.

Feature flags

Ship the code, hide the feature behind a conditional. Users do not see it until you flip the flag. Remove the flag when the feature is released and verified.

When to use: UI changes, risky features, gradual rollouts. Any work that will take more than a day and touch code paths users interact with.

This technique requires tests for both the flag on and off conditions to run while active. Once released, a clean-up step is performed to remove the flag, the inactive path, and its tests. This isn't "technical debt", it's a path to continuous integration.

Ruby

if feature_enabled?(:new_checkout)
  render_new_checkout
else
  render_current_checkout
end

Enter fullscreen mode Exit fullscreen mode

Python

if feature_enabled("new_checkout"):
    render_new_checkout()
else:
    render_current_checkout()

Enter fullscreen mode Exit fullscreen mode

Java

if (featureEnabled("newCheckout")) {
    renderNewCheckout();
} else {
    renderCurrentCheckout();
}

Enter fullscreen mode Exit fullscreen mode

TypeScript

if (featureEnabled("newCheckout")) {
  renderNewCheckout();
} else {
  renderCurrentCheckout();
}

Enter fullscreen mode Exit fullscreen mode

On feature flag platforms. Feature flags as described here are a development technique. A conditional that exists temporarily so incomplete work can live on trunk safely. The feature rollout and the flag share the same lifecycle.

In recent years, an entire industry has grown up around feature flags that has twisted the term from the original use case. In that world, flags are permanent infrastructure, managed in a third party system's dashboard, with targeting rules, audience segments, percentage rollouts, and analytics. This type of flag is a business facing feature flag, and often a permanent fixture. There is a distinction between development and business feature flags.

The result is that many teams now associate "feature flags" with a platform they pay for and a dashboard they maintain, rather than an if/else block they delete next week. The technique predates the platforms by decades. You do not need a vendor to put a conditional in your code.

If you have hundreds of flags in production and no plan to remove any of them, you do not have a trunk-based development practice. You have a configuration management problem wearing a different hat.

Branch by abstraction

Introduce an abstraction layer (interface, facade, adapter) in front of the existing implementation. Build the new implementation behind the same interface. Route traffic through the abstraction layer. This could be a hard switch, percentage-based, or per-tenant.

When to use: replacing infrastructure, swapping libraries, rewriting subsystems. Unlike a feature flag, branch by abstraction (BBA) is structural. The abstraction layer stays after the migration. You can shift traffic incrementally, e.g. 10% to the new implementation, monitor, increase, rather than flipping a boolean.

Ruby

# Step 1: Introduce abstraction in front of existing code
class PaymentGateway
  def initialize
    @legacy = LegacyGateway.new
  end

  def charge(amount)
    @legacy.charge(amount)
  end
end

# Step 2: Build new implementation behind the same interface
class NewGateway
  def charge(amount)
    new_provider.create_charge(amount)
  end
end

# Step 3: Route through the abstraction layer
class PaymentGateway
  def initialize(rollout_pct: 0)
    @legacy = LegacyGateway.new
    @new = NewGateway.new
    @rollout_pct = rollout_pct
  end

  def charge(amount)
    if rand(100) < @rollout_pct
      @new.charge(amount)
    else
      @legacy.charge(amount)
    end
  end
end

# Step 4: 100%, remove legacy
class PaymentGateway
  def initialize
    @new = NewGateway.new
  end

  def charge(amount)
    @new.charge(amount)
  end
end

Enter fullscreen mode Exit fullscreen mode

Python

# Step 1: Introduce abstraction in front of existing code
class PaymentGateway:
    def __init__(self):
        self._legacy = LegacyGateway()

    def charge(self, amount):
        self._legacy.charge(amount)

# Step 2: Build new implementation behind the same interface
class NewGateway:
    def charge(self, amount):
        new_provider.create_charge(amount)

# Step 3: Route through the abstraction layer
class PaymentGateway:
    def __init__(self, rollout_pct=0):
        self._legacy = LegacyGateway()
        self._new = NewGateway()
        self._rollout_pct = rollout_pct

    def charge(self, amount):
        if random.randint(0, 99) < self._rollout_pct:
            self._new.charge(amount)
        else:
            self._legacy.charge(amount)

# Step 4: 100%, remove legacy
class PaymentGateway:
    def __init__(self):
        self._new = NewGateway()

    def charge(self, amount):
        self._new.charge(amount)

Enter fullscreen mode Exit fullscreen mode

Java

// Step 1: Introduce abstraction in front of existing code
class PaymentGateway {
    private final LegacyGateway legacy = new LegacyGateway();

    void charge(BigDecimal amount) {
        legacy.charge(amount);
    }
}

// Step 2: Build new implementation behind the same interface
class NewGateway {
    void charge(BigDecimal amount) {
        newProvider.createCharge(amount);
    }
}

// Step 3: Route through the abstraction layer
class PaymentGateway {
    private final LegacyGateway legacy = new LegacyGateway();
    private final NewGateway next = new NewGateway();
    private final int rolloutPct;

    PaymentGateway(int rolloutPct) {
        this.rolloutPct = rolloutPct;
    }

    void charge(BigDecimal amount) {
        if (ThreadLocalRandom.current().nextInt(100) < rolloutPct) {
            next.charge(amount);
        } else {
            legacy.charge(amount);
        }
    }
}

// Step 4: 100%, remove legacy
class PaymentGateway {
    private final NewGateway next = new NewGateway();

    void charge(BigDecimal amount) {
        next.charge(amount);
    }
}

Enter fullscreen mode Exit fullscreen mode

TypeScript

// Step 1: Introduce abstraction in front of existing code
class PaymentGateway {
  private legacy = new LegacyGateway();

  charge(amount: number) {
    this.legacy.charge(amount);
  }
}

// Step 2: Build new implementation behind the same interface
class NewGateway {
  charge(amount: number) {
    newProvider.createCharge(amount);
  }
}

// Step 3: Route through the abstraction layer
class PaymentGateway {
  private legacy = new LegacyGateway();
  private next = new NewGateway();

  constructor(private rolloutPct = 0) {}

  charge(amount: number) {
    if (Math.random() * 100 < this.rolloutPct) {
      this.next.charge(amount);
    } else {
      this.legacy.charge(amount);
    }
  }
}

// Step 4: 100%, remove legacy
class PaymentGateway {
  private next = new NewGateway();

  charge(amount: number) {
    this.next.charge(amount);
  }
}

Enter fullscreen mode Exit fullscreen mode

Dark launch

Run the new code path in production alongside the old one, untethered from any existing user facing interface.

When to use: performance-critical paths, algorithm changes, or switching over a backend capability with a new one. Validation happens in production with real data.

The shadow path is removed when the team is confident in the new implementation.

Ruby

def calculate_shipping(order)
  legacy_result = LegacyShipping.calculate(order)

  NewShipping.calculate(order).then do |new_result|
    if new_result != legacy_result
      log_discrepancy(order, legacy_result, new_result)
    end
  end

  legacy_result
end

Enter fullscreen mode Exit fullscreen mode

Python

def calculate_shipping(order):
    legacy_result = LegacyShipping.calculate(order)

    new_result = NewShipping.calculate(order)
    if new_result != legacy_result:
        log_discrepancy(order, legacy_result, new_result)

    return legacy_result

Enter fullscreen mode Exit fullscreen mode

Java

BigDecimal calculateShipping(Order order) {
    BigDecimal legacyResult = legacyShipping.calculate(order);

    CompletableFuture.runAsync(() -> {
        BigDecimal newResult = newShipping.calculate(order);
        if (!newResult.equals(legacyResult)) {
            logDiscrepancy(order, legacyResult, newResult);
        }
    });

    return legacyResult;
}

Enter fullscreen mode Exit fullscreen mode

TypeScript

function calculateShipping(order: Order): number {
  const legacyResult = LegacyShipping.calculate(order);

  NewShipping.calculate(order).then((newResult) => {
    if (newResult !== legacyResult) {
      logDiscrepancy(order, legacyResult, newResult);
    }
  });

  return legacyResult;
}

Enter fullscreen mode Exit fullscreen mode

Common misconceptions

"Long-lived branches are safer"

They may feel safer because the integration is deferred, but it still needs to happen. The risk accumulates with both the batch size and delay.

"But I merge master into my branch continuously"

Do you also merge every other team member's branch into yours in that transaction? They do not have your code either. Merging master into your branch is one-directional. That's pulling a delta view of the real code in flight, not integrating. Your changes are invisible to everyone else until you merge back, which might be days or weeks later. That's not integration either.

"We need code review before merging to trunk"

Pair programming gives you continuous code review with no delay. If you pair on the work, the review already happened. If you need asynchronous review, keep the branch to hours - review it the same day. The alternative is comments about code structure or formatting that arrive days later, when the context is gone and the cost of change is high.

"Our team is not ready for this"

Start with one story. Commit it to trunk behind a feature flag. See what happens. The practice is learned by doing it, not by preparing for it.

"But we use 'AI' and agentic workflows"

Higher code output velocity makes trunk-based development in small increments with TDD and CI more important, not less. When code is generated faster, integration risk grows faster too. A tool that produces a thousand lines on a branch in an hour creates the same merge problem as a developer who did it in a week.

Summary

Teams that develop on long-lived feature branches cannot do continuous integration. Teams that cannot do continuous integration cannot do continuous delivery. The branch and pull request model is the bottleneck.


This is part of the Mainline documentation. Mainline is a project management tool for teams that ship continuously.