Posts in Devops (20 found)
Farid Zakaria 2 days ago

Your phone is a Kubernetes node

tl;dr tabernetes turns browser tabs into real Kubernetes nodes. Open tabernet.es on your phone to join my live cluster: the scheduler assigns your tab a pod, and it runs on a Linux kernel booted inside the browser . Ever since I came across @_pi0_ ’s work on unkernel.dev , it’s been a chaotic brain-gasm of ideas about running Linux in unconventional places now that it’s economical and practical enough to do even on a phone. 1 In my last post I introduced tabc , a container runtime that runs each container in a browser tab. Feedback to the project and the post were a mix of curiosity and a surprising amount of skepticism about whether this could actually be useful. What can you do with a container runtime that treats every browser tab as a potential host? How about create a massive botnet Kubernetes cluster out of people’s browsers? The genesis of the idea came from that flag in . It made me realize that any browser that opens a link could effectively become a host for a container. If you could coordinate multiple browsers, you could orchestrate them like a real cluster. By default that URL is only bound to localhost, so it’s meant for your own browser. Nothing in actually cares where the browser lives, though: put a reverse proxy or tunnel in front of it, send the link to a friend, and their laptop runs your container. If any browser can run a container just by opening a link, then any browser can become a node in “a cluster”. The one thing missing is a way to coordinate them all: a scheduler like Kubernetes . The end result is tabernet.es , a Kubernetes cluster made out of people’s browsers, phones included! Ready to join? 🧑‍🍳 Go ahead and scan it (or open tabernet.es/join ) and your browser will join my live cluster: That is a real k3s cluster, 2 and is just the phone in my hand with a browser tab open. 🤯 The cluster at the moment is configured with two services: one counting visits and another rendering Mandelbrot tiles. Once you join, your tab displays your pod’s live logs and you can even start a shell. Hit “Send a request” or “Render a picture” on the dashboard a few times and watch the tab start churning with activity. 3 As far as Kubernetes is concerned, a node is really just two things: a object in the API server advertising some capacity ( 1 CPU, 256 MiB of RAM, Ready ), and a that keeps renewing its lease and starts whatever pods the scheduler binds to it. There is no rule saying the kubelet has to run on the same physical machine as the workload it manages. 4 is a small Go agent sitting next to the API server that acts as a kubelet for every connected browser tab at once . On the Kubernetes side, a pod only needs a single line to land on a browser. Everything else is standard pod YAML: The agent also labels each with whatever the browser reports about itself: the OS platform, browser name, and device model when available. That means you can target specific devices with a normal : That pod will only run on Android phones. Swap in and you have the world’s first Kubernetes workload with a blue-bubble requirement. 5 In order to facilitate migrating workloads between the browser and the host, the pod is effectively split in two. The browser tab supplies the CPU and RAM. Everything else: the container image and volumes, stays on the server. This is the magic that makes it possible to migrate a stateful service like Redis between different phones without losing its state. 6 Did this further exploration change any of those eye-rolls from earlier? Obviously this is not how you should run production but it does make me think of leveraging possibly the world’s largest pool of disposable compute: people’s phones. 7 I continue to be fascinated with exploring what new possibilities arise when running the bedrock component, Linux, in the browser makes possible. It’s wild that a single URL is now enough to turn almost any device on earth into a sandboxed Linux compute node in a couple of seconds. Go join the cluster at tabernet.es , or check out the README if you want to spin up your own. Sometimes you build the ridiculous version just to see how far the abstraction actually bends. trynix.dev is another project of mine exploring Linux in the browser, which inspired some of my thinking here.  ↩ I chose to run k3s because it is a lightweight Kubernetes distribution and I’m running this on a small exe.dev instance.  ↩ Please be kind to the server. It is running on a tiny instance with 2 vCPUs and 8 GB of RAM.  ↩ Virtual Kubelet has been doing this for years to make managed cloud container services look like a single giant node.  ↩ I actually cringed making this joke.  ↩ unkernel.dev can actually snapshot a running Linux guest, serialize its memory, and resume it in a completely different browser tab but that requires a graceful shutdown.  ↩ This is reminiscent of distributed computing projects like Folding@home , where people’s personal devices contribute to a larger computational effort.  ↩ trynix.dev is another project of mine exploring Linux in the browser, which inspired some of my thinking here.  ↩ I chose to run k3s because it is a lightweight Kubernetes distribution and I’m running this on a small exe.dev instance.  ↩ Please be kind to the server. It is running on a tiny instance with 2 vCPUs and 8 GB of RAM.  ↩ Virtual Kubelet has been doing this for years to make managed cloud container services look like a single giant node.  ↩ I actually cringed making this joke.  ↩ unkernel.dev can actually snapshot a running Linux guest, serialize its memory, and resume it in a completely different browser tab but that requires a graceful shutdown.  ↩ This is reminiscent of distributed computing projects like Folding@home , where people’s personal devices contribute to a larger computational effort.  ↩

0 views
Jeff Geerling 4 days ago

Ansible Fails waiting for privilege escalation on Ubuntu 26

I've slowly been moving my servers from Ubuntu 22 and 24 to 26 this year, and noticed my Ansible automation starts failing if I have password protection for use: Apparently Ubuntu's been rewriting system utilities in Rust, and the version that ships on Ubuntu 26.04 has some incompatiblities with the I've used on servers for 20+ years.

0 views
Farid Zakaria 6 days ago

2035 came early

tl;dr trynix.dev boots GUI programs now. Try solitaire , GL gears , xeyes , a voice , the weather over curl , or Firefox . I remember watching the talk The Birth & Death of JavaScript by Gary Bernhardt and falling in love with the whimsical yet dreadfully serious unfolding of the story of how JavaScript will come to dominate all software. Others have noted the inevitability of JavaScript’s dominance, so perhaps it was not surprising that Atwood’s Law holds true. Atwood’s Law Any application that can be written in JavaScript, will eventually be written in JavaScript. — Jeff Atwood, 2009 I highly recommend watching the talk if you have not already seen it, but the short and skinny is a lookback from 2035 and how JavaScript came to be the defacto language for all software. In Bernhardt’s retelling of events, the date is worked back from 2035, however unsurprisingly, large language models have rapidly sped up the timeline. What was once perceived to be the end-state at 2035 has arrived years earlier and you can witness it unfolding at trynix.dev . One of the most impressive creations I’ve managed to build leveraging nixpkgs-multiverse is https://trynix.dev . It still baffles my mind that I can run any Nix package , over 300,000 distinct package versions, straight from my browser. Truly insane capability. I was however a little dismayed at the speed of the QEMU emulation in the browser. It was slow enough that the creation tipped more towards novelty than practicality. I woke on November 20th and saw Domen Kožar sharing a single message in our TacoSprint Discord channel: unkernel.dev It was the fast browser Linux experience I had sought to achieve, but with Nix . Aside What is unkernel ? It is Linux compiled to WebAssembly, allowing the kernel and system components to run at wasm speed while only user programs are emulated. It was published by Pooya Parsa on November 19th, 2026. In an AI induced manic frenzy, I adopted the new engine along with a slough of long-wished features almost immediately. The proof is in the pudding: unkernel delivers remarkable speed improvements over qemu-wasm , 1 especially on first runs where kernel work dominates. The new engine is able to deliver 2x to 32x faster performance depending on the workload. 2 JavaScript & WebAssembly nirvana. Amazingly not only does the kernel boot quickly, it also enables networking, full-fledged graphical and audio experiences directly in the browser. Windows. A program’s Wayland surfaces are composited in the page by wland , and they float over the terminal you started them from. GL. The VM includes a minimal Mesa build with only the virgl driver, compiled to WebAssembly, rendering through your browser’s WebGL2. Sound. The VM has an ALSA sound card, and can play audio through your browser. Network. , and work. Each TCP connection goes over one WebSocket to a Wisp relay. 3 The best joke in Bernhardt’s talk is a browser running inside another browser: the Windows GIMP under Wine, in Chrome, in Firefox. Of course, I had to try it with trynix. 😈 Here is Firefox in trynix , and it loading trynix.dev , and then loading Firefox again inside itself. 4 Sit and bask in that insanity. That is Firefox, on Linux compiled to WebAssembly, in a Firefox tab, loading the site and then loading Firefox again inside itself. 🤯 2035 came early. With a very healthy set of patches applied to make it even faster.  ↩ The benchmark page tracks both engines over time, measured through the real page and shell.  ↩ Thank you to @_pi0_ for adding trynix.dev to his Wisp relay allow-list.  ↩ Don’t get too excited: this took over 4 hours. The inner Firefox needed JIT disabled, the middle one ran without GL, and the outer page used a Wisp relay on my laptop since wisp.unkernel.dev cannot reach itself .  ↩ With a very healthy set of patches applied to make it even faster.  ↩ The benchmark page tracks both engines over time, measured through the real page and shell.  ↩ Thank you to @_pi0_ for adding trynix.dev to his Wisp relay allow-list.  ↩ Don’t get too excited: this took over 4 hours. The inner Firefox needed JIT disabled, the middle one ran without GL, and the outer page used a Wisp relay on my laptop since wisp.unkernel.dev cannot reach itself .  ↩

0 views
Allen Pike 1 weeks ago

Powerplant, for Coding Agent Traces

Powerplant, our tool for improving AI dev workflows using coding agents’ session traces, is now open without an invite : Today we’re excited to announce that Powerplant is now available to all, and is free for teams under 25 seats. Modern dev teams need to be able to leverage their coding agent sessions. These traces help make PRs more reviewable, improve in-repo skills and instructions , and can even explain why you’re spending a face-melting amount of money on Claude Enterprise. But developers shouldn’t need to push every agent session irrevocably to git to get this benefit. If that sounds appealing to you, try Powerplant . Let me know how it could be better for your team, and we’ll donate $50 to Rewiring America or Let’s Encrypt. ⚡️

0 views
Farid Zakaria 1 weeks ago

Build systems à la trace

