<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <generator uri="https://astro.build/">Astro</generator>
  <link href="https://tech.bedrockstreaming.com/feed.xml" rel="self" type="application/atom+xml" />
  <link href="https://tech.bedrockstreaming.com/" rel="alternate" type="text/html" />
  <updated>2026-12-05T00:54:06+00:00</updated>
  <id>https://tech.bedrockstreaming.com/feed.xml</id>
  <title type="html">Bedrock Tech Blog</title>
  <subtitle>Bedrock tech blog</subtitle>
  <entry>
    <title type="html">re:Invent 2026: how Datadog optimizes cost per token for GenAI at scale</title>
    <link href="https://tech.bedrockstreaming.com/2026/12/08/reinvent-2026-datadog-cost-per-token.html" rel="alternate" type="text/html" title="re:Invent 2026: how Datadog optimizes cost per token for GenAI at scale" />
    <published>2026-12-08T00:00:00+00:00</published>
    <updated>2026-12-08T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/12/08/reinvent-2026-datadog-cost-per-token</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/12/08/reinvent-2026-datadog-cost-per-token.html">&lt;blockquote&gt;
&lt;p&gt;This article is part of a &lt;a href=&quot;/2026/12/08/aws-reinvent-2026.html&quot;&gt;series on AWS re:Invent 2026&lt;/a&gt;, written by Bedrock Streaming team members who attended the event.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why is my AI bill going up, and what can I do about it? This was the single question of the session &lt;strong&gt;“How Datadog optimizes cost per token for GenAI at scale”&lt;/strong&gt; (AIM3317, level 300) at AWS re:Invent 2026 in Las Vegas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.linkedin.com/in/sujatha-kuppuraju-a8212662&quot;&gt;Sujatha Kuppuraju&lt;/a&gt; (AWS)&lt;/strong&gt; opened with the general picture: why AI agents change the cost model and which levers AWS offers. &lt;strong&gt;Julien Launay (Datadog)&lt;/strong&gt;, who runs the AI infrastructure team at Datadog, then explained how Datadog uses these levers to serve tens of trillions of tokens a month.&lt;/p&gt;
&lt;aside class=&quot;callout&quot;&gt;
&lt;p class=&quot;kicker&quot;&gt;About the illustrations&lt;/p&gt;
&lt;p&gt;Illustrations in this article are our own diagrams, based on the content presented by Sujatha Kuppuraju and Julien Launay. All credit for the ideas, figures and examples goes to the speakers, Datadog and AWS.&lt;/p&gt;
&lt;/aside&gt;
&lt;hr&gt;
&lt;h2 id=&quot;part-1-why-token-cost-is-now-an-architecture-problem&quot;&gt;Part 1: why token cost is now an architecture problem&lt;a href=&quot;#part-1-why-token-cost-is-now-an-architecture-problem&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;the-token-math-has-changed&quot;&gt;The token math has changed&lt;a href=&quot;#the-token-math-has-changed&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-datadog-cost-per-token/agent-context.png&quot; alt=&quot;Chat versus agent: the context grows on every call&quot;&gt;
&lt;em&gt;Diagram based on the talk by Sujatha Kuppuraju (AWS) and Julien Launay (Datadog), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;With a chat, the cost is easy to predict: one prompt, one response, a bounded context.&lt;/p&gt;
&lt;p&gt;An agent works in a loop: it plans, calls a tool, reads the result, plans again. A single task can take dozens of model calls. On every call, the agent sends the instructions &lt;strong&gt;and the full history so far&lt;/strong&gt;. The context grows with each step, so the number of tokens per task keeps going up.&lt;/p&gt;
&lt;p&gt;This is why token cost is no longer only a billing topic. It is an architecture topic.&lt;/p&gt;
&lt;h3 id=&quot;tactics-are-not-a-system&quot;&gt;Tactics are not a system&lt;a href=&quot;#tactics-are-not-a-system&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Most teams start with the same list: a cheaper model tier, prompt caching, shorter prompts, trimmed context, limits on agents, self-hosting. All of these work. But they are tactics, not a system. They do not tell you who uses which tokens, for what, and whether the capacity you pay for is used well.&lt;/p&gt;
&lt;h3 id=&quot;the-lever-map&quot;&gt;The lever map&lt;a href=&quot;#the-lever-map&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-datadog-cost-per-token/three-levers.png&quot; alt=&quot;Three families of levers: governance, platform, technology&quot;&gt;
&lt;em&gt;Diagram based on the talk by Sujatha Kuppuraju (AWS) and Julien Launay (Datadog), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To operate at scale, the speaker proposed three families of levers, to address &lt;strong&gt;from day one&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Governance&lt;/strong&gt;: who uses which model, for what, and is the cost visible?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Platform&lt;/strong&gt;: how efficiently does the capacity you pay for turn into tokens?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Technology&lt;/strong&gt;: how many tokens do you use, and what does each one cost?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Governance is the one teams skip most often. It is easy to skip at the start and hard to add later.&lt;/p&gt;
&lt;h3 id=&quot;governance-levers-on-aws&quot;&gt;Governance levers on AWS&lt;a href=&quot;#governance-levers-on-aws&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Attribution&lt;/strong&gt;: every Amazon Bedrock call is tied to an IAM user or role. Add tags (team, cost center, line of business) to these identities and enable them as cost allocation tags in billing. Use Bedrock Projects or application inference profiles to attribute cost per application, and request metadata in invocation logs to attribute per prompt.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spend alerts and limits&lt;/strong&gt;: enable AWS Budgets and Cost Anomaly Detection, built on the same tags, so you learn about a spike before the monthly bill. For agents, the Amazon Bedrock AgentCore harness lets you set a maximum number of iterations and tokens per run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluation-driven model choice&lt;/strong&gt;: most of the time you do not need the biggest model. Do not pick a model from public leaderboards. Run your own evaluations on your own use cases (Amazon Bedrock Evaluations, AgentCore Evaluations for agents).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Routing&lt;/strong&gt;: a central LLM gateway gives you one place to route, tag and apply policies. Bedrock Intelligent Prompt Routing covers simple two-model cases.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;platform-levers-on-aws&quot;&gt;Platform levers on AWS&lt;a href=&quot;#platform-levers-on-aws&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Capacity you pay for but do not use is spend with no return. The advice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Buy GPU capacity to match demand&lt;/strong&gt;: Capacity Blocks for ML for planned bursts like training, Savings Plans or reserved capacity for a steady baseline, Spot only for work that can be interrupted.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pick the right Bedrock tier per request&lt;/strong&gt;: Priority for customer-facing features, Flex for evaluation jobs that can wait, and batch inference when you do not need an immediate answer (up to 50% cheaper than on-demand).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right-size the accelerator&lt;/strong&gt;: you do not always need the biggest GPU. Match the instance to the model, and use SageMaker Inference Recommender to check.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Share GPUs between teams&lt;/strong&gt;: idle GPUs owned by one team while another team waits is a common waste. &lt;a href=&quot;https://kueue.sigs.k8s.io/&quot;&gt;Kueue&lt;/a&gt; on Amazon EKS lets teams share quotas, borrow and lend capacity.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;technology-levers&quot;&gt;Technology levers&lt;a href=&quot;#technology-levers&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;These are the ones most teams already know:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Send fewer tokens&lt;/strong&gt;: trim prompts, and do not send the full history to every agent call. Use a sliding window or a summary.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reuse what repeats&lt;/strong&gt;: turn on prompt caching. Put the stable parts first (system prompt, tool definitions) so they form the cached prefix, and the changing parts last.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right-size the model&lt;/strong&gt; for each use case, based on your evaluations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each lever is easy on its own. Pulling all three at scale is harder, and this is where Datadog came in.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;part-2-datadogs-ai-at-scale&quot;&gt;Part 2: Datadog’s AI at scale&lt;a href=&quot;#part-2-datadogs-ai-at-scale&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;not-all-ai-usage-is-equal&quot;&gt;Not all AI usage is equal&lt;a href=&quot;#not-all-ai-usage-is-equal&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Datadog uses AI in two ways: AI in its products (for example the Bits AI agents for SRE and security investigations) and AI for its own teams. By token volume, about &lt;strong&gt;50%&lt;/strong&gt; goes to customer-facing features, &lt;strong&gt;30%&lt;/strong&gt; to internal developer productivity and &lt;strong&gt;20%&lt;/strong&gt; to R&amp;#x26;D (evaluations, new products).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-datadog-cost-per-token/usage-split.png&quot; alt=&quot;At Datadog, AI coding is about 30% of tokens but about 60% of costs&quot;&gt;
&lt;em&gt;Diagram based on the talk by Sujatha Kuppuraju (AWS) and Julien Launay (Datadog), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In dollars, the picture is different: &lt;strong&gt;AI coding is about 30% of tokens but about 60% of the cost&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The challenges Datadog faced while scaling were model fragmentation (every team picking its own model, with a new model every week), uneven agent spend, GPU scarcity, very different inference workloads, and the need for more control over its main workloads.&lt;/p&gt;
&lt;p&gt;The goal was not to spend less. Julien said it plainly: spend on AI will keep growing. What matters is &lt;strong&gt;more intelligence per dollar&lt;/strong&gt;: analyze more logs and time series, investigate more alerts, solve more issues on their own. Customers do not ask Datadog to spend less on Bits AI, they ask Bits AI to do more.&lt;/p&gt;
&lt;h3 id=&quot;governance-one-central-ai-gateway&quot;&gt;Governance: one central AI gateway&lt;a href=&quot;#governance-one-central-ai-gateway&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Datadog has a central AI platform organization. Product teams build features, and the platform team builds shared infrastructure: the gateway, model serving, and training clusters.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-datadog-cost-per-token/ai-gateway.png&quot; alt=&quot;One AI gateway between clients and model backends&quot;&gt;
&lt;em&gt;Diagram based on the talk by Sujatha Kuppuraju (AWS) and Julien Launay (Datadog), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Every model call (LLMs, decision models, embeddings) goes through the &lt;strong&gt;Datadog AI Gateway&lt;/strong&gt;, which became a public product the week of re:Invent. Datadog uses it internally on tens of trillions of tokens a month. It gives them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Attribution and traceability&lt;/strong&gt;: which team and feature spends what, and where.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One control plane&lt;/strong&gt;: routing decisions and policies in one place, for example who gets access to the most expensive models based on budget.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compliance checks&lt;/strong&gt;: routing based on region constraints, such as keeping EU traffic on EU endpoints for GDPR.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;abstract-the-model&quot;&gt;Abstract the model&lt;a href=&quot;#abstract-the-model&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Each provider has its own format for tool calls, reasoning and parameters. The gateway includes a &lt;strong&gt;translation layer&lt;/strong&gt; that converts requests, so any client (an application, a coding CLI, a direct API call) can reach any model behind it: a proprietary API, Amazon Bedrock or Datadog’s own GPUs.&lt;/p&gt;
&lt;p&gt;A concrete example: developers wanted to try a new model, but did not want to leave their usual coding tool. With the translation layer, Datadog exposes the new model inside the tools they already use. The cost of switching from one model to another drops to almost zero.&lt;/p&gt;
&lt;p&gt;Datadog goes further: product teams can no longer pick a specific model. They pick a &lt;strong&gt;capability tier&lt;/strong&gt; (high performance, balanced, low cost). The gateway maps each tier to the best model and the best backend at that moment, for example where Datadog has the most remaining commitment. When a better model comes out, it is swapped behind the tier once, and every feature benefits within days, with no code change.&lt;/p&gt;
&lt;h3 id=&quot;the-evaluation-hub&quot;&gt;The evaluation hub&lt;a href=&quot;#the-evaluation-hub&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Rule at Datadog: &lt;strong&gt;every AI feature above a certain spend must have an evaluation registered in the evaluation hub&lt;/strong&gt;. When a new model is released, it is connected to the hub and run on all evaluations within a few days.&lt;/p&gt;
&lt;p&gt;Two views matter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Pareto frontier&lt;/strong&gt;: the best performance you can get for each cost. Models below the curve are not worth using.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluation stability&lt;/strong&gt;: models end up saturating old evaluations, which then cannot tell them apart. Datadog has full teams that keep building new evaluations, so the best models still spread out at the top.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Julien was clear that building and maintaining evaluations is one of the hardest parts and where they spend the most engineering effort. A/B test results are also used, but they are expensive and so less frequent.&lt;/p&gt;
&lt;h3 id=&quot;protect-the-developer-experience&quot;&gt;Protect the developer experience&lt;a href=&quot;#protect-the-developer-experience&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-datadog-cost-per-token/cache-savings.png&quot; alt=&quot;5-minute versus 1-hour prompt cache: about 25% savings on AI coding&quot;&gt;
&lt;em&gt;Diagram based on the talk by Sujatha Kuppuraju (AWS) and Julien Launay (Datadog), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Datadog works on the idea that most developer spend is justified. There are &lt;strong&gt;no hard limits&lt;/strong&gt; for developers. When usage gets close to a threshold, the developer gets a Slack notification and can &lt;strong&gt;self-approve&lt;/strong&gt; to keep working. The goal is only to catch mistakes, like a job left running or the wrong model selected.&lt;/p&gt;
&lt;p&gt;Cost control focuses on changes that developers do not see. The best example is the &lt;strong&gt;prompt cache hit rate&lt;/strong&gt;. Looking at the gateway data, the team saw that cache hits for one coding tool were much lower than for the others. The cause: a default cache duration of 5 minutes. With long-running agent sessions, developers often come back after more than 5 minutes (sometimes just because reading the output takes time), and the cache has expired.&lt;/p&gt;
&lt;p&gt;They added a rule in the gateway to use a &lt;strong&gt;1-hour cache&lt;/strong&gt; instead of 5 minutes for some tasks and users. After a one-week A/B test, they rolled it out. Result: &lt;strong&gt;about 25% savings on AI coding spend&lt;/strong&gt;, which Julien described as millions of dollars. His advice: always monitor your cache hit rates, a change in a tool or a prompt can silently break them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Governance takeaways:&lt;/strong&gt; one gateway for all traffic, abstract the model and let evaluations and company-wide policies choose it, and find savings that do not hurt the developer experience.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;platform-one-fleet-day-and-night&quot;&gt;Platform: one fleet, day and night&lt;a href=&quot;#platform-one-fleet-day-and-night&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Behind the gateway, models run on several backends: Datadog’s own GPUs, Amazon Bedrock and other inference providers. The same model can be served by different backends, and Datadog switches capacity between them.&lt;/p&gt;
&lt;p&gt;Self-hosting works like a commitment: it only saves money when the fleet is well sized and used. On-demand APIs are great for flexibility, self-hosting makes sense at high volume, and running it takes real engineering effort. Datadog keeps dashboards on all providers and keeps checking where each workload should run.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-datadog-cost-per-token/one-fleet.png&quot; alt=&quot;The same GPUs run training at night and inference during the day&quot;&gt;
&lt;em&gt;Diagram based on the talk by Sujatha Kuppuraju (AWS) and Julien Launay (Datadog), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Inference demand follows the working day: most agents are still driven by humans who work 9 to 5. So Datadog uses the &lt;strong&gt;same GPUs&lt;/strong&gt; for different jobs over 24 hours:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At night, the fleet mostly runs &lt;strong&gt;training&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;During the day, it mostly serves &lt;strong&gt;online inference&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Batch inference&lt;/strong&gt; (for example synthetic data generation, trillions of tokens) fills the gaps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To decide, Datadog uses a model inspired by the &lt;strong&gt;electricity spot market&lt;/strong&gt; in Europe: at any time, they compute the marginal cost of serving one more token for each workload, and move spare GPU capacity to the workload with the highest marginal cost.&lt;/p&gt;
&lt;p&gt;The cluster runs on Kubernetes with a customized fork of &lt;strong&gt;&lt;a href=&quot;https://kueue.sigs.k8s.io/&quot;&gt;Kueue&lt;/a&gt;&lt;/strong&gt;. Each team has a quota for training and can use capacity other teams do not use. The online inference pool can grow into other pools when demand is high. All training and inference systems are built to be &lt;strong&gt;interrupted&lt;/strong&gt;: a job gets from a few seconds to 15 minutes to save a checkpoint. The fleet mixes many GPU generations. With this setup, GPU utilization is in the &lt;strong&gt;low 90%&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For the few workloads that make up most of the traffic, Datadog runs a &lt;strong&gt;custom inference stack&lt;/strong&gt; with its own kernels. One version of Bits AI reaches about 1,000 tokens per second. They also use coding agents to optimize this inference code automatically, which brings gains of tens of percent on these workloads.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Platform takeaways:&lt;/strong&gt; treat GPUs, clouds and providers as one “token capacity”, route workloads based on marginal cost, and specialize the serving stack only for the highest-impact workloads.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;technology-training-their-own-models&quot;&gt;Technology: training their own models&lt;a href=&quot;#technology-training-their-own-models&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Datadog trains its own models for two reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More capable agents&lt;/strong&gt;: models post-trained for software and observability tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Native understanding of observability&lt;/strong&gt;: models pre-trained from scratch on logs, traces, metrics and time series, treated as a modality like images. One example is &lt;strong&gt;&lt;a href=&quot;https://github.com/datadog/toto&quot;&gt;Toto&lt;/a&gt;&lt;/strong&gt;, a time series forecasting model. The long-term idea is close to “world models” in self-driving: predict the future state of an infrastructure and evaluate “what if” changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For reinforcement learning, Datadog built its own stack (Harmony) with a single code base for training and inference. It has three parts: a Python SDK for researchers to write RL recipes, a control plane that manages resources at scale, and fast custom model code that only runs a handful of basic instructions.&lt;/p&gt;
&lt;p&gt;Building RL environments is harder than for code: a coding agent can run in a sandbox, but an observability agent works on a whole infrastructure, so Datadog has to simulate entire fake infrastructures.&lt;/p&gt;
&lt;p&gt;Datadog’s own model for Bits AI reaches the performance of top frontier models at a much lower cost (the slide claimed 5 to 7 times cheaper). A quote from the talk sums up the effort needed: “the frontier is a pace, not a place”. A model that is at the frontier today is behind in two weeks.&lt;/p&gt;
&lt;p&gt;Julien also gave a strong warning. For about 99% of companies, training their own models does not make sense: it needs a lot of talent, compute and continuous work to keep up. It only pays off for very high-volume tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technology takeaways:&lt;/strong&gt; fine-tune open-weight models only for your highest-volume tasks, small domain specialists can beat general models on your data, and reuse the evaluation hub for both training and model selection.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;bringing-it-together&quot;&gt;Bringing it together&lt;a href=&quot;#bringing-it-together&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There is no silver bullet. Not training your own models, not only open models, not only proprietary models. Datadog manages a &lt;strong&gt;portfolio&lt;/strong&gt;: proprietary models, open models, custom models, several inference providers and its own GPUs, and makes it easy for teams to use the right one. Pulled together, the levers give more data analyzed and more features shipped for the same budget.&lt;/p&gt;
&lt;h2 id=&quot;what-we-take-away-at-bedrock&quot;&gt;What we take away at Bedrock&lt;a href=&quot;#what-we-take-away-at-bedrock&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Start with governance.&lt;/strong&gt; Tag every AI call by team and use case from day one, and set budget alerts. It is much harder to add later.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One gateway for AI traffic&lt;/strong&gt; gives visibility, policies and the freedom to change models without changing code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Measure before choosing a model.&lt;/strong&gt; Even a small set of evaluations on our own use cases is better than public leaderboards.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Watch the cache hit rate.&lt;/strong&gt; It is a simple metric, and a 25% saving on AI coding shows how much it can matter.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Notify, do not block.&lt;/strong&gt; Developer trust and productivity are worth more than strict limits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Know when not to build.&lt;/strong&gt; Training custom models is only worth it at very large scale. For most teams, the other levers come first.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;credits&quot;&gt;Credits&lt;a href=&quot;#credits&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Talk: “How Datadog optimizes cost per token for GenAI at scale” (AIM3317), AWS re:Invent 2026.&lt;/li&gt;
&lt;li&gt;Speakers: &lt;strong&gt;&lt;a href=&quot;https://www.linkedin.com/in/sujatha-kuppuraju-a8212662&quot;&gt;Sujatha Kuppuraju&lt;/a&gt;&lt;/strong&gt; (AWS) and &lt;strong&gt;Julien Launay&lt;/strong&gt; (Datadog).&lt;/li&gt;
&lt;li&gt;The diagrams in this article are our own illustrations of the content presented by the speakers. All ideas, figures and examples are theirs and belong to Datadog and Amazon Web Services.&lt;/li&gt;
&lt;/ul&gt;</content>
    <summary type="html">Notes from AWS re:Invent 2026 session AIM3317: why AI agents make token cost an architecture problem, the levers AWS offers, and how Datadog runs GenAI at scale.</summary>
  </entry>
  <entry>
    <title type="html">AWS re:Invent 2026: our notes from Las Vegas</title>
    <link href="https://tech.bedrockstreaming.com/2026/12/08/aws-reinvent-2026.html" rel="alternate" type="text/html" title="AWS re:Invent 2026: our notes from Las Vegas" />
    <published>2026-12-08T00:00:00+00:00</published>
    <updated>2026-12-08T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/12/08/aws-reinvent-2026</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/12/08/aws-reinvent-2026.html">&lt;p&gt;In December 2026, Bedrock Streaming attended &lt;strong&gt;AWS re:Invent 2026&lt;/strong&gt; in Las Vegas. We picked a selection of talks that stood out to us and that we think are important to share, as AI is quickly changing the way we work. We wrote one article per talk. This page lists them all, with a short summary of each, and will be updated as new articles are published.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;how-datadog-optimizes-cost-per-token-for-genai-at-scale&quot;&gt;How Datadog optimizes cost per token for GenAI at scale&lt;a href=&quot;#how-datadog-optimizes-cost-per-token-for-genai-at-scale&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.linkedin.com/in/sujatha-kuppuraju-a8212662&quot;&gt;Sujatha Kuppuraju&lt;/a&gt; (AWS) and Julien Launay (Datadog)&lt;/strong&gt; · AIM3317&lt;/p&gt;
