cookd engineering
cookd team. What is cookd →
Measuring a limit nobody publishes
We fitted three constants to a rate limit Anthropic does not expose. Then we deleted the constant, and the code learned something its own decision record had ruled out.
Every number in this system is a claim
A refactor moved a computation from our client to our server. Nothing about trust changed, but one word in the design doc started to read like verification, so we wrote down what it did not mean.
A policy that has never run is not a security boundary
Twenty-five migrations reached production without ever being executed. When we finally ran them, every failure was in the test harness. That is less reassuring than it sounds.
Ship the shape, not the answer
Our CLI sent the server a percentage. It was correct when it left. It also locked people out of the app while they were working, and no single line of code was wrong.
Gate on growth, not on time
Our CLI runs after every assistant turn on someone else's laptop, so an idle session has to cost exactly nothing. The trick was gating on how wrong the number is, not how old it is.
We deleted our realtime layer, then tried to break what replaced it
Polling did not remove our scaling ceiling. It moved it from a cap that fails for one user to a budget that fails for all of them. Then the load generator broke before the database did.
One rule, three implementations, one fixture
The same arithmetic lives in TypeScript, in SQL and in TypeScript again, and the build topology says it has to. We stopped trying to share the code and pinned the meaning instead.
Blocking, in one function call per statement
Putting block and takedown rules in row-level security gave every reader moderation for free. Done the obvious way it would have cost thousands of function calls per screen, and at least four correct-looking lines would have blacked out the feed.
Our self-calibrating limit was 2.15× too high
We inferred a quota nobody publishes, from files on disk. Seven weeks later one paired reading showed we were off by more than a factor of two, and reading about half of reality. Only one earlier decision made that fixable.
A symlink, a recursive walk, and a promise we had written down
The fix was a path comparison. Deciding the escape was a bug at all took a privacy record written seven weeks earlier, because by any normal severity scale it did not matter.
For its first 62 hours, our AI feature never called the AI
Every roast in that window was one of twenty hand-written fallbacks, and every request returned 200. Here is the one function that talks to a model, and what it took to make its failures visible as well as survivable.
Installing yourself into a tool you do not own
To stay fresh, our CLI downloads a binary, registers it in a config file another program owns, and runs unattended after every turn. We mitigated that risk and wrote it down. We did not remove it.