Writing

Notes on production AI, distributed systems, ML infrastructure, reliability, and performance.

RSS feed

31 articles across 6 topics

Agent Reliability

Keeping execution authority outside the model: typed proposals, deterministic policy, durable confirmation, revalidation, idempotency and audit.

Only Agent Reliability
9 min read

Stop Asking Coding Agents to Guess What's Wrong

Why Agent-Friendly Codebases need runtime evidence, not just better documentation: traces, profiles, reproducible workloads, and independent verification.

Read
8 min read

Agentic Without the LLM: Building Deterministic Kubernetes RCA

How I built a bounded autonomous Kubernetes incident investigator where evidence selection and root-cause diagnosis run deterministically — 17/22 exact root cause on a blind holdout, with zero model calls.

Read
9 min read

Hard Gates + Frozen Hashes for AI Coding Agents

Making agentic development verifiable rather than merely autonomous: external gates decide whether work is acceptable, and hashed baselines stop the agent from redefining what acceptable means.

Read
3 min read

Memory Is Context, Not Authority

Persistent agent memory is useful only if remembered text cannot become permission. A practical boundary for scoped memory, consent, DLP, TTL, and authority isolation.

Read
11 min read

Designing Guardrails for Production AI Agents

A practical execution model for tool-using agents built from typed proposals, deterministic policy, durable confirmation, revalidation, idempotency, and audit.

Read

AI Platform

Model lifecycle as a control-plane problem: desired state and reconciliation, progressive delivery, inference gateways, shared limits and monitored batch scoring.

Only AI Platform
5 min read

A Canary That Cannot Fail Is Not a Gate

A canary rollout earns trust only if it can reject a bad candidate on real traffic. How the ML platform's rollout gate decides PASS, WAIT or FAIL, why an unexercised canary fails closed, and what a live rollback test found in the metrics and the drift detector.

Read
5 min read

Commit the Intent, Then Touch the Cluster

An ML platform API that waits on Kubernetes inherits every timeout, partial apply and crash in the cluster. Why the control plane records desired state in PostgreSQL and returns, and how reconcilers turn that intent into namespaces, workflows and serving revisions safely.

Read
5 min read

Fail Closed When the Limiter Is Down

A rate limit that lives in each gateway replica multiplies with every replica, and a limit that disappears during an outage is not a limit. How the ML platform shares budgets through PostgreSQL, what it returns when that store is gone, and how a three-statement transaction cut limiter p95 from 187 ms to 4.7 ms.

Read
5 min read

One Million Rows, One Schedule, No Hand-Run Monitoring

Batch inference is trustworthy when every output can be traced to the exact data, model and run that produced it, and checked against ground truth without a person starting the check. A walk through one million real NYC taxi trips scored and monitored by the ML platform.

Read
5 min read

The Gateway Is Not the Control Plane

Prediction traffic and platform management have different callers, failure modes and scaling needs. Why the ML platform runs a separate inference gateway, and how it was moved from Python to Go without changing a single admission decision.

Read
7 min read

Designing a Policy-Driven Model Promotion Control Plane

Model deployment is not complete when a container starts. How progressive traffic, delayed ground truth, explicit policy outcomes, rollback, and desired-versus-observed reconciliation make model promotion a control-plane problem.

Read

Governed Text-to-SQL

Turning a natural-language request into a query that is allowed to run: deterministic SQL admission, server-owned grain safety and execution-based evaluation.

Only Governed Text-to-SQL
4 min read

A SUM That Counts the Parent Three Times

A join to a one-to-many child table can silently triple a parent measure, and the query still looks correct. This is why grain safety belongs to the server, not to the model that wrote the SQL.

Read
5 min read

The Model Wrote the SQL. It Doesn't Get to Run It.

Between a model writing a query and a database running it sits an admission chain that ends in a capability object. The executor runs an accepted QueryPlan, not raw SQL, so passing every gate is the only path to execution.

Read
4 min read

Your Text-to-SQL Benchmark Is Measuring the Wrong Thing

Exact-match and single-state checks pass wrong SQL that happens to return the right rows. Correctness has to be execution across counterfactual database states, and mutation testing is how you prove the test can tell right from wrong.

Read

Retrieval & RAG

Retrieval as evidence rather than authority: hybrid search, citation integrity, provenance and grounded generation.

Only Retrieval & RAG
6 min read

Read the Number From the Page, Calculate in Code

A language model can find the right two numbers in a 10-K and still return the wrong ratio. How an agentic document research workspace lets the model transcribe sourced inputs, while application code applies units and scale, executes the arithmetic and proves it again at release.

Read
8 min read

A Research Loop Remembers in Types, Not in Prose

How an agentic document research workspace keeps its memory as typed application state: PydanticAI agents propose, the application writes memory, runs the tools and decides when the loop ends. 101 of 120 long-document questions reached an accepted outcome.

Read
3 min read

RAG Can Provide Evidence. It Cannot Grant Authority.

Retrieved evidence can support an agent answer without becoming an authorization source. How hybrid retrieval, provenance, grounding checks, and bounded abstention keep the knowledge path separate from execution.

Read
5 min read

63 Rescues, 0 Drops, and 2.4 Seconds

A cross-lingual reranker moved Recall@5 from 0.9563 to 1.0000. The aggregate is the least interesting number in that sentence, and the latency figure means less than it looks like.

Read

Data Engineering

Shared definitions, lineage and quality gates in the pipelines that feed training, inference and reporting.

Only Data Engineering
5 min read

A DAG Is a Failure Contract, Not a Schedule

Orchestration tutorials sell the schedule. The parts that decide whether a pipeline survives are retry semantics, write shape, backfill parameterisation and what a half-finished run leaves behind.

Read
5 min read

One Definition Per Feature

When every pipeline rebuilds the same customer feature, the definitions drift apart silently. Making the feature a shared owned artifact fixes that and creates a change-impact problem that column lineage has to answer.

Read

Distributed Systems

Explicit delivery guarantees, idempotent effects, transactional boundaries and measured service limits.

Only Distributed Systems
7 min read

The Limiter Said 100. The Provider Saw 119.

A 70.7 ms wall-clock jump exposed a hidden assumption in a Redis rate limiter. The investigation, controlled clock-step tests, and the throughput cost of a bounded fix.

Read
10 min read

Building a Reliable Kafka Event Processing Platform

A deep dive into designing, testing, and optimizing an event-driven commerce platform with Kafka, PostgreSQL, Redis, and transactional outbox patterns.

Read