As a build systems enthusiast, Build Systems à la Carte is one of my favourite papers. It defines a way to think about build systems that is both precise and surprisingly practical. As a Nix enthusiast, I am deeply fond of hermetic builds, where every dependency is explicitly declared and the build can be replicated. I have already explored the idea of leveraging Guix derivations in Nix by proving that any system that claims to be hermetic can be transmogrified into another lossless one. Where else can this idea be applied? The holy grail of build systems is to combine the best of both worlds: the hermetic guarantees of Nix with the efficient scheduling and incremental rebuilds of systems like Bazel. In the paper’s vocabulary, it defines tasks as being either applicative or monadic . Applicative tasks have static dependencies that can be listed before running anything, while monadic tasks have dynamic dependencies discovered as the task executes. Although the dependencies for Nix itself must be known and declared upfront, many build tasks it orchestrates are monadic, discovering their dependencies dynamically as they execute. Is it possible to take a monadic build, like the ones orchestrated by Nix, and convert it into an applicative form that Bazel can understand and schedule efficiently? What if I had a complete trace of every build action and could write that graph by watching Nix build hello once? What if I had a deterministic VM that could replay every system call and file access exactly as it happened during the original build? Turns out, maybe a little obviously, that retroactively converting a monadic build into an applicative one is feasible if you have a complete trace of the build’s execution. With the help of Rewind , we can record a Nix build, follow it à la trace , 1 and generate a and a file for Bazel and buck2 to build the bit-for-bit exact same thing out of nothing but . tl;dr genrulify takes a Nix build recorded by Rewind and compiles it into a and a file made of nothing but genrules, one per command the build ran. GNU hello, built that way by both tools, comes out with the same NAR hash that cache.nixos.org serves. Explore sample packages at fzakaria.github.io/genrulify . The idea of creating a trace to convert a build system into another is not new. Other tools have explored this space before, often relying on system call tracing, or similar mechanisms, to infer dependencies. Rewind runs a Nix build inside a deterministic VM and lets us rewind to any step, so by default we have a trace of the entire build’s execution. Aside: New to Rewind? Start with a flaky build you only catch once and dafuq is a deterministic VM? We actually have more than a trace, we have the full filesystem state at every step of the build. This allows us to reconstruct exactly what each process saw, byte for byte. Turns out that having a file’s contents, or a hash of it, is incredibly useful when attempting to construct accurate build dependencies. A Nix build though is a complex sequence of shell commands, environment setups, and file manipulations, all orchestrated by the Nix builder: a process that runs stdenv’s and then executes the build commands. What is the important unit of work that needs to be captured for the conversion? If I simply wrapped the whole Nix build as one unit, I would lose all the benefit of granularity I seek from even bothering to migrate to Bazel or Buck. As a starting default: I call the builder, and every subshell it forks, the driver . A cut is the moment a driver process calls . From there until that process and its children exit is one unit of work. Breaking up a recording though is not enough. We also need to account for the fact that many build tools modify files in place, 2 which conflicts with the single-producer requirement of Bazel and Buck. Bazel and buck2 want every file to have exactly one producer. Thankfully, this is a problem compilers solved in the 1980s. A variable assigned twice becomes two values. Static single assignment, but for files. Confused? Let’s use this derivation as an example: Although the path appears only once in the filesystem, it actually has two distinct versions in the build graph. Remember when I said that it will be really useful to have access to the contents of every file version? This is exactly why: the same path can have multiple versions, and we need to distinguish between them. I have been using LLVM at for a while and I’ve briefly skirted with MLIR , a compiler infrastructure that makes it easy to define new intermediate representations and transformations on them. This seemed like a natural fit for representing the build graph, since each file version can be treated as a distinct entity and the relationships between them can be captured explicitly. 3 Our example converted to MLIR looks like this: Using MLIR turned out to be a good choice because it came with some prebuilt support for canonicalization and optimization passes, which I could leverage to simplify and analyze the build graph without writing custom passes from scratch such as dead code elimination or constant folding. Aside genrulify includes passes such as constant folding, merging same outputs, raising copies, and link, which help simplify the build graph automatically. The web interface for genrulify also visualizes the build graph and the effects of these passes, making it easier to understand how the build is simplified. With so much of the build graph already captured and canonicalized, the lowering step becomes almost trivial. Every in the MLIR graph is translated into a corresponding Bazel or Buck . The is the as Rewind captured it during the original build with every argument, environment variable, and file descriptor it observed as Bazel labels as inputs. Aside A recorded command only makes sense in the context where it ran. It expects the directory, its environment, and its file descriptors to be exactly as they were during the original build. That is why every includes the sandbox script, , and all necessary inputs to recreate that context. There is no . There is no toolchain. There is no provider, aspect, transition or configuration. It is Bazel but without the extra language features and abstractions that usually come with it. Crucially though, it still captures the full dependency graph and the exact commands needed to reproduce the build so we can leverage remote-execution capabilities effectively. Converting Nix builds into a series of Bazel s is straightforward but verbose. Each command becomes a with all its inputs and outputs explicitly listed. It’s not elegant, but it works. MLIR and compilers have a solution for this as well. We can pattern match on the recorded commands and elevate them into higher-level abstractions like , , and , known as raising in MLIR-speak . We now have a higher-level representation of the build, where individual commands are grouped into meaningful abstractions like , , and . These are very syntactic abstractions though as they are just macros over and do not change the underlying execution semantics. I asked at the top whether a monadic build can be turned into an applicative one. For a build that has already happened, the answer is yes, and it’s effectively a tautology. A recording is a monadic build in which every choice has been made. So, is this a breakthrough? What is the significance of the trace and the ability to convert to Buck or Bazel rules? Consider a Nix build whom may set the environment variable or run with . When we handed the graph to Bazel, it could see that none of those compiles need each other’s output, and will run the commands in parallel. Code written as first-class citizens in Buck or Bazel can also better integrate with the output of the converted build graph, allowing for more efficient and parallel execution while maintaining correctness. I have spent years reading arguments about whether Bazel’s rules or Nix’s derivations are the right abstraction. I am not the one who will end that holy war but I can at least build the same package in both systems and compare the results. For now, enjoy a Nix-y Bazel-y Bazel. 🥸 Turns out that trace is French for following something by the trail it left. This makes me happy.  ↩ Examples include appending to an archive, rewriting a binary in place, and appending to .  ↩ If you want another reason: I also like to learn new things and have fun. I enjoy experimenting with new tools and techniques.  ↩ Turns out that trace is French for following something by the trail it left. This makes me happy.  ↩ Examples include appending to an archive, rewriting a binary in place, and appending to .  ↩ If you want another reason: I also like to learn new things and have fun. I enjoy experimenting with new tools and techniques.  ↩

0 views
Lea Verou 1 weeks ago

Nudeps: bundler-like imports, none of the baggage

You a package (e.g. ), you write , and it works — as long as there is a bundler in between. Without one, the browser has no idea what is: it only understands URLs, and was never meant to be deployed. So even the simplest project ends up needing a bundler, only so it can use dependencies instead of reinventing the wheel. But bundlers add a significant tax. They process every single file, introduce several layers of abstraction between source and deployment, and these abstractions often leak : things that work fine in the browser can break in the build. Earlier this year, I published Web dependencies are broken: Can we fix them? that discusses this from a platform architecture perspective. Besides the architectural concerns, the complexity is an active developer pain point: in State of JS 2025 , “Managing Dependencies” was the 3rd biggest pain point , and “Build tools” were 6th. However, getting rid of build tools is not the goal. Some use cases should not be handled by the browser, so bundlers and build tools will always have a role to play. The goal is making them lighter, composable, and less essential . In that vein… Nudeps 1 is a new kind of lightweight build tool that lets you continue using to manage dependencies, vendor them locally, and import them via bare specifiers (package names like or instead of URLs), without the bundler. You set it up once, and then you can forget about it: you keep ing packages and importing them by name, and they work in the browser. And it only ever touches your dependencies, never your own code . Since my apprentice Dmitry and I prototyped the initial MVP in February, we and others have tested it on a variety of projects, and at this point I’m confident that — while not perfect — it’s ready for prime time. A core architectural difference between Nudeps and bundlers is that your own code remains untouched . In fact, it doesn’t even need a watcher that runs whenever you make edits! It only touches dependency files, and doesn’t rewrite anything, making it extremely lightweight in terms of complexity it adds. This means it can complement any other tooling — or none. You write raw HTML, CSS, JS? This is for you. You use a templating engine, a CSS preprocessor, and TypeScript? This is also for you (though understandably you may have less use for it). This also makes it complement static site generators and island architectures particularly well. Does it replace your build process? If all you needed it for was getting imports to work, it could. If you also compile your code (JSX, TypeScript, single-file components), you still need a tool for that, but it can be a much smaller one. Bundlers make complex things possible. Nudeps is hoping to occupy the space on the left of the curve and make simple things easy . Assuming you don’t need to customize anything (e.g. using for the map, for the dependencies, all default settings) it goes like this: That’s it. You’re done. You can now and to your heart’s content, and start using packages right away in your code. Things Just Work™. We have been so trained to expect friction and complexity, that some testers thought they were doing it wrong: I ran the npx command and added the import map to my app, but I assumed that there was still a lot more work to do. I was shocked to realize I was done. — Sam Littlefair Most of the pieces were already there, and were just waiting for someone to put the puzzle together. Import maps allow us to import bare specifiers (package names like ) instead of URLs in the browser and are Baseline Widely Available. JSPM is a library that traces a dependency graph and generates an import map. It focuses on CDN use cases, but its engine is exposed as a separate library that can be repurposed, which is what Nudeps uses under the hood (with a lot of tweaks). Import maps currently have to be inline in the HTML of every page, which would require templating, but external import maps can be easily emulated via a small script that injects the map. Package managers like npm already give you the file structure and let you manage versioning, that structure just can’t be deployed as-is to the web . When you install Nudeps via , it does two things: Using as a hook means there is no Nudeps watcher or command to run when you start working on a project! In that sense, Nudeps actually gets you better DX than a bundler 2 . Then, whenever runs, it… Here’s an example of what that script may look like. In production, you can prune to only the specifiers actually used (via the option), and including them all in development means the import map only needs to change when your dependencies do, not whenever you write an import. Yes! Obviously some frameworks are compile-only (e.g. Svelte), but many have runtime-only imports. Even React can be used, though without JSX the ergonomics are poor. My personal go-to is Vue . Most libraries also work fine, including D3 , gsap , Lit , Three.js , Floating UI , interact.js , and Underscore . Beyond common cases, Nudeps supports quite a few edge cases too: Many CJS-only packages like lodash work too, via a tiny shim (that Nudeps handles), and the jQuery demo even loads two different jQuery versions side by side through npm aliases. Yes! In fact the demos include two such dependencies: Open Props and Bootstrap Icons . The catch is that since browsers currently have no way to include CSS stylesheets via specifiers , you need to use actual URLs ( this is changing ). This also means these packages cannot use other dependencies (unless they bundle them). Thankfully, that’s the case for most. To make this easier, Nudeps creates symlinks (or redirects, where symlinks are not supported) so you can import versionless URLs like . From the very beginning of our testing (back in February), Claude understood it just fine, making only minor mistakes that were unnecessary, but ultimately harmless (Nudeps still worked fine), such as: And the package now includes a file, which makes them go away entirely once the agent is instructed to actually use it. Most packages work. Also, since Nudeps doesn’t bundle, packages with a lot of tiny modules pulled together by ESM imports may be slower to load initially. If you’re a package author that wants to provide a Nudeps-friendly bundle, generating a bundle that consolidates them somewhat can improve performance. But there is a tradeoff to all bundling: the more files are bundled, the less granularly they can be loaded. There is typically a sweet spot, and that varies depending on the structure and usage patterns of your package. But please do not bundle your package’s dependencies in there as well — these need to remain separate, so they can be shared with other packages that use the same version of the same dependency. Nudeps does one job, so there are things it doesn’t do, and things it doesn’t do yet : Nudeps is just the beginning, and is far from perfect. There are certainly plenty of unknown unknowns, and many things we simply haven’t gotten around to. Besides bugfixes and closing the gaps above, at the top of the roadmap is testing more packages to ensure compatibility and uncover edge cases. If you want to give Nudeps a try, the easiest way is to head to your terminal and run in your project directory — or just let your agent do it. Get Nudeps Demos Nudeps on npm I’m hoping that Nudeps is the first step towards a future of lighter, composable build tools . Try it and let us know how it went! Thanks to the beta testers: @g12n , @jak2k , @lgarron , @beejunk . Thanks to Jordan Harband for his early feedback around package subsetting. And as always to my apprentice Dmitry for his help working out the kinks and making this a reality. Which you can choose to read as either nude deps or nu (new) deps ↩︎ Of course if you need to start a server for development, that doesn’t make a ton of difference. But localhost is cheap. Your editor can start one. Your agent can start one. Heck, I even have one running at the root of all my cloned repos. ↩︎ You run and it will set everything up for you. You add to your HTML through whatever mechanism you want, before any other scripts that import dependencies: Adds Nudeps to your Adds two scripts that run : , so Nudeps re-runs itself every time you or , and , so a fresh clone is ready too. copies the necessary files from into a directory, which is meant to be deployed, but not committed: it is regenerated on every , and comes with its own flattens the directory structure by including the version number in the directory name (e.g. becomes ) which gives you better deduplication and granular cache busting, generates an import map injection script with all specifiers in your direct dependencies and the specifiers they actually use, using JSPM under the hood. Local packages ( ) npm aliases ( ) git dependencies ( ) npm workspaces (experimental) Adding entries to (the generated files already ignore themselves) Running manually, adding it as an script, or even running manually because it thought it was a custom script. It wasn’t aware of the hook (and would in fact insist it doesn’t exist 😅) Adding config file overrides that weren’t necessary Nudeps works much better with ESM packages. CJS support is very experimental. Some packages unfortunately assume that they are running in a Node.js environment and rely on Node.js-specific APIs like . For the most common ones, you can just stub them, but if it starts getting out of hand, you’re better off using a bundle for that particular package (you can add overrides via Nudeps’ config). It doesn’t transform your code. Anything that needs compiling (JSX, TypeScript, Svelte) still needs its own tool, which Nudeps happily works alongside. npm only, for now. Supporting other package managers (pnpm, yarn, etc) is at the top of the roadmap, since many people today have moved away from npm. Non-JS dependencies need actual URLs, not specifiers. Workers also don’t do specifiers, see No benchmarks yet. Depending on the package structure and type of usage, bundlers may be significantly faster or even slightly slower. It would be nice to get some data on this. Which you can choose to read as either nude deps or nu (new) deps ↩︎ Of course if you need to start a server for development, that doesn’t make a ton of difference. But localhost is cheap. Your editor can start one. Your agent can start one. Heck, I even have one running at the root of all my cloned repos. ↩︎