&lt;p&gt;With AI agents, every task makes dozens of model calls and resends a growing context each time, so token cost becomes an architecture problem. AWS presented three families of levers (governance, platform, technology) and the services behind each. Datadog then shared how it runs tens of trillions of tokens a month: one central AI gateway, model tiers chosen by evaluations instead of by teams, a 1-hour prompt cache that cut AI coding spend by about 25%, and one GPU fleet shared between training and inference day and night.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/2026/12/08/reinvent-2026-datadog-cost-per-token.html&quot;&gt;Read the article&lt;/a&gt;&lt;/p&gt;</content>
    <summary type="html">Bedrock Streaming at AWS re:Invent 2026: the list of talks we attended, with a short summary and a link to a detailed article for each one.</summary>
  </entry>
  <entry>
    <title type="html">Our ad configuration moves to HCL, with AI as co-pilot</title>
    <link href="https://tech.bedrockstreaming.com/2026/11/10/acc-from-yaml-to-hcl-with-ai.html" rel="alternate" type="text/html" title="Our ad configuration moves to HCL, with AI as co-pilot" />
    <published>2026-11-10T00:00:00+00:00</published>
    <updated>2026-11-10T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/11/10/acc-from-yaml-to-hcl-with-ai</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/11/10/acc-from-yaml-to-hcl-with-ai.html">&lt;p&gt;Ad Configurator (ACC, for Ad Configurator Configurable) is the service that decides, for every ad request, which ad server to call and with which parameters. This is the story of how we migrated its configuration from YAML to HCL (HashiCorp Configuration Language, the language of Terraform), with AI involved end to end: design, code, review, monitoring. What it cost, what it bought us, and why driving the AI rather than letting it run stays entirely our job.&lt;/p&gt;
