<?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-05T01:11:40+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: the future of security, from human analysis to AI agents</title>
    <link href="https://tech.bedrockstreaming.com/2026/12/08/reinvent-2026-future-of-security.html" rel="alternate" type="text/html" title="re:Invent 2026: the future of security, from human analysis to AI agents" />
    <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-future-of-security</id>
    <content type="html" xml:base="https://tech.bedrockstreaming.com/2026/12/08/reinvent-2026-future-of-security.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;For decades, security was built for humans: telemetry, queries, dashboards and alerts that a person reads and acts on. What happens when software, and attackers, move at machine speed? This was the question of &lt;strong&gt;“The Future of Security”&lt;/strong&gt; (SEC001), the mainstage session that opened the first ever Security Day at AWS re:Invent 2026 in Las Vegas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Chet Kapoor&lt;/strong&gt;, VP of Security, Search and Observability at AWS, spent the first 20 minutes on the shifts he sees in the industry, after talking with about 150 CISOs over the past year. He then hosted a panel with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Evan McHenry&lt;/strong&gt;, CISO and VP at Robinhood Markets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Derek Bush&lt;/strong&gt;, CISO and SVP at Infor&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunil Potti&lt;/strong&gt;, SVP and GM Security, Observability and Data Platform at Cisco&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Michael D’Angelo&lt;/strong&gt;, Member of Technical Staff, Cyber, at OpenAI&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The thread running through the session: security is moving from human analysis to AI agents that act on their own, but the human does not leave. The human moves from approving every action to setting the boundaries agents work within.&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 Chet Kapoor. All credit for the ideas and examples goes to the speakers, their companies and AWS.&lt;/p&gt;