0 views
Blog System/5 1 weeks ago

Remote EngFlow caching meets an old G4

During BazelCon 2026 in early October, the fine folks at EngFlow gave me a very cool piece of swag: a Cache & Carry box or, in other words, a portable remote cache for Bazel builds. The only ask was for me to post a photo on social media, which I’d have gladly done, but… that seemed like too low a price for a nice piece of hardware. So I promised I would write an article instead. The article is late, though, as I have been busy getting ZKeys out the door and trying to find a good idea for what to talk about. I finally got the right inspiration after taking an old PowerBook G4 laptop from 2004 out of the closet to play with Tabby-PPC . That experiment failed, but as the laptop sat on my desk, I thought: could I make it leverage the Cache & Carry and demonstrate the clear benefits of remote caching? The answer was “of course yes” before even trying, but it was not going to be easy: this machine is severely underpowered by today’s standards and won’t run Bazel, so showing remote caching via a modern build system wasn’t going to be possible. I had to find an alternative demonstration path, and find it I did: the recc compiler wrapper . Even then, the benefits weren’t great on the first try, so I had to debug and iterate. In the end, the compilation time for itself dropped from a little over 1 hour to just 3 minutes. Let’s see how. Typing articles like this one, with manually-taken pictures and hand-edited videos, requires a lot of work. Subscribe to Blog System/5 to show your support. EngFlow is a relatively new company that offers a hosted remote caching and execution service for Bazel builds. More specifically, EngFlow is an implementation of the Remote Execution (RE) API . And fun fact: the protocol name is RE, not RBE as many people call it, because RBE was Google’s own RE service that never really saw the light of day. The EngFlow Cache & Carry in its box before unpacking it. Cache & Carry is a little toy that packages the EngFlow remote cache (not execution) software into a Raspberry Pi 4 preconfigured to work as an appliance, enclosed into a branded 3D-printed case and packaged into a fancy cardboard box. Mind you: this is what I wanted to achieve with my own EndBOX last year but never went the last mile to distribute it as a truly finished toy. The EngFlow Cache & Carry Raspberry Pi 4, with its custom branded case. Getting started I’m quite used to EngFlow’s product by now because we use it at Snowflake to power our in-house builds and tests, so using the Cache & Carry was no difficulty. And it shouldn’t be for anyone given that configuration and management are pretty easy. Here is the cluster status page right after plugging in the device and connecting to it, showing how this “cluster” is really just a cache and has no remote execution features: EngFlow's standard Cluster status page in the live dashboard. Using it to run Bazel builds is trivial, really. All it took was to stick these few lines in my file, as the instructions say: And just like that, builds started showing up in the UI: EngFlow's standard Invocations browser in the live dashboard. This is one of the weakest parts of the UI, to be honest, because of its poor search capabilities, but the team is hard at work redesigning it. We can even peek into one of the builds to observe cache statistics: EngFlow's Invocation Details drill-down view in the dashboard. Here we can see the cache usage status and that the whole build was cached and took only 17 seconds to run (compared to the 13 minutes it takes otherwise). One thing that did surprise me about this setup is the ability to carry power and Ethernet over a single USB-C cable between the Raspberry Pi 4 and the host. I didn’t know this was possible, and it’s a great feature: if you just want to use the Cache & Carry with your laptop, all you have to do is plug it in with one cable and it just works. Getting Bazel to work against EngFlow was easy. But… as I told you earlier, EngFlow is not just a remote caching and execution service for Bazel: it is an implementation of the RE API. With some imagination, you would think that there might be clients other than Bazel for this API, and you would be right. Buck 2—Meta’s build system—is an obvious example, but there are more niche clients. And the one I discovered while searching whether supported EngFlow and finding that it didn’t was : a compiler wrapper like and that uses RE for caching and remote execution. Building and installing is easy: But note I installed the binary as , not . The rationale for this is that we have to configure . This is done via environment variables, and as I don’t like to pollute my regular environment with program-specific noise, I created a launcher like the following: With this in place, we can run a single compilation command and verify that the wrapper runs: And, with a repeated invocation, we can ensure that caching is in effect: OK, time to pick up the PowerBook G4 from 2004. This little 12” laptop sports a PowerPC G4 (7447A) running at a whopping 1.5 GHz, with 768 MB of RAM, a super-duper-slow 80 GB spinning drive, and a 100 Mbit Ethernet link. Not a lot, you’d say… but this computer was frigging amazing back in the day. I had the iBook G4 back in the day and was always jealous of the PowerBooks I saw in the wild, unaffordable to me, so when I could grab this one for $40 a few years ago, I just had to. EngFlow Cache & Carry in its box next to the PowerBook G4 12” from 2004 we’ll use as a client. Right now, this machine is running Debian forky/sid, one of the only Linux distros out there that still works out of the box on 32-bit PowerPC. As of 2026-11-09, it reports: With the specs out of the way, let’s go back to the premise of the article: showing you what a massive and unsurprising difference (remote) caching can make during compilations, and how, because RE is “just a protocol”, we can leverage it even from old machines. For this, we’ll measure ’s own build from a clean slate, cached and uncached, because it’s a large enough C++ project that takes about an hour to build out of the box—not too little, but also not so much as to be discouraging. Here are the final numbers of the comparison: Let’s break them down. My first attempt at using remote caching was to build with itself in the “default” configuration for and the toolchain installed by Debian. This meant GCC 16.2 and no custom flags to CMake. The clean, fully-cached build took about 8 minutes to finish. This showed a nice ~7x speedup compared to the clean unwrapped build, but somehow it felt like not enough. Why did we still spend 8 minutes to compile something when everything should be cached? I had two theories, but neither of them was valid: The machine doesn’t have a lot of RAM for C++ compiles. Was causing it to thrash, maybe because it buffers files in memory instead of transferring them in chunks? Looking at the code, the answer was no: implements chunked uploads and downloads. The machine’s Ethernet port is slow. Were network transfers slowing things down? Not really either: the output tree is only ~150MB after a build. (Mind you, with Bazel and remote execution, you’d typically use to avoid ferrying large intermediate object files, but that’s not an option with a compiler wrapper that knows nothing about the end-to-end build graph.) With both theories debunked, I had to look elsewhere: CPU consumption. It is no surprise that compiler wrappers are compute-heavy. One specific CPU-bound operation for C++ wrappers is dependency scanning: these wrappers have to (re)discover on their own what a specific compilation action depends on, because nothing tells them upfront. When the wrapper sees something like , it can tell that depends on … but what about the thousands of other implied dependencies like header files and toolchain binaries involved in that innocent invocation? You must know what those are in order to generate a cache key that can disambiguate different environments correctly. Taking some measurements, dependency scanning was indeed the problem as more than 5 out of the total 8 minutes of the cached build were spent on it. Looking through the codebase, I found that implements support for : a helper tool that ships with Clang and is specifically designed to speed up dependency discovery. Would it help here? I switched to Clang, reran the build and… whoops, still no bueno. The unwrapped build was, interestingly, much faster than the GCC one, but did not help: the logs claimed that it succeeded only for 23 out of 124 scanner runs, and so it didn’t materially change the overall result. Looking further, I found that was not being effective: ’s scanner adds to the compile commands, and because precompiled headers (PCHs) had been built without that option, Clang rejected using it. So… what if we disable PCHs by adding to the CMake invocation? Well, it turns out this made no difference either because CMake emits in this case, and apparently probes for these flags wrong, which in turn causes to fall back to slow dependency scanning. I applied a very hacky, targeted fix to to ensure was effective, reran the measurements, and got these numbers. Focus on the PCH? and Dep scanning columns: Yay! End-to-end clean, fully-cached build times fell from 8 minutes to 3 minutes, and those 3 minutes are pretty much the cost of the entire build and account for local non-compiler work such as protobuf generation and linking. Still not zero, but much better than what we started with. Here is the 1-minute video comparing build times. The difference is pretty massive: Recording of recc's own compilation on a PowerBook G4 without and with remote caching. As you can see, there is nothing magical about remote caching, and EngFlow’s Cache & Carry is a little toy to play with this technology. You can, of course, download an open source alternative such as Builbarn , but playing with a preconfigured appliance was fun and removed a lot of the complexities of setting such a system up. When paired with a modern build system such as Bazel, remote caching (and execution) can be trivially enabled and can achieve near 0-second build times when the whole build is cached: these build systems have precise knowledge of the full build graph and know which paths in it are or are not invalidated for a given build. And because they have this knowledge, they can apply optimizations to the whole build such as not downloading intermediate artifacts. But as we have seen, RE is just a protocol, and if you can speak it, you can leverage it from pretty much any machine (even if ancient and “worthless”) and any build system. You’ll hit some inherent limitations, like a compiler wrapper having only a very narrow view of the build, or you’ll have to deal with strange corner cases that don’t allow maximum efficiency, but you can make it work. Keep caching and carrying! The EngFlow Cache & Carry in its box before unpacking it. Cache & Carry is a little toy that packages the EngFlow remote cache (not execution) software into a Raspberry Pi 4 preconfigured to work as an appliance, enclosed into a branded 3D-printed case and packaged into a fancy cardboard box. Mind you: this is what I wanted to achieve with my own EndBOX last year but never went the last mile to distribute it as a truly finished toy. The EngFlow Cache & Carry Raspberry Pi 4, with its custom branded case. Getting started I’m quite used to EngFlow’s product by now because we use it at Snowflake to power our in-house builds and tests, so using the Cache & Carry was no difficulty. And it shouldn’t be for anyone given that configuration and management are pretty easy. Here is the cluster status page right after plugging in the device and connecting to it, showing how this “cluster” is really just a cache and has no remote execution features: EngFlow's standard Cluster status page in the live dashboard. Using it to run Bazel builds is trivial, really. All it took was to stick these few lines in my file, as the instructions say: And just like that, builds started showing up in the UI: EngFlow's standard Invocations browser in the live dashboard. This is one of the weakest parts of the UI, to be honest, because of its poor search capabilities, but the team is hard at work redesigning it. We can even peek into one of the builds to observe cache statistics: EngFlow's Invocation Details drill-down view in the dashboard. Here we can see the cache usage status and that the whole build was cached and took only 17 seconds to run (compared to the 13 minutes it takes otherwise). One thing that did surprise me about this setup is the ability to carry power and Ethernet over a single USB-C cable between the Raspberry Pi 4 and the host. I didn’t know this was possible, and it’s a great feature: if you just want to use the Cache & Carry with your laptop, all you have to do is plug it in with one cable and it just works. Bypassing Bazel Getting Bazel to work against EngFlow was easy. But… as I told you earlier, EngFlow is not just a remote caching and execution service for Bazel: it is an implementation of the RE API. With some imagination, you would think that there might be clients other than Bazel for this API, and you would be right. Buck 2—Meta’s build system—is an obvious example, but there are more niche clients. And the one I discovered while searching whether supported EngFlow and finding that it didn’t was : a compiler wrapper like and that uses RE for caching and remote execution. Building and installing is easy: But note I installed the binary as , not . The rationale for this is that we have to configure . This is done via environment variables, and as I don’t like to pollute my regular environment with program-specific noise, I created a launcher like the following: With this in place, we can run a single compilation command and verify that the wrapper runs: And, with a repeated invocation, we can ensure that caching is in effect: Let’s go retro OK, time to pick up the PowerBook G4 from 2004. This little 12” laptop sports a PowerPC G4 (7447A) running at a whopping 1.5 GHz, with 768 MB of RAM, a super-duper-slow 80 GB spinning drive, and a 100 Mbit Ethernet link. Not a lot, you’d say… but this computer was frigging amazing back in the day. I had the iBook G4 back in the day and was always jealous of the PowerBooks I saw in the wild, unaffordable to me, so when I could grab this one for $40 a few years ago, I just had to. EngFlow Cache & Carry in its box next to the PowerBook G4 12” from 2004 we’ll use as a client. Right now, this machine is running Debian forky/sid, one of the only Linux distros out there that still works out of the box on 32-bit PowerPC. As of 2026-11-09, it reports: With the specs out of the way, let’s go back to the premise of the article: showing you what a massive and unsurprising difference (remote) caching can make during compilations, and how, because RE is “just a protocol”, we can leverage it even from old machines. For this, we’ll measure ’s own build from a clean slate, cached and uncached, because it’s a large enough C++ project that takes about an hour to build out of the box—not too little, but also not so much as to be discouraging. Here are the final numbers of the comparison: Let’s break them down. First build, slow My first attempt at using remote caching was to build with itself in the “default” configuration for and the toolchain installed by Debian. This meant GCC 16.2 and no custom flags to CMake. The clean, fully-cached build took about 8 minutes to finish. This showed a nice ~7x speedup compared to the clean unwrapped build, but somehow it felt like not enough. Why did we still spend 8 minutes to compile something when everything should be cached? I had two theories, but neither of them was valid: The machine doesn’t have a lot of RAM for C++ compiles. Was causing it to thrash, maybe because it buffers files in memory instead of transferring them in chunks? Looking at the code, the answer was no: implements chunked uploads and downloads. The machine’s Ethernet port is slow. Were network transfers slowing things down? Not really either: the output tree is only ~150MB after a build. (Mind you, with Bazel and remote execution, you’d typically use to avoid ferrying large intermediate object files, but that’s not an option with a compiler wrapper that knows nothing about the end-to-end build graph.)

