Cheap Diagnostics, Expensive Assumptions

How being wrong cheaply beat guessing confidently — and what it taught us about making Trinity's architect smarter.
I spent this week being wrong about four things in a row, and it made our build 40x faster. Not despite being wrong — because being wrong got cheap.
That's the whole post. Everything below is just the receipts.
What actually got cheap
The headline is the tooling, but the tooling isn't the story. The story is that trying things stopped costing anything to start.
Think about how a toolchain question usually gets answered. Someone floats "we should switch linters." Someone else worries it'll need a compiler upgrade. A third person isn't sure the config will port. Now it's a thread, then a doc, then a half-hour of a planning call — and at the end you've spent more human time discussing the change than the change would take to try. Nobody actually ran it. The whole argument was about a thing none of us had measured.
The fix isn't a better argument. It's making the measurement so cheap that arguing is the slow path.
A git worktree spins up in about five seconds. It's a fully isolated checkout of the repo on its own branch — separate working directory, separate node_modules, its own build cache. It's throwaway. It can't touch your real branch, and when you're done you delete a directory and the experiment is gone. So the setup is nearly free.
The experiments themselves still cost real time. A webview build is a few seconds. A test run is a couple of minutes. A full gate — build plus the entire suite — is about four minutes cold. None of that got magically instant. What changed is that starting an experiment costs a throwaway directory, and being wrong costs rm -rf. Not a revert on a shared release branch. Not a broken build everyone else pulls. A deleted folder.
When trying is that cheap and being wrong is that safe, you stop arguing in a thread and start measuring. That's the shift. Cheap to try, cheap to be wrong, high payoff — that's the trade that changed how the week went.
The wins, measured
Here's what a week of cheap experiments bought. Same repo, same machine, direct runs — no benchmark theater.
Full gate · cold: ~238s → ~238s. Genuinely new work didn't get faster. The wins above are about not re-running what didn't change — not about running the same work faster.
The Rust wave
Look at the "after" column and you'll see the same fingerprint over and over: oxlint, rolldown-vite, tsgo. These aren't three unrelated upgrades. They're the same wave — the JavaScript toolchain getting rewritten in Rust, most of it under the Oxc umbrella.
oxlint is a Rust linter. Rolldown is a Rust bundler — the one that will sit under Vite 8, which is why swapping in rolldown-vite today is a preview of where the whole ecosystem is heading. tsgo is the Go-native port of the TypeScript compiler, the thing people are calling "TS7." Different languages, same idea: the hot path of your dev loop doesn't have to run in the language it's checking.
We rode that wave early. The lint numbers are the loudest — ESLint at 26.2s on the website dropped to 2.5s on oxlint, roughly 10x — but the pattern holds across typecheck and bundling too. The app's typecheck went from 12.4s on tsc to 2.4s on tsgo; the website's from 6.1s to 1.1s. When we swapped Vite for rolldown-vite, the webview build went from 18.9s to 5.6s. That's the same Vite-based build we shipped Trinity's desktop rewrite on, just with a Rust bundler underneath.
"Early" is the operative word, and it's exactly the kind of bet cheap experiments make safe. None of these are the boring, obvious, everyone's-already-on-it upgrade. They're new enough that the reasonable-sounding position is "let's wait until it's proven." A worktree flips that. You don't have to wait for someone else to prove it — you prove it against your own repo in the time it takes to get a coffee, and if it doesn't hold, you delete the folder and you've lost nothing but the coffee.
What didn't get faster
Here's the part that matters more than any of the green numbers.
The cold gate did not get faster. It was about 238 seconds before this week, and it's about 238 seconds now.
You can't skip work that's genuinely new. If a build has never compiled these files and a test has never run this code, something has to actually do it — and that something takes as long as it takes. The cold gate is that floor, and we didn't move it.
So where did the 40x come from? Not from running the same work faster. From not re-running work that didn't change.
That's Turborepo caching plus one boring detail: a shared local cache directory that every worktree reads from. When a fresh worktree runs the gate, most of its tasks are inputs Turbo has already seen, so it replays finished results instead of recomputing them. The test suite goes from ~196 seconds to about half a second on a cache hit. A warm gate in a fresh worktree lands around 5 seconds — not because it ran fast, but because it barely ran at all.
I'm putting this front and center on purpose. The honest version of a performance post has to say what didn't improve, because that's the only way the numbers that did improve mean anything. If I told you every number got better, you should trust none of them. The cold gate is the same. Everything else got cheaper to avoid.
This is the same instinct behind how Trinity runs dozens of agents on one machine: the fastest work is the work you never do twice.
Four things I was wrong about
Now the fun part. Four times this week I said something confident, spun up a worktree to check, and was wrong within minutes. Every one of these could have been a meeting. Instead each was a five-second setup and a short wait.
Minutes being wrong in a worktree — instead of a week defending a wrong call.
Read those again and notice what they have in common: each is a claim I'd have defended in a planning discussion. "Type-aware linting needs the TypeScript 7 upgrade first" sounds responsible. "Turning off test isolation gets us a free 2x" sounds clever. Both are the kind of thing a team can argue about for a week and then build the wrong plan around.
The test-isolation one is my favorite, because it's the one where being wrong was loudest. Killing isolation didn't give us a free 2x — it broke 1,071 tests across 135 files, instantly, in a worktree nobody else could see. The cost of learning that isolation is load-bearing was one test run and a deleted folder. The cost of learning it after shipping the "optimization" would have been a very bad afternoon.
And two of the four were wrong in my favor — the Go-native compiler did handle our Next.js types, and the bundler swap was worth chasing. That's the other half of cheap experiments people forget: they don't just kill bad ideas, they rescue good ones you'd have talked yourself out of. "The bundler swap isn't worth chasing" is the kind of thing that sounds like discipline and is actually just an untested guess wearing a nice coat. One build proved it wrong and handed us a 3.4x.
That's the point. We spent minutes being wrong in a throwaway checkout instead of a week defending a wrong call in a document. The worktree is a place to be wrong on purpose, fast, where it's safe.
Teaching the architect the same loop
Here's why this is more than a tooling-week retro.
The loop we ran all week is small and repeatable: ground yourself in the real thing, try it where trying is cheap, be honest when you're wrong, correct. Start from what the code actually is, not what you remember it being. Test the change in a sandbox where a wrong guess costs nothing. Read what really happened. Update.
That's exactly the loop we've been teaching Trinity's architect — the agent that plans and reasons about your codebase — this release.
The old way an agent works is to answer from what it "knows." It has a model of your project in its head, and it plans against that model, and when the model is stale or wrong, the plan is confidently wrong with it. That's the "guessing confidently" from the title, and it's expensive for the same reason a wrong planning decision is expensive: nobody finds out until the work is already built on top of it.
The new way is the loop. Instead of reciting an answer, the architect investigates the actual code. Instead of assuming a change is safe, it tries it where trying is cheap and watches what really happens. Instead of defending a guess, it figures out what's true and corrects. Same four beats we ran by hand this week, just run by the agent that plans your work.
We didn't teach it answers. We taught it the loop.
Answers go stale the moment the code moves. The loop doesn't. An agent that can investigate, test cheaply, and admit when it's wrong keeps being right long after any specific fact it memorized has expired — which, in a codebase that changes every day, is the only kind of "right" worth having.
Cheap diagnostics beat expensive assumptions. That held for our build all week, and it's the same bet we're making on how Trinity plans your next one. If you want the moving parts underneath that planning, the sidecar it all runs on is where to look next.