&lt;h2 id=&quot;context&quot;&gt;Context&lt;a href=&quot;#context&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;ACC decides, for every ad request, which ad server to call and with which parameters. A “configuration” is a set of files describing, for a given customer and platform, which ad server to contact, which URL to call, and which parameters to send. Business and engineers change this content constantly, at two speeds: a value changes with no deployment, while a real business rule stays code, reviewed and deployed like any other change. That’s the system we set out to preserve while migrating.&lt;/p&gt;
&lt;p&gt;These configuration files lived in YAML, edited through Ad Configurator Manager (ACM), a dedicated back office hosted in a separate project. We’d wanted to change that for a while: too many easy mistakes to make, implicit behavior that only lived in code, a format that enforced neither precision nor consistency. We moved to HCL, with an editor built into ACC (language server and linter included), all of it built with AI as a pair-programmer. Here’s why, and how we got there without breaking anyone’s ads.&lt;/p&gt;
&lt;h2 id=&quot;why-leave-yaml&quot;&gt;Why leave YAML&lt;a href=&quot;#why-leave-yaml&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The format had three concrete flaws, which we let accumulate without ever tackling head-on. Here they are in detail, with real examples.&lt;/p&gt;
&lt;h3 id=&quot;you-already-had-to-know-what-to-do-and-where-to-look&quot;&gt;You already had to know what to do, and where to look&lt;a href=&quot;#you-already-had-to-know-what-to-do-and-where-to-look&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Here is, pretty much as-is, a real chunk of YAML configuration for one customer, three different files, shown here one after another:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Customer and ad server names are anonymized here and in the rest of the article: &lt;code&gt;{{customer}}&lt;/code&gt; stands for the customer, &lt;code&gt;{{customer&apos;s_ad_server}}&lt;/code&gt; for its ad server, and &lt;code&gt;{{ad_server}}&lt;/code&gt; for any other ad server.&lt;/em&gt;&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;yaml&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;kind&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;metadata&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  active&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  description&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}} {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}} &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;Web&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  id&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;live_web&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  version&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;11&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  constraints&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    - &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;routine&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;target&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      values&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;live&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    - &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;routine&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;platform&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      values&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        - &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;web&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  providers&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    - &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;_live_web&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      output_key&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      output_name&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;kind&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;provider&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;metadata&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  active&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  description&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}} - &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;web - LIVE - {{customer&apos;s_ad_server}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  id&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;_live_web&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  version&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  format&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;composed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  attributes&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;    ang_plrh&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      routine&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;player_height&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      if_empty&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      if_error&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;    fwd_rpusr&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      routine&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ad_scheme&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      if_empty&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ada_free&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      if_error&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ada_max&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;kind&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;parameters&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;metadata&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  active&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  description&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}} &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ad server parameters for {{customer}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  id&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  version&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;customer&apos;s_ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  base_url&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  host_targeting_separator&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  targeting_keys_separator&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;One thing this file doesn’t say: &lt;code&gt;spec.format: composed&lt;/code&gt; silently requires that a &lt;code&gt;targeting: {}&lt;/code&gt; be returned, a requirement hardcoded in the Go that interprets that field, never mentioned in any configuration. Worse: it complicates onboarding. Old hands know what &lt;code&gt;composed&lt;/code&gt; and &lt;code&gt;decomposed&lt;/code&gt; mean; newcomers struggle more. It’s implicit behavior living in code rather than in the data meant to describe it.&lt;/p&gt;
&lt;p&gt;Even once you’ve found the right file, finding your way around is a challenge. A definition nests &lt;code&gt;configuration&lt;/code&gt;, then &lt;code&gt;provider&lt;/code&gt;, then &lt;code&gt;parameters&lt;/code&gt; (an inherited name that doesn’t make much sense today). Each level is its own file, referenced by ID strings like &lt;code&gt;{{customer&apos;s_ad_server}}_live_web&lt;/code&gt; or &lt;code&gt;{{customer&apos;s_ad_server}}&lt;/code&gt;: connecting the three snippets above means already knowing they reference each other, and where to find each one.&lt;/p&gt;
&lt;p&gt;In HCL, all of that fits in a single file, every reference is clickable (jump-to-definition, like in an IDE), and a block shared by several definitions is automatically factored out: delete the last reference to it, and the tooling folds it back in on its own. Here’s the full equivalent of the customer above, in a single HCL file:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;hcl&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;hcl&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;advertising&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;{{customer}}_live_web&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  customer    &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;{{customer}}&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  description &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;{{customer}} {{customer&apos;s_ad_server}} Web&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  conditions &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    contains([&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;web&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;], platform()),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    target() &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;live&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;  providers&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;    slot&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;video&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      name &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;{{customer&apos;s_ad_server}}&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;      ad_request&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        hostTargetingSeparator &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        targetingKeysSeparator &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        targeting              &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;        url&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;host&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;          base_url &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;{{host}}&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;          query_params &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;            ang_plrh  &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; fallback(player_height(), &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;            fwd_rpusr &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; fallback(ad_scheme(), &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ada_free&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ada_max&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;          }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;And it’s that exact HCL block, once resolved, that produces this JSON: the YAML block above produces the exact same result. The separators were present there too, just buried in another file. The real weak point of YAML is the empty &lt;code&gt;targeting&lt;/code&gt;, which was never written anywhere in it and shows up here explicitly:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;json&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;advertising&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{customer&apos;s_ad_server}}&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;base_url&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;{{host}}?ang_plrh=404&amp;#x26;fwd_rpusr=ada_free&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;host_targeting_separator&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;targeting_keys_separator&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;targeting&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;providers&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;video&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;{{customer&apos;s_ad_server}}&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Assuming this is the only definition that exists (not true in reality, but for the sake of the example): if the conditions aren’t met (on replay, say, or on a platform other than web), the response is simply empty, &lt;code&gt;{}&lt;/code&gt;. It’s advertising, so nothing is blocking: never an error, an empty response and an HTTP 200 every time.&lt;/p&gt;
&lt;p&gt;Same behavior, same request produced. But one reads, the other has to be deciphered.&lt;/p&gt;
&lt;h3 id=&quot;acm-and-the-hcl-editor&quot;&gt;ACM and the HCL editor&lt;a href=&quot;#acm-and-the-hcl-editor&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;ACM, the interface the business side uses, doesn’t help: navigating between linked items there is limited and finicky. Links don’t always show up, and not every definition type is supported for navigation. Going back can land you on an unexpected page, and climbing back up to the root configuration from a provider or a parameters definition can quickly get complicated.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;ACM, for a single definition: four screens. 1, the flat list behind a single static URL. 2, the detail of {{customer}}_replay_tvjs, where you read IDs rather than links. 3, another page to open to find {{customer}}_pausevast_replay_TVJS. 4, yet another for {{customer&amp;#x27;s_ad_server}}_{{customer}}, the last link in the chain. Purple arrows show each click.&quot; src=&quot;/images/posts/2026-11-10-acc-from-yaml-to-hcl-with-ai/acm-four-screens.jpg&quot;&gt;&lt;/center&gt;
&lt;ol&gt;
&lt;li&gt;The flat list, behind a single static URL.&lt;/li&gt;
&lt;li&gt;The detail of &lt;code&gt;{{customer}}_replay_tvjs&lt;/code&gt;: you read IDs, not links.&lt;/li&gt;
&lt;li&gt;You have to open another page to find &lt;code&gt;{{customer}}_pausevast_replay_TVJS&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;And yet another for &lt;code&gt;{{customer&apos;s_ad_server}}_{{customer}}&lt;/code&gt;, the last link in the chain.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Same definition, this time in the HCL editor: it all fits on one screen, no scavenger hunt.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;The HCL editor, same definition, one screen: the file tree and version tabs on the left, the HCL for {{customer}}_replay_tvjs in the middle with the pausevast block automatically inlined, the computed payload on the right&quot; src=&quot;/images/posts/2026-11-10-acc-from-yaml-to-hcl-with-ai/hcl-editor-one-screen.jpg&quot;&gt;&lt;/center&gt;
&lt;p&gt;&lt;em&gt;The file tree on the left, the HCL for &lt;code&gt;{{customer}}_replay_tvjs&lt;/code&gt; on the right: here the &lt;code&gt;pausevast&lt;/code&gt; block, automatically inlined.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Obviously, we don’t want to duplicate an identical provider in every definition that uses it. In HCL, factoring is automatic: a block shared by several definitions is extracted on its own, and &lt;code&gt;Cmd&lt;/code&gt;+click on a reference jumps straight to its declaration; going from an inlined block back to its source, or the other way around, takes no manual gymnastics. For example, &lt;code&gt;endpoint.{{customer&apos;s_ad_server}}&lt;/code&gt; replaces the old &lt;code&gt;kind: parameters&lt;/code&gt;: that variable now only holds the host, to avoid duplication. Neither factoring nor inlining is something you manage by hand: the tooling handles it.&lt;/p&gt;
&lt;h3 id=&quot;yaml-enforces-no-type&quot;&gt;YAML enforces no type&lt;a href=&quot;#yaml-enforces-no-type&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This one is a real bug that shipped to production. The same key, &lt;code&gt;fwd_br&lt;/code&gt;, written differently depending on the file:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;yaml&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# provider {{customer&apos;s_ad_server}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;fwd_br&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;  # string&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# provider {{ad_server}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;fwd_br&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;    # int&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# v2.yaml (drifted over time)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;fwd_br&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;  # float&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Nothing says which of the three is correct. And all three shipped to production without a single alert. In HCL, every attribute has exactly one type, declared once in our Go code, checked on load. It’s not a convention we hope people follow, it’s a structural guarantee.&lt;/p&gt;
&lt;p&gt;That power stays scoped: only ~150 already-reviewed Go routines can produce a value, variables are typed and whitelisted, and the schema rejects any invalid definition before it’s saved.&lt;/p&gt;
&lt;h3 id=&quot;an-ad-servers-invisible-limit&quot;&gt;An ad server’s invisible limit&lt;a href=&quot;#an-ad-servers-invisible-limit&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One last example, probably the clearest. One of our ad servers expects a URL where several parameter blocks are concatenated, separated by &lt;code&gt;;&lt;/code&gt; (a constraint imposed by the ad server itself, not by us), a separator that doesn’t follow HTTP conventions.&lt;/p&gt;
&lt;p&gt;In YAML, that concatenation was handled entirely by Go code, wired to assemble exactly two blocks, glued together by a single &lt;code&gt;;&lt;/code&gt;:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;yaml&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# &quot;targeting&quot; is an internal name, the ad server never heard of it,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# hence the rename to &quot;key_values&quot; on the HCL side below&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {{&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;ad_server&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;  attributes&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;    ang_api&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      value&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;2,7&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;    ang_plrh&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      routine&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;player_height&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      if_empty&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      if_error&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;    targeting&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      plcmt&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;        value&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;      fwd_nltype&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;        value&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;std&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;→ &lt;code&gt;...host?ang_api=2,7&amp;#x26;ang_plrh=404;plcmt=1&amp;#x26;fwd_nltype=std&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Nothing in this file says the ad server expects &lt;code&gt;block_0;block_1;block_2...&lt;/code&gt;, or that each block must be generated separately then glued with &lt;code&gt;;&lt;/code&gt;. That rule lived only in rendering code, wired for a fixed number of blocks. The day an extra slot showed up, we simply had no way to express it from the configuration. It would have meant touching Go code, not a file.&lt;/p&gt;
&lt;p&gt;Here’s the HCL equivalent, for the same result, and the rename of &lt;code&gt;targeting&lt;/code&gt; to &lt;code&gt;key_values&lt;/code&gt;, the name the ad server actually expects. And unlike YAML, HCL also lets you declare extra blocks per slot with &lt;code&gt;slot_params&lt;/code&gt;, each with its own parameters: something simply not expressible in YAML, where the number of blocks was fixed in rendering code.&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;hcl&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;hcl&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;ad_request&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;{{ad_server}}&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;  url&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;host&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    base_url &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; var&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;base_url&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;    query_string&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      param_block_separator &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      global_params &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        ang_api  &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;2,7&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        ang_plrh &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; fallback(player_height(), &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;404&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      key_values &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        plcmt      &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        fwd_nltype &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;std&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;      # slot_params: only expressible in HCL, not in YAML&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;      slot_params&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;0&quot; { ang_ifa &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;      slot_params&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;1&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        ang_plrh &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;720&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;        ang_plwh &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1080&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Without &lt;code&gt;slot_params&lt;/code&gt;, one block per &lt;code&gt;;&lt;/code&gt;:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;text&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;...host?ang_api=2,7&amp;#x26;ang_plrh=404&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ;plcmt=1&amp;#x26;fwd_nltype=std&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;Exactly the same request (&lt;code&gt;;&lt;/code&gt; included), but here every piece is named and declared.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;slot_params&lt;/code&gt;:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;text&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;...host?ang_api=2,7&amp;#x26;ang_plrh=404&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ;plcmt=1&amp;#x26;fwd_nltype=std&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ;ang_ifa=1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ;ang_plrh=720&amp;#x26;ang_plwh=1080&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;Two extra slots, each with its own parameters, each adding its own &lt;code&gt;;&lt;/code&gt;, simply not expressible in YAML.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-migration-steps&quot;&gt;The migration steps&lt;a href=&quot;#the-migration-steps&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The single most important point isn’t the language, it’s the double run: for several weeks, YAML and HCL ran side by side, with production serving never depending on the new format until it had proven it produced the same result. Nothing migrated in one shot. It was a chain of small, reversible steps, at the pace of earned confidence rather than a calendar.&lt;/p&gt;
&lt;p&gt;During that double run, we kept shipping new features, on this project and others, without ever impacting the migration, and once it was running, it cost us no daily time: monitoring told us what was happening, and alerted us if production serving misbehaved or the gap between YAML and HCL went beyond what’s normal.&lt;/p&gt;
&lt;p&gt;Building that plan took time, and AI was involved as much as in the execution: breaking the project into a precise number of steps, ordering their dependencies, defining for each one what would prove it had gone well. That preparation was at least as much work as the code generated afterwards.&lt;/p&gt;
&lt;p&gt;We rolled this out through progressive shadowing: every request ran both decoders, the YAML result was the only one served, the HCL result was only compared. External dependencies (an API call, say) only ran once: nothing was duplicated on the network side. Only the HCL interpretation ran in addition, on the same data as the YAML one.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;Progressive shadowing: one ad request enters an orchestrator that runs both the YAML decoder and the HCL decoder, their results go through a comparison step that logs match or mismatch to New Relic, the YAML result is served with ratio 1 always, the HCL result is only compared with a ratio going from 0 to 1 per customer, and rollback is ratio back to 0 with no deployment&quot; src=&quot;/images/posts/2026-11-10-acc-from-yaml-to-hcl-with-ai/diagram-progressive-shadowing.png&quot;&gt;&lt;/center&gt;
&lt;p&gt;&lt;em&gt;The YAML result shipped alone to production; the HCL result was never served, only compared, until the confidence ratio reached 100%, customer by customer, then switched over to real HCL serving at the same pace.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This rollback principle holds for both phases, shadowing and later serving: resetting the ratio to 0 is enough, no deployment at all. The idea is to minimize, at every step of the process, the number of actions that can go wrong: turning things on or off, at any point, only ever goes through a feature flag.&lt;/p&gt;
&lt;p&gt;This tracking ran on a dedicated New Relic dashboard, built for this project: every YAML/HCL comparison was logged there, customer by customer, platform by platform. The goal was a 100% match. When it wasn’t, the dashboard pointed straight at the customer, the platform, and the field that diverges.&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;customer&lt;/th&gt;&lt;th&gt;platform&lt;/th&gt;&lt;th&gt;field&lt;/th&gt;&lt;th&gt;yaml&lt;/th&gt;&lt;th&gt;hcl&lt;/th&gt;&lt;th&gt;result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;{{customer}}&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;web&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;fwd_rpusr&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;ada_free&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;ada_max&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;← mismatch&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Here you can see in seconds that for customer &lt;code&gt;{{customer}}&lt;/code&gt;, on &lt;code&gt;web&lt;/code&gt;, the field &lt;code&gt;fwd_rpusr&lt;/code&gt; diverges: HCL returns &lt;code&gt;ada_max&lt;/code&gt; where YAML returns &lt;code&gt;ada_free&lt;/code&gt;. Enough to trace straight back to the offending configuration line, without replaying the request by hand.&lt;/p&gt;
&lt;p&gt;We ramped the comparison ratio from 0 to 100%, until zero unexplained mismatches for several weeks straight. During that phase, the new HCL editor was already available, but read-only: you could browse it, get used to it, with no save ever coming from there. ACM remained the only hand on the configuration actually served.&lt;/p&gt;
&lt;p&gt;Concretely, that ratio lived in a feature-flag key like &lt;code&gt;hcl_shadow.{{customer}}.{{customer}}&lt;/code&gt;, each customer has its own, with a value per target and then per platform, with a default fallback if something is missing (0 meaning 0%, 1 meaning 100%):&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;json&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;_default&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;_default&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;live&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;_default&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;amazon_kepler&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;chromecast&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{partner_a}}_smarttv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;android_tv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;androidmob&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;androidtab&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;apple_tv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;hbbtv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0.3&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;ipad&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;iphone&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;web&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{partner_b}}_android_box&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{partner_b}}_ott_boxes&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;ott_boxes&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;smarttv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;replay&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;_default&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;amazon_kepler&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;chromecast&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{partner_a}}_smarttv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;google_bot&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;android_tv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;androidmob&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;androidtab&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;apple_tv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;hbbtv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;ipad&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;iphone&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;web&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{partner_b}}_android_box&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{{partner_b}}_ott_boxes&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;ott_boxes&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0.6&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;smarttv&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Once every platform was at 1, the same principle took over on the serving side, through a &lt;code&gt;hcl_serving.{{customer}}.{{customer}}&lt;/code&gt; key: that’s the moment ACM switched to read-only, and the HCL editor took over the saves.&lt;/p&gt;
&lt;p&gt;Same ratio-based rollout for serving, with a rollback always available (ratio to 0, no deployment). Today, 100% of traffic is served from HCL, and YAML has been removed.&lt;/p&gt;
&lt;p&gt;Despite the double run (YAML and HCL both computed and compared on every request), response time stayed between 40 and 55ms depending on the tenant, throughout shadowing. Shadowing itself was rolled out progressively, platform by platform.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Small aside: once everything was validated, we reset the ratio to 0% then flipped it back to 100% everywhere at once, on purpose, so we could pull this graph and show in black and white that performance never suffered. The marker below is a feature flag change, not an app deployment.&lt;/em&gt;&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;New Relic chart, average response time in milliseconds by status over 30 minutes: a flat line around 50ms for HTTP 200, with a deployment marker in the middle that changes nothing&quot; src=&quot;/images/posts/2026-11-10-acc-from-yaml-to-hcl-with-ai/new-relic-response-time.png&quot;&gt;&lt;/center&gt;
&lt;h2 id=&quot;ais-place-in-this-project&quot;&gt;AI’s place in this project&lt;a href=&quot;#ais-place-in-this-project&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Without AI, a project of this scope (rewriting the configuration format, the editor, the automatic migrator, and keeping both systems alive in parallel during the switch) simply wouldn’t have happened on this timeline, with one person on it. We used it across the whole chain: for the design of the feature itself, to write the code (the language, parser, editor, migrator), for review (every step coded by one agent is reviewed by another), and for monitoring the cutover (the YAML/HCL comparison dashboard detailed above).&lt;/p&gt;
&lt;p&gt;The project (language, parser, editor, automatic migrator) was built in one month, by a single engineer, for about $4,000 of AI usage overall (Claude and Codex both involved). &lt;strong&gt;51,472 net lines&lt;/strong&gt; were added across the five pull requests (PRs) that make up the project, of which only &lt;strong&gt;~75 lines&lt;/strong&gt; touched ACC’s business core. That’s the work serving the entirety of ad traffic today.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Small aside: that number is only a snapshot. Once the migration is final, all the YAML-related infrastructure will disappear: its validation, ACM itself, and the cautionary guardrails added along the way. So yes, a lot of lines went in, but a lot are also coming back out.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And despite that volume, ACC’s business core was only touched to add the YAML/HCL comparison: the rest of the core didn’t move; only the primary and secondary infrastructure around it absorbed the changes.&lt;/p&gt;
&lt;h3 id=&quot;costs-and-gains&quot;&gt;Costs and gains&lt;a href=&quot;#costs-and-gains&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Without AI, this project would have stayed in the backlog, not because we’d have moved slower, but because a single engineer couldn’t absorb it on top of everything else, and the team didn’t have the budget to isolate it for several months.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;About $4,000 of AI for one engineer-month of work. With AI: about one month, one engineer, about $4,000 of usage. Without AI, estimated: several months and a dedicated team budget that was never granted. Result: a project that simply wouldn&amp;#x27;t have happened.&quot; src=&quot;/images/posts/2026-11-10-acc-from-yaml-to-hcl-with-ai/diagram-cost.png&quot;&gt;&lt;/center&gt;
&lt;h3 id=&quot;driving-the-ai-not-riding-along&quot;&gt;Driving the AI, not riding along&lt;a href=&quot;#driving-the-ai-not-riding-along&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;But it wasn’t autopilot. Our job was to drive the AI rather than let it run: verifiable steps one at a time, precise scoping each time, reviewing every line touching the business core like any other sensitive change. That harness (not the model alone) made the difference. The code can come from anywhere. Judgment can’t.&lt;/p&gt;
&lt;p&gt;This harness didn’t exist from day one: for most of the project (nearly all of the ~52,000 lines in the end, including the ~75 touching the business core), we worked with a less structured process, adjusting the method day by day, week by week. Each improvement made it a bit faster and cheaper. Only on the last two steps did it reach its most refined form: Claude and Codex paired under human supervision, with a plan, a plan review, one agent coding the step, the other reviewing it, then the roles flip for the next step. The second-to-last step, run over 23 sub-steps this way, cost about $400.&lt;/p&gt;
&lt;p&gt;Before launching the last one, we refined the harness further: switching models by task size, a model suggested by the agent in charge based on its own estimate, cleaner context sharing between agents. Result: the last step (21 sub-steps, same pattern) cost about $130.&lt;/p&gt;
&lt;p&gt;That harness didn’t improve from human supervision alone: the agents knew they were being tested, and gave their own feedback on how to improve the process. They also knew they were competing with each other, each trying to do better than the other on the next step.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Small aside: we’d already tried this kind of exercise with Claude alone, and the results were worse than with this Claude/Codex mix. But the models changed in the meantime, so that comparison is probably a bit biased.&lt;/em&gt;&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;Core business-logic lines touched per PR: 0 for PR 1, 50 for PR 2, 0 for PR 3, 0 for PR 4, 25 for PR 5. Not a downward curve: most PRs touched zero lines of the core.&quot; src=&quot;/images/posts/2026-11-10-acc-from-yaml-to-hcl-with-ai/diagram-core-lines-per-pr.png&quot;&gt;&lt;/center&gt;
&lt;p&gt;&lt;em&gt;~75 core lines in total, concentrated in just two PRs: adding the YAML/HCL comparison (PR 2) and a later adjustment (PR 5). The other three touched zero core lines: the AI kept its work scoped to the surrounding infrastructure, leaving the core alone.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We also went further than usual on safety nets, knowing AI was involved at this volume of code. Shadowing is one. We also added, temporarily, mechanisms we probably wouldn’t have deemed necessary by hand: &lt;code&gt;recover&lt;/code&gt; calls scattered around, and a hard-delete route kept on hand just in case. None of this is meant to stay. It’s cautionary instrumentation, to be removed once trust is established.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The kind of precaution you gladly take when a good chunk of the code didn’t come out of a human keyboard line by line, and you’d rather be able to react fast than bet that nothing will go wrong.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We ship this project two, three, sometimes four times a day, without drama, alongside the squad’s other projects, which also deploy continuously. That was already true before AI, and still is since: what makes us effective is how the code is split, and that hasn’t changed. AI just helps us be even more so.&lt;/p&gt;
&lt;p&gt;The AI itself stays naturally scoped by that architecture: it writes in isolated zones, never in the business core without a review. Some parts could be improved (this isn’t a perfect project), but isolated, they never threaten the rest. We work in parallel on improving those weaker zones and on how we scope the AI, and the two pull each other up: better-split code makes it safer to let AI work on it, and scoping the AI better buys us the time to keep improving the code.&lt;/p&gt;
&lt;p&gt;We’ve come to think that over-constraining AI on a clean codebase is actually counterproductive as models keep improving: we’d rather enforce things with linters, and define an architecture validated by a deterministic tool, than build skills to make the AI do it.&lt;/p&gt;
&lt;p&gt;On more legacy projects, ones we know less well, or ones mid-rewrite, it’s the opposite: we push the AI harder to quickly frame how we want it to work.&lt;/p&gt;
&lt;p&gt;None of this is trust earned once and for all. It’s a balance we keep reworking, and that’s exactly what lets us move fast, with AI, without ever losing control.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My job as a software engineer has never been to write code, but to solve problems. Code is a tool for solving those problems, and today we write it faster than ever, while still staying in control of it. That lets me spend a lot more time on the facets of the job that, to me, matter far more. The faster the code gets written, the more an engineer’s value lies in everything around it.&lt;/p&gt;
&lt;/blockquote&gt;</content>
    <summary type="html">Why and how we migrated the configuration of Ad Configurator, our ad decisioning service, from YAML to HCL, Terraform’s configuration language, with AI involved end to end: design, code, review, monitoring. What it cost, what it bought us, and why driving the AI rather than letting it run stays entirely our job.</summary>
  </entry>
  <entry>
    <title type="html">Migrating the blog from Jekyll to Astro</title>
    <link href="https://tech.bedrockstreaming.com/2026/10/14/migrating-the-blog-from-jekyll-to-astro.html" rel="alternate" type="text/html" title="Migrating the blog from Jekyll to Astro" />
    <published>2026-10-14T00:00:00+00:00</published>
    <updated>2026-10-14T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/10/14/migrating-the-blog-from-jekyll-to-astro</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/10/14/migrating-the-blog-from-jekyll-to-astro.html">&lt;p&gt;We moved the blog framework from Jekyll to Astro. It took a while and multiple attempts, but applying how we work at Bedrock when we do migration is what made it work.&lt;/p&gt;
&lt;h2 id=&quot;more-than-a-decade-of-jekyll&quot;&gt;More than a decade of Jekyll.&lt;a href=&quot;#more-than-a-decade-of-jekyll&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;People write articles on this blog since 2012 and still publish some articles from time to time. The problem is that Jekyll works with Ruby, which is a language that nobody uses daily in our teams. It became hard to maintain as the people who knew how it works were not here anymore. The developer experience of writing an article was hard for new-comers as it required to use docker and devcontainers to work locally. That made people rely on previews, with the configuration outside of the repo.&lt;/p&gt;
&lt;p&gt;The theme we were using had not been updated since. We used &lt;code&gt;type-on-strap&lt;/code&gt; , which started to look a bit dusty and not aligned with our brand anymore.&lt;/p&gt;
&lt;p&gt;The posts had more than 300 distinct tags, and 200 of them were used once, which made them irrelevant for browsing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;php&lt;/code&gt;, &lt;code&gt;PHP&lt;/code&gt;, and &lt;code&gt;Php&lt;/code&gt; were three tags.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In conclusion, time had passed and it made some problems appear. The question to replace Jekyll with a framework more modern to enable a better developer experience, and to do some cleanup to have a better user experience started to gain traction.&lt;/p&gt;
&lt;h2 id=&quot;it-was-time-to-meet-astro&quot;&gt;It was time to meet Astro&lt;a href=&quot;#it-was-time-to-meet-astro&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://astro.build&quot;&gt;Astro&lt;/a&gt; is a web framework made for content sites. For the people writing, it runs on JavaScript, the language some of our teams already use, so maintaining the blog no longer meant learning Ruby or opening a container just to reread a paragraph. Articles metadata are checked when the site builds, so a mistake in the metadata fails the build instead of showing up wrong on the page, and prevents from ending up with ~300 tags ;-)&lt;/p&gt;
&lt;p&gt;That improvement stays on our side of the site. A reader still gets static HTML, the same way they did with Jekyll, and JavaScript is only sent on the pages that actually need it. The developer experience gets closer to the rest of our work. The page a visitor opens stays a page, with room afterwards to clean the tags and the theme.&lt;/p&gt;
&lt;h2 id=&quot;two-attempts-in-vain&quot;&gt;Two attempts, in vain&lt;a href=&quot;#two-attempts-in-vain&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With the hope of migrating the blog and the will to learn about Astro, a first attempt was made in November 2024 in one go. At that time the previews were too mysterious for the apprentice – me – to work. A fork on Vercel was the preview, hard to review, hard to consider merging… Obviously the first comment was &lt;strong&gt;“No preview?”&lt;/strong&gt; A lot of things were missing or broken, and maintaining the fork on another repo, while people continued to write articles was really hard. The time dedicated to the blog being scattered over the year, the first attempt was abandoned.&lt;/p&gt;
&lt;p&gt;In May 2026, we &lt;a href=&quot;https://github.com/BedrockStreaming/tech.bedrockstreaming.com/pull/484&quot;&gt;tried again&lt;/a&gt;. That time, another approach was taken: heavy AI-usage and the will to make the blog look identical to the Jekyll version. Thirteen commits, one pull request against &lt;code&gt;master&lt;/code&gt;, keeping everything as it was. It faced similar problems of maintenance, and since it had no previews the reviews were hard to get and it never made it on production.&lt;/p&gt;
&lt;h2 id=&quot;applying-bedrock-methods&quot;&gt;Applying Bedrock methods&lt;a href=&quot;#applying-bedrock-methods&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At Bedrock we have teams that are used to do technical migrations. We applied their method by opening the first Request For Comments (RFC) of the repository: &lt;a href=&quot;https://github.com/BedrockStreaming/tech.bedrockstreaming.com/pull/488&quot;&gt;RFC 0001&lt;/a&gt;. The point was to make a plan that could be stopped by someone and started again by someone else.&lt;/p&gt;
&lt;p&gt;We treated the blog the way we treat an application that already has users. We made what we call a Phase 0 to prepare the live Jekyll site so the later cut is as small as possible. By working on the current site to clean it, we enabled the possibility for people to continue contributing.&lt;/p&gt;
&lt;p&gt;We started by cleaning features not needed or too coupled with Jekyll, we split posts into articles and talks, backfilled articles to have the right metadata and clean the tags.&lt;/p&gt;
&lt;h2 id=&quot;the-cutover-was-a-stack&quot;&gt;The cutover was a stack&lt;a href=&quot;#the-cutover-was-a-stack&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Astro was bootstrapped beside Jekyll so that the revert was easy to make. The first step was to make the previews work for Astro so that everything kept being readable. Jekyll stayed the source of truth until the last step and its assets and styles were used by Astro.&lt;/p&gt;
&lt;p&gt;Then we made another pull request to make the production Astro so that the impact of the end-user was contained in one commit and easy to undo.&lt;/p&gt;
&lt;p&gt;The last step was to give the repo an Astro shape and remove Jekyll, concluding the technical modernisation.&lt;/p&gt;
&lt;h2 id=&quot;what-made-it-work&quot;&gt;What made it work&lt;a href=&quot;#what-made-it-work&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The two attempts failed for the same reason. They tried to move the whole blog in one pull request, with no preview people could trust, while articles were still being written. A change that big is hard to review, and hard to leave and come back to.&lt;/p&gt;
&lt;p&gt;What worked was the way we migrate anything else that already has users. A plan someone else can pick up, a cleanup on the live site so people could keep publishing, then a cutover in small steps that we could revert. Writers now work in JavaScript, with metadata checked at build time. Readers still open a static page. The technical move is done.&lt;/p&gt;
&lt;p&gt;To wrap it up, let me quote the villain in John Wick 4&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;how you do anything is how you do everything - Marquis de Gramont&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And at Bedrock we make it work with method, and that’s how the migration succeeded.&lt;/p&gt;</content>
    <summary type="html">We moved the blog framework from Jekyll to Astro. It took a while and multiple attempts, but applying how we work at Bedrock when we do migration is what made it work.</summary>
  </entry>
  <entry>
    <title type="html">How we lost our tests migrating to Databricks (and how we&apos;re getting them back)</title>
    <link href="https://tech.bedrockstreaming.com/2026/09/17/how-we-lost-our-tests-migrating-to-databricks.html" rel="alternate" type="text/html" title="How we lost our tests migrating to Databricks (and how we&apos;re getting them back)" />
    <published>2026-09-17T00:00:00+00:00</published>
    <updated>2026-09-17T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/09/17/how-we-lost-our-tests-migrating-to-databricks</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/09/17/how-we-lost-our-tests-migrating-to-databricks.html">&lt;p&gt;Earlier this year, a one-character-wide fix closed a bug that had been failing one of our