0 views
Farid Zakaria 2 weeks ago

beer.drv.drv.drv

Have you heard about dynamic derivations ? They are an experimental-feature in Nix that lets a derivation produce other derivations as its output. Why ? This lets you dynamically create your build graph, instead of having to know it all at evaluation time. It’s Nix’s answer to try and match the build speed of other build systems like Bazel or buck2 . There is not much written about dynamic derivations, and the documentation is sparse. I have written a few posts about them, so I sometimes get questions about them. Recently, I got a DM from Evan Porter over LinkedIn , the ultimate bug triaging network, about whether it is possible to query the deriver of a dynamic derivation to get the initial derivation. For dynamic derivations let’s say I have a .drv.drv file. This file outputs a derivation. Is it usually possible to query deriver the output derivation to obtain the initial derivation? They had tried it and got this: That should work. 🤨 Every path a build registers carries a , the that produced it, and a that came out of a build is still a path a build registered. When I tried it, it worked. 🤷 You will need in your to drive the samples in this post. Turns out, there is a case where you do get if you set on the producer. If the producer is content-addressed, its output path is not known until after the build, and Nix does not fill in the of a path that already exists. I filed NixOS/nix#16823 . The question though made me wonder how far back you can walk the chain of dynamic derivations. I had to try it. 😈 Let’s pick a fun example to see how far we can go. Here is a derivation that imitates the classic song 99 bottles of beer by producing a chain of derivations, each one outputting the next verse. 1 Tip A derivation whose output is a must set . In our example we are using a content-addressed derivation, but the same idea works with an input-addressed one, but it’s more work to compute the output path in the shell, unless you are using to do it for you with recursive Nix. The Nix side builds the first derivation and then follows once per bottle. While working through this example, I hit a bug in Nix that made me set on the top derivation. That is not necessary for a derivation that outputs a , but it works around the bug. I filed NixOS/nix#16830 . You might notice that we limit the number of beers to 50. Why 50 and not 99? Well, 50 is the most that fits in a store path. The maximum length of a store path is 211 characters . A derivation’s store path must include the suffix, and every in a chain adds four characters. The top derivation is named and if you add 51 s we get 208 characters. No room for any more beer. 🍻 Let’s build sing it. Fifty-one builds, one after another 2 . Evaluation knows about only the first one. Nix discovers each of the other 50 by building the one before it. 🍺 Back to the original question: can we query the deriver of the output derivation to get the initial derivation? Yes, we can. Let’s put in a loop that walks from the result all the way back to the top. We have the result plus 51 derivations. 💪 Since every derivation in the chain was built, every one has a build log, and you can ask any of them to sing its verse again. I’m very excited for the future of dynamic derivations. tomberek is leading a working-group to finalize the feature and are currently meeting weekly. With dynamic derivations, Nix will be able to compete with other build systems in terms of speed and flexibility and take over the world . Nix the world. The builder writes the next derivation by hand in ATerm , so there is no recursive Nix and no involved.  ↩ A single trivial build takes about 1.5 seconds on my laptop, so the cost of building 51 derivations is about 75 seconds largely due to substituter lookups. If you disable substituters , the builds take about 1.3 seconds in total.  ↩ The builder writes the next derivation by hand in ATerm , so there is no recursive Nix and no involved.  ↩ A single trivial build takes about 1.5 seconds on my laptop, so the cost of building 51 derivations is about 75 seconds largely due to substituter lookups. If you disable substituters , the builds take about 1.3 seconds in total.  ↩

0 views
Jeff Geerling 2 weeks ago

Ops needs friction

Between Microsoft's two-day outage and the FAA ground stop yesterday , there's plenty of ink spilled about who's responsible, why these things happened, etc. But it made me think back to some of the infrastructure and ops teams I've worked on, and similar (though much smaller scale) outages we encountered. Having an ops mindset is fundamentally different from a development or project management mindset. And it took me over a decade of software development to understand why.

0 views
codedge 2 weeks ago

Pihole in HA mode

Pihole is the central point of resolving internal and external domains in my homelab. Running this on only one device is a classical SPOF so I run two separate instances on two physical devices in HA mode. In my homelab I decided to use two spare Raspberry Pis doing all DNS resolving. Even my Fritzbox uses the Pihole devices as custom DNS server. The problem is, that the Fritzbox can only take one IP as DNS server server. There is no builtin logic running Pihole in a typical high availability (HA) setup like one Pihole goes down and the other one kicks in. If your router takes more than one IP already, there is no need for the solution I describe here. Just put in the IPs of your two devices and you are done. So even having two devices running Pihole, Fritzbox would only use one for resolving names, which is a single point of failure (SPOF). The solution would be having a floating IP that jumps to the device, which can handle the current request. If both are up, there is a primary instance, and one or multiple secondary instances. Fortunately there is keepalived which brings load balancing and high availability to Linux. […] keepalived runs a set of health checkers that watch each server pool and decide, in real time, whether a real server stays in the topology or drops out according to its health. keepalived ships in most Linux distributions. I use Raspberry Pi OS Lite , the headless version without any desktop environment. My current Pihole setup is: On the Raspberry Pis I rolled out this configuration, with a different value, to define the primary and seconday instance. In the healthcheck script you define how often a check can fail or should succeed to trigger failed or healthy states. In the example above, a check each 2 seconds with means a failover after 4 seconds The only IP address that Fritzbox hands out to all my devices is which is a floating, load balanced IP what either one of my Raspberry Pis answers. I can update one Pi while the other one automatically serves all DNS requests. Pihole 1: x.x.x. 18 Pihole 2: x.x.x. 19 Floating IP: x.x.x. 53

0 views
Takuya Matsuyama 2 weeks ago

I moved 39 repos into a monorepo to boost agentic coding

Hey, what's up? It's Takuya here. I recently moved my projects into a monorepo to speed up my agentic coding. I came across a post by Mitchell Hashimoto . He recently started a new company, Superlogical, which builds Rex , a terminal app designed for working with AI agents. His team is small, and everyone on it is trusted to push commits straight to main. They skip the traditional flow of opening a pull request, waiting for someone to review and approve it, and then merging it. Instead, AI reviews the code before the push, and humans and AI review it again after it lands. Their workflow looks super fast. I'm a big fan of Mitchell, and I admire the quality of his work, like Ghostty. So I trust his technical decisions, including how his company uses AI. His post inspired me a lot and made me rethink my own workflow, starting from how my repositories are structured. Before I started coding with agents, each of my private modules lived in its own repository and was published to npm from there. Development was slower before AI, so I usually focused on one module at a time: make the changes, publish a new version, then update the apps. With semver, a change in one module couldn't unexpectedly break the apps. Many of these packages are shared across multiple projects, so this workflow was crucial for me. When I started using Claude Code, I kept the same structure, and at first it simply sped up my traditional workflow. But the more I relied on agents, the more friction I felt. AI makes a lot of changes, blazingly fast, so my workflow became the bottleneck. I had set up trusted publishing on npm, so GitHub Actions published new versions automatically. Still, after every change to a package, I had to wait for the publish run to finish before an app could use the new version. Agents also make many changes that span multiple modules, and keeping the module structure in shape became painful. Because each task was spread across several repositories, agents often missed shared constants, functions, and APIs. I think my job now is to help AI make fewer mistakes. One way to do that is to give the project a shape where AI can quickly understand the whole picture: where to look and where to add things. That's why I decided to move to a monorepo. The transition wasn't that simple. I have an Electron app, a React Native app, and a web app, each with its own tech stack and package manager (my server-side code stays in its own repos). Most packages used pnpm, but the React Native app used Yarn, so I had AI switch it to pnpm. Some of my repositories are public, as contributions to the open source community: for example, React Native modules and tools that help developers build Inkdrop plugins. Those can't move into a private monorepo. Everything else moved in, and the repository is now a single pnpm workspace. I used to bring each repository in with its full git history. For each repo, it moved every file into its new folder (for example, or ) across all past commits. It also renamed the tags to the format, like , since every repo had its own . And it rewrote bare issue references like in old commit messages to , so they still point to the right repository. Then I merged each rewritten repo into the monorepo with . For the plugin-related repositories, I made a second, public monorepo ( inkdropapp/plugins ). So now there are two monorepos, and the release flow looks like this: With everything in one repo, I could also unify the toolchain. Some modules still used ESLint and Prettier, so I migrated them all to Oxlint and Oxfmt, which now run once from the root. I also tried Vite+ , a unified toolchain that bundles Vite, Vitest, Oxlint and Oxfmt behind a single command. I was already using most of these tools in my modules, so switching looked easy, and its task caching promised a faster loop with agents. But in my case, its type-check cache reported a broken TypeScript 7 project as passing. With agents, that's risky: they see a green check and move on. There also wasn't much build time to save in the first place, so I decided not to go with it. I'll try it again in the future. This work took two days to finish, and I'm happy with the result. Now, my agent and I can quickly update modules and keep them aligned in a single change, and I can comfortably create a git worktree for each task. Before the move, a task that touched several repositories needed a worktree in each of them, and that was painful. So, this transition has already paid off. Inkdrop's codebase is over 10 years old. If you also have an old project split across many repositories, I hope this helps you rethink how you work with agents. I have so many ideas to improve my app, and I'm so excited to work on them starting next week. That's it! Thank you for reading.