&lt;/aside&gt;
&lt;hr&gt;
&lt;h2 id=&quot;part-1-five-shifts-redefining-security&quot;&gt;Part 1: five shifts redefining security&lt;a href=&quot;#part-1-five-shifts-redefining-security&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Chet opened with a question: is our biggest threat the attacker, or the way we run security? His answer: both. Attackers are faster than ever, and the way enterprises organize security has not kept up.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-future-of-security/five-shifts.png&quot; alt=&quot;Five shifts redefining security&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;1-from-finding-vulnerabilities-to-eliminating-risks&quot;&gt;1. From finding vulnerabilities to eliminating risks&lt;a href=&quot;#1-from-finding-vulnerabilities-to-eliminating-risks&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Everybody already had a backlog of vulnerabilities. With AI, finding vulnerabilities got much easier, so the backlog got bigger, and it keeps growing every day. The focus now has to be on &lt;strong&gt;fixing&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To know whether you are getting better, you need the right metric. The one Chet proposed is not the number of vulnerabilities, but &lt;strong&gt;exploitable risk eliminated per engineering hour&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;2-from-teams-to-outcomes&quot;&gt;2. From teams to outcomes&lt;a href=&quot;#2-from-teams-to-outcomes&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-future-of-security/teams-vs-outcomes.png&quot; alt=&quot;Teams vs. outcomes: the attack moves through the gaps between teams&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Inside a company, security is split between infrastructure, application, SRE, SOC and IT teams. When one team needs something from another, it opens a ticket and waits. Attackers do not work like this. They organize around one outcome (find a vulnerability, get access, deploy ransomware, get paid), and AI lets them do it with fewer and fewer people. The attack moves through the gaps between teams.&lt;/p&gt;
&lt;p&gt;The answer is &lt;strong&gt;defensive workflows that run continuously and across organizational boundaries&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;3-from-identity-to-intent&quot;&gt;3. From identity to intent&lt;a href=&quot;#3-from-identity-to-intent&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-future-of-security/identity-to-intent.png&quot; alt=&quot;Identity to intent: every check passes, and the payment is still stolen&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We always told software &lt;strong&gt;how&lt;/strong&gt; to do things. With agents, we tell them &lt;strong&gt;what&lt;/strong&gt; to do, and they figure out the how. This makes their intent harder to know. In the example on the slide, the agent is authenticated, authorized and sends a valid request. It then reads a supplier document with a hidden instruction, and a payment is rerouted and stolen.&lt;/p&gt;
&lt;p&gt;Registering agents is not enough. You need to understand what an agent intends to do, because without that you cannot define its guardrails. The tools named: &lt;strong&gt;ephemeral credentials, scoped access and intent evaluation&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;4-from-periodic-tests-to-continuous-evidence&quot;&gt;4. From periodic tests to continuous evidence&lt;a href=&quot;#4-from-periodic-tests-to-continuous-evidence&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pen tests, red teaming and audits are useful, but they are snapshots. With the pace at which code is now written with AI, the system is “a movie, not a snapshot”. Testing, fixing and verifying must happen in &lt;strong&gt;one continuous loop&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;5-from-controlling-technology-to-governing-autonomy&quot;&gt;5. From controlling technology to governing autonomy&lt;a href=&quot;#5-from-controlling-technology-to-governing-autonomy&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-future-of-security/governing-autonomy.png&quot; alt=&quot;Controlling technology vs. governing autonomy&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Classic software waits for humans. An agent plans and acts on its own. If you try to control every step, you are not really using AI, you are using it as classic software. If you give it blanket permissions, you take a risk. Chet’s answer: &lt;strong&gt;agent security is about setting the boundaries of autonomy&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;building-security-software-for-agents&quot;&gt;Building security software for agents&lt;a href=&quot;#building-security-software-for-agents&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Software development already moves at the speed of AI. According to Chet, an average developer works with 4 to 14 agents, and developers at AWS with 8 to 14. The question AWS asked itself: does security software move at the same speed?&lt;/p&gt;
&lt;h3 id=&quot;two-architectures&quot;&gt;Two architectures&lt;a href=&quot;#two-architectures&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-future-of-security/humans-to-agents.png&quot; alt=&quot;From dashboards for humans to actions by agents&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The world we come from is &lt;strong&gt;telemetry, storage, queries and dashboards, for humans&lt;/strong&gt;. It has worked well. The new world is &lt;strong&gt;telemetry, context, reasoning and action, by agents&lt;/strong&gt;. AWS will keep building for both, but they are two different architectures, and architecture is in the DNA of a product: you cannot simply turn one into the other.&lt;/p&gt;
&lt;h3 id=&quot;automation-is-not-autonomy&quot;&gt;Automation is not autonomy&lt;a href=&quot;#automation-is-not-autonomy&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If there was one thing to remember from his talk, Chet said, it was the difference between the two words people often use as synonyms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automation&lt;/strong&gt; is about automating a workflow that a human designed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autonomy&lt;/strong&gt; is about the system doing the work without a human driving each step.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We must keep automating everything we can. But in parallel, we have to move toward autonomy. Pen testing is a good example: many companies replaced manual pen tests with tools, which is automation. The next step is to test continuously and autonomously everything that is exposed.&lt;/p&gt;
&lt;h3 id=&quot;autonomy-needs-a-foundation&quot;&gt;Autonomy needs a foundation&lt;a href=&quot;#autonomy-needs-a-foundation&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-future-of-security/foundation.png&quot; alt=&quot;Autonomy needs a foundation: identity, telemetry, context, reasoning, action&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;None of this works without a foundation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Identity&lt;/strong&gt;: authentication and authorization for every human and non-human identity, including agents acting for a person.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Telemetry&lt;/strong&gt;: record everything. “There is no AI without data.”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context&lt;/strong&gt;: one shared context across build, run and challenge, not silos. Context is what lets an agent tell an alert from a test box apart from one on a purchasing system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reasoning&lt;/strong&gt;: with that context, agents decide what matters and what to do. This is autonomous security.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Action&lt;/strong&gt;: policy enforcement, containment and remediation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;build-run-challenge-and-close-the-loop&quot;&gt;Build, run, challenge, and close the loop&lt;a href=&quot;#build-run-challenge-and-close-the-loop&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-future-of-security/continuum.png&quot; alt=&quot;Security at machine speed: AWS Continuum on top of AWS security services&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;AWS sees three areas to cover:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Build&lt;/strong&gt;: fix vulnerabilities while the product is being built, by developers and by their agents. Secure the software supply chain: we do not write software from scratch, we pull packages, images and now MCP servers, and these must come from trusted sources and be blocked at runtime when they are not.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run&lt;/strong&gt;: secure agents and detect threats. The first thing customers ask is how to discover &lt;strong&gt;shadow agents&lt;/strong&gt;, the ones nobody registered. Then you need to know each agent’s intent, check it behaves as intended, and enforce it. Threat detection and response must be proactive and continuous.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Challenge&lt;/strong&gt;: test what is exposed, continuously.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finding faster is not enough, you also have to fix. That is why the loop must be closed. AWS used these principles to build &lt;strong&gt;&lt;a href=&quot;https://aws.amazon.com/continuum/&quot;&gt;AWS Continuum&lt;/a&gt;&lt;/strong&gt;, announced in the keynote, with components for code vulnerabilities, software supply chain, agents, threats and pen testing. Chet added that it also works with partner products, including ones running on other clouds.&lt;/p&gt;
&lt;h3 id=&quot;the-trust-ramp-keeping-humans-in-the-loop&quot;&gt;The trust ramp: keeping humans in the loop&lt;a href=&quot;#the-trust-ramp-keeping-humans-in-the-loop&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-future-of-security/trust-ramp.png&quot; alt=&quot;Build the trust ramp: human in the loop, human on the loop, autonomy&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This was, for us, the most practical part of the talk. You cannot turn autonomous security on in one day. You build trust step by step:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Human in the loop&lt;/strong&gt;: a person approves every action. It looks a lot like dashboards for humans, and that is where you start.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human on the loop&lt;/strong&gt;: a person watches and steps in on exceptions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autonomy&lt;/strong&gt;: the agent acts inside boundaries that have been proven.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Different tasks can sit at different steps at the same time.&lt;/p&gt;
&lt;h3 id=&quot;the-ciso-role-is-changing&quot;&gt;The CISO role is changing&lt;a href=&quot;#the-ciso-role-is-changing&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-future-of-security/security-eras.png&quot; alt=&quot;A new era of security leadership&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Chet asked a CISO group: if your board gave you 30% more security budget today, could you reduce security risk by 30%? The answer was no. We link spending to protecting and defending, but not to measurable risk reduction over time. This is something the industry has to get good at.&lt;/p&gt;
&lt;p&gt;The CISO role has changed before. From 1995 to 2012, it was about protecting and complying, and the question was “did we pass the audit?”. From 2013, breaches started to cost CEOs their jobs, security became a board-level risk, and the question became “what are the risks?”. The new era is about &lt;strong&gt;accelerating and governing at the same time&lt;/strong&gt;, and the question is “can security operate at AI speed?”.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/2026-12-08-reinvent-2026-future-of-security/ciso-role-shift.png&quot; alt=&quot;The CISO role shift&quot;&gt;
&lt;em&gt;Diagram based on the talk by Chet Kapoor (AWS), AWS re:Invent 2026.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;He closed with a Formula 1 image: race cars have the best brakes in the world so they can take corners at full speed. Security should let the company use AI at full speed, and turn the corners safely.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;part-2-the-panel&quot;&gt;Part 2: the panel&lt;a href=&quot;#part-2-the-panel&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;where-we-are-today-a-vulnerability-storm&quot;&gt;Where we are today: a vulnerability storm&lt;a href=&quot;#where-we-are-today-a-vulnerability-storm&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 panel agreed that we are in the middle of a storm. Each time a new model is released, bug bounty programs see a spike of reports, the models find the vulnerabilities, they get fixed, and the next model release starts the cycle again. With every model generation, older and older vulnerabilities are found, and new categories appear.&lt;/p&gt;
&lt;p&gt;The panelists expect this to calm down, but not to disappear:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The most critical issues in existing (“brownfield”) code should be fixed within months to one or two years, with tools like Continuum or in-house vulnerability management. Companies with a longer software history will take longer.&lt;/li&gt;
&lt;li&gt;Michael D’Angelo said that if you start from scratch with a frontier model and a good harness, you can get much closer to secure by default, even if it will not be perfect.&lt;/li&gt;
&lt;li&gt;Vulnerabilities will not go away: there is still human error, and AI code generation and remediation are not perfect.&lt;/li&gt;
&lt;li&gt;After classic vulnerabilities, the next concern will be &lt;strong&gt;business logic vulnerabilities&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Attacks also move faster. Ten years ago, it took about two years on average for a vulnerability to be exploited in the wild. Now, some are exploited before the CVE is even published.&lt;/p&gt;
&lt;h3 id=&quot;fix-attack-chains-not-single-vulnerabilities&quot;&gt;Fix attack chains, not single vulnerabilities&lt;a href=&quot;#fix-attack-chains-not-single-vulnerabilities&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Chet asked about the idea of rewriting everything in a memory-safe language such as &lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt;. The panel found the idea reasonable (the cost of rewriting is much lower with AI), but not the first priority. What matters more than the rating of one vulnerability is the &lt;strong&gt;attack chain&lt;/strong&gt;: a low-rated vulnerability with no external access can become critical if it sits next to two exposed ones with lateral movement to sensitive data. Fix the chains first, and know your choke points and blast radius.&lt;/p&gt;
&lt;h3 id=&quot;where-to-draw-the-line-between-ai-and-human-judgment&quot;&gt;Where to draw the line between AI and human judgment&lt;a href=&quot;#where-to-draw-the-line-between-ai-and-human-judgment&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 was the heart of the discussion, and the panelists did not fully agree.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use risk and reversibility.&lt;/strong&gt; Low-risk, reversible tasks are easy to hand to AI. The interesting question is how to move, step by step, toward high-risk, high-value tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Business context and judgment.&lt;/strong&gt; Derek Bush argued that AI can handle the basics (an endpoint sees something wrong and blocks it), but deeper decisions need an understanding of the business and of the “domino effect” a decision can have on customers. This is human judgment, and AI is not there yet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Judgment can be packaged.&lt;/strong&gt; Evan McHenry explained that Robinhood has spent about two years putting its security knowledge into a knowledge graph for agents: its security standards and the history of every exception it reviewed and approved. Engineers now write their design and architecture proposals with an agent that has this context. The proposal gets security feedback before it reaches a human reviewer. Security has shifted left into the document writing phase, and the team is now comfortable letting an agent do an architecture review.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context is the key.&lt;/strong&gt; Michael D’Angelo described how OpenAI puts its corporate context (Slack, email, code and other systems) into &lt;a href=&quot;https://openai.com/codex/&quot;&gt;Codex&lt;/a&gt; through connectors. Organizations that do this safely will work much more effectively.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The line keeps moving.&lt;/strong&gt; Derek’s conclusion: the line will keep moving as we get better with AI, but there will always be a line where human judgment is needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;verification-is-the-unsolved-problem&quot;&gt;Verification is the unsolved problem&lt;a href=&quot;#verification-is-the-unsolved-problem&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 panelist added that how much AI an organization uses depends on how comfortable it is with &lt;strong&gt;verifying&lt;/strong&gt; the results. A few companies can do it. Hundreds of thousands of others do not know whether a given agent works, or works consistently, and that is a risk in itself.&lt;/p&gt;
&lt;p&gt;Chet agreed: the industry has mostly solved the building part, but has not cracked verification, and does not talk about it enough. One panelist expects that in the next one to two years, the conversation will move from “how do we fix all the vulnerabilities” to “how do we continuously and formally verify our whole environment”. Others were more careful: formal verification is hard and expensive, and the first gains will probably come at runtime (reading logs and fixing issues), or from applying risk-based judgment using the systems of record a company already has.&lt;/p&gt;
&lt;h3 id=&quot;how-security-jobs-change&quot;&gt;How security jobs change&lt;a href=&quot;#how-security-jobs-change&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;How do security jobs change with AI? The panel gave several answers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The CISO becomes one of the most technical people in the room.&lt;/strong&gt; They must understand what happens at every level of the organization and push safe AI adoption across the company without killing productivity. Evan expects more hybrid CIO, CISO and CTO roles.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;From “the no police” to business partner.&lt;/strong&gt; Derek described security teams moving from saying no to guiding the business on risk. The CISO must speak the technical language, think like a builder, understand every part of the business, and have the risk-versus-reward conversation with every leader and every engineer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Educator, and the calmest person in the room.&lt;/strong&gt; With CVEs coming out faster than ever, part of the job is to explain the real impact before stopping the whole company.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security teams become product teams.&lt;/strong&gt; Michael said security teams already work more like product teams that build tools embedded in software teams, so that engineers fix issues at the source without being slowed down. One CISO gave an example: a developer in their company built and shipped a tool to find which IAM roles you need, on the security platform, after a safety by design review. Security was happy about it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analysts become builders.&lt;/strong&gt; A key challenge raised at the end: how do you turn security analysts into builders and engineers, fast enough? It is a real change of skills.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accept losing some control.&lt;/strong&gt; Chet summed it up as “engineering trust”: the CISO cannot have every decision go through them anymore, and has to trust the guidance, tools and processes in place. This is what “governing autonomy” means.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bigger, not smaller.&lt;/strong&gt; Sunil expects the role to keep growing, maybe as important as the CFO within five years.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;what-to-tell-a-board&quot;&gt;What to tell a board&lt;a href=&quot;#what-to-tell-a-board&quot; class=&quot;heading-anchor&quot; aria-label=&quot;Link to this section&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Asked what they would tell a board of non-security people:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The rate of change is much higher than with cloud or mobile. AI is a double-edged sword. Embrace it more openly than past technologies, still measured, but less than before.&lt;/li&gt;
&lt;li&gt;Classic security KPIs no longer work. Not all security is equal: development, production and finance need different controls and different measures.&lt;/li&gt;
&lt;li&gt;Better questions to ask: what share of our operational workflows is fully agentic, and how effective is each agent? What threats is our business uniquely exposed to (not a generic risk register)? Which controls apply, and what are we doing to improve?&lt;/li&gt;
&lt;li&gt;Automate security reviews, and focus on business risk first.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;one-year-from-now&quot;&gt;One year from now&lt;a href=&quot;#one-year-from-now&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 biggest surprise each panelist expects in one year:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Entire classes of vulnerabilities eliminated, with supply chain still a pain point.&lt;/li&gt;
&lt;li&gt;A moment where security systems visibly improve themselves.&lt;/li&gt;
&lt;li&gt;Trust in &lt;strong&gt;self-healing and self-remediation&lt;/strong&gt; arriving much faster than people expect today, even if many teams still say they are not ready.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vendor risk&lt;/strong&gt; turned upside down: with so much changing, CISOs will start asking whether they can still trust their critical vendors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Chet’s practical advice for companies with no agents yet: ask every employee to pick one piece of their daily work and, within 30 days, have an agent do it end to end. Then ask them to make it run in half the time.&lt;/p&gt;
&lt;h3 id=&quot;how-the-panel-feels&quot;&gt;How the panel feels&lt;a href=&quot;#how-the-panel-feels&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 close, Chet asked each panelist for one word to describe how they feel about where security is today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Evan McHenry: &lt;strong&gt;optimistic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Derek Bush: &lt;strong&gt;energized&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Sunil Potti: &lt;strong&gt;thoughtful&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Michael D’Angelo: &lt;strong&gt;excited&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Despite the pressure, all four words were positive. As one panelist put it during the discussion, trying to stay ahead of AI is a losing game: what matters is to learn faster than everybody else.&lt;/p&gt;
&lt;hr&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;Humans stay in the loop, but their place changes.&lt;/strong&gt; The trust ramp (in the loop, on the loop, autonomy) is a simple way to decide, task by task, how much we let an agent do.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Measure risk removed, not vulnerabilities found.&lt;/strong&gt; AI will keep finding more. What matters is what we fix, and how fast.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Think in attack chains.&lt;/strong&gt; A low-rated finding can be the missing link to sensitive data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Know your agents.&lt;/strong&gt; Shadow agents, MCP servers and packages pulled by agents are now part of our attack surface and our supply chain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Package our knowledge.&lt;/strong&gt; Robinhood’s knowledge graph of standards and past exceptions is a good model to give agents the context they need, and to get security feedback earlier, at design time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security as a builder.&lt;/strong&gt; Security people who build tools that engineers use, and engineers who contribute to them, is the direction all panelists described.&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: “The Future of Security” (SEC001), AWS re:Invent 2026.&lt;/li&gt;
&lt;li&gt;Speaker: &lt;strong&gt;Chet Kapoor&lt;/strong&gt; (AWS).&lt;/li&gt;
&lt;li&gt;Panel: &lt;strong&gt;Evan McHenry&lt;/strong&gt; (Robinhood Markets), &lt;strong&gt;Derek Bush&lt;/strong&gt; (Infor), &lt;strong&gt;Sunil Potti&lt;/strong&gt; (Cisco) and &lt;strong&gt;Michael D’Angelo&lt;/strong&gt; (OpenAI).&lt;/li&gt;
&lt;li&gt;The diagrams in this article are our own illustrations of the content presented by the speakers. All ideas and examples are theirs and belong to their companies and Amazon Web Services.&lt;/li&gt;
&lt;/ul&gt;</content>
    <summary type="html">Notes from AWS re:Invent 2026 session SEC001: how security moves from human analysis to AI agents while keeping humans in the loop, and how security jobs change.</summary>
  </entry>
  <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;
&lt;hr&gt;
&lt;h2 id=&quot;the-future-of-security&quot;&gt;The future of security&lt;a href=&quot;#the-future-of-security&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;Chet Kapoor (AWS), with Evan McHenry (Robinhood Markets), Derek Bush (Infor), Sunil Potti (Cisco) and Michael D’Angelo (OpenAI)&lt;/strong&gt; · SEC001&lt;/p&gt;
&lt;p&gt;Security was built for humans reading dashboards. AWS described five shifts (risks eliminated, outcomes, intent, continuous evidence, governing autonomy) and a “trust ramp” that moves work from human in the loop, to human on the loop, to autonomy. The panel of CISOs and builders then discussed where to draw the line between AI and human judgment, why verification is still unsolved, and how the CISO and security teams turn into builders.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/2026/12/08/reinvent-2026-future-of-security.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>
</feed>
