Software architect, 11 years. I came to software from geology, which is probably why I like systems where being approximately right is not good enough — storage engines, flight control, and lately what a language model is allowed to do.
Most of my recent work sits on two questions that turn out to be the same question: what is this system permitted to do, and how would I know if it stopped working?
Systems where the interesting bugs live in the rare interleavings, so the tests go looking for them.
atlas-graph-db — a graph database written from scratch
Storage engine with write-ahead logging, snapshots and crash recovery; transactions, property/unique/fulltext indexes, traversals and graph algorithms; a full AQL query language over the top; a multi-user Fastify server with argon2id auth, revocable sessions, API tokens and a permission matrix; a typed isomorphic client SDK; and the Knowledge Graph Explorer web app. Durability came before features — a graph store that loses a write on power failure is a cache with extra steps — so recovery was tested by killing the process mid-transaction before anything was built on top of it.
TypeScript · Angular · 468 tests · benchmark gate at 1M nodes / 5M edges, signed off in docs/BENCHMARKS.md
wal-crash — every state a crash could leave on disk, checked
Records a program's file-system calls under strace, then builds every crash
state the disk may legally be left in under three models: process killed, power
cut on an in-order disk, and power cut where only what was fsynced survives.
Each state goes through the program's own recovery and the user's invariant. On
a toy store it catches all six planted bugs; killing the process finds one. On
SQLite every verdict matches SQLite's documentation, including
journal_mode=delete, synchronous=normal corrupting the database: a zeroed page
passed a journal checksum that samples one byte in 200.
Go · 34 tests · CI regenerates the SQLite matrix and diffs it
ota-safe — firmware updates that survive a power cut at every write
A/B firmware updates for microcontrollers in no_std Rust: two image slots, each
signed (Ed25519) and checked before every boot, double-buffered metadata with
sequence numbers and CRCs, and a trial boot that rolls back if the new image
never confirms. Power is cut at every erase and program on a NOR flash model,
including writes torn partway. A naive in-place updater bricks on 98.6% of cuts
and a naive A/B one on 3.1%; ota-safe boots on all 998, and on all 356,028
double cuts. The same boot code on a Cortex-M3 in QEMU decides identically.
Rust · no_std · Embedded · 33 tests · six planted bugs, all caught
quorum-lab — Raft from scratch, and a simulator that attacks it
Raft as a pure state machine, driven by a deterministic simulator that partitions the network (including non-transitive partitions, where A reaches B and B reaches C but A can't reach C), crashes the leader at the worst moment, and drops, duplicates and reorders messages. Safety is checked after every event, linearizability per key at the end of each run, and every run is a pure function of its seed, so a failure replays exactly. To show the search has teeth, the repo carries six classic ways to get Raft wrong, including Figure 8 from the paper, and the simulator catches every one. It also caught a message storm in my own leader: in one run duplicated rejections multiplied probes into seven million messages.
Go · standard library only · 32 tests · CI runs 20,000 seeds of the correct build and every broken variant on each push
crdt-notes — local-first notes that merge without conflicts
Every browser holds the whole notebook, works with no network, and merges when it can reach the others. The merging is a CRDT written from scratch: RGA for text, last-writer-wins registers for fields, an OR-set for tags. The relay stores and forwards and has no authority. "Eventually consistent" is easy to claim, so convergence is tested: a fuzzer runs replicas over a network that drops, duplicates and reorders, 5,000 seeds converge, and six deliberately broken merges are each caught on the first seed.
TypeScript · Angular · 32 tests + a two-browser Playwright test of offline edits
schema-drift — catch breaking event-schema changes before they ship
An event stream couples teams who never call each other. This reads the JSON Schemas producers publish per topic, decides whether a new version breaks readers of the old one (or the other way round), and blocks the pull request. Every "breaking" verdict comes with a concrete event that proves it. The "compatible" verdicts are checked too: 7.6 million random events against 38,600 pairs it judged compatible, 0 counterexamples. That oracle found one real bug first.
Go · contracts live in git, the check is a CI step · 33 tests
migrate-safe — what a Postgres migration really locks, measured
Runs a migration on a copy of the database while a workload keeps reading and
writing, and measures what it took: locks, rewrites, full scans, and how long
reads and writes were locked out, including the queue that piles up behind a
waiting ACCESS EXCLUSIVE. On 5 million rows in Postgres 17, a volatile
ADD COLUMN … DEFAULT locked the table for 50.4 s; the safe rewrite, 19 ms. A
static linter predicts the same, and CI checks its 67-statement corpus against
what real Postgres 16 and 17 did.
Go · PostgreSQL · ~40 unit tests + integration on Postgres 16 and 17
deadline — stop the work when the caller has already given up
Passes a request's time budget from service to service, refuses to start work the budget can't cover, and reports where the time went at each hop. In a three-service chain where the user gives up at 2 s, retries and per-hop timeouts kept the system busy until 9.6 s; with the budget passed along it stops at 1.86 s with no wasted work. Under 30 requests/s, on-time answers went from 15% to 94.5%. It also found that the JDK's built-in HTTP server leaves Nagle on, holding replies about 40 ms behind delayed ACKs.
Java 21 · virtual threads · no dependencies beyond the JDK · 49 tests, a virtual clock for the planner
rate-proof — do rate limiters keep their promise when deployed?
Six algorithms run in a deterministic simulator the way they are deployed: four nodes with skewed clocks sharing a store a round trip away, with restarts and a store wipe. Every admit is checked against the algorithm's own promise. With clocks 50 ms apart a token bucket lets 5.8x its limit through, while a leaky bucket that differs by one line stays at its design bound. Reading the store's clock fixes all six. The Redis Lua scripts match the Go code over 120,000 differential calls, and given each request's measured timing the simulator predicts live Redis's admit count exactly.
Go · standard library only · 33 tests · CI runs against a real Redis
Boundaries that hold because of where they sit, not because the model behaves.
sqlguard-mcp — let an agent query a real database without giving it write access
Reads run under a row cap and a timeout. Writes are refused until a human
approves that exact statement, in a separate process the agent cannot reach —
the approval is bound to a statement rather than a capability, and is single-use
through an atomic filesystem operation rather than a mutex, because the server
and the approving CLI are different programs. Deployed to Kubernetes, approving
becomes kubectl exec, so the boundary needs cluster credentials rather than
access to a file.
Go · MCP · Kubernetes · Helm · 138 tests · CI stands up a real cluster and drives the deployed service
authz-proof — who gains access when the permission model changes?
A Zanzibar-style relationship engine with a diff: for an old and new schema, or a relationship change, it lists every permission gained or lost and the chain behind each one. A refactor meant to change nothing gives two contractors access to payroll, and the CI gate fails. It agrees with a deliberately naive reference evaluator across 20,000 random seeds, and with a real SpiceDB server on 60,000 checks. That comparison also found a SpiceDB cache bug that grants a permission it should deny.
Go · no dependencies · 27 tests · CI cross-checks against SpiceDB on every push
admission-replay — what would this admission policy have blocked last month?
Replays a cluster's audit log through a proposed ValidatingAdmissionPolicy
before it is turned on, using the Kubernetes API server's own admission plugin
rather than a reimplementation. On an example month the strict-looking policy
blocks 26 legitimate writes and lets two of three bad ones through: it only
matched Deployments and only checked containers. In CI the same policies run on
a real kind cluster, which re-judges 185 recorded writes, with 0 disagreements.
Go · Kubernetes · CEL · 30 tests · CI crosschecks every verdict against a live API server
bench-mcp — an agent at the lab bench that can't destroy the board
An MCP server that lets an agent drive power supplies, multimeters and oscilloscopes over SCPI. It's the first agent use case I know of where a wrong tool call costs hardware rather than a retry, so the limits sit where the agent can't reach them: in a file a person signed off, read once at start-up, never exposed to a tool. Voltage changes ramp, an emergency stop latches, and every decision goes to an audit log. In the demo the same requests sent as raw SCPI destroy the simulated board.
Python · MCP · 135 tests, property tests on the interlocks · simulated instruments, not yet tried on real hardware
local-network-mcp — an MCP server with a real deny boundary
Lets an agent discover, ping, inspect and SSH into devices on a local network. The three tools that change state are denied unless explicitly enabled, and the switch lives in the server's environment where a tool argument cannot reach it.
Python · MCP · 62 tests that assert the refusal, not the execution
mcp-audit — check an MCP server before your agent trusts it
Connects as a real MCP client, scans everything the server shows the model for
hidden instructions (including Unicode tag characters), lists tools again to
catch descriptions that change, and calls every tool in a sandbox with no
network under strace to compare what it does with what it claims. Its first run
on eight servers it had never seen gave 25 false alarms; the record is committed
with the fixes. It found that the official git server's git_status, annotated
read-only, rewrites .git/index.
Python · MCP · Docker · 65 tests · GitHub Action with tool pinning
permit — what can this dependency upgrade do that the old version couldn't?
Most npm supply-chain attacks arrive as an ordinary version bump that a lockfile diff doesn't reveal. permit compares old and new code by capability: network access, install scripts, child processes, environment reads, code loaded by a computed name. A pull request that gains one stops until someone allows it in a committed policy. Recreations of the event-stream and ua-parser-js attacks are blocked.
TypeScript · CLI and GitHub Action · 35 tests
llm-contract-router — fall back to a cheaper model without breaking the caller
Routes across providers behind one interface, adapting each request to the target model's tier — a compact model gets the schema restated, an example to copy and temperature zero; a frontier model gets none of that, because the scaffolding crowds out the task. The answer is validated against your schema, and a failure sends the model the specific constraints it broke. Degraded means cheaper and slower, never malformed.
TypeScript · zero runtime dependencies · 105 tests, no API keys
rag-knowledge-agent — a CLI RAG agent that shows its work
Hybrid retrieval — dense vectors and BM25, fused by reciprocal rank — with every
claim cited as [source:heading] and a confidence gate that declines rather
than guessing. Retrieved text is handled as data and never as instructions, so
injection resistance is a property of the design rather than a filter.
Python · ChromaDB · Claude · 109 tests, model stubbed throughout
noisefloor — a regression harness for systems that don't give the same answer twice
Eval tooling answers "what score does this get?" The question that blocks a merge is "did this change make it worse?" — unanswerable on a non-deterministic system until you know how much it moves on its own. Runs the target N times, measures the spread, and only calls something a regression when the delta clears it. Capturing a real baseline found a false positive in noisefloor itself.
Python · 202 tests · quickstart runs with no API key and no network
slo-proof — test an alert rule against last month before it pages anyone
Alert rules are usually tested by shipping them and finding out at 3 a.m. This replays past SLI data through a proposed rule, evaluated the way Prometheus evaluates it, and scores the pages against known incidents: caught or missed, how late, how much error budget burned first, and how many pages would have been for nothing. On the example month the common fast-burn-only rule misses the slow burn that spent 10% of the budget; the standard multiwindow rule catches all six incidents with no false pages.
Python · 67 tests · reads CSV or exported Prometheus query results
agent-replay — did the new prompt change what the agent does?
Records an agent's tool calls and replays the session against a new model, prompt or tool set, feeding back recorded results so no tool runs. It diffs the actions, not the text, flags calls that are newly destructive, and repeats replays to separate real changes from run-to-run noise. With a real Claude model driven through Claude Code, an edited system prompt turned "archive the old logs" (5 of 5 runs) into "delete them" (5 of 5).
Python · MCP · Claude · 78 tests · quickstart runs offline with no API key
trace-diff — the regression your tests and p95 both miss
Compares OpenTelemetry traces from before and after a change, matched by normalized operation and compared per endpoint with multiple-testing control. In a real three-service demo a pull request passes its tests and improves p95 from 73.5 to 50.4 ms, while turning one query per request into up to 50 and adding a retry storm. trace-diff fails it and names both, with example trace IDs. Over 200 seeds per scenario every planted regression is found and nothing fails falsely.
Go · OpenTelemetry · 25 tests · CI runs the demo stack with a real Collector
flaky-hunt — say why a test is flaky, not just that it is
A pytest plugin that re-runs a suite under one controlled change at a time
(order, clock, time zone, seeds, thread timing, environment, network), confirms
each cause with an exact test, bisects order dependence to the single polluting
test, and prints the plain pytest command that reproduces it. On real
projects it found 25 order-dependent tests in humanize 4.10.0, gone in 4.11.0,
and the arrow locale pollution behind an issue open since 2021.
Python · pytest · 44 tests · five planted mis-diagnoses, all caught
Flight control and geology, where being approximately right isn't good enough.
geofence-guard — refuse the setpoint before the drone leaves the fence
A ROS 2 node between whatever decides where the aircraft goes (a planner, a
teleop bridge, a language model with a goto tool) and the autopilot. It
forwards a setpoint only when it can show the path stays inside the flight
envelope. Autopilot geofences are a failsafe that acts after the breach; this
acts before the vehicle moves. In PX4 SITL the unguarded drone flew a shortcut
42.7 m outside the fence; the guarded one never left, with an 8.2 m closest
approach against a 5 m margin.
C++17 · ROS 2 · PX4 · 93 core tests under sanitizers · CI flies both runs in PX4 SITL on every push
paramguard — a "cleanup" of the parameter file that loses the failsafe
Diffs autopilot parameter files by the value the vehicle will actually run, so deleting a line counts as a change, and checks it against PX4's own parameter metadata and a rule file that gives the reason for each rule. In PX4 SITL the same flight loses its radio link 300 m out: with the original file it lands 0.1 m from home, after the cleanup it's still hovering 299 m out with no failsafe. paramguard blocks that change, though the diff has only deletions.
Python · PX4 + ArduPilot rules · 66 tests · CI flies both runs in SITL
terrain-follow — prove the drone clears the hill
Checks a mission against real elevation data (Copernicus GLO-30) and states, for each leg, a clearance it can prove: the exact maximum of the interpolated terrain over a corridor, minus the data's own error and the vehicle's. In PX4 SITL over a Gazebo world built from that data, a mission flown at 60 m above home hits the hillside 2.14 km in (predicted: 2.15 km); the replanned one keeps 39.7 m measured against 30.1 m proven, and lands 0.1 m from the drop point.
Python · PX4 · 38 tests · CI flies both missions in SITL
strata — a ground model that says where it's guessing
Back to geology. Borehole logs in, a layered model of the ground out, with a 95% interval on every contact, and a refusal to answer where the interval is too wide to be useful. Most of a site is never drilled, but most tools draw layers equally confidently next to a borehole and 150 m from one. strata krigs the ground surface and layer thicknesses, so layers can't cross, and checks its own honesty against synthetic sites with known geology: 95.3% of its 95% intervals contain the truth on smooth ground, 94.0% on rough.
Rust · zero dependencies · 46 tests · calibration bench in CI
fieldlog — a field notebook for boreholes, with no signal
An Android app for logging boreholes and outcrops on site. Phones merge their edits when they reconnect through a CRDT written from scratch, and a relay that only stores and forwards. Clean over 25,000 fuzzed sync runs; six broken merges each caught on the first seed. Its export goes straight into strata, where a newly logged hole turns a refused point into an answer within 2 cm of the truth. Two emulators editing offline and converging are in the README.
Kotlin · Jetpack Compose · Android · 39 tests, including UI tests on an emulator in CI
runon — run the same shell script on your laptop, one server, or a fleet
A procedure is a directory with a main.sh, so adding a capability means adding
a directory and the tool itself never changes. It shells out to your own ssh,
which is why your config, agent and jump hosts already work and there is no
second implementation of SSH to keep correct. The inventory is committed, so a
password written in it is a hard error — a host names an environment variable or
a 0600 file instead, and add-host will write that file for you rather than
take a password on a command line where shell history can keep it.
The suite was green at 319 tests while four bugs made copying to a fresh host impossible, because everything drove a fake transport. There is now a CI job that stands up a real sshd and copies to it, which is what found them.
Python · on PyPI · zero runtime dependencies · 338 tests · Ubuntu + macOS × 3.11–3.13, plus an integration job against a live sshd
tsz — time-series compression, measured honestly
Gorilla, Chimp and a decimal codec, with auto picking the smallest per block.
On real sensor datasets it is 5–8x smaller than Gorilla and 2.5–5x smaller than
zstd. pco still beats it on size on every dataset, by 11–26%, and the README
says so. Byte-exact round trips over a million random series, including
NaN payloads, infinities and -0.0, and fuzzing finds nothing.
Rust · zero dependencies · 21 tests plus a million-series soak in CI
ops-console — a live dashboard that stays fast and accessible
Angular 22, zoneless and signals throughout, over a stream of 10,000+ events a second. A virtualised table that works fully from the keyboard, alerts a screen reader hears at most once every 10 s, and an axe audit with no violations in either theme. At 40k events/s copying the list per event drops 98% of frames and zone.js 99%; the default drops none. The README notes per-frame batching wasn't what saved it: Angular's zoneless scheduler already coalesces.
Angular · TypeScript · 24 unit + 28 Playwright tests · CI checks frame timing and a soak
The rest of the last decade.
My Stream — a multi-model AI publishing platform I build and run. Angular/Ionic and Android on AWS, routing across seven LLM providers behind one interface with per-model quality calibration, so a cheaper model degrades predictably instead of failing in surprising ways.
Drone autonomy (HEAR / droneLeaf) — C++ onboard software for unmanned aircraft: mission-scenario control, an onboard REST API and websocket link, machine identity, and a ROS/CMake cross-compilation toolchain for getting it onto the target hardware.
| Languages | TypeScript, Python, Go, C++, Rust, Java, Kotlin |
| Working with models | Anthropic / Claude, MCP, RAG, hybrid retrieval, evals, multi-provider routing |
| Systems | Storage engines, crash consistency, firmware updates, authorization, consensus, CRDTs, rate limiting, compression, query languages, distributed services, real-time C++/ROS, geostatistics |
| Web & mobile | Angular (signals, zoneless), Ionic, Node, Android (Kotlin, Jetpack Compose), accessibility (WCAG 2.1 AA) |
| Infrastructure | AWS, Docker, Kubernetes (admission policy, CEL), Helm, GitHub Actions, Prometheus, Redis, PostgreSQL, OpenTelemetry |
geohashim.com · Medo Apps