0 views

AWS Emulator and the engineer's job when agents write the code

AWS Emulator, launched today and written and tested entirely by agents, gives you a local copy of more than 200 AWS services to test against. Swami Sivasubramanian recalls the high-fidelity simulation his team built to test one of Amazon's earliest distributed systems, and writes about how the engineer's work changes when agents write the code.

0 views
Farid Zakaria 2 weeks ago

What if every Nix build were bit-reproducible?

The holy grail of build systems and package managers is bit-reproducible 1 builds. This is such a desired trait that nearly every Linux distribution has a reproducible builds project to track the progress and validity of their builds. Why is bit-reproducibility so important? Trust. You can trust that the software you are running has not been tampered with and is the same as what the developers intended if you can verify that when built from source, the output is identical. Making software bit-reproducible though is hard. There are a lot of ways that can introduce non-determinism into a build: timestamps, random seeds, thread scheduling, and more. Most distributions that have achieved “reproducible builds” have done so for only a subset of their packages, usually those that comprise the core of the ISO or distribution. Nix’s default model, the extensional model (input-addressed), famously works around the need for bit-reproducibility by hashing the inputs to a build and using that hash as the store path. This lets the build be repeatable even if the output is not bit-for-bit identical. It is an incredibly pragmatic solution to making builds repeatable, but it does not solve the problem of trust. We are still trusting the outputs uploaded to cache.nixos.org have not been tampered with. Nix also has an experimental content-addressed model (intensional model) where the paths are based on the content of the output, but crucially, it does not guarantee that the builds are bit-reproducible. This leaves us with an undesirable situation regardless of the model. For the extensional model, the smallest change in the inputs changes the store path which causes a cascade of rebuilds. For the intensional model, a single derivation can produce multiple different outputs. What if every build could be bit-reproducible? What would that mean for Nix and the extensional model? I have been working on Rewind , a deterministic virtual machine. It runs builds in a deterministic environment, which so far has mostly been used to investigate bugs. I have been thinking about what else a platform that runs builds deterministically makes possible. I started this thought by exploring how to make profile-guided optimization reproducible but I was just scratching the surface. When we try to make a build bit-reproducible, we usually go hunting for the sources of non-determinism: timestamps, random seeds, thread order. These are inputs the derivation does not account for, so they are not hashed into the store path. A simpler approach is to run the whole build inside a deterministic machine. Eelco’s thesis says outright that the extensional model assumes the builder is impure (§5.7). Build operations in general are not pure: the contents that a builder stores in the output path can depend on impure factors such as the system time. […] Thus, while any derivation can have a potentially infinite set of output path contents that can be produced by an execution of its builder, we view the elements of that set as interchangeable. But this is a model—an assumption about builders. Running a build within Rewind captures all of the implicit inputs to a build and makes them explicit, which makes any build bit-reproducible. 🤯 Aside: New to Rewind? Start with a flaky build you only catch once and dafuq is a deterministic VM? We can wrap any derivation in Rewind with a Nix function. takes the machine’s inputs and a derivation, and returns the same derivation with its builder running inside Rewind: 2 It works on any derivation and the resulting derivation is bit-reproducible every time. 3 Let’s look at a simple example of a build that is not bit-reproducible, and how when wrapped in Rewind, it becomes bit-reproducible. Here is a simple C program that prints a greeting and depends on a library. The derivation adds a build id and a build time to the output similar to what release builds often do to “stamp” their builds. The build id and build time are two common sources of non-determinism in builds. We have wrapped the derivation in a function to control whether the build runs in Rewind or not, and whether the build is content-addressed or not. Built on the host under the input-addressed model, fails : Built in Rewind, the same derivation passes: The UUID still comes from the kernel’s random pool and the time still comes from the clock. They are the same on every build because the pool’s seed and the clock’s start are initialized from the same values. Nice! We just got a build that is bit-reproducible even if it’s not content-addressed. You can find more details of the library and even making Rewind a Nix on Rewind’s Nix build reference . What does that mean for the content-addressed model? Since the outputs are not bit-reproducible, the same derivation gets a different path on each rebuild. 4 Producing multiple variants is problematic and the thesis notes the consequence (§6.4.1): you can end up with a closure that contains more than one variant of the same derivation. The fact that a derivation can resolve to any number of output paths due to impurity, leads to the problem that we might end up with a closure that contains more than one element from the output equivalence class of a derivation. With , both stores build the same bytes and print the same path: 5 One derivation, one path, in every store. Bit-reproducible outputs also mean cache hits across machines. If the bytes are the same, the content address is the same, and a path one machine built is a hit for every other: early cutoff optimization ftw! When we make every build bit-reproducible, the two models collapse into one. What does this mean for the extensional model? The extensional model was a wonderful pragmatic solution to a world where determinism was not guaranteed but it came at a cost: a single change in the inputs cascades through every downstream derivation. Adoption to content-addressed derivations has been slow similarly because producing multiple outputs makes it hard to reason about the closure of a derivation. When we have guaranteed bit-reproducibility, both problems disappear. Having a stable platform with which to build software reproducibly might completely change the toil of working to make software reproducible and change the economics of whether to leverage content-addressed derivations. The usefulness of a reproducible environment is not well explored and I think there are other interesting use cases for it. One that I’m exploring is to use it to make the act of performing a benchmark reproducible. Aside The cost is that the machine is now an input, Rewind included. Upgrade Rewind and every wrapped derivation rebuilds. Build on an Intel machine and you get a different, equally reproducible, output than on AMD. A tool that was designed for bug investigation and reproducibility of builds might have a larger impact on the software ecosystem than I had originally thought. It is a tool that can be used to make software more trustworthy, and all the wonderful beefits that come with it. It’s lame that I have to keep clarifying it as “bit” reproducible but the term is overloaded.  ↩ Rewind is a KVM-based virtual machine, so it requires a host with KVM support. It also requires the or system feature to be advertised by the host.  ↩ On the same Rewind version and the same CPU vendor. Fixed-output derivations are refused, because they need the network and the VM has none.  ↩ Two stores are used to illustrate buids on different machines.  ↩ Nix 2.35 changed how it hashes an output that mentions its own path, so the content address of such an output depends on the Nix version.  ↩ It’s lame that I have to keep clarifying it as “bit” reproducible but the term is overloaded.  ↩ Rewind is a KVM-based virtual machine, so it requires a host with KVM support. It also requires the or system feature to be advertised by the host.  ↩ On the same Rewind version and the same CPU vendor. Fixed-output derivations are refused, because they need the network and the VM has none.  ↩ Two stores are used to illustrate buids on different machines.  ↩ Nix 2.35 changed how it hashes an output that mentions its own path, so the content address of such an output depends on the Nix version.  ↩

0 views

The race to secure record-like information for domains