pipelines in a particularly instructive way:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# before&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; df.drop(&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;&quot;`&lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;c&lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;`&quot;&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt; for&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; c &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; invalid])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#8A8A8A;font-style:italic&quot;&gt;# after&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; df.drop(&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;invalid)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;The function’s job was to collect column names that Delta would reject (spaces, weird
characters) and drop them before the write. The bug: PySpark’s &lt;code&gt;df.drop()&lt;/code&gt; takes raw
column name strings, not SQL-style backtick-quoted identifiers. Given quoted names, it
found no matching columns, and since dropping a non-existent column is by design a no-op,
it silently dropped nothing. The guard ran, reported success, and did not guard. Invalid
columns sailed through to Delta, which rejected them and took the pipeline down.&lt;/p&gt;
&lt;p&gt;Here is the uncomfortable part. That function is small, pure and easy to test. The
invariant is one line: after dropping, no invalid column remains. A unit test would have
refuted the bug in milliseconds, on a laptop, months before it reached production. The
test didn’t exist, and there was a structural reason why: the function lives inside a
784-line Databricks notebook that no test can import.&lt;/p&gt;
&lt;p&gt;How it ended up there is the story of a migration. We modernized our data platform’s
architecture and lost our tests on the way, which, if the data teams we talk to are any
indication, might be the most common failure mode in this industry. This post walks
through the three generations of our pipelines: the Scala stack whose discipline we loved
and whose weight we didn’t, the Databricks rebuild that fixed the weight and dropped the
discipline, and the platform we are building now for the media-consumption data source,
which is our attempt to keep both. It ends with the part we didn’t plan: how this
verification infrastructure turned out to decide how much of our development we could
hand to AI agents.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;Three pipeline generations side by side: Scala jobs with tested importable modules, a Databricks rebuild with logic inline in notebooks and no seam for tests, and the new platform where a thin notebook wires an importable, tested Python package&quot; src=&quot;/images/posts/2026-09-17-how-we-lost-our-tests-migrating-to-databricks/diagram-0-three-architectures.png&quot;&gt;&lt;/center&gt;
&lt;h2 id=&quot;generation-one-the-scala-years&quot;&gt;Generation one: the Scala years&lt;a href=&quot;#generation-one-the-scala-years&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Our first-generation pipelines were Scala and Spark batch jobs, orchestrated by Airflow,
and their engineering discipline was real. In the core repository, roughly fifteen
thousand lines of test code sat next to nineteen thousand lines of main code. Every
output table was a class whose schema was derived from a case class, so “the table has
the declared schema” was a compile-time property plus a one-line test. Sources were
constructor-injected, which meant a transformation’s entire upstream graph could be
stubbed with typed in-memory datasets. The ingestion repository tested against golden
files: real gzipped event payloads, plus a small museum of deliberately malformed ones.
Even the Airflow DAG topology was unit-tested. Compliance rules like per-purpose data
retention were pinned by tests, so a regression there failed CI rather than an audit.&lt;/p&gt;
&lt;p&gt;We want to be fair to this stack, because what follows makes more sense if you understand
that it worked. When something broke, a test usually caught it before production did.
Refactoring was routine rather than frightening.&lt;/p&gt;
&lt;p&gt;But the weight was real too. Configuration was compiled Scala, written per customer, so
supporting three customers meant three config trees that were 80% identical and had to be
kept in sync by hand. The build produced one jar per customer per environment through six
Maven profiles, and CI compiled all six on every pull request. The inventory of ingested
event types lived in three parallel JSON files of roughly four hundred entries each.
Cross-DAG timing was hand-tuned sensor offsets, annotated with comments about winter
time. The test suite took fourteen minutes. None of this was anyone’s fault; it was the
accumulated cost of building per-customer systems before we had a platform. The
consequence was plain: onboarding a new customer or evolving a schema was slow, and
everyone knew it.&lt;/p&gt;
&lt;h2 id=&quot;generation-two-a-better-architecture-minus-the-tests&quot;&gt;Generation two: a better architecture, minus the tests&lt;a href=&quot;#generation-two-a-better-architecture-minus-the-tests&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So we rebuilt. The next generation moved to Databricks: a medallion architecture (bronze,
silver, gold), declarative pipelines with built-in data-quality expectations, and
reusable internal Terraform modules, so that standing up a new data product became “copy
this folder and change the variables” instead of “write and compile a new config tree”.
This was genuinely better. The architecture problems of generation one were solved, and
solved well.&lt;/p&gt;
&lt;p&gt;We shipped it under a schedule that was not going to move, and under that schedule the
transformation logic landed where it was quickest to iterate: inline, in notebooks. In
one representative pipeline, about three thousand lines of transformation logic live in
three notebook files, while the importable Python package next to them is empty. The
notebooks aren’t careless code; they’re well commented, they define functions, they pass
lint. But the functions are defined inside the notebook rather than imported into it, the
files are Terraform templates with &lt;code&gt;${...}&lt;/code&gt; placeholders interpolated at deploy time, and
they depend on &lt;code&gt;spark&lt;/code&gt; and &lt;code&gt;dbutils&lt;/code&gt; globals injected by the runtime. Code like that has
no seam a unit test can grab. It can only be verified by deploying it and watching.&lt;/p&gt;
&lt;p&gt;And that’s precisely what the repo’s own docs prescribed: the verification step for a
change was “apply to staging, run the pipeline, check for green checkmarks in the UI”.
The test directory tells the same story. Two test files. One of them is a smoke test
whose docstring reads, in full, &lt;code&gt;&quot;&quot;&quot;To add tests&quot;&quot;&quot;&lt;/code&gt;. CI ran linters on every pull
request but no test step; the pytest hook sat in the pre-commit config, commented out.&lt;/p&gt;
&lt;p&gt;We want to be precise about what happened here, because “they didn’t write tests” is not
it. The linting survived the migration. The code review survived. What got lost was the
factoring that makes tests possible, and it got lost for economic reasons: under deadline
pressure, inline notebook code is faster this week, and the cost lands next quarter. The
platform modules even offered an affordance for shipping a proper Python package
alongside the notebook. The flag sits in the config, set to false.&lt;/p&gt;
&lt;p&gt;Next quarter arrived on schedule. Over roughly a year, more than half of the meaningful
commits to that pipeline were fixes. Three separate one-shot repair jobs were written,
deployed and decommissioned to mend data in place. Four corrupted metrics tables had to
be recovered. And a disproportionate share of the incidents were exactly the class a unit
test is best at: pure-logic bugs in column-name validation, the backtick no-op from the
opening among them. Meanwhile the commit history shows sixteen changes evolving the main
notebook for every four touching the tests.&lt;/p&gt;
&lt;p&gt;The frustrating part in hindsight: generation one would have caught most of these before
merge, and generation one’s tests were only possible because of seams (injected
dependencies, pure functions, importable modules) that the notebook form factor had
quietly removed.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;Five-dimension comparison of generation one and generation two: tenant onboarding, build and deploy, and data-quality checks improve with the rebuild, while the location of the logic and the unit tests are lost&quot; src=&quot;/images/posts/2026-09-17-how-we-lost-our-tests-migrating-to-databricks/diagram-1-the-trade.png&quot;&gt;&lt;/center&gt;
&lt;h2 id=&quot;generation-three-keeping-both&quot;&gt;Generation three: keeping both&lt;a href=&quot;#generation-three-keeping-both&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We are now building the next platform, for the media-consumption data source (who watched
what, on which device, for how long), and it has one design rule that everything else
hangs off: the legacy stack defines &lt;em&gt;output semantics only&lt;/em&gt;. We are not porting the Scala
architecture, and we are not repeating the notebook shortcut. The concrete practices:&lt;/p&gt;
&lt;p&gt;Notebooks are thin. The product’s rulebook states it bluntly: “If you are writing an
&lt;code&gt;if&lt;/code&gt; inside a notebook, you are in the wrong file.” The notebook is the wiring that
declares the pipeline graph; every transformation is an importable, pure function in a
package, where pytest and a local Spark session can reach it. The notebook itself is
inside the lint and type-check gate like any other file, because it is effectively the
product’s &lt;code&gt;main.py&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Tests come first, mechanically. The rule is “a transform without a unit test does not
merge”, and the failing test exists before the implementation. Fixtures are synthetic
and PII-free. This sounds like textbook TDD because it is; the only interesting part is
that it held, and what it caught. Before the pipeline had run even once on a cluster,
the test suite had surfaced six real defects, including a Spark ANSI-mode behavior change
on empty arrays, an inverted boolean in an exclusion predicate that would have kept every
row it was meant to filter, and a hash that silently depended on the machine’s timezone.
Our internal RFC records it in one line: three real defects were caught before a single
DBU was spent. The suite went from 112 tests to just under 600 in the product’s first
weeks, and it runs in under two minutes.&lt;/p&gt;
&lt;p&gt;Structure mirrors infrastructure. The source tree, the test tree and the Terraform roots
share one vocabulary (bronze, silver, facts, ops), one to one. Establishing that mirror
was itself a bug hunt: the restructuring exposed two latent deployment defects, including
a file-upload rule that would have shipped 2 of the 19 library files and left the rest
behind. Both were invisible to tests and would have been fatal on the first pipeline
update.&lt;/p&gt;
&lt;h2 id=&quot;property-based-tests-or-the-bugs-you-didnt-imagine&quot;&gt;Property-based tests, or: the bugs you didn’t imagine&lt;a href=&quot;#property-based-tests-or-the-bugs-you-didnt-imagine&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Unit tests, including ours, share a silent assumption: the author can imagine the bad
input. For open-ended input spaces, names, paths, dates, identifiers, that assumption
fails quietly. Our favorite recent example is a validator guarding a destructive
operation. Identifiers were checked against an allowlist regex anchored with &lt;code&gt;$&lt;/code&gt;:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;run_id_re &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; re.compile(&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#E82577&quot;&gt;a-z0-9_-&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;{1,64}&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;In Python, &lt;code&gt;$&lt;/code&gt; matches at the end of the string, and also just before a trailing
newline. So &lt;code&gt;&quot;abc123\n&quot;&lt;/code&gt; validates, newline included, and that string was on its way
into a SQL &lt;code&gt;DELETE&lt;/code&gt; statement built from it. Four of our validation regexes had the same
anchor. Every example-based test passed, because nobody writes the trailing-newline
example. That is the pattern: the bug class that survives example tests is the class
nobody thought of.&lt;/p&gt;
&lt;p&gt;A property-based test inverts the job. State what must hold for all inputs; let the
framework hunt. With &lt;a href=&quot;https://hypothesis.readthedocs.io/&quot;&gt;Hypothesis&lt;/a&gt;:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; hypothesis &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; given, strategies &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; st&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;@given(st.text())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; test_validator_rejects_anything_not_purely_allowlisted(s):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; run_id_re.match(s):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;        assert&lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;(s) &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; ALLOWED_CHARS&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Hypothesis finds the newline in seconds and shrinks it to a minimal counterexample. The
fix is one character: &lt;code&gt;\Z&lt;/code&gt;, which anchors at the true end of the string. All four
regexes now use it, and twenty-two property tests now cover the validators and parsers
whose input spaces are too large to enumerate.&lt;/p&gt;
&lt;p&gt;Two honest footnotes, because property testing gets oversold. First, in CI we pin the
random seed: a blocking gate that fails on a different input every run is a gate people
learn to re-run rather than read. That buys reproducibility at the price of exploring a
fixed slice of the space. Second, this technique has found us one defect class so far,
not ten; the six pre-cluster catches above came from ordinary disciplined unit tests.
Property tests are a scalpel for a specific wound, the imagination gap, and that wound
is real: it is the same one the backtick bug came through.&lt;/p&gt;
&lt;h2 id=&quot;gates-that-discover-their-own-scope&quot;&gt;Gates that discover their own scope&lt;a href=&quot;#gates-that-discover-their-own-scope&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The second generation had another quiet failure mode worth designing against: the hollow
gate. Its contract-checking crown jewel was six hundred lines of logic inlined in a CI
workflow file, where no test could reach it, and its pytest step was configured but never
wired to run. A gate that exists and doesn’t fire is worse than no gate, because it
radiates confidence.&lt;/p&gt;
&lt;p&gt;Our defense in generation three is a verification script with a design rule stated in
its own header: discovery, not enumeration. It never contains a list of things to check.
It finds every Python product by globbing for &lt;code&gt;pyproject.toml&lt;/code&gt;, every Terraform root by
globbing for &lt;code&gt;backend.tf&lt;/code&gt;, every generated artifact by globbing for its regeneration
script, and then asserts per discovered item: tests exist, lint passes, formatting holds,
generated files match their sources. The header includes the sentence that motivated the
rewrite, which we’ll admit was written about ourselves: “a root missing from the list is
a root nobody checks” was true of this file about itself. The day the hand-maintained
list became a glob, the script flagged two Terraform roots that had never been checked by
anything. Not new roots. They had been green by omission since the day they were created.&lt;/p&gt;
&lt;p&gt;The other design rule is honest exit codes. A skipped gate is not a passed gate: if a
required tool is missing, that’s a failure, not a skip. There is no &lt;code&gt;|| true&lt;/code&gt; anywhere in
the script, and a comment forbids adding one. As the platform grew, the gate count went
from 10 to 31 without a single edit to the script, which is the point: coverage that
tracks the codebase by construction instead of by diligence.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;Four-step flow of a discovery gate: glob the repository for structural markers, derive the checklist per discovered item, assert every gate treating a skipped check as a failure, and exit listing exactly what is missing&quot; src=&quot;/images/posts/2026-09-17-how-we-lost-our-tests-migrating-to-databricks/diagram-2-discovery-gates.png&quot;&gt;&lt;/center&gt;
&lt;h2 id=&quot;where-ai-comes-in&quot;&gt;Where AI comes in&lt;a href=&quot;#where-ai-comes-in&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Everything above would have been worth doing in any decade. What makes it strategic now
is a change in economics.&lt;/p&gt;
&lt;p&gt;Be honest about why generation two happened: rigor costs engineer-hours, deadlines don’t
negotiate, and rigor lost. Discipline was the only remedy on offer, and discipline loses
that fight often enough that most data teams have a story like ours. What changed is
that the marginal cost of rigor collapsed. On the new platform, AI agents write most of
the first draft of everything: the property tests, the Terraform for a new stage, the
schema definitions, the test fixtures. The suite grew from 112 to nearly 600 tests in
weeks at constant team size, and that growth is the direct product of agents doing the
mechanical writing while humans decide what must be true.&lt;/p&gt;
&lt;p&gt;The reason this is safe here, and would have been reckless on generation two, is the
infrastructure this post has been describing. An agent’s characteristic failure is
confident, plausible, wrong code, which is the exact failure the gates catch. A property
test doesn’t care who wrote the regex. The discovery script doesn’t care who added the
Terraform root; the moment an agent scaffolds one, CI demands its tests and its wiring,
and an agent cannot forget what a glob will find. We’ve also adopted a working rule for
review: when an incident or a review reveals a mechanical hazard class, the fix is not
vigilance, it is an executable guard. Internally we phrase it as “if it can be
greppable, it must be a failing test”, and the review agents check diffs against those
declared hazards rather than free-associating over the code. The same principle covers
our own claims: our repo rule is “verify, don’t assert”, and the verification script
exists so that a reviewer, or an agent, can re-check a claim like “everything passes”
instead of trusting a status file that says so.&lt;/p&gt;
&lt;p&gt;So the loop runs in both directions. The gates make agent output trustworthy, and agents
make gate-quality rigor affordable. But the order of operations is the entire lesson of
our second generation: the verification infrastructure has to come first. Point agents
at a codebase with no invariants holding them and you don’t get a faster team. You get
our generation two at machine speed.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;The development loop: an AI agent drafts tests and infrastructure, the output passes through a trust boundary of property tests, discovery gates and hazard guards, a human reviews the invariants, the change merges, and red builds feed back to the agent&quot; src=&quot;/images/posts/2026-09-17-how-we-lost-our-tests-migrating-to-databricks/diagram-3-ai-loop.png&quot;&gt;&lt;/center&gt;
&lt;h2 id=&quot;if-you-want-to-try-this&quot;&gt;If you want to try this&lt;a href=&quot;#if-you-want-to-try-this&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The order matters more than the ingredients:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Give your logic seams. Pull transformations out of notebooks into importable, pure
functions with injected dependencies. This is the step generation two skipped, and it
is the precondition for everything else. The notebook keeps only the wiring.&lt;/li&gt;
&lt;li&gt;Property-shape the tests where input spaces are open-ended: names, identifiers,
paths, dates. One invariant per function; let the framework do the imagining. The
first shrunk counterexample will convert more colleagues than any slide deck.&lt;/li&gt;
&lt;li&gt;Convert one hand-maintained checklist into a gate that discovers its own scope. Glob
for the structural marker, derive the checks, and treat a skipped check as a failure.
Expect the first run to find something; that finding is the inventory of what you
weren’t checking.&lt;/li&gt;
&lt;li&gt;Then open the door to the agents: tests first, hazards declared as executable guards,
automated review before every PR. They are exactly as good as the fences you’ve built.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;closing&quot;&gt;Closing&lt;a href=&quot;#closing&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We should say plainly where we are: the new platform is young. Its first production
milestone is still ahead of it, and its output will have to prove itself against the
legacy stack’s numbers through a formal parity gate, seven consecutive clean daily runs,
before anything gets switched over. What we can already say is that it caught its first
six bugs before it ever touched a cluster, that its checklist cannot silently rot, and
that we now know, from having lived both, which half of a migration is easy to lose in
transit.&lt;/p&gt;
&lt;p&gt;The backtick bug at the top of this post was one character wide. The hole it revealed
was a missing test; the hole behind that was a missing seam; and the hole behind that
was a migration that optimized everything it could see. Architecture is what you draw on
the whiteboard. Discipline is what’s left when the deadline arrives. This time we built
the discipline into the structure, where deadlines can’t reach it.&lt;/p&gt;
&lt;p&gt;This is the data engineering chapter’s first article on this blog. The next chapter of
this story is the parity run and the cutover, and we intend to report it here, including
whatever it breaks.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thanks to the data engineering chapter, whose work this describes, to Jabrane Hajadi
for backing the article, and to our reviewers in the blog channel.&lt;/em&gt;&lt;/p&gt;</content>
    <summary type="html">Three generations of data pipelines: a well-tested Scala stack, a Databricks rebuild that lost the tests along the way, and the platform we’re building to keep the best of both — property-based testing, self-discovering CI gates, and AI with guardrails.</summary>
  </entry>
  <entry>
    <title type="html">Hosting the 2026 World Cup on M6+</title>
    <link href="https://tech.bedrockstreaming.com/2026/08/25/hosting-the-2026-world-cup-on-m6plus.html" rel="alternate" type="text/html" title="Hosting the 2026 World Cup on M6+" />
    <published>2026-08-25T00:00:00+00:00</published>
    <updated>2026-08-25T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/08/25/hosting-the-2026-world-cup-on-m6plus</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/08/25/hosting-the-2026-world-cup-on-m6plus.html">&lt;p&gt;On June 11th 2026, Mexico and South Africa kicked off the World Cup. For us, it was the start of 54 matches streamed on M6+ and 39 days of match-evening operations.&lt;/p&gt;
&lt;p&gt;At Bedrock, we build and operate M6+, the M6 group’s streaming platform, along with the platforms of several other European broadcasters.&lt;/p&gt;
&lt;p&gt;This was not our first international football championship on M6+ but it was the first at this scale. M6 acquired the rights to nearly every match of the tournament: we had never streamed that many matches, especially during the night, and we expected more simultaneous users than the platform had ever seen.&lt;/p&gt;
&lt;p&gt;A football kickoff is a brutal load pattern. Millions of users arrive in a few minutes, all for the same live stream. Reactive autoscaling alone cannot follow that curve. But a kickoff has one good property: you know when it happens. Everything we did for this World Cup comes down to that: &lt;strong&gt;anticipate, prepare, verify&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Here is how we validated the platform months ahead, how the match evenings went, and how we made a success of this worldwide event.&lt;/p&gt;
&lt;h2 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;a href=&quot;#table-of-contents&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#preparing-months-ahead&quot;&gt;Preparing months ahead&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#prescale-dont-react&quot;&gt;Prescale, don’t react&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#load-tests-validate-and-calibrate&quot;&gt;Load tests: validate, and calibrate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#serve-the-match-from-the-edge&quot;&gt;Serve the match from the edge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#plan-b-circuit-breakers-and-fallbacks&quot;&gt;Plan B: circuit breakers and fallbacks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#freeze-then-keep-verifying&quot;&gt;Freeze, then keep verifying&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#match-evenings&quot;&gt;Match evenings&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#the-evening-ritual&quot;&gt;The evening ritual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#the-lifecycle-of-a-match-evening&quot;&gt;The lifecycle of a match evening&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#when-the-unexpected-happens&quot;&gt;When the unexpected happens&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#wrap-up&quot;&gt;Wrap-up&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;preparing-months-ahead-&quot;&gt;Preparing months ahead &lt;a name=&quot;preparing-months-ahead&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id=&quot;prescale-dont-react-&quot;&gt;Prescale, don’t react &lt;a name=&quot;prescale-dont-react&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#prescale-dont-react-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In 2022, we explained &lt;a href=&quot;https://tech.bedrockstreaming.com/2022/02/03/prescaling.html&quot;&gt;how we prescale our platform&lt;/a&gt; for football evenings. The idea has not changed: for an event of this scale and importance, don’t bet on reactive autoscaling. When millions of users arrive in the same couple of minutes, capacity must already be there.&lt;/p&gt;
&lt;p&gt;And we don’t try to optimize the last few euros of compute: a tournament like this happens about once a year. We would rather start a bit more machines than strictly needed and be certain that all the capacity is up before kickoff. Fewer scaling mechanisms in play means fewer things that can go wrong, and the best possible experience for viewers.&lt;/p&gt;
&lt;p&gt;Concretely, three layers have to scale ahead of a match:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the Kubernetes clusters themselves (nodes, managed by Karpenter),&lt;/li&gt;
&lt;li&gt;the applications deployed on them,&lt;/li&gt;
&lt;li&gt;the managed services around them (DynamoDB capacity, Fastly KV stores, etc.).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the applications, we don’t touch the HPAs’ minimum replicas. Each project’s HPA scales on a dedicated prescaling metric, which varies with the prescaling size we want and the configuration set in the project itself. Every microservice gets a prescaling adapted to it. The exporter behind this mechanism is open source and maintained by Bedrock: &lt;a href=&quot;https://github.com/BedrockStreaming/prescaling-exporter&quot;&gt;prescaling-exporter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To drive all of this, we built our own solution. “prescaling-api” orchestrates the scaling actions through a system of scheduled jobs: it declares an event with a start time, an end time and an expected number of concurrent streams, and it arms each layer at the right moment before kickoff, then tears everything down after the match. On top of it, the Prescaling UI lets us register every match weeks in advance and choose the prescaling size for each one.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-08-25-hosting-the-2026-world-cup-on-m6plus/prescaling-ui.png&quot; alt=&quot;A football match registration in the Prescaling UI&quot;&gt;&lt;/p&gt;
&lt;center&gt;&lt;em&gt;A football match registration in the Prescaling UI&lt;/em&gt;&lt;/center&gt;
&lt;br&gt;
&lt;p&gt;Since Euro 2024, arming and disarming is fully automated. Nobody scales or downscales anything manually anymore at the beginning of the match.&lt;/p&gt;
&lt;h2 id=&quot;load-tests-validate-and-calibrate-&quot;&gt;Load tests: validate, and calibrate &lt;a name=&quot;load-tests-validate-and-calibrate&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#load-tests-validate-and-calibrate-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;From March to June, we ran regular load-test sessions with &lt;a href=&quot;https://gatling.io/&quot;&gt;Gatling&lt;/a&gt;, in production, in the morning.&lt;/p&gt;
&lt;p&gt;The first goal was the obvious one: prove that the platform holds well above the biggest audience forecast.&lt;/p&gt;
&lt;p&gt;The second goal was to calibrate: we validated how the different components scale with the user arrival rate. That is what lets us determine the sizing to plan for each match, based on its forecast plus a safety margin.&lt;/p&gt;
&lt;h2 id=&quot;serve-the-match-from-the-edge-&quot;&gt;Serve the match from the edge &lt;a name=&quot;serve-the-match-from-the-edge&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#serve-the-match-from-the-edge-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Being as static as possible and serving from the edge is the key to very-high-traffic events: every request answered by the CDN is pressure taken off the backends. And it is easy to do on a World Cup evening, because we know exactly what users come for: the match. That is the idea behind the features we deployed for the tournament. A few examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Static Homepage&lt;/strong&gt;: displayed in place of the classic home page on every match day, it gives users a fully static path into the platform, with no call to our backends.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Live@edge&lt;/strong&gt;: live responses are pre-generated per platform and user profile, then served entirely from the CDN edge, with no call to the origin.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rate limiting on the ad router&lt;/strong&gt;: protects the ad stack from request storms.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these features went through its own load-test validation before joining the match-evening setup.&lt;/p&gt;
&lt;h2 id=&quot;plan-b-circuit-breakers-and-fallbacks-&quot;&gt;Plan B: circuit breakers and fallbacks &lt;a name=&quot;plan-b-circuit-breakers-and-fallbacks&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#plan-b-circuit-breakers-and-fallbacks-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If something breaks at 9pm in front of millions of viewers, we don’t want to improvise. Every critical path has a plan B, and we tested those too.&lt;/p&gt;
&lt;p&gt;We have already experienced this kind of incident in the past: an error hits every viewer at the same time during playback, everyone refreshes at once, and the platform takes a massive arrival rate in an instant. So we built a dedicated Gatling scenario replaying that massive F5, and used it to validate the fallback and mitigation mechanisms in place to withstand this kind of trouble.&lt;/p&gt;
&lt;p&gt;Same logic on authentication: if our auth provider fails during a match, a degradation bypass can open the gates rather than lock viewers out.&lt;/p&gt;
&lt;p&gt;And as a last resort, for the worst-case scenario: if a backend fails entirely, our CDN automatically falls back to static response files stored on S3, regenerated every few minutes by a cron. The main layouts are covered (homepage, services, folders, live, navigation), programs and clips get an error layout. This mode drops authentication, locked content and personalization, but the platform stays browsable and the live reachable.&lt;/p&gt;
&lt;h2 id=&quot;freeze-then-keep-verifying-&quot;&gt;Freeze, then keep verifying &lt;a name=&quot;freeze-then-keep-verifying&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#freeze-then-keep-verifying-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;During the tournament, production deployments on M6+ were frozen. Exceptions had to go through an explicit validation process.&lt;/p&gt;
&lt;p&gt;A freeze protects against regressions, but it proves nothing by itself. So we kept running no-regression load-test sessions: twice in the days before the first match, and once more mid-tournament. Same scenarios, same targets, one question: does the platform still respond exactly as when we validated it?&lt;/p&gt;
&lt;h1 id=&quot;match-evenings-&quot;&gt;Match evenings &lt;a name=&quot;match-evenings&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id=&quot;the-evening-ritual-&quot;&gt;The evening ritual &lt;a name=&quot;the-evening-ritual&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#the-evening-ritual-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every match evening followed the same ritual. Infra teams online one hour before kickoff, application teams (web, mobile, TV) thirty minutes before. One permanent meet link for the whole tournament, and one Slack thread per evening where everything gets logged: checks, observations, decisions, and how long each action took. An AI agent monitors the platform throughout the evening, warns us when it spots an anomaly, and produces a technical report of the whole evening at the end.&lt;/p&gt;
&lt;p&gt;Before kickoff, a checklist: prescaling armed on every layer, static homepage configured for the match window, World Cup features up, authentication provider checked. Each team then watches its own scope on shared dashboards. On the biggest matches, AWS engineers were on standby on a dedicated bridge.&lt;/p&gt;
&lt;h2 id=&quot;the-lifecycle-of-a-match-evening-&quot;&gt;The lifecycle of a match evening &lt;a name=&quot;the-lifecycle-of-a-match-evening&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#the-lifecycle-of-a-match-evening-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One hour before kickoff, the prescaling arms itself: nodes first, then applications, DynamoDB tables and KV stores, each layer at its own offset. Nobody scales anything: we verify.&lt;/p&gt;
&lt;p&gt;At kickoff, the wave. The arrival rate is what stresses the platform, much more than the plateau that follows: users call our microservices mostly when they arrive and launch the live. Once it plays, it is mainly video consumption, served from the CDNs, and our backends are barely solicited. Halftime brings a dip, then a second wave.&lt;/p&gt;
&lt;p&gt;If a match goes to extra time or penalties, we extend the event directly in the Prescaling UI and the capacity stays up. After the final whistle, users leave, the platform downscales automatically, and everyone goes to bed.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-08-25-hosting-the-2026-world-cup-on-m6plus/traffic-curve.png&quot; alt=&quot;A typical traffic curve for a soccer game&quot;&gt;&lt;/p&gt;
&lt;center&gt;&lt;em&gt;A typical traffic curve for a soccer game&lt;/em&gt;&lt;/center&gt;
&lt;br&gt;
&lt;h2 id=&quot;when-the-unexpected-happens-&quot;&gt;When the unexpected happens &lt;a name=&quot;when-the-unexpected-happens&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#when-the-unexpected-happens-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Zero major incident in 54 matches does not mean nothing happened. A few evenings tested the plan Bs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Our authentication provider failed&lt;/strong&gt; right at the biggest peak of the tournament. Retries and fallbacks absorbed it, and the issue resolved itself. The “open the gates” bypass stayed ready, we never needed it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A storm in Philadelphia delayed a kickoff&lt;/strong&gt; by about two hours. The whole prescaling was rescheduled on the fly through the UI. A marathon evening for the teams, a non-event for viewers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The audience beat the forecasts&lt;/strong&gt; on some early matches (the tournament was an instant success), and reactive autoscaling took over without any trouble: the kickoff wall had already been absorbed, and the extra viewers arrived gradually. Elasticity stays on as a safety net on top of the prescaling. We adjusted the forecasts with M6 for the following matches.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A small DDoS hit during a match.&lt;/strong&gt; The WAF absorbed it, nobody had to act.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of it reached the viewers. That is what the preparation was for.&lt;/p&gt;
&lt;h1 id=&quot;wrap-up-&quot;&gt;Wrap-up &lt;a name=&quot;wrap-up&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;54 matches, 39 days, zero major incident.&lt;/p&gt;
&lt;p&gt;On M6’s side, the tournament gathered 60 million French viewers across the channel and M6+. The platform signed its 13 best audiences ever, was the most downloaded app on the stores for the whole competition, and counted more than 100 million videos viewed, 11 million unique users and 4.2 million new accounts created.&lt;/p&gt;
&lt;p&gt;As the competition progressed, that attention translated into unprecedented streaming demand. M6+ surpassed 1M concurrent streams on three occasions, while at peak around 60K viewers arrived within a single minute. That last figure is the one that matters to us: the arrival rate is what the whole preparation was built for.&lt;/p&gt;
&lt;p&gt;Three things we take away from it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Anticipating beats reacting&lt;/strong&gt;: for an event you can see coming, prescale rather than rely on autoscaling to keep up.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Load tests are as much about calibration as validation&lt;/strong&gt;: knowing how each component scales with the arrival rate is what let us size every match from its forecast.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Being static and served from the edge&lt;/strong&gt; is the most effective lever on very-high-traffic events.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And a few things we want to improve: bringing the platform back down earlier after a match, so teams get to sleep sooner and we save a little bit of money. Better graceful shutdown on our backend APIs during downscale. And sharper escalation paths with our external partners, the ones we depend on but do not operate.&lt;/p&gt;
&lt;p&gt;See you at the next big event.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thanks to everyone who made these late nights look easy.&lt;/em&gt;&lt;/p&gt;</content>
    <summary type="html">How Bedrock prepared M6+ for the 2026 World Cup: prescaling, load tests, edge features and plan Bs. 54 matches, 39 days, zero major incident.</summary>
  </entry>
  <entry>
    <title type="html">Building a Scalable, Multi-Tenant QA Automation Stack at Bedrock Streaming</title>
    <link href="https://tech.bedrockstreaming.com/2026/02/06/web-homologation-as-app.html" rel="alternate" type="text/html" title="Building a Scalable, Multi-Tenant QA Automation Stack at Bedrock Streaming" />
    <published>2026-02-06T00:00:00+00:00</published>
    <updated>2026-02-06T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/02/06/web-homologation-as-app</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/02/06/web-homologation-as-app.html">&lt;p&gt;At Bedrock Streaming, we create and operate full-scope streaming services for leading media companies with best-in-class user experience across AVOD, SVOD and hybrid business models.&lt;/p&gt;
&lt;p&gt;Given that our application is multi-customer, scaling testing efforts becomes increasingly challenging and costly due to the requirement for extensive manual validation.&lt;/p&gt;
&lt;p&gt;QA engineers are therefore a critical resource responsible for assessing product quality and ensuring high standards through continuous validation and &lt;em&gt;homologation&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In our context, &lt;em&gt;homologation&lt;/em&gt; specifically involves the rigorous, final assessment of a release candidate (RC). This process entails fully testing the RC across a matrix of multi-client configurations (customer-specific data/settings) and multi-browser environments on an iso-production environment before deployment. &lt;em&gt;Homologation&lt;/em&gt; used to be a fully-manual process in the software release process.&lt;/p&gt;
&lt;p&gt;To make sure this process follows a more and more speedy release cycle and scales at a limited cost, automated testing becomes a must have and critical tool to support even shorter release cycle in the future.&lt;/p&gt;
&lt;p&gt;This article will cover the building foundation of our new homologation stack, dedicated to the validation of the frontend release candidates.&lt;/p&gt;
&lt;p&gt;Disclaimer: the strategy is home-made but the stack we’re using is composed of various open-source tools. We want to share with the QA community our journey in the automation world and expose our approach. Bedrock is evolving fast and it’s only a snapshot of our current way of working.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;-transforming-frontend-homologation&quot;&gt;🚀 Transforming Frontend Homologation&lt;a href=&quot;#-transforming-frontend-homologation&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Challenge : Velocity meets Quality&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Web team operates on a two-week release cycle, deploying major updates rapidly. This demanding pace places the QA engineers in a critical role, responsible for continuous validation and homologation to assure product quality.&lt;/p&gt;
&lt;p&gt;However, relying heavily on traditional manual QA processes presented a scalability and cost challenge:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Growing Feature Set: As the number of features increases, the time required for comprehensive manual testing grows linearly, threatening to delay major releases and negatively impacting Time-to-Market (TTM).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Speed Constraint: To accommodate even shorter release cycles in the future, the homologation process needed to become faster, more reliable, and less expensive to execute repeatedly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The Goal:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build a new, robust, and scalable homologation stack dedicated to validating frontend release candidates that can meet the current pace and future demands.&lt;/li&gt;
&lt;li&gt;On another hand, traditional and fully manual QA processes were a bit dusty compared to the evolving environment around QA and AI and representing a source of monotony in the QA engineers day-to-day. From “nice-to-have“, the automated testing shifted to critical need to sustain our evolution.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;️-building-blocks-of-the-new-homologation-stack&quot;&gt;⚙️ Building Blocks of the New Homologation Stack&lt;a href=&quot;#%EF%B8%8F-building-blocks-of-the-new-homologation-stack&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Our solution hinges on a deliberate choice of tools and methodologies designed for readability, maintainability, and future-proofing:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Core Stack&lt;/strong&gt;&lt;/p&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Component&lt;/th&gt;&lt;th&gt;Role&lt;/th&gt;&lt;th&gt;Key Benefit&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://playwright.dev/&quot;&gt;Playwright&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Browser Automation Engine&lt;/td&gt;&lt;td&gt;Speed and Reliability: Unified API for all major browsers (Chromium, Firefox, WebKit), mobile emulation, and excellent DX.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://vitalets.github.io/playwright-bdd/#/&quot;&gt;playwright-bdd&lt;/a&gt;&lt;/td&gt;&lt;td&gt;BDD Framework (Gherkin)&lt;/td&gt;&lt;td&gt;Collaboration and Readability: Enables tests to be written in a natural, shared language while managing Playwright test generation.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ Our dictionary of steps is greatly inspired by &lt;a href=&quot;https://github.com/Orange-OpenSource/uuv&quot;&gt;uuv&lt;/a&gt; which aims to provides an ecosystem that simplifies the writing of End-to-End tests in a BDD approach and a user-centric way and accessibility-first selectors.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Requirements and rationale behind&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Natural Language BDD (Gherkin)&lt;/strong&gt;: This is a key enabler for collaboration.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy Review: Allows QA Engineers, Product Owners (POs), and Developers (DEVs) to easily read, review, and contribute to the test specifications without needing deep coding knowledge.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Multi-Client / Multi-Platform Support&lt;/strong&gt;: Leveraging Playwright’s power, our stack should inherently supports validation across:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple Languages (leveraging our i18n packages).&lt;/li&gt;
&lt;li&gt;Multiple Platforms (desktop and mobile browsers).&lt;/li&gt;
&lt;li&gt;Multiple apps / projects.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Codebase Integration (the shift)&lt;/strong&gt;: The homologation application is part of the main Web codebase.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Better Context: QA engineers gain a better understanding of code changes and their impact.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reduced Maintenance: We leverage the existing i18n language packages directly within the test environment, significantly limiting test maintenance when text strings change following editors update.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Leverage our CI environments and workflows for future integration with deployment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;But also higher responsability regarding the quality of the injected tests and code overall 🥐. The fear of breaking things is natural but approved reviews and a green CI are always keeping up the quality level.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;️-homologation-architecture-overview&quot;&gt;🏗️ Homologation Architecture Overview&lt;a href=&quot;#%EF%B8%8F-homologation-architecture-overview&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Today this architecture allows writing one test that runs across 4 customers × 2 platforms × multiple environments.
The architecture follows a clean layered separation between business requirements (Gherkin), test logic (steps), and implementation details (utils).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Feature Files (BDD Layer)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Path: &lt;code&gt;features/@desktop/&lt;/code&gt; &amp;#x26; &lt;code&gt;features/@webview/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Purpose: Plain-language Gherkin files defining the test scenarios.&lt;/li&gt;
&lt;li&gt;Organization: Grouped by functional domains: &lt;code&gt;@core&lt;/code&gt; (navigation), &lt;code&gt;@player&lt;/code&gt; (VOD/Live/audio), and &lt;code&gt;@ulc&lt;/code&gt; (accounts/payments).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;2. Step Definitions (Glue Layer)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Path: &lt;code&gt;features/steps/\*.steps.ts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Purpose: The bridge between Gherkin and code.&lt;/li&gt;
&lt;li&gt;Design: Standardized by action (When) or assertion (Then) to maximize reusability across different features.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;3. Utilities (Implementation Layer)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Path: &lt;code&gt;features/steps/utils/\*.utils.ts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Purpose: The “brains” of the framework.&lt;/li&gt;
&lt;li&gt;Responsibility: Instead of individual page objects, these shared utilities handle complex multi-tenant logic, video player interactions, and smart navigation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;4. Configuration (Multi-Tenant Layer)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Path: &lt;code&gt;config/{customer}/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Purpose: Environment and client-specific data.&lt;/li&gt;
&lt;li&gt;Components: Holds the unique URLs, account information and localized strings (translations.config.ts) for each brand.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ We have not implemented the Page Object Model (POM) in favor of a Functional Utility-Based approach. This avoids the heavy overhead of maintaining an excessive amount of page-specific classes across multiple brands. Instead, we centralize logic in a shared implementation Layer, allowing us to update core behaviors (like the Video Player) in a single place for all tenants.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Finally the architecture looks like this:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;text&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apps/homologation/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── features/                    # Gherkin feature files organized by platform&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── @desktop/                # Desktop-specific test scenarios&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── @webview/                # Mobile-specific test scenarios (same structure)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   └── steps/                   # TypeScript step definitions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       ├── authentification.steps.ts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       ├── interactivity.steps.ts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       ├── visibility.steps.ts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       │── ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       └── utils/               # Utility functions for steps&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── config/                    # Customer-specific configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── config.ts              # Main config aggregator&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── selectors.ts           # Main selectors aggregator&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── clientA/               # client A specific config&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── .../&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   ├── .../&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│   └── clientN/                  # client N specific config&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       ├── datas.config.ts       # Test data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       ├── urls.config.ts        # URL mappings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│       └── translations.config.ts # Merged translations from different source&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;🔄 Data Flow Example: Multi-Tenant Magic&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When executing a test like:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;js&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;Then the user should see the text &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#FD4D26&quot;&gt;translation.account.menu.logout&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;ul&gt;
&lt;li&gt;Step receives the abstract key &lt;code&gt;&quot;translation.account.menu.logout&quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Step calls a utils fonction &lt;code&gt;getValue(&quot;translation.account.menu.logout&quot;)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Config resolves to the specific customer’s value (e.g., &lt;code&gt;&quot;Kijelentkezés&quot;&lt;/code&gt; for one customer, &lt;code&gt;&quot;Logout&quot;&lt;/code&gt; for another).&lt;/li&gt;
&lt;li&gt;Playwright locates the element with that specific text and validates visibility.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;-the-future-ai-readiness-and-ci-integration&quot;&gt;✦ The Future: AI Readiness and CI Integration&lt;a href=&quot;#-the-future-ai-readiness-and-ci-integration&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AI and BDD&lt;/strong&gt;: The structured, human-readable format of Gherkin makes it an ideal input for future AI agents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CI/CD In Action&lt;/strong&gt;: Automated tests are integrated into our CI pipeline, ensuring quality gates are enforced before any release proceeds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Human Factor&lt;/strong&gt;: We’ve transformed the QA role. By transitioning to “Quality Architects,” our engineers now own the automated patrimony, supported by targeted training to bridge the gap between manual testing and code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;-next&quot;&gt;🤝🏻 Next&lt;a href=&quot;#-next&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;All in all, this new stack is the backbone for delivering high-quality streaming experiences quickly.&lt;/p&gt;
&lt;p&gt;The architecture and overall approach are confirmed to be successful, leading to a reduced and continuously improving homologation time as test coverage increases. We’ve implemented new rituals to thoroughly analyze results and maintain a strategic focus on both manual exploratory testing and executing more complex tests. Also, time to get a first feeback on the overall outcome and quality of each release has been highly reduced from days to minutes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key takeaways for the QA community:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Embed tests in your codebase.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BDD approach is great to align teams on the “What” and is AI future-proof.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;More automated testing means more time dedicated to valuable and strategic work from QA engineers (and less repetitive tasks).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What’s next:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;More AI and bring the automated testing to the age of agentic.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Align the testing approach with our developers, who already have an automated E2E testing stack for Pull Request validation (currently based on &lt;a href=&quot;https://tech.bedrockstreaming.com/2021/09/06/web-best-practices.html#our-e2e-tests&quot;&gt;WebdriverIO &amp;#x26; CucumberJS&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content>
    <summary type="html">We share here QA context, key takeaways and reveal the architecture of the Web homologation stack.</summary>
  </entry>
  <entry>
    <title type="html">How Blue-Green helped us migrating critical components with zero downtime</title>
    <link href="https://tech.bedrockstreaming.com/2026/02/02/how-blue-green-helped-migrating-with-zero-downtime.html" rel="alternate" type="text/html" title="How Blue-Green helped us migrating critical components with zero downtime" />
    <published>2026-02-02T00:00:00+00:00</published>
    <updated>2026-02-02T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2026/02/02/how-blue-green-helped-migrating-with-zero-downtime</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/02/02/how-blue-green-helped-migrating-with-zero-downtime.html">&lt;p&gt;At Bedrock, we recently migrated our Kubernetes clusters from AWS VPC CNI to Cilium—with zero downtime. By leveraging Blue-Green canary with HAProxy for progressive traffic shifting and Consul for dynamic configuration updates, we achieved a seamless transition to eBPF-powered networking.&lt;/p&gt;
&lt;p&gt;You might wonder: why all this complexity around migration? Can’t you simply install Cilium in place of VPC CNI with a straightforward &lt;code&gt;kubectl apply&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;But here’s the key insight: &lt;strong&gt;this isn’t just about Cilium&lt;/strong&gt;. Whether you’re migrating to Cilium, Karpenter, the AWS Load Balancer Controller, Keda, or any other core infrastructure component that introduces breaking changes, the challenge remains the same. You need to transition from one set of tools to an incompatible version or alternative without any downtime and with the ability to rollback in seconds if issues arise.&lt;/p&gt;
&lt;p&gt;The Blue-Green canary clustering approach we’ll describe is a reusable pattern for handling any breaking change in your Kubernetes infrastructure. By creating a parallel cluster with the new configuration and progressively shifting traffic, you gain complete control over the migration while maintaining zero-downtime guarantees.&lt;/p&gt;
&lt;h2 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;a href=&quot;#table-of-contents&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#WhatAboutToday&quot;&gt;What about today?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#DigIntoLiveMigration&quot;&gt;Dig into live migration&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#HandleLiveMigrationZeroDowntime&quot;&gt;Handle live migration with zero downtime&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#BlueGreenDeployment&quot;&gt;Blue/Green deployment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#CanaryDeployment&quot;&gt;Canary deployment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#HAProxyBlueGreenLoadBalancing&quot;&gt;HAProxy blue/green load balancing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#DeploySynchronizeApplications&quot;&gt;Deploying and synchronizing applications on both clusters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#ConsulPoweredConfUpdate&quot;&gt;Consul powered configuration update&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;what-about-today-&quot;&gt;What about today? &lt;a name=&quot;WhatAboutToday&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Today in 2026, we are still relying on &lt;a href=&quot;https://kops.sigs.k8s.io/&quot;&gt;KOps&lt;/a&gt; managed Kubernetes cluster running on EC2 spot instances in private subnets at AWS. We needed to get more observability at our network layer on Kubernetes to have better insights about possible bottlenecks on our infrastructure or our ingresses implementation, but not only.&lt;/p&gt;
&lt;p&gt;To have more insights on the fundamental differences between iptables with kubeproxy and eBPF there’s this very interesting blogpost from &lt;a href=&quot;https://isovalent.com&quot;&gt;Isolvalent&lt;/a&gt; that we encourage you to check. It contains a lot of usefull informations.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://isovalent.com/blog/post/why-replace-iptables-with-ebpf/&quot;&gt;What is Kube-Proxy and why move from iptables to eBPF?&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&quot;dig-into-live-migration-&quot;&gt;Dig into live migration &lt;a name=&quot;DigIntoLiveMigration&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;With a clear understanding of why we needed to migrate to Cilium, the critical question became: how do you execute such a migration in production without any downtime? This chapter explores the deployment strategies we evaluated, our hybrid approach combining Blue-Green and Canary patterns, and the technical infrastructure we built using HAProxy and Consul to orchestrate the migration safely.&lt;/p&gt;
&lt;h2 id=&quot;handle-live-migration-with-zero-downtime-&quot;&gt;Handle live migration with zero downtime &lt;a name=&quot;HandleLiveMigrationZeroDowntime&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#handle-live-migration-with-zero-downtime-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Several strategies exist for achieving zero or near-zero downtime during migration. The two most common approaches are Blue/Green and Canary deployments. Each has distinct advantages depending on your infrastructure and risk tolerance. We evaluated both before selecting the approach that best aligned with our production requirements and operational constraints.&lt;/p&gt;
&lt;h3 id=&quot;bluegreen-deployment-&quot;&gt;Blue/Green deployment &lt;a name=&quot;BlueGreenDeployment&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#bluegreen-deployment-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Blue/Green deployment is a strategy that improves application availability while minimizing downtime and risk. You deploy to two identical production environments: “blue” represents the current live environment, while “green” hosts the next version.&lt;/p&gt;
&lt;p&gt;Once thoroughly tested in green, traffic switches from blue to green. This swift transition minimizes downtime and enables instant rollback if issues arise—simply revert traffic back to blue.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;/images/posts/2026-02-02-how-blue-green-helped-migrating-with-zero-downtime/image0.png&quot;&gt;&lt;/center&gt;
&lt;br&gt;
&lt;h3 id=&quot;canary-deployment-&quot;&gt;Canary deployment &lt;a name=&quot;CanaryDeployment&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#canary-deployment-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Canary deployment takes a different approach by avoiding the need for duplicate production environments. Instead, you select a subset of servers or nodes to receive the new deployment first, serving as a testing ground before rolling out changes across the entire infrastructure.&lt;/p&gt;
&lt;p&gt;A typical canary deployment workflow using a load balancer looks like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Your production infrastructure runs behind a load balancer with additional nodes kept in reserve.&lt;/li&gt;
&lt;li&gt;Deploy the new version to these spare nodes, which become your “canary” servers—the first to run the updated code in production.&lt;/li&gt;
&lt;li&gt;Configure the load balancer to route a small percentage of traffic to the canary nodes, exposing the new version to a limited number of users while monitoring for errors and gathering feedback.&lt;/li&gt;
&lt;li&gt;If metrics look healthy and no critical issues emerge, progressively increase traffic to the canary nodes until they handle 100% of requests.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;/images/posts/2026-02-02-how-blue-green-helped-migrating-with-zero-downtime/image1.png&quot;&gt;&lt;/center&gt;
&lt;br&gt;
&lt;h2 id=&quot;haproxy-bluegreen-load-balancing-&quot;&gt;HAProxy blue/green load balancing &lt;a name=&quot;HAProxyBlueGreenLoadBalancing&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#haproxy-bluegreen-load-balancing-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At Bedrock, we opted for a hybrid Blue-Green Canary approach to handle our live migration. We still use &lt;a href=&quot;https://www.haproxy.com&quot;&gt;HAProxy&lt;/a&gt; for reverse proxy needs—it works perfectly-fin on our side and we know it well. This made it the natural choice for orchestrating our migration to Cilium.&lt;/p&gt;
&lt;p&gt;To avoid making an ON/OFF migration, we leveraged HAProxy to make a progressive switch to our new Cilium cluster. We deployed a new layer of load balancing and ASG with HAProxy in front of our Kubernetes cluster with pre-defined weights between our blue and green clusters.
Our hybrid approach also gave us the flexibility to migrate traffic application by application rather than switching everything at once. By maintaining separate weight configurations for each API or service, we could independently control the traffic distribution for individual applications. This granular approach was a mandatory prerequisite to ensure stability and security throughout the migration.&lt;/p&gt;
&lt;p&gt;We could start with less critical services, validate Cilium’s performance in production with real traffic, and progressively move more sensitive applications only after gaining confidence. If an issue appeared with a specific application on the Cilium cluster, we could immediately roll back just that service while keeping others on the new infrastructure—significantly reducing blast radius and risk compared to an all-or-nothing migration strategy.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;/images/posts/2026-02-02-how-blue-green-helped-migrating-with-zero-downtime/image2.png&quot;&gt;&lt;/center&gt;
&lt;br&gt;
&lt;p&gt;In this architecture, each API is represented as an HAProxy backend with configurable weights that control traffic distribution between the blue and green clusters. By adjusting these backend weights, we can progressively increase traffic to the new cluster or instantly rollback if needed with a simple update of our Terraform state.&lt;/p&gt;
&lt;p&gt;Importantly, this load balancing layer added negligible latency to our response times, giving us confidence to proceed.&lt;/p&gt;
&lt;h2 id=&quot;deploying-and-synchronizing-applications-on-both-clusters-&quot;&gt;Deploying and synchronizing applications on both clusters &lt;a name=&quot;DeploySynchronizeApplications&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#deploying-and-synchronizing-applications-on-both-clusters-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A critical challenge in our migration strategy was ensuring application parity between clusters. Without a centralized orchestration tool to manage deployments across all environments globally, we needed to adapt our existing processes.&lt;/p&gt;
&lt;p&gt;At Bedrock, we use a common CI/CD workflow shared by all development teams to build and deploy their applications to Kubernetes. Our first step was updating this workflow to deploy applications to both clusters simultaneously. This ensured that all workloads remained synchronized between blue and green environments at all times.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;/images/posts/2026-02-02-how-blue-green-helped-migrating-with-zero-downtime/image3.png&quot;&gt;&lt;/center&gt;
&lt;br&gt;
&lt;p&gt;However, not all projects follow the same deployment cadence. Some applications are rarely redeployed, which meant we couldn’t rely solely on the CI/CD pipeline to synchronize everything. We had to manually verify that all projects were deployed and ready to receive traffic on both clusters before proceeding with traffic shifting.&lt;/p&gt;
&lt;p&gt;This manual overhead highlighted the need for a more automated approach. To address this, we introduced a specific annotation to our Helm releases. This annotation is consumed by a workflow we developed, which can automatically redeploy releases from one cluster to another. This would significantly accelerates synchronization and will prove invaluable for any future blue/green migrations—whether for CNI changes, Kubernetes upgrades, or other infrastructure evolutions.&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;/images/posts/2026-02-02-how-blue-green-helped-migrating-with-zero-downtime/image4.png&quot;&gt;&lt;/center&gt;
&lt;br&gt;
&lt;h2 id=&quot;consul-powered-configuration-update-&quot;&gt;Consul powered configuration update &lt;a name=&quot;ConsulPoweredConfUpdate&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#consul-powered-configuration-update-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;But how do you update weights on the fly to advance the migration or rollback during issues?&lt;/p&gt;
&lt;p&gt;We leverage &lt;a href=&quot;https://developer.hashicorp.com/consul&quot;&gt;Consul&lt;/a&gt; to dynamically update our HAProxy configuration. Using &lt;a href=&quot;https://developer.hashicorp.com/consul/docs/automate/consul-template&quot;&gt;Consul-agent&lt;/a&gt; and Consul KV/Store, we synchronize all HAProxy configurations across our infrastructure:&lt;/p&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;/images/posts/2026-02-02-how-blue-green-helped-migrating-with-zero-downtime/image5.png&quot;&gt;&lt;/center&gt;
&lt;br&gt;
&lt;p&gt;When ready to migrate an application, we simply update the blue and green weights for that specific API in our Consul KV/Store. The Consul-template opens a persistent connection to the Consul server KV/Store and detects the change to its watched keys and triggers a hot reload of HAProxy via &lt;a href=&quot;https://www.haproxy.com/documentation/haproxy-runtime-api/&quot;&gt;the Runtime API&lt;/a&gt;, seamlessly shifting traffic distribution. Using the Runtime API saves us the need to execute HAProxy reload which could cause some loss of performance during high traffic events, same approach we use for our &lt;a href=&quot;https://tech.bedrockstreaming.com/2021/11/18/hsdo.html&quot;&gt;HSDO project&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;conclusion-&quot;&gt;Conclusion &lt;a name=&quot;Conclusion&quot;&gt;&lt;/a&gt;&lt;a href=&quot;#conclusion-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So to recap, here’s how we achieved our zero-downtime migration from VPC CNI to Cilium:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Deployed a new Kubernetes cluster&lt;/strong&gt; with Cilium as the CNI, running in parallel to our existing VPC CNI cluster&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set up HAProxy as a traffic orchestrator&lt;/strong&gt; in front of both clusters, with configurable weights to control traffic distribution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Leveraged Consul KV/Store&lt;/strong&gt; to manage HAProxy configuration dynamically, allowing us to adjust traffic weights on the fly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gradually shifted traffic&lt;/strong&gt; from the blue (VPC CNI) cluster to the green (Cilium) cluster, application by application&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitored KPIs closely&lt;/strong&gt; at each step to validate performance improvements and catch any potential issues early&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintained rollback capability&lt;/strong&gt; throughout the process by simply adjusting weights back to the blue cluster if needed&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This hybrid approach enabled us to migrate production workloads without service disruption while unlocking all the benefits of eBPF-powered networking.&lt;/p&gt;
&lt;p&gt;One significant advantage of this architecture is its reusability. The same HAProxy and Consul-based traffic orchestration can be leveraged for future infrastructure changes—such as upgrading to new Kubernetes versions. While we currently perform in-place upgrades, major version upgrades can be risky. With this pattern already in place, we can simply spin up a new cluster with the target Kubernetes version and progressively migrate traffic, significantly reducing the risk associated with potentially breaking changes.&lt;/p&gt;
&lt;p&gt;Potential enhancements to our solution include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automate weight adjustments&lt;/strong&gt; based on real-time metrics leveraging our monitoring stack &lt;a href=&quot;https://tech.bedrockstreaming.com/2022/09/06/monitoring-at-scale-with-victoriametrics.html&quot;&gt;Victoria Metrics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement automated rollback triggers&lt;/strong&gt; if error rates or latency thresholds are exceeded&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create a self-service interface&lt;/strong&gt; for teams to control their own application migrations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Target specific subsets of users&lt;/strong&gt; and enable sticky canaries, which will ensure that a subset of users are always redirected to our new cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Many thanks to all contributors, reviewers of this article and people who worked on this project, and especially to our beloved Lead at the time: &lt;a href=&quot;https://github.com/vgallissot&quot;&gt;Vincent Gallissot&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</content>
    <summary type="html">How can you hot change your CNI from VPC CNI to Cilium on your Kubernetes cluster with zero downtime in a production environment?</summary>
  </entry>
  <entry>
    <title type="html">Writing end-to-end tests for a Smart TV app</title>
    <link href="https://tech.bedrockstreaming.com/2025/12/23/tvjs-e2e-tests.html" rel="alternate" type="text/html" title="Writing end-to-end tests for a Smart TV app" />
    <published>2025-12-23T00:00:00+00:00</published>
    <updated>2025-12-23T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2025/12/23/tvjs-e2e-tests</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2025/12/23/tvjs-e2e-tests.html">&lt;p&gt;End-to-end can be challenging for focus-based interfaces like Smart TV apps that rely on LRUD (Left, Right, Up, Down) navigation. This article shares how the TVJS team overcame the instability in their Cypress test suite by incorporating focus-aware assertions and adapting testing strategies for directional navigation, leading to more reliable and trustworthy automated tests.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;At TVJS, we work on a Smart TV app. It’s a classic React app, but the user doesn’t interact with it in the same way they would on a typical desktop or mobile application. Instead, the app implements LRUD (Left, Right, Up, Down) navigation: users interact exclusively through directional keys on their remote control.&lt;/p&gt;
&lt;p&gt;For a while, the team had faced an issue: our end-to-end (e2e) tests were filled with flaky feature tests, polluting CIs with false negatives, forcing us to rely on retries and relaunching CI jobs. This eroded trust in our test suite and slowed down development.&lt;/p&gt;
&lt;h2 id=&quot;the-challenge-of-testing-lrud-navigation&quot;&gt;The Challenge of Testing LRUD Navigation&lt;a href=&quot;#the-challenge-of-testing-lrud-navigation&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;cypresss-built-in-stability&quot;&gt;Cypress’s built-in stability&lt;a href=&quot;#cypresss-built-in-stability&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.cypress.io/&quot;&gt;Cypress&lt;/a&gt;, our e2e testing tool of choice, includes powerful mechanisms that make tests stable out of the box. For pointer interactions, it automatically ensures the target element exists and is visible, and retries the action if the targeted element isn’t ready.&lt;/p&gt;
&lt;p&gt;These features make tests naturally resilient against network delays and rendering times, handling timing details so you can focus on the feature test. They also make tests
easier to write: when you know what behaviour to expect, Cypress handles the
timing details, allowing you to focus on the feature test.&lt;/p&gt;
&lt;h3 id=&quot;the-challenge-of-lrud-navigation&quot;&gt;The challenge of LRUD navigation&lt;a href=&quot;#the-challenge-of-lrud-navigation&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The trouble starts when we stop using pointer interactions and start testing keyboard-based LRUD navigation. Cypress can easily simulate remote key presses as keyboard events, but it has no idea what’s currently focused on the page and focus is everything in LRUD. Every navigation step is relative: pressing the &lt;code&gt;right&lt;/code&gt; key only makes sense if the correct item is focused before the key event.&lt;/p&gt;
&lt;p&gt;In a simple navigation test like:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;gherkin&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;gherkin&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Given &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I am on a program page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;When &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I press the right key twice&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;And &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I press the enter key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Then &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I should be on the clip n°3 page&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;A few things can go wrong:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The page is displayed, but the navigation system hasn’t finished its own initialization, so nothing is focused when Cypress sends the first key.&lt;/li&gt;
&lt;li&gt;Everything is ready, but Cypress fires &lt;code&gt;right&lt;/code&gt; and &lt;code&gt;right&lt;/code&gt; so fast that the navigation handler only processes one of them before the &lt;code&gt;enter&lt;/code&gt; key arrives.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The outcome of a navigation action is entirely dependent on which element was focused at the moment the key event was dispatched. A missing or incorrect focus leads to unpredictable navigation paths.&lt;/p&gt;
&lt;p&gt;This created for us a bad case of flaky tests in our CI: the test only passes when the timings perfectly aligned, which obviously is not a sustainable situation.&lt;/p&gt;
&lt;h3 id=&quot;explicit-focus-assertions&quot;&gt;Explicit Focus Assertions&lt;a href=&quot;#explicit-focus-assertions&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To solve this, we took inspiration from how Cypress stabilizes pointer interactions: before doing anything, confirm the app is in the expected state.&lt;/p&gt;
&lt;p&gt;For LRUD, the equivalent of “the element is ready” is “the correct element is focused.” So we added explicit focus assertions before and after every navigation step.&lt;/p&gt;
&lt;p&gt;The same test now looks like this:&lt;/p&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;gherkin&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;gherkin&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Given &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I am on a program page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Then &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;Item 1 of block 1 should be focused&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;When &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I press the right key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Then &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;Item 2 of block 1 should be focused&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;When &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I press the right key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Then &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;Item 3 of block 1 should be focused&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;And &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I press the enter key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;Then &lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;I should be on the clip n°3 page&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;These &lt;code&gt;X should be focused&lt;/code&gt; assertions are implemented using &lt;a href=&quot;https://docs.cypress.io/api/commands/get&quot;&gt;&lt;code&gt;cy.get()&lt;/code&gt;&lt;/a&gt;, which brings Cypress’s built-in retry and timeout mechanisms to our focus checks. It gives us the same stability guarantees as standard pointer interactions: if the focus isn’t ready yet, Cypress waits and retries until it is or times out.&lt;/p&gt;
&lt;p&gt;This version is massively more robust because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We never send a navigation key unless we’ve confirmed the app is ready for it.&lt;/li&gt;
&lt;li&gt;Every navigation step is validated, so if something goes wrong, we catch the error immediately instead of cascading into unrelated failures.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The test no longer relies on internal timing or initialization sequences. Only on deterministic focus transitions.&lt;/p&gt;
&lt;p&gt;In practice, this eliminated nearly all flaky tests, but introduced a new complexity in test writing: developers had to know about this layer of assertions to add and remember to write tests this way.&lt;/p&gt;
&lt;h2 id=&quot;enforcing-consistency-with-linting&quot;&gt;Enforcing Consistency with Linting&lt;a href=&quot;#enforcing-consistency-with-linting&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After the initial round of test stabilisation, flakiness returned with every test written by developers unaware of this quirkiness of LRUD app testing.
Since our Gherkin tests are ultimately just code, the obvious solution was the same as for any coding convention:
&lt;strong&gt;lint it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We used &lt;a href=&quot;https://github.com/vsiakka/gherkin-lint&quot;&gt;gherkin-lint&lt;/a&gt;. It’s a tool used by other teams in the company and supports custom rules. We wrote a custom rule to enforce our navigation discipline.&lt;/p&gt;
&lt;p&gt;The rule is simple and strict: any step that triggers LRUD navigation (“I press the X key”) must be immediately followed by a focus assertion (“X should be focused”).&lt;/p&gt;
&lt;p&gt;To implement this, the rule parses feature files line by line, keeps track of the last “effective step,” handles chaining with “And”, and flags any navigation step that isn’t followed by a matching assertion.&lt;/p&gt;
&lt;h2 id=&quot;beyond-should-be-focused&quot;&gt;Beyond “Should be Focused”&lt;a href=&quot;#beyond-should-be-focused&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;X should be focused&lt;/code&gt; assertion is effective and easy to lint, but verbose. We also introduced other utilities to cover more scenarios:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Navigate X direction to X&lt;/code&gt;: This action combines the navigation step with the final focus check. By specifying the end goal, we ensure the action itself is successful. Although it doesn’t validate the initial focus, it significantly improves stability by verifying the outcome of the action.&lt;/li&gt;
&lt;li&gt;Player state assertions: In a streaming app, focus isn’t the only state that matters. We also validate player states (&lt;code&gt;should be playing&lt;/code&gt;, &lt;code&gt;should be at X progress&lt;/code&gt;, …) after keyboard actions. Our lint rule accepts these as valid post-navigation assertions, ensuring that key presses have the expected effect on the media player.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a href=&quot;#conclusion&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Testing LRUD navigation exposes a gap: Cypress is great at handling UI interactions that target DOM elements directly, but it has no built-in understanding of focus state or navigation flow. In a Smart TV app, where everything depends on which item is focused at each step, that gap becomes the main source of flaky tests.&lt;/p&gt;
&lt;p&gt;By adding explicit focus assertions before and after every navigation action, we give Cypress the information it needs to stay in sync with the app. The tests become deterministic and failures point to real issues. We now trust our tests, and while we still monitor stability with weekly “no-retry” runs, they are finally working for us, not against us.&lt;/p&gt;
&lt;p&gt;Enforcing this pattern with linting sealed the deal to get rid of tests derailing and give us confidence back in our tests.&lt;/p&gt;</content>
    <summary type="html">REX on stabilising end-to-end tests for a focused based app, using Cypress.</summary>
  </entry>
  <entry>
    <title type="html">Switching from Babel to SWC: Balancing performance with modern tools and legacy code</title>
    <link href="https://tech.bedrockstreaming.com/2025/12/22/switching-from-babel-to-swc.html" rel="alternate" type="text/html" title="Switching from Babel to SWC: Balancing performance with modern tools and legacy code" />
    <published>2025-12-22T00:00:00+00:00</published>
    <updated>2025-12-22T00:00:00+00:00</updated>
    <id>https://tech.bedrockstreaming.com/2025/12/22/switching-from-babel-to-swc</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2025/12/22/switching-from-babel-to-swc.html">&lt;p&gt;Ever since websites started being made essentially from JavaScript, transpiling this code to run in the largest number of different browsers has been an essential step in the build process. From the very beginning, more than ten years ago, the BedrockStreaming web application has relied on &lt;a href=&quot;https://babeljs.io/&quot;&gt;Babel&lt;/a&gt; for this task. This year we migrated from Babel to its next-gen replacement, &lt;a href=&quot;https://swc.rs/&quot;&gt;SWC&lt;/a&gt;. It was not a smooth ride all the way, so let’s see what challenges we’ve had to overcome and if the payoff was worth the effort!&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;️-transpilation--whats-that-about-&quot;&gt;⚙️ Transpilation !? What’s that about ?&lt;a href=&quot;#%EF%B8%8F-transpilation--whats-that-about-&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br&gt;
&lt;p&gt;Generally, transpilation is the process by which you take some source code, transform it, and output a transformed version of source code (opposed to compilation where you output lower-level code than your source code).&lt;/p&gt;
&lt;p&gt;In the JavaScript/web context, this means taking your code and transforming it into another version of the same language. But what is the point of transforming code into code?&lt;/p&gt;
&lt;p&gt;The modern JavaScript code we write often uses features that aren’t supported in all environments. For example, older browsers that we want to support don’t implement every new syntax we are using. Another use case is server-side code, on the Node.js side we sometimes end up using modules or JSX in files that the runtime still expects in CommonJS. All-in-all, the transpilation transforms our newest syntax into older/more standard syntax that is supported in more environments.&lt;/p&gt;
&lt;p&gt;Most transpilers use a &lt;strong&gt;plugin-based architecture&lt;/strong&gt;: the core library is responsible only for parsing source code into an AST (Abstract Syntax Tree), performing the most common transformations (down-leveling the code to be compatible with older browsers for instance) and generating output code. All additional (more specific) transformations are handled by individual plugins, which are installed manually and added to the configuration. This separation of concerns allows easy customization and lets the community contribute new plugins without touching the core code. In other words, in modern transpilers, &lt;strong&gt;most custom code transformations are done via plugins.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Over the years, as the web technologies evolved, countless transformations have been added to the transpilation step. At BedrockStreaming, the transpiler handles all modern syntax, converting ESM to CJS modules, transforming TypeScript into JavaScript, transforming JSX into JS, etc., making it a cornerstone of our build process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So the question isn’t whether we transpile or not, but how.&lt;/strong&gt;&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;-the-starting-point-babel&quot;&gt;📦 The starting point: Babel&lt;a href=&quot;#-the-starting-point-babel&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br&gt;
&lt;p&gt;&lt;strong&gt;Babel is the first JavaScript transpiler&lt;/strong&gt;, created to enable developers to write modern JavaScript code that could run in older browsers. &lt;strong&gt;Our project, &lt;a href=&quot;https://tech.bedrockstreaming.com/comment-ne-pas-jeter-son-application-frontend-tout-les-deux-ans&quot;&gt;now over 10 years old&lt;/a&gt;, has relied on Babel from the start&lt;/strong&gt;, a solid choice built on robustness and flexibility. Being a 10-year-old tool is both a curse and a blessing! Because of its huge community, Babel can do almost anything: for nearly every need, there is a well-maintained and documented plugin available, and when you need to go off the beaten path, its API allows very specific and custom transformations. For a long time, this foundation was a real advantage, reliable, extensible, and almost indispensable for handling the transpilation of a complex project.&lt;/p&gt;
&lt;p&gt;In Babel, all transformations happen through &lt;strong&gt;presets&lt;/strong&gt; and &lt;strong&gt;plugins&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ &lt;strong&gt;Plugins&lt;/strong&gt; are pieces of code which perform a single transformation on a piece of code. A typical Babel pipeline consists of several plugins which sequentially transform the input source code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ &lt;strong&gt;Presets&lt;/strong&gt; are plugins that are grouped together for convenience in order to fill a more general use case. For example, &lt;code&gt;@babel/preset-env&lt;/code&gt; compiles modern JavaScript for the targeted browsers, &lt;code&gt;@babel/preset-react&lt;/code&gt; handles JSX, and &lt;code&gt;@babel/preset-typescript&lt;/code&gt; transpiles TypeScript. Each of those presets actually return a group of individual plugins, which are then applied sequentially to transform the code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The architecture of Babel allows us to enable different sets of plugins depending on the environment to achieve optimal bundle size/build time/developer experience. For instance, on top of all the traditional transformations (TypeScript, JSX, preset-env…), here are some plugins we enable only conditionally:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In development:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;react-refresh/babel&lt;/code&gt; to enable Hot Module Replacement and improve the Developer eXperience (DX)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;In production:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code splitting via &lt;code&gt;@loadable/babel-plugin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Removal of attributes like &lt;code&gt;data-testid&lt;/code&gt; with &lt;code&gt;react-remove-properties&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Removal of PropTypes with &lt;code&gt;transform-react-remove-prop-types&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;img src=&quot;/images/posts/2025-12-22-switching-from-babel-to-swc/babel-process.png&quot; alt=&quot;Scripts execute during render phase too&quot; style=&quot;border-radius: 8px; display: block; margin: 0 auto; padding: 0px;&quot;&gt;
&lt;br&gt;
&lt;p&gt;On the flip side, when we started looking more closely at our bundler, Webpack, compilation times, the limits of Babel became obvious. A quick analysis showed that &lt;code&gt;babel-loader&lt;/code&gt; alone accounted for roughly &lt;strong&gt;50% of the total build time&lt;/strong&gt; (around 35 seconds out of a 1-minute build). In other words, even if everything else were optimized, transpilation would still remain our main bottleneck.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ In a Webpack-based setup, &lt;strong&gt;most of the transpilation work happens inside loaders&lt;/strong&gt;. Webpack itself is responsible for building the dependency graph, but every file then goes through one or more loaders to be transformed before being bundled.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In our case, babel-loader sits on the hot path of the build: every JavaScript file passes through it (at the time of writing this article, we have almost &lt;strong&gt;5,000&lt;/strong&gt; JavaScript/TypeScript files in our project). This makes it one of the most impactful pieces of the pipeline in terms of performance. Optimizing this step, or replacing it with a faster alternative, is where the biggest gains can be achieved.&lt;/p&gt;
&lt;p&gt;The long build time has a lot of implications: it is more costly in CI time, but above all, it translates to longer start times for our local development servers, which was starting to become a huge pain point as the application grew more and more with start times upwards of a minute. Since builds happen constantly—every time a developer starts their local environment, on every CI pipeline run, and during deployments—even small improvements compound into significant time savings across the entire team and infrastructure.&lt;/p&gt;
&lt;p&gt;We were faced with a trade-off: continue benefiting from Babel’s massive ecosystem, or look for something significantly faster to improve compilation speed. Since our goal was clear: a better DX and higher performance, the question naturally arose.&lt;/p&gt;
&lt;p&gt;This is where &lt;strong&gt;SWC (Speedy Web Compiler)&lt;/strong&gt; comes in. SWC is an extensible, Rust-based platform for the next generation of fast developer tools, already widely adopted by modern frameworks and companies. It is positioned as a much faster alternative to Babel, with a simple promise: “SWC is 20x faster than Babel on a single thread and 70x faster on four cores.” More than enough to seriously question our existing stack and justify exploring a migration to a compiler designed from the ground up for performance.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;️-the-proptypes-issue-missing-remove-prop-types-support&quot;&gt;⚠️ The PropTypes issue: missing remove-prop-types support&lt;a href=&quot;#%EF%B8%8F-the-proptypes-issue-missing-remove-prop-types-support&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br&gt;
&lt;p&gt;One limitation we quickly ran into was the lack of support for removing PropTypes in SWC. This became a problem because PropTypes, while largely deprecated in modern React applications, were still present in parts of our legacy codebase. Without stripping them, our production bundles remained unnecessarily large, and build times were impacted.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ &lt;code&gt;prop-types&lt;/code&gt; is a legacy React library created to help type the props of React components. It has been deprecated since 2017 in favor of using TypeScript.
The library allows you to declare the propTypes for a component in this way:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure class=&quot;code-block&quot;&gt;&lt;figcaption class=&quot;code-bar&quot;&gt;&lt;span class=&quot;code-name&quot;&gt;jsx&lt;/span&gt;&lt;button class=&quot;code-copy&quot; type=&quot;button&quot;&gt;Copy&lt;/button&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code bedrock&quot; style=&quot;background-color:#000000;color:#FAF8F8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;jsx&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;MyComponent.propTypes &lt;/span&gt;&lt;span style=&quot;color:#50F1D7&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  propA: PropTypes.string,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;  propB: PropTypes.number.isRequired,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FAF8F8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;It is this kind of code (only useful during development) that we want to remove from our production code.&lt;/p&gt;
&lt;p&gt;SWC’s core is written in Rust and compiled into a native binary executed by Node.js. Plugins are also written in Rust, but they are compiled to WebAssembly (WASM), producing a single portable file that can run anywhere in a sandboxed environment. This architecture makes SWC extremely fast and portable, but it also means that features available in older transpilers (like Babel) may not exist yet.&lt;/p&gt;
&lt;p&gt;Our specific issue is that &lt;strong&gt;there is no WASM plugin in SWC to strip PropTypes&lt;/strong&gt;. PropTypes were effectively deprecated in 2017, so SWC being a modern transpiler doesn’t include this functionality out of the box. We found ourselves in a very specific case: trying to transpile a legacy app with cutting-edge tooling. It looks like we were not the only ones with this issue, the author of the Babel plugin to strip PropTypes opened an issue in 2021 exactly for this: &lt;a href=&quot;https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/issues/201#top&quot;&gt;SWC support&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At this point, we were faced with a frustrating dilemma: either renouncing and waiting for our codebase to be ready for the SWC migration, or trying to circumvent the issue to deliver the DX improvement as soon as possible. Here are the solutions we tried out.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;-the-solutions-we-evaluated&quot;&gt;💡 The solutions we evaluated&lt;a href=&quot;#-the-solutions-we-evaluated&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br&gt;
&lt;h3 id=&quot;️-option-1---removing-all-proptypes-from-the-codebase&quot;&gt;🗑️ Option 1 - Removing all PropTypes from the codebase&lt;a href=&quot;#%EF%B8%8F-option-1---removing-all-proptypes-from-the-codebase&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We initially considered simply dropping the library and removing all PropTypes in one shot. While this sounds somewhat ambitious for a large project, the PR would have been straightforward to review. Since we had started migrating parts of the codebase to TypeScript, we were on our way to removing the library anyway, albeit at our own pace.&lt;/p&gt;
&lt;p&gt;This approach offers the “simplest” migration path from a technical standpoint and requires only a one-time effort with no ongoing maintenance afterward. It also results in a cleaner codebase because removing the library is our end goal anyway.&lt;/p&gt;
&lt;p&gt;However, while this would require moderate effort, &lt;strong&gt;dropping PropTypes without adding TypeScript typing is risky,&lt;/strong&gt; as it degrades the developer experience and could introduce bugs. There is also a potential regression risk during the removal process, and the change creates a large pull request surface area, which increases the review burden for the team.&lt;/p&gt;
&lt;br&gt;
&lt;h4 id=&quot;-why-we-didnt-choose-this&quot;&gt;❌ Why we didn’t choose this&lt;a href=&quot;#-why-we-didnt-choose-this&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;After reflection and team discussions, we abandoned this approach given the extensive codebase. Even though the changes would have been theoretically simple to review, &lt;strong&gt;the sheer size of the PR&lt;/strong&gt; could have potentially introduced unexpected regressions that would be difficult to trace.&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;-option-2---understanding-modernjs-wasm-plugins-vs-js-re-implementations&quot;&gt;🔌 Option 2 - Understanding ModernJS: WASM plugins vs JS re-implementations&lt;a href=&quot;#-option-2---understanding-modernjs-wasm-plugins-vs-js-re-implementations&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Because there are no official prop-types plugins for SWC we looked for community plugins. We found one in &lt;a href=&quot;https://github.com/web-infra-dev/swc-plugins&quot;&gt;swc-plugins&lt;/a&gt;, a plugins library for &lt;a href=&quot;https://github.com/web-infra-dev/modern.js&quot;&gt;&lt;code&gt;Modern.js&lt;/code&gt;&lt;/a&gt;, an open-source web framework created by ByteDance.&lt;/p&gt;
&lt;p&gt;This library has a system of extensions, which are plugins ported from Babel, and one of these extensions is &lt;code&gt;reactUtils&lt;/code&gt;. It features a &lt;code&gt;removePropTypes&lt;/code&gt; option, so it looks like exactly what we were looking for!&lt;/p&gt;
&lt;p&gt;We looked for a way to implement the plugin into our new SWC stack but we had a hard time simply plugging the plugin. This is because &lt;strong&gt;&lt;code&gt;swc-plugins&lt;/code&gt; is actually a re-implementation of SWC&lt;/strong&gt;: it’s a JS wrapper over SWC-core with a fixed set of available plugins. We were not the only ones to simply want the SWC plugin without the whole re-implementation, an &lt;a href=&quot;https://github.com/web-infra-dev/swc-plugins/issues/214&quot;&gt;issue&lt;/a&gt; was actually opened in &lt;code&gt;swc-plugins&lt;/code&gt; since a year without any response.&lt;/p&gt;
&lt;p&gt;We still tried to implement the standalone transpiler like in the docs, but quickly it was obvious that this would be an alternative to vanilla SWC and not a plugin. We were actually adding a whole new transpiler to our application!&lt;/p&gt;
&lt;p&gt;We tried to make it work this way, but we soon found another issue: &lt;strong&gt;we couldn’t use official SWC plugins with this new compiler&lt;/strong&gt;. This was a major blocker for us because we already need some official plugins that are not available in the &lt;code&gt;swc-plugins&lt;/code&gt; compiler, like &lt;code&gt;plugin-react-remove-properties&lt;/code&gt; to strip &lt;code&gt;data-testid&lt;/code&gt; attributes from our production builds. Moreover, it didn’t give us a lot of trust towards this stack and its future evolution: we were basically locking ourselves out of all the official and community plugins to use a compiler from a repository with 64 stars and no activity since September ‘24.&lt;/p&gt;
&lt;p&gt;To sum it up, we lost a bit of time trying to make this solution work because the &lt;code&gt;swc-plugins&lt;/code&gt; repo is pretty well referenced and it looks exactly like a collection of plugins for any SWC users (even though it was made for &lt;code&gt;Modern.js&lt;/code&gt;). It turns out that it is a very specific tool almost only used for &lt;code&gt;Modern.js&lt;/code&gt; and it isn’t suited for people using a normal SWC stack.&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;-option-3---writing-the-missing-plugin-in-rust&quot;&gt;🦀 Option 3 - Writing the missing plugin in Rust&lt;a href=&quot;#-option-3---writing-the-missing-plugin-in-rust&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Another solution we tried was to prototype a PropTypes removal plugin in Rust that would be compatible with SWC.&lt;/p&gt;
&lt;p&gt;This was quite challenging since &lt;strong&gt;we’re not Rust developers&lt;/strong&gt; 😅. We had to move fast and see how far we could get by creating a POC with Cursor. The first step was to analyze what &lt;code&gt;babel-plugin-transform-remove-prop-types&lt;/code&gt; was doing. The entire logic was contained in a few source files, which we used to prompt the agent to translate into Rust.
After reading the SWC documentation on &lt;a href=&quot;https://swc.rs/docs/plugin/ecmascript/getting-started&quot;&gt;how to write a plugin&lt;/a&gt;, setting up the environment, and initializing a new plugin project with Cargo, we began iterating with Cursor. We achieved a POC that works very similarly to the Babel plugin in a short amount of time.&lt;/p&gt;
&lt;p&gt;However, the challenges with this approach are the ongoing development investment and, more importantly, the time needed to build a clean and well-tested plugin. Since we’re not Rust developers, &lt;strong&gt;building and maintaining this codebase could become costly&lt;/strong&gt;, even with agent assistance. We would also need feedback from the SWC Rust developers through the &lt;a href=&quot;https://github.com/swc-project/swc&quot;&gt;swc-project repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We plan to contribute this plugin to the community repository so it can be reviewed, merged and hopefully maintained by developers with real Rust expertise. We’re planning to move forward on this in the coming months.&lt;/p&gt;
&lt;p&gt;In the meantime, we needed an alternative to avoid being blocked.&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;-option-4-chosen---using-a-hybrid-setup-with-babel--swc&quot;&gt;🤝 Option 4 (chosen) - Using a hybrid setup with Babel + SWC&lt;a href=&quot;#-option-4-chosen---using-a-hybrid-setup-with-babel--swc&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the end, we took a step back and reconsidered the problem: we had tried three alternative solutions to overcome the issue of removing propTypes from our production build. This proved very costly, if not outright impossible. We thus had to find a compromise: taken individually, &lt;strong&gt;removing propTypes is a minimal transformation compared to the 50+ other transformations&lt;/strong&gt; we apply to our JavaScript files. What if we kept Babel only for this transformation and still migrated to SWC for all the other transformations?&lt;/p&gt;
&lt;p&gt;The implementation of this double setup was actually made fairly easy by leveraging Webpack loaders. In our webpack configuration for JavaScript files, we specify two different loaders. Babel-loader goes first and only removes prop-types (very importantly, it doesn’t perform any other transformation and returns untransformed files except for prop-types removal). Then the SWC loader takes the output of babel-loader and performs all the transformations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Babel-loader is only enabled for prod builds&lt;/strong&gt; in order to keep the dev experience as smooth as possible.&lt;/p&gt;
&lt;p&gt;This has a cost, of course, because there is the overhead of running all files through both Babel and SWC, but overall we expected an improvement in performance, only slightly less than what we could have achieved running only SWC.&lt;/p&gt;
&lt;p&gt;What’s more, &lt;strong&gt;this hybrid setup is a temporary solution&lt;/strong&gt; while we finish migrating away from &lt;code&gt;prop-types&lt;/code&gt;, so we were looking for a solution that would allow us to bring the build time improvements as quick as possible, even if the setup isn’t definitive and will be tweaked in the future.&lt;/p&gt;
&lt;br&gt;
&lt;img src=&quot;/images/posts/2025-12-22-switching-from-babel-to-swc/final-process.png&quot; alt=&quot;Scripts execute during render phase too&quot; style=&quot;border-radius: 8px; display: block; margin: 0 auto; padding: 0px;&quot;&gt;
&lt;br&gt;
&lt;h2 id=&quot;-benchmark-results&quot;&gt;📊 Benchmark results&lt;a href=&quot;#-benchmark-results&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ For the SWC part, we measure SWC here without removing PropTypes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;h3 id=&quot;️-build-times-without-cache&quot;&gt;🏗️ Build times (without cache)&lt;a href=&quot;#%EF%B8%8F-build-times-without-cache&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;br&gt;
&lt;div style=&quot;display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin: 20px 0;&quot;&gt;
  &lt;div style=&quot;flex: 1; min-width: 300px; max-width: 50%;&quot;&gt;
    &lt;img src=&quot;/images/posts/2025-12-22-switching-from-babel-to-swc/build-performance.png&quot; alt=&quot;Build performance benchmark&quot; style=&quot;border-radius: 8px; width: 100%; padding: 0px;&quot;&gt;
  &lt;/div&gt;
  &lt;div style=&quot;flex: 1; min-width: 300px; max-width: 50%;&quot;&gt;
    &lt;img src=&quot;/images/posts/2025-12-22-switching-from-babel-to-swc/dev-build-performance.png&quot; alt=&quot;Dev build performance benchmark&quot; style=&quot;border-radius: 8px; width: 100%; padding: 0px;&quot;&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;Production builds improved significantly: &lt;strong&gt;77.4s (Babel) → 55s (hybrid SWC + Babel) → 40.4s (pure SWC)&lt;/strong&gt;. Development builds saw even more dramatic gains: &lt;strong&gt;dev server 54.5s → 14.1s&lt;/strong&gt; and &lt;strong&gt;dev client 27.4s → 15s&lt;/strong&gt;. Even with our hybrid approach, SWC delivers substantially faster builds.&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;-bundle-sizes&quot;&gt;📦 Bundle sizes&lt;a href=&quot;#-bundle-sizes&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;br&gt;
&lt;div style=&quot;display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin: 20px 0;&quot;&gt;
  &lt;div style=&quot;flex: 1; min-width: 300px; max-width: 50%;&quot;&gt;
    &lt;img src=&quot;/images/posts/2025-12-22-switching-from-babel-to-swc/bundle-size.png&quot; alt=&quot;Bundle size comparison&quot; style=&quot;border-radius: 8px; width: 100%; padding: 0px;&quot;&gt;
  &lt;/div&gt;
  &lt;div style=&quot;flex: 1; min-width: 300px; max-width: 50%;&quot;&gt;
    &lt;img src=&quot;/images/posts/2025-12-22-switching-from-babel-to-swc/bundle-analysis.png&quot; alt=&quot;Bundle analysis&quot; style=&quot;border-radius: 8px; width: 100%; padding: 0px;&quot;&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When looking at the bundle size graph, the difference is actually quite small (&lt;strong&gt;1 MiB&lt;/strong&gt;): using SWC without stripping PropTypes results in a bundle that is only slightly larger than our hybrid setup combining SWC and Babel. On paper, this might suggest that the additional complexity is not strictly necessary.&lt;/p&gt;
&lt;p&gt;However, we deliberately chose to prioritize bundle size over development-time convenience. Production bundles are what ultimately get shipped to users, and keeping them as lean as possible is both a performance and a cleanliness concern. PropTypes are a development-time safety net; they provide no value in production and should not end up in the final bundle. Leaving them in, even with a marginal size impact, means knowingly shipping dead code.&lt;/p&gt;
&lt;p&gt;From our perspective, this is less about chasing a few kilobytes and more about maintaining a clean production pipeline. Even if the gains are small today, enforcing this separation keeps the build process explicit, predictable, and aligned with how the code is meant to be used.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;-next-steps&quot;&gt;🚀 Next steps?&lt;a href=&quot;#-next-steps&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br&gt;
&lt;p&gt;Looking ahead, there are a few clear steps to further improve our setup.&lt;/p&gt;
&lt;p&gt;One of the first improvements we plan to adopt is &lt;a href=&quot;https://swc.rs/docs/usage/jest&quot;&gt;&lt;code&gt;@swc/jest&lt;/code&gt;&lt;/a&gt;. By replacing the default JavaScript-based Jest runner (like &lt;code&gt;ts-jest&lt;/code&gt;) with this drop-in Rust replacement, our tests can run significantly faster. SWC’s Rust/WASM architecture makes it possible to apply the same transformations much more efficiently, which should reduce overall CI times and improve the feedback loop for developers.&lt;/p&gt;
&lt;p&gt;On a longer-term horizon, we also plan to remove the remaining parts of the legacy PropTypes code. The migration has been designed in a way that makes it easy to phase out the remaining Babel setup once these PropTypes are gone. Even with this hybrid setup for now, the performance gains are already significant, and the codebase is noticeably more efficient.&lt;/p&gt;
&lt;p&gt;It’s also worth mentioning that SWC’s documentation can be limited when it comes to more specific or advanced use cases. A big part of this migration involved experimentation, reading source code, and validating assumptions through benchmarks. We hope this article can help others facing similar constraints and reduce some of the friction we encountered along the way.&lt;/p&gt;
&lt;p&gt;Throughout this process, our goal was clear: push developer experience as far as possible without compromising the quality of the final production bundle. And while this migration alone already delivers strong gains, it really starts to shine when combined with other optimizations, such as smarter caching strategies. &lt;strong&gt;More on that in a follow-up article.&lt;/strong&gt;&lt;/p&gt;</content>
    <summary type="html">From Babel to SWC: our journey of migrating from a 10-year-old transpiler to a next-gen compiler, overcoming challenges and achieving build performance improvements.</summary>
  </entry>
</feed>
