Skip to content

The Cleo Team

The Workshop

Notes on building an AI marketing operating system. Architecture decisions, technical challenges, and the craft of making something that thinks.

4 min read

The Database Was in Sydney

Dashboard screens took one and a half to nearly three seconds to paint because each made eight to ten database reads, in sequence, across the Pacific. Cutting the round trips first and then moving the functions beside the database brought most screens under seven hundred milliseconds.

performanceinfrastructureengineering
3 min read

Two Spellings of One Instant

A claim token written as a JavaScript timestamp ending in Z came back from Postgres ending in +00:00. The run compared them as strings, decided the claim was stale, and exited. Every time. The tests passed because they used tidy fake tokens.

engineeringdatabasesscheduling
4 min read

An Unordered Limit Is a Lottery

A scheduled job ran green every thirty minutes for a week and did almost nothing, because its query had a LIMIT and no ORDER BY. An audit found the same shape in nine other jobs, two of them already starving real work.

engineeringdatabasesreliability
5 min read

A Stylesheet Is Not a Palette

Brand colours read from CSS included states nobody ever sees, browser defaults nobody chose, and one red that was only ever an error message. Reading the rendered page, and checking the reader with an independent instrument, fixed the palette at its source.

designbrandengineering
4 min read

Sent Is a Claim

Failed recipients were logged and forgotten, so a campaign the provider refused entirely still read as sent. Failures are now data, the final status is earned, and energy is reserved at approval and settled against what was delivered.

emailengineeringbilling
3 min read

A Timeout Is Not a Cancellation

Tool calls had a time budget enforced by racing a timer. When the timer won, the system reported failure while the work carried on and sometimes completed. Now the work can be cancelled, and when it cannot be, the outcome is reported as unknown.

engineeringaireliability
4 min read

The Limit That Ran Before My Code

Photo uploads above four and a half megabytes vanished without a word. My code allowed fifty, but the hosting platform refused the request before my code ever ran. Sending bytes straight to storage removed the cap from the path.

engineeringuploadsreliability
4 min read

The Row That Never Finished

Activity rows left as running by processes that died were counted by a concurrency gate forever. Two of them made every image wait a full minute and then carry on, which is why nothing ever reported it.

engineeringreliabilitydatabases
4 min read

One Image, Every Turn

A wide, highly compressed image passed the byte limit and broke the vision API's dimension limit. Because history is resent on every turn, one upload would have failed every message that followed. Inputs that persist need stricter gates.

aiengineeringreliability
4 min read

Two Workers, One Frame

Two render requests could both read a frame as idle, both claim it, and both charge for it. The fix was to stop treating a status write as the record of a decision and make it the decision itself.

engineeringconcurrencydatabases
4 min read

Write to the Platform First

A budget change was written to my own database before it was sent to Google. When Google refused, the screen showed the new budget while Google kept spending the old one. The order of two writes was the whole bug.

adsengineeringarchitecture
4 min read

Open Before the Click

The floating chat fetched its conversation on click, so every open began with a spinner. Prefetching on intent fixed the wait. Fixing it also turned up a quieter problem: the message box forgot what people had typed whenever it remounted.

uiperformanceengineering