It’s sort of surprising, but we’re still figuring out how to secure simple, record-like information for domain names in an application-accessible way. Think about it. How would you bind the following to a domain name? Importantly, how would you secure it? Since we’re talking about domain names, lets start with DNS. The classic solution adds configuration as TXT records: Notice that we use an underscored subdomain label to make it clear we aren’t talking about a hostname. The protocol name is then repeated to make it abundantly clear this record is related to the protocol. As is, we can’t claim this solution is secure. DNS-based network interference is trivial and widespread. The best practice for securing DNS records is DNSSEC, which uses cryptographic signing. I’m not going to debate the security properties of DNSSEC in this post. There are strong opinions on both sides and the most helpful answer likely depends on the context in which you work. For the sake of this blog post I’ll wave my hands and call this “secure enough” to side-step the issue. In any case, the rest of the post doesn’t depend on a favorable or unfavorable assessment of the security properties of DNSSEC. Even the strongest supporters of DNSSEC need to face the reality that DNSSEC isn’t widely adopted. There’s no single answer that quantifies DNSSEC adoption. At Fox Loop Software I collect adoption metrics for various Internet protocols; we just released the first dashboard . Our approach highlights that adoption rates vary widely depending on which cohort you measure. For example, here are the adoption rates of DNSSEC signed MX records among second-level domain names that accept email: From the perspective of an application developer, it is not reasonable to expect that a customer domain name will support DNSSEC. Until this changes, application developers must use alternate solutions if they need security. If my application is web-based then there’s a pretty obvious solution as I already have an HTTPS secured endpoint. I can use the HTTPS .well-known approach ( RFC 8615 ). These records are secured by HTTPS. The developer experience is excellent: adding a record could be as easy as dropping a file in a web server directory. Fetching records is a simple HTTP GET request. But not everything is a web-based application. Can we extend this solution to other protocols? Email is a very old protocol, predating not only TLS but the entire Internet as well. Over time all sorts of additions have been bolted on to modernize and maintain the protocol. Many of these additions added new DNS TXT records, such as SPF, DKIM, and DMARC. These records can be secured by DNSSEC but do not require it, so tampering of these records is unmitigated or otherwise tolerated. Let’s look past these examples to a problem that clearly requires a secure record. Email has an awkward problem, which is how hostnames are managed. When a message transfer agent (MTA) relays an email it needs to discover the destination MTA. This is solved using an MX record, which specifies the target MTA’s domain name. I’ve measured that around 80% of domains host their email on a different domain name, often using providers like Google or Microsoft. When sending an email, the MTA will discover a chain from the user’s email address to the receiving MTA’s TLS certificate, like this: The sending MTA now needs to decide if it trusts the connection. Unfortunately, smtp.provider.com, as seen in the TLS certificate, does not match example.com, as provided in the email address. The only link between the two domain names is an MX record, which typically unsigned and therefor insecure. Without trustworthy information, certificate validation cannot succeed and the sending MTA must skip validation. Lack of certificate validation means that receiving MTAs can use a self-signed, expired, or even a certificate with the wrong name; the sending MTA does not care. This approach is known as “opportunistic encryption” and it provides strong protection against passive eavesdropping. But without a way to validate the receiving MTA’s TLS certificate, active attacks remained unmitigated. Email cannot enforce authenticated MTA-to-MTA transit encryption until this hostname mis-match problem is solved in a secure way. Many email security conversations focus on end-to-end encryption. It is a great solution to many of the security problems facing email, but it doesn’t fully address the problem being discussed here. Message relaying requires the MTA to know the recipient’s email address. This is known as “envelope information” and it cannot be end-to-end encrypted. Methods like PGP encryption can not and do not protect this information, as they only encrypt the message body. The only way to protect this information from network-level attackers is to ensure the message is delivered to the correct MTA, which requires authenticated transit encryption. When I first encountered this issue I was surprised as there is no analogous problem on the web. The issue relates to the semantic difference between a CNAME and an MX record. A CNAME record pointing at a web hosting provider’s server is a matter of identity and that server can get a TLS certificate to prove it. An MX record does not permit the target email server to get a corresponding TLS certificate. A web browser is able to compare the name in the TLS certificate with the name shown in the address bar and can expect these to strictly match. An MTA doesn’t compare the name in the TLS certificate with the domain name in the “to” address as a mismatch is typically expected. Further, email is sent asynchronously so there are no humans involved in MTA-to-MTA communications. While web browsers can show a certificate warning message to allow users to make their own security decisions, an MTA is all on its own. Email providers often tout support for transit encryption but the lack of certificate validation makes email traveling between MTAs about as secure as a user browsing the web while always clicking through invalid certificate warnings. Interestingly, email has adopted two solutions to this problem: a DNSSEC-based approach and an HTTPS .well-known approach. This give us a unique opportunity to compare these approaches head-to-head as they attempt to solve the same problem. The DNSSEC approach is SMTP DNS-based Authentication of Named Entities (DANE) ( RFC 7672 ), which was standardized in 2015. DANE requires DNSSEC signing in both the customer and email provider’s DNS zones for the protection to have full effect. DANE adds the TLSA DNS record. Here’s an example: This record indicates that the MTA-to-MTA connection can use authenticated encryption. Specifically, this record indicates that the receiving MTA should provide a TLS certificate with a public key digest of “6111A…”. Validating this pinned certificate does not depend on the certificate authority (CA) system. SMTP DANE signals that it should be possible to cryptographically validate the chain from the domain name in the email address to the domain name on the receiving MTA’s TLS certificate. One key benefit of DNSSEC, which we’ll revisit, is that blocking of a signed record can be distinguished from a non-existent policy. When the TLSA record does not exist, the authoritative DNS server should provide a signed proof of non-existence (NSEC). This acts as a fail safe: if DNSSEC is enabled and the sender cannot determine the DANE policy, then the sender can conclude that it is not safe to send the message as network interference may be present. Email providers realized that slow adoption of DNSSEC was delaying authenticated transit encryption between MTAs. They looked at what other tools were available and found inspiration from the HTTPS .well-known approach. Standardized in 2018, SMTP MTA Strict Transport Security (MTA-STS) ( RFC 8461 ) provides an HTTPS-based solution. Here’s what it looks like: Notice that the mta-sts subdomain is used instead of the bare domain. This best practice stems from the need to isolate security policies from whatever website lives at the bare domain; often a marketing website which may not have a security posture suitable for cross-protocol policies like MTA-STS. To distinguish any pre-existing use of the mta-sts subdomain the “_mta-sts” TXT record must also be set. Finally, policy caching was added as a partial mitigation of intermittent network interference. Like DANE, MTA-STS signals that the sender should strictly authenticate TLS. The MX record is duplicated in the MTA-STS policy, relying on HTTPS to secure the link. MTA-STS requires the receiving MTA to have a TLS certificate issued by a well-trusted CA. An MTA-STS policy document is fairly unchanging, making it well-suited for inexpensive, widely available, and highly scalable static web hosting. Many domain owners implement MTA-STS by adding the subdomain to an existing web server, as a virtual host, although it turns out this isn’t always a good idea. The TLS certificate renewal process is an obvious point of failure for MTA-STS. When a user-facing website goes down users complain, support tickets are filed, and the certificates are quickly renewed. The MTA-STS policy server fails open when it’s certificate expires. Senders will fall back to using opportunistic encryption and users won’t notice any disruption. As such an expired TLS certificate on an MTA-STS policy server can go unnoticed. To address this lack of visibility, TLS Reporting ( RFC 8460 ) was created, which allows email servers to share deliverability reports with each other. Another problem, which I think is an even larger issue, are web servers that block email servers from accessing their MTA-STS policy. You’ve probably noticed a sharp rise in bots, scrapers, and other unwanted automated traffic impacting the web. In the rush to protect web servers from these ills many sites inadvertently blocked access to their MTA-STS policy. An email server fetching an MTA-STS policy can look a lot like unwanted traffic: it’s automated and its coming from data center IP ranges. Misapplying security policies intended to protect user-facing websites from unwanted bot traffic degrades API-like interfaces. One unique benefit of SMTP DANE is that the policy cannot be blocked without the sender noticing. An MTA-STS policy server can be blocked just like any other web server and this blocking cannot easily be distinguish from a non-existent policy. While MTA-STS caching can protect against intermittent network-level blocking of the policy server, the first email sent to a domain is always vulnerable due to an empty cache. The effectiveness of MTA-STS in preventing an on-path attacker from intercepting email is questionable if the same on-path attacker can block the sender from discovering the MTA-STS policy. By these measures, DANE seems like the stronger option. DANE’s reliance on DNSSEC signing is its major weakness. Measurements show that 0.9-1.2% of domain names that receive email have DANE support, which doesn’t provide much practical protection yet. Worse, large providers like gmail.com lack DNSSEC support, so the per-user impact may be larger. Unless DNSSEC adoption can grow among large email providers, DANE can only be a partial solution. In contrast, HTTPS is very widely adopted making MTA-STS familiar to practitioners, even with these challenges. The web has blazed a path that MTA-STS can likely follow. HTTP Strict Transport Security (HSTS) ( RFC 6769 ) is essentially MTA-STS for the web (or visa-versa). HSTS is similarly vulnerable when the cache is empty. Web browsers mitigate this issue using a preload list, which ships in the browser. Out-of-the-box, the web browser knows that popular websites, like wikipedia.com, strictly use HTTPS. While there are challenges with HSTS, like the size of the list , this may have marginal impact for a server-side technology like email. I think MTA-STS can copy this solution. There are unknowns, like who would build an MTA-STS preload list, why we trust them to do so, and the exact semantics needed for a domain to be added. In any case, I think we should wait on increased MTA-STS adoption before we take those next steps. The adoption rates of MTA-STS and SMTP DANE tell an important story about how application protocols can secure domain information in practice. The fact that email has both a DNSSEC and an HTTPS approach gives us a way to spectate. Current measurements show that MTA-STS has overtaken DANE among the top-ranked domain names. Given the importance of protecting messages, including envelope information which cannot be end-to-end encrypted, these results are disappointing. Prior work shows that TLS downgrade attacks on email are widespread . With the slow adoption of email security protocols since that study, the situation is unlikely to have improved. We can and should do better. These SMTP DANE and MTA-STS measurements will be published quarterly. Subscribe to the newsletter to follow the trends. MTA-STS isn’t the only protocol that works this way. OpenPGP Web Key Directory (WKD) ( draft-koch-openpgp-webkey-service-22 ) uses an HTTPS .well-known approach to secure PGP key distribution, facilitating end-to-end encryption of message bodies. The WKD “advanced method”, seen above, follows the best practice of using a protocol-specific subdomain. The analogous DNSSEC-based approach is OPENPGPKEY ( RFC 7929 ). Unfortunately, the SHA-256 hash does not provide meaningful privacy. Use of this protocol can leak the email addresses of your correspondents to passive network-level eavesdroppers. This highlights the importance of encryption, not just signing. Other protocols like Mail AutoConfig ( draft-ietf-mailmaint-autoconfig-07 ) simplify the process of setting up an email client and similar applications. Again we see this protocol follow the security best practice of using a protocol-specific subdomain. There are over 100 registered .well-known URIs , showing the popularity of this approach. Many of these tolerate lower security properties and use the bare domain name instead of a protocol-specific subdomain. While I’ve thus far framed the discussion as a competition, DNSSEC and HTTPS .well-known are actually complementary. We don’t need one approach to defeat the other: we’ll see ecosystem improvements as both solutions are adopted, side-by-side. HTTPS .well-known can offload large policy documents and allow rapid experimentation, avoiding the size limits of UDP packets and the slow process of adding new DNS record types. DNSSEC can sign the CAA record, providing improved security during TLS certificate issuance. DANE could even replace the CAs entirely, a topic of renewed interest after the recent eMudhra mishap . After all, we wouldn’t need the CAs if we had a secure DNS . I see complementary nature of DNSSEC and HTTPS .well-known emphasized in another draft, Domain Authority (DA): A DNS-Designated Service Endpoint for Domain Information ( draft-swaminathan-da-00 ), which seeks to standardize the use of HTTPS to add capabilities to domain names beyond what DNS can natively support. While I think the current draft is too ambitious in scope, it provides a great summary of the benefits an HTTPS-based policy retrieval layer can provide beyond DNS. Unfortunately, we still have an insecure DNS. But progress in the domain name ecosystem is not blocked by DNS. MTA-STS shows that an HTTPS approach is immediately usable. Hello! I'm Robert Alexander, a DevSecOps consultant available for contract work . This blog features some of my work and thoughts on software, the cloud, and security. You can subscribe to my posts with your favorite RSS client and follow me on Mastodon . If you'd like to show your appreciation and help support my writing, you can do so via this link.

0 views
neilzone 3 weeks ago

Automating renewal of Let's Encrypt certificates with Home Assistant OS

I had an alert from my monitoring tool that the Let’s Encrypt TLS certificate for my Home Assistant OS installation had expired. The answer lay in the documentation for the Let’s Encrypt app : Certificates are not renewed automatically by the plugin. The app has to be started again to renew certificates. If the app is started again, it checks if the certificates are due for renewal. This is usually the case 30 days before the certificates’ due date. If the certificates are not due for renewal, the app terminates without changes. If the certificates are due for renewal, new certificates will be created. There are multiple ways how the app can be started to check/renew the certificates. One way to automate the certificate renewal is to configure a Home Assistant automation to restart this app every night via the Supervisor app restart action. My automation looks like this: I can see in the log for the Let’s Encrypt app, and the log for the automation, that it ran as expected so, fingers crossed, no more TLS certificate issues…

0 views
Farid Zakaria 3 weeks ago

The intensional model in disguise

