<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Inside Base Power Company]]></title><description><![CDATA[A window into the work we do to build the modern power company of the electric era. ]]></description><link>https://inside.basepowercompany.com</link><image><url>https://substackcdn.com/image/fetch/$s_!fo8v!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1202fd2-9d8e-4898-a914-b4a3a877fb41_256x256.png</url><title>Inside Base Power Company</title><link>https://inside.basepowercompany.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 05 Sep 2026 04:55:08 GMT</lastBuildDate><atom:link href="https://inside.basepowercompany.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Base Power Company]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[insidebasepowercompany@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[insidebasepowercompany@substack.com]]></itunes:email><itunes:name><![CDATA[Base Power Company]]></itunes:name></itunes:owner><itunes:author><![CDATA[Base Power Company]]></itunes:author><googleplay:owner><![CDATA[insidebasepowercompany@substack.com]]></googleplay:owner><googleplay:email><![CDATA[insidebasepowercompany@substack.com]]></googleplay:email><googleplay:author><![CDATA[Base Power Company]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Merge, Don’t Queue]]></title><description><![CDATA[Dynamically scoped parallel merge queues done right, or how we slashed our time-to-trunk by an order of magnitude.]]></description><link>https://inside.basepowercompany.com/p/merge-dont-queue</link><guid isPermaLink="false">https://inside.basepowercompany.com/p/merge-dont-queue</guid><dc:creator><![CDATA[Base Power Company]]></dc:creator><pubDate>Tue, 04 Aug 2026 14:49:27 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/118d73ed-32f9-4092-849b-e64e8c34c715_1774x887.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>This post is a deep dive into some of the software engineering work at Base Power. We&#8217;re <a href="https://www.basepowercompany.com/careers">hiring</a>!</em></p><p>Picture this: It&#8217;s mid-2026. You own developer velocity at an economy-of-scale startup. Software engineers are the fixed cost around these parts, so the company gives them API keys for fancy coding agents. They are tasked with automating the processes that support the company&#8217;s geometric growth towards the minimum efficient scale required to color the balance sheet bright green. They need to ship <em>yesterday</em>.</p><p>Your colleagues learn the trick pretty fast: Parallel coding agents pushing, failing, fixing, and delivering stacks of pull requests (PRs) with passing continuous integration (CI) checks. The most combative submit north of 200 PRs a week.</p><p>Getting there is the easy part. If you sat through Christopher Nolan&#8217;s <em>The Odyssey</em> (with apologies for the 3,000-year-old spoilers if you haven&#8217;t), you know the rest of the story: the first act wraps up a ten-year war, and the getting-home takes the other two and a half hours. This is what happens to organizations that switch to agents: CI-passing PRs written at record speed, then hours or days getting reviewed and merged to production.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pwu0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pwu0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 424w, https://substackcdn.com/image/fetch/$s_!Pwu0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 848w, https://substackcdn.com/image/fetch/$s_!Pwu0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 1272w, https://substackcdn.com/image/fetch/$s_!Pwu0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pwu0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg" width="728" height="204.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:409,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:3962,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pwu0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 424w, https://substackcdn.com/image/fetch/$s_!Pwu0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 848w, https://substackcdn.com/image/fetch/$s_!Pwu0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 1272w, https://substackcdn.com/image/fetch/$s_!Pwu0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F461e85a8-da2e-4ffe-bf2d-46b3b641d55e_800x225.svg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>This was us at Base a month ago, so we rebuilt that path. This post is about how.</p><h3>Step 1: Push your post-submit left</h3><p>Let&#8217;s start with the obvious: no human comprehensively reviews 200 PRs a week. We use an array of AI review agents, which helps. Importantly, we also decided to shift as much of the review burden as possible into tests: we leaned into a monorepo and now aggressively test every atomic change before it merges, when feasible. More specifically, we made the uncommon choice to pull end-to-end suites that traditionally run post-merge, nightly, or before a release into the pre-merge CI gate. This way, a change gets in by surviving a well-designed test workload, not by being well-vetted.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y7Hb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y7Hb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 424w, https://substackcdn.com/image/fetch/$s_!y7Hb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 848w, https://substackcdn.com/image/fetch/$s_!y7Hb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 1272w, https://substackcdn.com/image/fetch/$s_!y7Hb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y7Hb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg" width="728" height="206.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:413,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:2467,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y7Hb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 424w, https://substackcdn.com/image/fetch/$s_!y7Hb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 848w, https://substackcdn.com/image/fetch/$s_!y7Hb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 1272w, https://substackcdn.com/image/fetch/$s_!y7Hb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347a2fbd-89a7-4492-92d7-67fe6510c1fc_600x170.svg 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>To be clear, we&#8217;d have argued against this before agents, but felt the calculus had flipped. Anyways, does this help?</p><p><strong>Good news</strong>: Provided design discussions happen somewhere other than pull requests and the tests actually match your risk/reliability posture, this helps. Minor caveat: agents write the tests too, so a change could weaken its own gate. We trust reviewers to catch it if one does; test changes still require human attention. You&#8217;ll generally need a somewhat sophisticated set of change approval rules to protect your most precious lines of code.</p><p><strong>Bad news</strong>: CI is now even slower! A PR or merge validation run can have a long wall-clock time, require an unreasonable number of machine-hours, or be inherently flaky (e.g., for tests that run on unreliable hardware). That cost is the villain of the rest of this post. Giving up the testing was off the table, because the testing is the only reason any of this is safe; the cost had to come down another way.</p><h3>Step 2: Only run the tests you need, and save the footprint</h3><p>This part isn&#8217;t exactly <a href="https://www.youtube.com/watch?v=THNPmhBl-8I">brain surgery</a>: Don&#8217;t run the whole suite on every change, only the part the change can actually affect. At Base, we use an industry standard input- and content-addressed hermetic build system: Google&#8217;s <a href="https://bazel.build/">Bazel</a>, paired with Tinder&#8217;s <a href="https://github.com/tinder/bazel-diff">bazel-diff</a>. See this <a href="https://www.youtube.com/watch?v=rCFc3tFcVVE">presentation</a> if this is unfamiliar.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U58J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U58J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 424w, https://substackcdn.com/image/fetch/$s_!U58J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 848w, https://substackcdn.com/image/fetch/$s_!U58J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 1272w, https://substackcdn.com/image/fetch/$s_!U58J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U58J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg" width="728" height="303.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:607,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:3253,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U58J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 424w, https://substackcdn.com/image/fetch/$s_!U58J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 848w, https://substackcdn.com/image/fetch/$s_!U58J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 1272w, https://substackcdn.com/image/fetch/$s_!U58J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38edeb33-5b8a-4a58-b242-4b706a7ae241_720x300.svg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">footprint(PR,merge-base) = the affected leaves of the build graph.</figcaption></figure></div><p>Besides making pre-submit CI faster and cheaper, this produces a footprint of the PR, which turns out to matter: for a given change, a machine-computed answer to &#8220;what does this change touch relative to the reference point chosen by the CI run?&#8221;. Hold that thought, but for now: does this work?</p><p><strong>Good news</strong>: Steps 1 and 2 fixed the left half of that first timeline. PRs now go green as fast as their affected tests go, cheaply, and with less of a human bottleneck.</p><p><strong>Bad news</strong>: All that did for the right half is make it worse! Approved PRs now arrive by the hundreds, and every one of them still has to make its way to the same trunk branch. The bottleneck shifted right yet again, into the merge strategy.</p><h3>Step 3: Hear the sirens&#8217; song</h3><p>This step isn&#8217;t really actionable; it&#8217;s more of an explainer to motivate what follows, in case you&#8217;re not clear about what merge queues are. Recall that a green checkmark is a statement about the past. Your PR was validated against the trunk branch of an hour ago, and thirty other PRs landed on the trunk branch since. Merging now means publishing a combination of changes that was never tested. Physical conflicts are caught by Git, but logical conflicts (two changes that each pass independently but break together) could slip through.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DH4-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DH4-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 424w, https://substackcdn.com/image/fetch/$s_!DH4-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 848w, https://substackcdn.com/image/fetch/$s_!DH4-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 1272w, https://substackcdn.com/image/fetch/$s_!DH4-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DH4-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg" width="728" height="232.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:465,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:2619,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DH4-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 424w, https://substackcdn.com/image/fetch/$s_!DH4-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 848w, https://substackcdn.com/image/fetch/$s_!DH4-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 1272w, https://substackcdn.com/image/fetch/$s_!DH4-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b00f82-5d6a-46b0-a950-4343a8546e92_720x230.svg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>So your trunk branch needs a guarantee: no combination of changes gets published without being validated first. There are plenty of fine implementations for serializing this validation, including <a href="https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/merging-a-pull-request-with-a-merge-queue">GitHub's Merge Queue</a> and <a href="https://docs.gitlab.com/ci/pipelines/merge_trains/">GitLab's Merge Train</a>. Unfortunately, this is slow at agent volume, even with diff-aware selective testing and caching:</p><ul><li><p>Once a PR triggers a heavy integration test suite, every PR following it pays the wall-time.</p></li><li><p>Logical conflicts and flaky failures cause queue rejections; every PR that follows them has to restart its validation run.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EYvj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EYvj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 424w, https://substackcdn.com/image/fetch/$s_!EYvj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 848w, https://substackcdn.com/image/fetch/$s_!EYvj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 1272w, https://substackcdn.com/image/fetch/$s_!EYvj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EYvj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg" width="728" height="585.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2296589-75b8-416c-bd61-198dcec9842e_720x579.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1171,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:6220,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EYvj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 424w, https://substackcdn.com/image/fetch/$s_!EYvj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 848w, https://substackcdn.com/image/fetch/$s_!EYvj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 1272w, https://substackcdn.com/image/fetch/$s_!EYvj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2296589-75b8-416c-bd61-198dcec9842e_720x579.svg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Note that this problem is mostly a consequence of step 1, which parked the heavy suites in front of the merge. This means that every engineer stuck in that line is hearing voices: <em>Nothing that landed since has anything to do with your change. It&#8217;s fine. Just merge it..</em></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oVxX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oVxX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oVxX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oVxX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oVxX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oVxX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg" width="350" height="211" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:211,&quot;width&quot;:350,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52276,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oVxX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oVxX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oVxX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oVxX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ea6f379-2772-45ba-a79d-3a16db2ea226_350x211.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><em>Your billing tweak is independent from that firmware fix.. &#127926;&#127925;</em></figcaption></figure></div><p>No matter how appealing, better plug your ears and row, because every time a logical conflict lands, it blocks CI and treats the entire team to a front-row seat at the revert. So how do we solve it?</p><h3>Step 4: Enter parallel merge queues</h3><p>The line in step 3 is serial because the queue assumes every merge can affect every PR behind it. Step 2 says otherwise: each change carries a footprint. If two footprints are disjoint, neither change can invalidate the other&#8217;s green, so the PRs can commute. Give each its own lane and validate both concurrently - only changes whose footprints intersect need serialization. The queue tracks this with a ledger: the footprint of every merge it lands on the trunk branch. Intersect a PR&#8217;s footprint with the merges since its base, and you know exactly whose green went stale.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yb3K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yb3K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 424w, https://substackcdn.com/image/fetch/$s_!Yb3K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 848w, https://substackcdn.com/image/fetch/$s_!Yb3K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 1272w, https://substackcdn.com/image/fetch/$s_!Yb3K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yb3K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg" width="728" height="772.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1545,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:8612,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yb3K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 424w, https://substackcdn.com/image/fetch/$s_!Yb3K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 848w, https://substackcdn.com/image/fetch/$s_!Yb3K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 1272w, https://substackcdn.com/image/fetch/$s_!Yb3K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a42843-65e7-40ff-942c-6a058ed514a6_720x764.svg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At Base, we evaluated <a href="https://trunk.io">trunk.io</a> and <a href="https://mergify.com">Mergify</a>, which both offer parallel merge queues with dynamically configured lanes. Uber&#8217;s <a href="https://dl.acm.org/doi/10.1145/3302424.3303970">SubmitQueue</a> also caught our attention with its aggressively speculative approach, for which an <a href="https://github.com/uber/submitqueue">open-source rewrite</a> is in progress.</p><p>Any of those will fix it! The long run stops being everybody&#8217;s problem: B merges as soon as its own fully cached validation clears, and if A is rejected, it takes down its own candidate, not the whole line.</p><p>That being said.. B ran nothing and waited for a full-cache-hit CI run anyways. Why queue it at all?<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><h3>Step 5: Directly merge to your trunk branch</h3><p>Look at B&#8217;s row in the figure above. The intersection column already answered the only question that matters: nothing that landed since B&#8217;s base touches B&#8217;s footprint, so B&#8217;s green never went stale. And that answer cost one set intersection against the ledger. B&#8217;s lane (candidate branch, CI dispatch, a validation run made entirely of cache hits) re-derived a fact the queue already knew. When the intersection is empty, the safe move and the fast move are the same move: merge directly to main, no lane, no CI run. That optimization pushes us one notch further along the design space, without giving up correctness guarantees.</p><p>The decision rule is exactly the step 4 panel plus one column. For each green PR, intersect its footprint with everything the trunk branch has landed since its base and with everything currently validating in flight. Empty on both counts: merge directly, in seconds. Overlap with a landed merge: queue for revalidation in a lane, as before. A footprint that covers everything (a toolchain bump, say) serializes the world; that is the correct behavior, and it is rare<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. Depending on your software architecture, a large majority of your PRs may merge directly to main.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZoTq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZoTq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 424w, https://substackcdn.com/image/fetch/$s_!ZoTq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 848w, https://substackcdn.com/image/fetch/$s_!ZoTq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 1272w, https://substackcdn.com/image/fetch/$s_!ZoTq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZoTq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg" width="728" height="697.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:8132,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZoTq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 424w, https://substackcdn.com/image/fetch/$s_!ZoTq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 848w, https://substackcdn.com/image/fetch/$s_!ZoTq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 1272w, https://substackcdn.com/image/fetch/$s_!ZoTq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91a1a3b1-ddae-4ea6-aebd-a109d7a74b24_720x690.svg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">B&#8217;s empty intersection lets it merge straight to the trunk branch and its footprint is appended to the ledger; only the overlapping firmware PRs pay for a lane.</figcaption></figure></div><p>We didn&#8217;t set out to build this; nobody wants to own a merge queue. But nobody sold the fast path either: a queue that uses the attested footprint to answer &#8220;must we test <em>again</em>?&#8221; and skips validation when the answer is no. Our current situation (about 100 people, agents everywhere, heavy integration tests) wanted it, so we built it<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. It took an engineer about three weeks: two weeks from start to rollout, and another week of iterating on it in production towards stability and performance.</p><p>What we built is deliberately small: one Go service, about 16,000 lines plus a React dashboard and Postgres for state. A validation run is ordinary CI: push a candidate branch, dispatch the same workflow PRs run, squash-merge on green, record the footprint in the ledger. Overlapping PRs ride merge trains (the queued PR tree in the dashboard above), so even the slow path extracts parallelism.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gTLT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gTLT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 424w, https://substackcdn.com/image/fetch/$s_!gTLT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 848w, https://substackcdn.com/image/fetch/$s_!gTLT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 1272w, https://substackcdn.com/image/fetch/$s_!gTLT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gTLT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png" width="728" height="506.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1013,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:1170485,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://inside.basepowercompany.com/i/209691933?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gTLT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 424w, https://substackcdn.com/image/fetch/$s_!gTLT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 848w, https://substackcdn.com/image/fetch/$s_!gTLT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 1272w, https://substackcdn.com/image/fetch/$s_!gTLT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0b03382-dee8-4ced-b303-0ee7fe574599_1504x1046.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A peek at our dashboard: PRs/trunk branch on the left, queued PR tree on the right. Commits marked with (D) indicate direct-merges. </figcaption></figure></div><p>A merge queue is concurrent, stateful, and guards your trunk branch, so we tested it like infrastructure. The whole system (real executor, real Postgres, fake GitHub) runs in-process, so every bug becomes a reproducible test case: overlap chains, merge trains, red builds, pushes mid-validation, footprint drift, external merges, and crashes injected at arbitrary points. Alongside those sits an exhaustively enumerated corpus of about 80,000 deterministic cases sweeping entry counts, footprint assignments, and train depths. On top of that sits model-based fuzzing: random multi-actor traffic (authors, CI, operators, a chaos actor) with global properties asserted after every command. The timing mattered, too: this work coincided with the release of <a href="https://www.anthropic.com/claude/fable">Fable</a>-class models<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>, which we exclusively used. In our estimate, the ROI of an internal build would not have been favorable before this model tier.<br><br>This overall approach resulted in an order of magnitude drop of our median time-to-trunk, which supported our contribution volume more than doubling since March. 40% of our merges skip validation entirely, and in our estimates, build graph improvements (tighter footprints, fewer over-broad targets) will take that north of 70%.</p><h4><em><strong>About the Author</strong></em></h4><p><a href="https://freux.fr">Valentin Reis</a> works on software infrastructure at Base Power. Previously, he worked on HPC systems at Argonne National Laboratory and helped build the software stack for Groq&#8217;s inference accelerator.</p><p>We just raised a <a href="https://x.com/ZachBDell/status/2084253366838870208">Series D</a> and are hiring for software roles. If you are interested in building fundamentals-driven solutions for a high growth vertical, click below.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.basepowercompany.com/careers&quot;,&quot;text&quot;:&quot;See Careers&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.basepowercompany.com/careers"><span>See Careers</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>At the time of writing, the vendors we had evaluated did not offer this optimization.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Another trick is relying on GitHub&#8217;s or GitLab&#8217;s auto-rebase-on-main behavior, which rebases branches when starting CI workflows. This makes CI runs closer to your trunk&#8217;s HEAD, which increases the probability of direct merges.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Since we did this work, <a href="https://mergify.com/">Mergify</a> and <a href="https://trunk.io">trunk.io</a> have shipped this direct-merge optimization. Check them out!</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Protip: If you&#8217;d like to know which models perform best on any given day, take a peek at the <a href="https://iijme.substack.com/">Is It Just Me?</a> newsletter, also proudly made in Austin, TX!</p></div></div>]]></content:encoded></item><item><title><![CDATA[Behind The Scenes: The Base Lab]]></title><description><![CDATA[Join Dino Sasaridis, Head of Hardware at Base Power, as he brings you along to meet some of the engineers who build next-generation technology to power America.]]></description><link>https://inside.basepowercompany.com/p/behind-the-scenes-base-lab</link><guid isPermaLink="false">https://inside.basepowercompany.com/p/behind-the-scenes-base-lab</guid><dc:creator><![CDATA[Base Power Company]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:03:09 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/26e3e0a5-44f2-47ca-8be5-038372f16f57_3936x2624.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;b407ec4d-8b8b-40f5-8d61-982fb6439cf6&quot;,&quot;duration&quot;:null}"></div><p></p>]]></content:encoded></item><item><title><![CDATA[Scaling Daily Deployments from 1 to 50]]></title><description><![CDATA[How Base is deploying energy storage faster than any other company.]]></description><link>https://inside.basepowercompany.com/p/scaling-daily-deployments-from-1</link><guid isPermaLink="false">https://inside.basepowercompany.com/p/scaling-daily-deployments-from-1</guid><dc:creator><![CDATA[Base Power Company]]></dc:creator><pubDate>Wed, 09 Apr 2025 02:05:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f155abea-e1eb-4e4f-9487-e470cd2a9997_4096x2160.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>Context</h1><p>Becoming &#8220;America&#8217;s Next-Generation Power Company&#8221; is no small ambition &#8212; it&#8217;s a bet on ourselves, our team, and the future of energy in this country. Every team at Base Power pours their heart into innovations driving this mission, taking us from CAD files to batteries backing up homes across Texas. Deployments actualizes these efforts, turning grit into grid-connected hardware. Traditionally, battery, generator, and solar installs are treated like custom construction jobs. That doesn&#8217;t scale. At Base, we&#8217;re deadset on building hardware deployment like a factory: repeatable, efficient, and engineered for speed.</p><h1>Challenges to Scale</h1><p>When I joined, Base had deployed roughly 70 batteries. The first 50 installations were managed directly by our team on site. Even at 5 to 15 installs per <em>week</em>, due to numerous manual checkpoints and constant troubleshooting, the process was breaking and couldn&#8217;t keep pace with our ambitions. Our goal was bold: scale to <strong>30+ installs per day</strong> with next-to-no direct contact or support, what we call &#8220;Base-Free&#8221; installs. To get there, we had to rethink processes, build tools, and team up across the company, all while holding fast to our high standards. The stakes were high: reliable, affordable electricity depends on nailing deployment at scale.</p><h3>Key Blockers:</h3><ul><li><p><strong>Permitting and Regulatory</strong>: Getting permits for one address is hard. Securing permits daily for dozens of addresses across multiple jurisdictions that all enforce different code is a critical obstacle.</p></li><li><p><strong>Installer Capacity and Ability: </strong>Electricians are in short supply. How do we recruit, train, and oversee enough crews to meet demands while keeping quality and customer service top-notch?</p></li><li><p><strong>Supply Chain: </strong>We can&#8217;t run out of materials, but overstocking is not an option either. Once materials land, we&#8217;ve got to kit and deliver them statewide, every day.</p></li><li><p><strong>Commissioning, Day-of Issues, and Install Intervention: </strong>Systems need perfect testing to work, but customer tweaks, installer slip-ups, and troubleshooting means 3+ interventions per install.</p></li><li><p><strong>Lack of Tooling Causing Redundancy: M</strong>anual settings, updates, and tracking create slow, repetitive tasks.</p></li><li><p><strong>Hardware Issues: </strong>Equipment failures on or after install day can lead to difficult headaches down the road.</p></li><li><p><strong>Data Visibility: </strong>We needed clear, accurate data that everyone could see and use on the spot.</p></li></ul><h1>Rebuilding the Deployments Model for Scale</h1><p>Making small tweaks to the system wasn&#8217;t an option. Here&#8217;s how we rebuilt the system from the ground up:</p><h3>Full-Court Press</h3><ul><li><p><strong>Easing Regulatory Burden</strong>: We built a tool to automatically generate &#8220;permit packets&#8221; based on the battery configuration being built, equipping us for 100+ permits per day. We&#8217;re now working with policymakers to implement a system that standardizes code enforcement across the state.</p></li><li><p><strong>Adding Capacity while Maintaining Quality: </strong>Pooling directly from our installer network helped us quickly develop a reliable pipeline. We hired foundational master electricians to establish Base installer hubs in our large metro areas. We revamped manuals and built processes to hire, onboard, and prepare installers for field readiness.</p></li><li><p><strong>Acquiring a Warehouse, Onboarding an ERP: </strong>We set up a central warehouse in Austin and built its logistics to operate as the locus of Base operations. Next, we mapped delivery routes across Texas, ensuring our own trucks, warehouse personnel, and drivers make just-in-time deliveries to our members&#8217; homes. An ERP system keeps our inventory dialed in as we grow, preparing Base for supply at scale.</p></li><li><p><strong>Empowering Installers with Tech: </strong>Without automation, manual system testing limits each installer to about six installs per day. Scaling beyond that would require hiring at the same pace as installation growth. Instead of hiring to match growth, we built a powerful, installer-facing app. It gives installers everything they need to bring a system online&#8211;commissioning, uploading close-out photos, accessing manuals, tracking progress, taking notes, and even troubleshooting independently. Several Base-free installs now happen every day.</p></li><li><p><strong>Establishing an Ecosystem: </strong>Alongside all of these changes, we developed an entire suite of helpful internal products. We informed the design of tools that significantly increased our ability to conduct site surveys, adjust battery settings, send address-specific firmware changes, track system issues fleetwide, and deploy batteries without intervention.</p></li><li><p><strong>Fixing Hardware Hiccups</strong>: By noting recurring issues and recovering failed hardware, we diagnosed and prevented system-critical failures such as water ingress through RJ45 connectors in battery modules or shorted PCBAs in hubs.</p></li><li><p><strong>See More</strong>: Visibility is everything when you&#8217;re coordinating dozens of installs and field services daily. We designed real-time dashboards for a clear view of installations and services, now widely used across teams.</p></li></ul><p>These improvements were a relay across operations, software, hardware, fleet, and customer support. Every group brought their A-game, resulting in 10x-ing our daily installs while tracking for 50x by the end of the year. Deployments fuels Base&#8217;s push for energy abundance, scaling backup power to thousands of homes and boosting storage capacity at record pace, one household at a time.</p><h4>About the Author</h4><p>David &#8220;DWilly&#8221; Willson works on the Deployments team as a Deployments Engineer. He focuses largely on install operations and tooling improvements, occasionally moonlighting as a growth guy. He&#8217;s also referred to as Base&#8217;s &#8220;Chief Vibes Officer&#8221;.</p>]]></content:encoded></item><item><title><![CDATA[Building a Scalable Risk Model for a New Retail Electric Provider]]></title><description><![CDATA[How Base Power manages electricity trading risk in the volatile Texas market.]]></description><link>https://inside.basepowercompany.com/p/building-a-scalable-risk-model-for</link><guid isPermaLink="false">https://inside.basepowercompany.com/p/building-a-scalable-risk-model-for</guid><dc:creator><![CDATA[Base Power Company]]></dc:creator><pubDate>Wed, 09 Apr 2025 01:49:14 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/1fdb6063-46df-45e5-9de2-f25e15da1e23_1408x768.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In retail electricity, risk isn't just a footnote in the quarterly report; it's the central challenge of our business model. At Base Power Company, we've developed our own way of quantifying and managing our exposure to ERCOT's volatile market. This post walks through our risk management philosophy, the framework we've built, and how we've implemented it in our day-to-day operations.</p><h2>The Fundamental Challenge</h2><p>Retail electricity providers (REPs) operate in a world of structural risk asymmetry. We sell fixed-price contracts to customers while purchasing power from a market where prices can spike from $20/MWh to $5,000/MWh in minutes. This creates a potential for catastrophic loss that must be managed with precision.</p><p>The challenge is further complicated by the limited storability of electricity. Unlike commodity traders who can take physical delivery and warehouse their assets, most REPs must balance supply and demand instantaneously, 24/7/365. Our risk exposure includes:</p><ul><li><p><strong>Price risk</strong>: Exposure to wholesale market volatility while serving fixed-price retail contracts</p></li><li><p><strong>Volume risk</strong>: Uncertain customer consumption patterns driven largely by weather events</p></li></ul><p>Some other risks that we won&#8217;t cover today (but will in future posts) include:</p><ul><li><p><strong>Credit risk</strong>: Customer payment default potential</p></li><li><p><strong>Regulatory risk</strong>: Changing market rules and compliance requirements</p></li><li><p><strong>Basis risk</strong>: Price differentials between financial hedging instruments and actual delivery locations</p></li></ul><p>The complexity compounds because these risks interact in non-linear ways. A heat wave simultaneously increases consumption (volume risk) and market prices (price risk), creating a multiplicative rather than additive exposure.</p><h2>Quantifying Risk</h2><p>The first challenge is defining what risk means and figuring out how to measure it. For Base, risk means the potential financial exposure our retail electricity business faces due to market volatility. Specifically, it represents our obligation to procure power for our customers through counterparties or directly from ERCOT at prices that may substantially exceed what we've contracted to charge our customers.</p><p>Traditional approaches tend to use simplistic worst-case scenarios represented by the following equation:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{maximum cost} = \\max(\\text{load}) \\cdot \\max(\\text{price}) \\cdot \\text{duration}&quot;,&quot;id&quot;:&quot;MLHEXWETLZ&quot;}" data-component-name="LatexBlockToDOM"></div><p>Where:</p><ul><li><p>duration is a time frame that an organization feels captures worst case risk appropriately</p></li><li><p>max(price) in ERCOT is $5,000/MWh</p></li><li><p>max(load) is the load of their portfolio they have to serve over the duration</p></li></ul><p>This leads to excessive conservatism and inefficient capital allocation. We needed a more nuanced approach.</p><p>The key insight was recognizing that risk is looking at the tails of our distribution and isn&#8217;t very different to how we would look at our expected P&amp;L. In this case the distribution is the P&amp;L our REP could make in a variety of outcomes. The other insight was risk is computed over some timeframe, e.g. our risk tomorrow or our risk for the remainder of the year, which can lead to having multiple risk metrics that are tracked. This takes a single number and gives you a view on the business from multiple angles.</p><p>As our customers pay us a fixed rate for electricity we can reduce the modeling complexity by only looking at our cost to serve our customers and ignoring the revenue portion of the P&amp;L equation:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{cost to serve} = \\sum_{t} \\sum_{c} \\text{load}(c, t) \\cdot \\text{price}(t)&quot;,&quot;id&quot;:&quot;NZTCELQHUJ&quot;}" data-component-name="LatexBlockToDOM"></div><p>Where:</p><ul><li><p>c is a single customer, t is a 15 minute time step (ERCOT bills us based on electricity usage and prices in 15 minute increments)</p></li><li><p>load(c, t) is the load of a given customer, c, at time, t</p></li><li><p>price(t) is the ERCOT wholesale price of electricity at time, t (there are other costs associated with delivering power but for simplicity we&#8217;ll ignore them)</p></li></ul><p>We can generate a distribution of cost to serve numbers over different load and price combinations. From here we can convert this into actionable metrics that are common in financial risk management:</p><ol><li><p><strong>Value at Risk (VaR)</strong>: The nth percentile of our potential daily obligation, representing our exposure in all but the most extreme n% of scenarios.</p></li><li><p><strong>Conditional Value at Risk (CVaR)</strong>: The average of all outcomes above the nth percentile, providing visibility into the severity of tail events.</p></li></ol><p>We chose to look at the 95th or 99th percentile as a way for us to understand our tail risk. You may be wondering why we don't look at the worst case scenario, we&#8217;ll dive into that in the next section.</p><h3>Why Not Model the Absolute Worst Case?</h3><p>Three key reasons:</p><ol><li><p>Statistical uncertainty: The 100th percentile is inherently unstable and cannot be reliably estimated from historical data</p></li><li><p>Decision paralysis: Optimizing for the absolute worst case leads to prohibitively expensive hedging strategies</p></li><li><p>Capital efficiency: The 99th percentile offers a practical balance between protection and performance</p></li></ol><h2>Simulation Framework: Monte Carlo with Historical Bootstrapping</h2><p>Our initial implementation uses a Monte Carlo approach with random sampling from historical distributions:</p><ol><li><p>We sample from historical summer load and price data, preserving the correlation structure between these variables</p></li><li><p>We scale historical customer load profiles to our projected customer base</p></li><li><p>We calculate the resulting distribution of daily obligations</p></li><li><p>We extract the 99th percentile and compare it to our risk threshold</p></li></ol><p>The power of this approach comes from modeling the full distribution of outcomes rather than fixating on a single scenario. This gives us a much more nuanced view of our risk landscape.</p><h2>Practical Application: From Mathematics to Market Decisions</h2><p>Our risk framework translates directly into actionable hedging strategies. Each morning, we view updated risk metrics on a dashboard showing:</p><ol><li><p>Current VaR and CVaR by load zone</p></li><li><p>Scenario analyses for extreme weather events</p></li><li><p>Hedge recommendations to maintain risk within defined thresholds</p></li></ol><p>We&#8217;ve built on this mathematical model to create a risk system that allows us to easily quantify the impact of our decisions, e.g. how would the risk profile and expected P&amp;L would change if we purchased more hedges.</p><p>In a future post we&#8217;ll discuss how we incorporate our batteries into our strategy and we&#8217;ll deep dive into why over hedging can be detrimental to a REP.</p><p></p><h4><em>About the author</em></h4><p><a href="https://www.linkedin.com/in/zaynhanif/">Zayn Hanif</a> works on the Markets Team, building algorithms and models to use Base batteries to stabilize the grid and power our retail engine. Before Base worked as a Quantitative Developer at Citadel on both their US Power Trading Desk &amp; European Natural Gas Trading Desk.</p><p>If you find this work interesting, join our team by clicking the button below.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.basepowercompany.com/careers&quot;,&quot;text&quot;:&quot;See Careers&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.basepowercompany.com/careers"><span>See Careers</span></a></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://inside.basepowercompany.com/p/building-a-scalable-risk-model-for?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Inside Base Power Company! If you found this post interesting, please share with your networks.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://inside.basepowercompany.com/p/building-a-scalable-risk-model-for?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://inside.basepowercompany.com/p/building-a-scalable-risk-model-for?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div>]]></content:encoded></item><item><title><![CDATA[Building a Telemetry Stack for The Modern Power Company]]></title><description><![CDATA[How Base Power modernized our telemetry stack to lower costs and increase observability.]]></description><link>https://inside.basepowercompany.com/p/building-a-telemetry-stack-for-the</link><guid isPermaLink="false">https://inside.basepowercompany.com/p/building-a-telemetry-stack-for-the</guid><dc:creator><![CDATA[Base Power Company]]></dc:creator><pubDate>Wed, 09 Apr 2025 01:33:59 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0a9f1dea-1625-4a62-8ded-524b85d21afe_3053x2032.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Background</h2><p>Base Power provides Distributed Energy Resources (DERs) on the Texas grid by managing a large fleet of home backup batteries. These resources support the grid by providing power during times of high demand.</p><p>Grid-scale batteries are seeing wider adoption due to falling battery costs and increased penetration of non-dispatchable generation such as wind and solar. Power supply and demand have to be matched at all times. For example, solar stops producing when the sun goes down which coincides with the time people arrive at home, turn on the AC, cook dinner, and plug in their EV. This has created the infamous duck curve, where natural gas peaker plants have to surge to match the increasing demand and decreasing supply. Batteries allow us to time-shift energy by charging when power is abundant and discharging when power is scarce.</p><p>Centralized grid-scale batteries must pass through a multi-year interconnection queue. Base, however, uses distributed grid-scale batteries to quickly deploy storage assets on the grid by locating batteries throughout the distribution infrastructure.</p><p>Having real-time visibility into the state of the system is a key challenge when managing a fleet of distributed batteries. To effectively operate the fleet of batteries we need to know how power flows to the home and from the grid, batteries, and optional onsite solar panels. The largest utilities in Texas participate in Smart Meter Texas, which only provides 15 minute power granularity, whereas Base has two second visibility into power flows.</p><h2>Defining a Modern Telemetry Stack</h2><p>Base Power interviews start with a working session. Interviewees are asked to present on how they&#8217;d design a system that&#8217;s relevant to our current challenges. This is a useful signal because it lets us see how they&#8217;d apply their knowledge to aspects of our business. My working session was to design a telemetry stack for a fleet of distributed batteries.</p><p>The main challenge is getting the data off the device attached to the member&#8217;s home and into the cloud. If we don&#8217;t have access to the member&#8217;s Wi-Fi we have to rely on often unreliable and expensive 4G backhaul. We don&#8217;t want to lose data if the network is down for an extended time or if the device loses power.</p><p>My proposal: </p><blockquote><p>Store-and-forward the data locally on device, send over encrypted proto/gRPC to a service in the cloud, and then from there write to a timeseries database. On the server you can optionally enrich the data and dual-write or publish to additional subscribers that need up-to-date telemetry.</p></blockquote><h2>The Existing State</h2><p>When I joined I learned about the state of Base&#8217;s existing telemetry system, which was written quickly in the early days of the company as a proof of concept. Our edge software is hosted on a Raspberry Pi that reads metrics from the battery over Modbus. Previously it would package those metrics into a JSON object and publish them over MQTT. An AWS IoT Core rule would then write them to AWS Timestream.</p><p>There were a number of problems with the existing stack. JSON is easy to use but has a very verbose wire format that costs a lot to send over 4G. The metrics had no interface definition or compile time checks and so could be modified by fat-fingering a key name in JSON. We were using Timestream&#8217;s single measure record format which limited us to 100 metrics per JSON message. And finally we had unpredictable and high costs from Timestream, with no cost observability to determine what was driving the cost.</p><p>The telemetry stack wasn&#8217;t ideal but worked well enough that rewriting it wasn&#8217;t our top concern, we had too many other pressing priorities. However, keeping the end goal in mind and using it to inform how we built other components of the system, we were able to do a piecemeal migration to a new telemetry stack over a 6-7 month period.</p><h2>Secure Device to Cloud Communication</h2><p>One of my first projects at Base was to design a way of configuring our gateways. The gateways are Raspberry Pi devices connected to the battery that run golang software in containers. They are the interface between the cloud and the battery&#8212;forwarding telemetry from the battery to the cloud and sending commands to charge and discharge the battery. We needed a declarative way to define the configuration of the system: whether it&#8217;s a subpanel or whole home backup, if the member has solar, etc.</p><p>I set up a new gateway API ECS task that exposes a configuration endpoint for gateways to contact. I configured mTLS to mutually authenticate the cloud service to the gateway and the gateway to the cloud service, sharing the same certs we use for connecting to MQTT. This laid the foundation for a secure connection from the device to the cloud.</p><h2>SQLite on the Edge</h2><p>Devices receive power commands from the cloud to charge, discharge, or follow home load. These were stored in memory on the gateway and could be lost during container restarts (such as during a software update). We wanted the commands to persist until they expired.</p><p>I added SQLite to our gateways and created a volume that attached to the containers for storing the database files. We write commands to the database upon receipt and the gateway checks for the latest command in the database when it first starts. This gave us structured, durable on-device storage.</p><h2>Proto/gRPC Telemetry Publishing</h2><p>In the fall we implemented support for dual ground mount batteries. This required us to talk to and receive telemetry from two batteries at once. For dual battery systems we&#8217;d need to add a new dimension `role` to the Timestream metrics to allow us to differentiate between the individual batteries. This was further complicated by the fact that we were already at the limit of the number metrics we could publish in a single JSON object.</p><p>This called for a rewrite of our telemetry publishing and ingestion. I defined a proto file for representing all of our device metrics. We already had the gateway API and so I wrote a new gRPC service endpoint for reporting telemetry to replace the IoT Core rule we were using. Its request object wraps the serialized telemetry proto and includes an enum indicating what type of telemetry is being reported. The server uses proto reflection to iterate over all proto fields and prepare them for ingestion into Timestream.</p><p>We had configured MQTT store-and-forward and needed to maintain that behavior to prevent us from losing telemetry during network interruptions. Fortunately we already had durable storage on-device in the form of SQLite. We wrote a little SQLite wrapper that first stores to the database, then publishes the telemetry to the cloud, and finally deletes the database row if that was successful. If not successful, a background process periodically looks for unpublished telemetry and attempts to send it to the cloud.</p><p>This allowed us to add additional device metrics that had been blocked by the 100 measure limit and quickly launch dual battery systems. We were now in full control over our telemetry stack.</p><h2>Datastore Migration</h2><p>Finally it was time to reconsider a new datastore for our timeseries data. Our AWS Timestream bill had grown quickly and offered very little in the way of observability, so we had no idea what was driving our costs. Furthermore it was lacking in features you&#8217;d expect from a modern database. Considering our use cases, I realized we would be better served by a data warehouse type application. We looked at BigQuery, Snowflake, Clickhouse, and others, but settled on BigQuery because I had the most experience with it which would allow for a quick migration.</p><p>We extended our Terraform to work with GCP and turned up a basic integration using Workload Identity Federation to authenticate our AWS resources with Google Cloud. We built our own schema syncer to evolve our table schemas in safe ways (no deleting columns, no changing column types) and integrated it into our CICD pipeline. With that all setup, we were able to start dual writing to Timestream and BigQuery.</p><p>We partitioned our telemetry table by time and clustered on the gateway ID to minimize query costs. A key goal in the migration was to have better cost observability, so I created a Grafana dashboard that queries the INFORMATION_SCHEMA tables to calculate query costs on a per-dashboard basis. I modified our query wrapper to read the gRPC service and method from the golang context and add them as tags as part of the BigQuery request so that I could also aggregate costs per service.</p><h2>Summary</h2><p>Over the course of 6-7 months we did a piecemeal rewrite of our entire telemetry stack. The foundations were laid as necessary as part of other development work and delivered incremental value along the way. We were successful in lowering our costs, increasing reliability, and improving observability for both query performance and cost.</p><p>We now have a telemetry system that continues to deliver two second power flow data and will scale as we exponentially grow our fleet of distributed grid-scale batteries.</p><h4><em>About the Author</em></h4><p><a href="https://www.linkedin.com/in/andrew-hitchcock-81a259316/">Andrew Hitchcock</a> works on the fleet team which is responsible for managing our fleet of batteries and the software that runs on-device at members&#8217; homes. Before Base he launched Amazon EMR, worked as an SRE at Google, and built BigQuery&#8217;s realtime storage optimization system. In his free time he larps as a rancher and enjoys spending time with his two longhorns.</p><p>If you want to work on projects like this from start to finish, join our team by clicking the button below.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.basepowercompany.com/careers&quot;,&quot;text&quot;:&quot;See Careers&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.basepowercompany.com/careers"><span>See Careers</span></a></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://inside.basepowercompany.com/p/building-a-telemetry-stack-for-the?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Inside Base Power Company! If you found this post interesting, please share.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://inside.basepowercompany.com/p/building-a-telemetry-stack-for-the?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://inside.basepowercompany.com/p/building-a-telemetry-stack-for-the?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div>]]></content:encoded></item></channel></rss>