A dry run is a promise. Can the OS enforce it?

A --dry-run flag is a promise: run this command, and it will tell you what it would do without actually doing it. The implementation is often a boolean. That boolean has no authority over the filesystem, the network, or the helper function someone added last Tuesday. Every part of the program has to remember to cooperate. I’ve been working on runtime safety features in Rye, a scripting language. One question keeps pulling these features together: Can a dry run depend less on my remembering to implement the dry run? Linux can enforce some useful boundaries here. But getting the boundaries right exposes a distinction: preventing a script from changing things is not the same as showing what a successful execution would do. ...

September 25, 2026 · Janko

Guaranteed Dry-Runs and Micro-Jails: The Dual Nature of Rye’s Safety Features

When building a scripting language, safety tools often get pigeonholed into a single bucket. We tend to view sandboxing strictly as defensive security, and dry-runs strictly as developer convenience. In Rye, features like Linux namespaces (unshare), filesystem allowlists (Landlock), and Intents serve a dual purpose depending on which hat you are wearing: For your own code: They turn dangerous side effects into observable, rehearsal-friendly data structures. For untrusted code: They act as lightweight, zero-overhead OS micro-jails. Here is how these three primitives do double duty. ...

September 18, 2026 · Janko

Practical Runtime Safety in Rye: Unshare, Landlock, and Intents

I didn’t set out to build a security framework for a scripting language; I just wanted to stop shooting myself in the foot. When running random scripts locally or in CI, safety comes down to three basic mechanisms: Namespaces (unshare) — A kernel wrapper that strips network access and hides the rest of your filesystem. Landlock — An unprivileged, process-level allowlist that restricts filesystem writes to specific directories. Intents (dry-run) — An application-level pattern to declare and rehearse side effects without executing them. These tools aren’t a grand manifesto. They are small habits that turn risky local scripts into safe defaults. Here is how they work in Rye, how they compose, and where they save you. ...

September 18, 2026 · Janko

Sandbox your scripts without Docker: Rye’s zero-root unshare guardrails

When you paste a snippet or refactor a build script, you’re holding a sharp knife. In 2026 that knife is sometimes AI-sharpened. This post is about putting a guard on it—without paying the container tax. Rye now ships a lightweight sandbox based on Linux namespaces (aka “unshare”). It’s one flag, zero root, and integrates with Rye’s standard library so your script can detect and adapt to isolation. ...

September 18, 2026 · Janko

Some odd runtime safety features of Rye language

I didn’t set out to add “security features” to a scripting language. I wanted to stop shooting myself in the foot. These are the three levers I actually use on my laptop: Unshare — a quick shell over your script so it can’t see or phone the whole world Landlock — a polite wall that says “only touch these paths, please” Intents — a way to say “this is what I’m about to do” and then, in dry‑run, just rehearse it This isn’t a manifesto. It’s a couple of small habits that saved me from dumb mistakes. Here’s exactly how they work in Rye, and a few little stories of when they helped. ...

September 18, 2026 · Janko

Guaranteed Dry-Runs: How Landlock and Intents Fix Scripting's Scariest Flag

Every developer has a horror story about a --dry-run flag. You write a quick maintenance script to clean up old files or migrate local data. You carefully add a dry_run boolean variable, wrap your primary write function in an if not dry_run: block, and run it with confidence. Then, three levels deep in an obscure helper function, a raw fs.unlink() or http.post() executes anyway because you forgot to wrap it. The script modifies state mid-rehearsal, leaving you with half-mutated data and a mild panic attack. ...

September 17, 2026 · Janko