Despite how different they look on the surface, Nix, Bazel and buck2 are remarkably similar under the hood. Don’t believe me? I built a prototype in one store, two frontends to prove it. Turns out though that the similarities are even deeper than I realized. Upon further reflection, I realized that the intensional model is an even more substantial common denominator. What is the intensional model? TIP I’ve written before about Nix’s intensional model , better known as content-addressed (CA) derivations. It has been “experimental” in Nix for years. 🧪 In the intensional model, outputs are addressed by their content , and actions refer to their inputs by content as well. The extensional model instead addresses an output by the recipe and inputs that produced it. Nix also calls this “content-addressed derivations” (CA derivations). Bazel and buck2 don’t name their model, but they use content-addressing as well. Consider this coincidence: Eelco’s PhD thesis was published in 2006, the same year that Google started development on Blaze, the predecessor of Bazel [ cite ]. Let’s take a closer look at the three systems with a simple C example and see how all three implement the intensional model. 🥸 In the traditional extensional model (input-addressed), a change anywhere upstream of a build action invalidates the action’s output. This occurs even if the change is irrelevant to the output, such as a comment change in a source file. In contrast, the intensional model (content-addressed) only invalidates an action’s output if the content of the output itself changes. In our C example, if we were to change the comment in from to , the compiled object file would still be byte-for-byte identical, as the comment does not affect the compiled output. In the ideal world, the linking of would not need to be redone, as its inputs have not changed in content. By default, Nix uses the extensional (input-addressed) model. If we edit the comment and rebuild: Everything rebuilt. 😩 The store path in the extensional model is a hash of the recipe , and the recipe for includes the recipe for . Recursion is fun! Change one byte anywhere upstream and every path downstream changes with it. 🌀 Warning The two binaries are not even byte-identical: the cc-wrapper puts in the , so the binary contains its own store path. The extensional model leaks into the bytes. 🙃 If we enable the build to use content-addressed derivations we observe rebuilt, but did not. 🎉 You can read demystifying Nix’s intensional model for a more detailed explanation of how CA derivations work, but the short version is that Nix rewrites to point at ’s content-addressed output instead of . The resolved is the same one we built before the edit. Since no “input” changed, Nix avoids the rebuild. This is the same behavior as Bazel and buck2, which are intensional by default. If we edit the comment and rebuild with Bazel or buck2, we see that the compile ran, but the link was an action cache hit . Bazel and buck2 do not have an input-addressed mode. They always use the intensional model. An action’s key is a hash of its command line (to force rebuilds) and the content digests of its inputs. A change only travels as far as the bytes actually change. This optimization is called early cutoff , and it is the whole selling point of the intensional model. There is a clear mapping between Nix’s CA derivations and Bazel’s action cache. A resolved derivation is a Bazel/buck2 action. 🤯 You may see the output paths in Bazel and buck2 and think they are extensional (i.e. ), but they are just a convenient place on disk. The real addresses are the digests. can even make this explicit with . Until dynamic derivations stabilize, people will continue to reach for Bazel and buck2 for the granularity on large builds. The intensional model is a big part of why they are so fast, and Nix has the same model. The two implementations are nearly identical in concept. Nix described the intensional model in 2006. Google started building on it the same year. Twenty years later, maybe it’s time they compared notes. 🥸

0 views
Martin Fowler 3 weeks ago

The Data Product Platform Navigator

Many organizations adopting data mesh and data products face a common challenge. They may be tasked with building a self-service platform for data products and data mesh from scratch, or they may have an existing platform that suffers from low adoption, preventing their data mesh from scaling. This article provides a platform navigator, based on the CNCF's Platform Engineering Maturity Model, to help you reason about your current situation and determine the next steps for your platform.

0 views
./techtipsy 3 weeks ago

Anecdata: running shucked WD My Book/Easystore 8TB hard drives for over 5 years

When I was getting my feet wet with self-hosting, I learned about shucking, which involves taking an external hard drive, prying its plastic case off and using it as a normal SATA hard drive. It’s not possible with every external hard drive, but with most ones it works well, and the WD My Book and Easystore drives are a prime example of this. Back then, I remember quite a few people being skeptical about these hard drives, suggesting that they could be drives that were not good enough to be server-grade WD Red drives, so they were cheaply thrown into external enclosures and sold to customers. While I can’t disprove that, I can now provide a few data points that can help someone judge if similar approaches are worth trying. I got mine quite soon after I had bought three WD Red 4TB hard drives. WD Red drives were pricey, but then I had one of them die after 6 months and although warranty service replaced it, it made me think about the alternative option. The math supporting this suggested that buying cheaper drives can make more sense even if they end up being more prone to failures, because with the savings you can simply buy an additional one and keep it as a spare that’s immediately available to you, which also improves the availability of your storage pool. These two drives have seen various use cases in their early life, jumping from one setup to another, but for most of their lives, they have run in a server room and are serving as an offsite backup endpoint. The disks have seen some abuse, you can tell that by the lifetime maximum temperature hitting 67°C, but in my defense, that was when the disks were running in their original enclosure. There was a brief moment where one of the disks started throwing some ZFS errors, but that could also have been an issue with the server that these drives are running in and its SATA connection. The power-on hours on the disks are the following (at the time of writing): Most people expect hard drives to last about 5 years, after which it becomes a lottery. Some have had drives successfully run for 10+ years, which is something I’d absolutely love to see with these two. Here are full outputs on both drives in case you want to dig into specifics: After running these shucked WD drives and these white label Seagate ones , I’m convinced that for most use cases, these drives are just as good as buying the branded, more expensive ones. Even with new ones it’s unwise to expect them to be perfect, they’re tiny mechanical miracles that somehow store and read data, after all, and you’d not want to use a large pool of drives without a filesystem like BTRFS or ZFS anyway if you care about your data integrity. Now I need to go find some wood to knock on because I would love to not buy any replacement hard drives in this economy. 55349 hours (6.4 years) 46513 hours (5.4 years) WDC WD80EZAZ-11TDBA0 WDC WD80EMAZ-00WJTA0

0 views
Hugo 4 weeks ago

PaaS, Coolify, Terraform and AI: How to Manage Your Infrastructure in 2026 When Launching a Startup

I created my first company which went well 14 years ago and I was able to grow that company from 0 to over 700 employees. You can imagine that the constraints when starting, the working methods, the tools, are very different from what you might encounter in most companies you know. You don't work the same way at 0 and at 700. You need to be fast, you need to build an application that people want to use without burning mountains of money you haven't earned yet and it's for all these reasons that I chose not to take care of the entire software infrastructure part at the beginning. What I call infrastructure is the servers, databases, backups, everything that's invisible to most people but essential for an application to function. It's essential, but overall everyone doesn't care about it. It's not that which allows you to sell a product. Good infrastructure but with a bad application doesn't work. And if you spend too much time on infrastructure, you don't make a good product. Obviously it still needs to work but you can delegate it, I would even say you should delegate it. Infrastructure should be a non-issue for several years when you start. So back then I chose to use a PAAS, a platform as a service, which precisely allows you to delegate all the infrastructure to people whose job it is. And whenever I saw people starting companies but starting to tell me about Kubernetes or Docker, I would systematically tell them it was far too early to talk about that. I always saw that as a bad signal whenever someone spent their time explaining to me how they were making their product, not what product they were making. The nuance is important. Now, I'm changing my mind. Except for Kube. I just launched a new product, Kula , the world has changed, company creation has changed and it might be time to reconsider some choices. So we're going to talk about PAAS, coolify, dokploy, easypanel, terraform, AI and how we can deploy applications in today's world. In 2014 I wrote an article on exactly this subject (in french). Because in 2014 we were leaving Heroku, our PAAS at the time to go to an OVH server. A PAAS is, in very simplified terms, an execution environment that allows you to run your applications. A PAAS manages for you web servers, databases, backups. It should allow you to collect and analyze errors that occur, alert you if you're running out of memory or CPU. We left Heroku because in 2014 we were starting to hit the limits of what PAAS could offer. Among the important limitations I could mention: In 2014 with Malt we needed precisely to be able to route Web requests to several different applications. For example the /search page was a separate application from the one that served the /profil page. Despite everything, in hindsight, it was a dangerous choice. The company was only 2 years old and I had to do a lot of ops to reproduce a satisfying developer experience on OVH. That's time I didn't spend elsewhere. Fortunately I already had experience on the subject and good mastery of certain automation tools like Ansible which limited the damage. But it was also an economic choice. A PAAS could quickly become expensive. Each resource (a database, a server, a process) is billed independently. And in 2014 at Malt, I can tell you we counted every euro spent very carefully. Okay, but I'm talking about Malt in 2014. Then the company grew well, we doubled in size every year. In 2017 we hired our first ops. We started doing OVH Cloud. In 2018 we went to GCP and we were no longer off by 100 euros. But that's not today's subject. What interests me is the startup phase. Since 2024 I left Malt and started creating products again. I love doing that. I find the first steps exciting. You have to know how to deal with constraints, be creative. I first launched Broadcast in 2024, a newsletter sending service for static blogs. Then Pulse in 2025 while I was living in Japan, an analytics service for blogs. Connect in 2026, a comment as a service (like Disqus). Writizzy in 2026 as well, a blogging and newsletter platform, a competitor to Substack or Beehiiv. Until now, it was the most ambitious and largest project. And for all these projects I used a new range of tools that I discovered in 2024, self hosted PAAS. They are PAAS, but they are PAAS that you can host yourself. I chose Coolify, which I already talked about in an old article . First of all, obviously, that changes the price. Today I run Coolify on two machines, with all my applications, all my databases. That represents more than thirty resources and it costs me 45 euros per month. Remember, I'm back in startup mode, so with very little money and it's therefore a heavyweight argument. No commercial PAAS can allow me to run all these resources for that amount. It would be at minimum between 300 and 1000 euros per month. I lose time on it, I have had some cold sweats with system updates, connection losses, machines that break down. But the fact of using a PAAS, so software that takes care of all deployment, monitoring, logs is a significant gain. Even if I need to understand how it works, I'm not obligated to spend as much time on it as if I had to manage everything manually and dive into the workings of Kubernetes for example. But, with more than 30 managed resources, I started to feel some limitations and especially, I realized that maybe, maybe I was going in the wrong direction. What if AI could become an excellent ops for me? I love Coolify, but there are still important limitations: This last point, if you have only one application, it's not very serious. But I already have too many applications. If I need to bring up an entire server, I'll have to reconfigure everything and I really don't want to. I'm exaggerating, Coolify's database itself is backed up in snapshot mode but it's a bit more painful and it doesn't allow me to easily migrate to another service, like Dokploy or EasyPanel. So I tested something else. I asked AI… Yes, ops takes time, it can be complex and you can't mess up. But writing code that allows you to automate your infrastructure, your network topology, your backups, your observability, that remains an excellent idea, much better than making dozens hundreds of clicks on an interface. Because code can be versioned. And I'm telling you that, I've already done Ansible, Capistrano and shell batches, so I'm not discovering that in 2026. But I also know that writing code is long and once again, it's time you don't spend on the product. Except… if AI writes it. In October 2026 I decided to take advantage of the experience I acquired on Writizzy and Broadcast around email sending to launch another product: Kula . Kula is a marketing and transactional email sending tool. I manage sequences, segmentation, analytics tracking, deliverability management and it's now the email sending backend for Writizzy and Broadcast. If you're already a customer of sendgrid, mailjet, brevo, or resend, don't hesitate to test. Plus I'm generally cheaper . Except this time I didn't want to use Coolify again for Kula. So I used AI to create Terraform scripts to control my infrastructure (at Hetzner, Bunny.net and AWS). I added continuous deployment, rolling upgrades with Caddy , incremental backups with WAL , logs collected in dozzle . And all that took me less than 1 hour to set up. I can bring up my entire infrastructure more easily, I manage and version my secrets with Sops, I lowered my RPO from several hours to 1 minute (RPO is the maximum possible data loss) and I can control everything from my code, by running scripts. Finally, my LLM can control everything. Now, if you didn't understand RPO, Sops, WAL, rolling upgrade and overall what I just said seems as clear as Chinese to you, it's because I may have misled you… In reality I haven't totally changed my mind. I still believe you should delay ops as late as possible but with much more nuance than before. You do ops anyway, even with a PAAS, but a large part is simplified, pre-digested for you. Except that precisely, you delegate choices to people who know how to do it without always understanding the compromises they made for you. You hadn't necessarily understood before now that your backups were imperfect. You hadn't perhaps realized that your secret management was a mess before I mentioned it to you. Creating IT projects is constantly making compromises between costs, risks and gains. And you can't maximize all three. Low risks and many gains requires a lot of budget. Low budget to get many gains, it's necessarily because you're taking risks. Etc… It's not a problem to solve, these are choices to make. So if you lack general knowledge, if you decide to do everything directly with AI, it might send you crashing into a wall because you won't understand the compromises that were made. It's true, there's no longer as much argument about loss of time as before. You can go very fast. But going fast into a wall isn't necessarily an advantage. In my case, I wasn't starting from scratch, far from it. So I knew where to go. I was already doing ops by choosing to use Coolify in self-hosted mode and then I had some experience, including in much larger companies. I understand the compromises I'm making. When I say that I launch a new company using terraform, I'm taking a shortcut. I've been launching products since 2011. And since leaving Malt, I have 2 years under my belt with Hakanai, Writizzy and Kula. When I say I took 1 hour to set everything up. It's true, but I took 25 years to learn to set it up in 1 hour. So let me rephrase. If you have no knowledge or experience of ops, infrastructure, take a PAAS. A very simple PAAS that you don't host yourself (Clever Cloud, Scalingo, Sevalla for example). The cost will remain acceptable and you'll have the opportunity to learn on a stack that's managed for you. (I came across koyeb too while writing the article but I'm having trouble positioning it between PAAS and IAAS, don't hesitate to give me info if you know) If you have knowledge but you're still in prototyping phase with still few applications to manage, choose a market PAAS or a self hosted PAAS, Coolify, Dokploy or EasyPanel. Here you'll prioritize cost and flexibility. If you're really knowledgeable, you can go to dedicated servers controlled with terraform. It's the advanced version of the previous option, focused on cost and flexibility. As soon as you have volume, and several applications, some architectural complexity and a budget to finance it, then you can start looking at IAAS (infrastructure as a service), DBAAS etc… I recommend Scaleway or Hetzner. In short, it's hard to launch a company. It's even harder to learn all the necessary trades at once. Even with AI. Don't waste time on what you don't yet know how to do. However, as soon as you've gained the experience, tell yourself that many things that were very time-consuming before is now much more accessible. Revisit your preconceived ideas on the subject and test. You might be surprised. There was no notion of private network. A private network is what allows your application to communicate with a database without going back through the internet. So the database is only accessible within your network. Most PAAS offerings didn't provide that. There was no notion of web frontend. A web frontend is a server that we place in front of one or more applications. This allows, among other things, to have different applications that are used for different parts of a website. Coolify doesn't allow multiple nodes of the same application There's no secret management. All environment variables are in plain text. You have to use a service like infisical . Monitoring exists but remains quite light. Backups are only in snapshot mode. That is to say you take photos of the database at regular intervals but in case of a crash, you lose all information since the last backup. it's clickodrome. You can hardly automate the fact of rebuilding resources, especially since the api is limited.

0 views
Allen Pike 4 weeks ago

Guidelines and Guardrails Belong in Git

One problem with AI is that it’s pretty stupid. I mean, sure, the current models are wildly useful. But out of the box, they overcomplicate, take undue shortcuts, and compound deficiencies to the moon. To get from default Claude or ChatGPT to a fast, affordable software loop – one that reliably zaps bugs, backlog items, and security vulnerabilities in your product in particular – it takes some real work. Increasingly, this is the work. So it’s past time you shared that work with your team. There are two main ways to get coding agents to behave consistently and correctly: steer them with guidelines , and redirect them with guardrails . Basically a union of “Please go do the good thing” with Sometimes, this means fighting models’ non-determinism with better non-determinism. We build and refine Markdown instructions: rules, docs, skills, and the like. Then at PR time, AI reviewers, classifiers, and human review workflows can non-deterministically ask Claude to go back and do better. But while this informed guidance is helpful, deterministic rules are gold. Instead of “PLEASE don’t make 10,000 line files”, a lint script can simply reject overlong files before they’re pushed 1 . When practical, moving Markdown rules, checks, and guides into deterministic code like this is a big level up. Checks in code are harder, better, faster, and stronger than prompting – and a hell of a lot cheaper. Similarly, if you set up a local environment so models can verify how their code works in practice, you’ll get less speculation and fewer unnecessary fallbacks. Step by step, you can tune your laptop into an instrument for turning brilliant slash idiotic tokens into good PRs. Before long, you’re building at a pace never before seen, with architectural consistency no less. Your team is in awe of your productivity, and… wait. Your team. Some of them need to understand your work too. And you still need to review their agents’ work– OH GOD WHAT IS THIS PR?! The history of software development is the story of sharing. At first we shared just code, once its author was done with it. Then we grew into sharing commit history, say with SVN. We’ve seen with everything from Makefiles to Jira, Slack, GitHub Actions, Terraform, and more recently code formatters and linters, that engineering improves with more sharing within teams . But when coding agents debuted, it made little sense to standardize how they were prompted. Hell, they barely worked in the first place. Nobody had any idea what it meant to use them well, and they lent themselves to experimentation and highly custom setups. But 2024 was a long time ago. We’ve learned a lot about good agent guidance and guardrails, and models have gotten far better at working within them. Yet many teams still work in repos with no shared agent instructions at all. These teams still use AI. But they rely mostly on models’ instincts, developers’ prompting skills, and reviewers’ discipline to keep agents in check. More industrious team members might email around skills they find helpful. Using their personal setups, a few folks on these teams elicit well-engineered PRs from Claude – but these get jammed up alongside other developers’ mystery slop in the review queue. Fortunately, this is beginning to change. In-repo AGENTS.md files are now common. Reproducible dev environments, consistent for every team member, are including more lints, sandboxes, MCPs, and other tools that make agent output more consistent. CI, previously the realm of unit tests, often now runs review agents – preferably steered by in-repo instructions. And teams are putting checks, constraints, and formatting rules on PRs, making them easier to review and trust. As Thoughtworks’ Rahul Garg said on martinfowler.com : A prompt on an individual machine is a personal productivity hack. The same prompt in the team’s repository is infrastructure. So from this, we now have two primary goals: work to make our agent instructions more deterministic, and more useful for the whole team. The job, increasingly, is not producing code. It’s iterating a system – guidelines, guardrails, and tools – that helps your whole team produce good work. And as more teams run coding agents in the cloud, spun out of Slack conversations, Linear tickets, or incident reports, ensuring your agents do the right thing regardless of where they run is even more essential. While a tuned software factory like this is a boon to generalists working in it, working on the system is where domain experts – perf wizards, database pros, and so on – can really shine. Instead of just running interference, trying to review and reject problematic PRs in their domain of expertise, they can iterate docs and guardrails that improve how every change, whether kicked off by a PM or a principal engineer, is written. PJ Onori, a design systems veteran at Sanity, responded to an increase in agent-authored code that didn’t comply with their design system not with derision, but with a spec . Basically, in-repo rules turn expertise into leverage. In 2024, models’ worst failures were not following instructions. In 2026, we also get agents failing because they do follow instructions, even overly absolute ones. Many a CLAUDE.md (or, now, AGENTS.md ) has collected slop like: IMPORTANT: Every fix must start not with code, but with failing tests. Make the fix, then honestly verify it against the new tests. This is not busywork—it’s discipline. 1000 PRs merged later, agents have gifted you 9999 new unit tests, many of them useless, like a cat delivering its owner dead birds. “Oh great, thanks Codex, tests that enshrine every copy edit we’ve ever made to the UI, how thoughtful of you.” Let this herd of tests run on hundreds of pushes to GitHub every day, and in time your CI bill will gain an entire digit. While having at least some agent docs and guidelines in-repo has become standard, there is wild variation in how well-maintained these instructions are. Often they get so long, agent harnesses truncate them. Multiple teams I’ve helped have said they still required humans to read and review code changes, but not AGENTS.md instructions. That is, the root set of rules followed by every agent working in their codebase. 2 Now, you definitely want to add in-repo guidance and guardrails for your team’s agents, but with great leverage comes great responsibility. If your one doc or tool can now affect thousands of nondeterministic coding runs across a team, it’s worth the effort to iterate and improve it over time. At the minimum, this means building a culture of standards for this shared infrastructure, and people who own its effectiveness. How do we actually do that? While surely you tested your AGENTS.md overhaul personally, how is it working for everyone else? You see that your agents aren’t adding overlong comment blocks anymore, but this new PR from Steve did. Had he pulled your new instructions before he wrote this? And come to think of it, is your new guideline now causing places where explanation really would have been merited to be under-commented? Of course, to maintain code well that runs on various other machines requires a measure of observability – doubly so when the flows are non-deterministic. What skills are people using? Are they working as intended? Are agents spinning needlessly on missing context or verification capabilities? Are they now yelling at Claude when it was actually your doc or skill that caused the problem? You need to be able to fix mistakes and waste. Not just on your laptop, but across your team’s agents. On some teams, this just means having developers send bug reports and traces to team members when a skill or doc goes wrong – if they notice it and know who can fix it. Other teams move to a coding environment like Amp that shares session transcripts and their telemetry by default, or our Powerplant tool that supports session debugging in a harness-agnostic way. Meanwhile, Entire wants to be GitHub but for agents’ session logs as well as code. Session sharing comes with its own challenges. As with observability tools like Honeycomb and Datadog, giving your coding agents access to log and telemetry data from other agents is both very useful and potentially risky. Shared context needs thoughtful security, privacy, and accountability controls. Meanwhile, social conventions on teams around working with agents in the open are still developing. Some companies are overtly skeptical of transparency with agents, while others are all-in. No matter how this all plays out, one thing is clear: the early scramble of siloed experimentation is ending. It’s time for teams to be building shared agent infrastructure, guidelines, and guardrails, and to be iterating them together. To be learning not just from some confident poster on X, but from how one another are working with AI. And to help us all do less yelling at Claude, and more building useful software. While simply failing lints for a file that exceeds limits is helpful, we can do better. If your lints emit graduated feedback, e.g. flagging when a file is close to, at, or beyond the threshold, then you can give models useful feedback without halting a critical change because a file got pushed one line too long. Another useful graduated approach is the ratchet : if you find a bad pattern in your code you don’t want agents copying, a ratchet counts how many instances of the pattern currently exist, and only fails if that number goes up. A helpful tool for longer-term migration projects. Also worth noting: deterministic checks can give agents just-in-time remediation guidance. It’s better to put “New endpoints should use the typed pattern instead” in the lint error when somebody copies the old pattern, rather than in global AGENTS.md clogging every session’s context. ↩ may be helpful if you need to dig out of this hole. ↩ While simply failing lints for a file that exceeds limits is helpful, we can do better. If your lints emit graduated feedback, e.g. flagging when a file is close to, at, or beyond the threshold, then you can give models useful feedback without halting a critical change because a file got pushed one line too long. Another useful graduated approach is the ratchet : if you find a bad pattern in your code you don’t want agents copying, a ratchet counts how many instances of the pattern currently exist, and only fails if that number goes up. A helpful tool for longer-term migration projects. Also worth noting: deterministic checks can give agents just-in-time remediation guidance. It’s better to put “New endpoints should use the typed pattern instead” in the lint error when somebody copies the old pattern, rather than in global AGENTS.md clogging every session’s context. ↩ may be helpful if you need to dig out of this hole. ↩

0 views