Engineering notes

Writing

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

RSS feed

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.

  • Coding Agents
  • Observability
  • Performance Engineering
  • Evaluation
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 — 21/25 exact-root agreement on a frozen blind holdout with zero model calls.

  • SRE
  • Kubernetes
  • Root Cause Analysis
  • Agent Architecture
  • Evaluation
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.

  • AI Agents
  • Guardrails
  • Evaluation
  • Reliability
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.

  • AI Agents
  • Memory
  • Security
  • Privacy
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.

  • AI Agents
  • Guardrails
  • Reliability
Read

AI Platform

Model lifecycle as a control-plane problem — progressive delivery, delayed quality feedback, policy-driven promotion and reconciliation.

Only AI Platform
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.

  • MLOps
  • AI Platform
  • Progressive Delivery
  • Reliability
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 over changing states.

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.

  • Data Engineering
  • SQL
  • Grain
  • Text-to-SQL
  • Governance
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.

  • Text-to-SQL
  • SQL
  • Execution Authority
  • Governance
  • PostgreSQL
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.

  • Data Engineering
  • SQL
  • Text-to-SQL
  • Evaluation
  • Testing
Read

Retrieval & RAG

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

Only Retrieval & RAG
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.

  • RAG
  • AI Agents
  • Security
  • Evaluation
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.

  • RAG
  • Evaluation
  • Performance Engineering
  • Reliability
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.

  • Data Engineering
  • Airflow
  • Idempotency
  • Reliability
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.

  • Data Engineering
  • dbt
  • Feature Platform
  • Lineage
Read

Distributed Systems

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

Only Distributed Systems
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.

  • Distributed Systems
  • Kafka
  • PostgreSQL
  • Reliability
  • Performance Engineering
Read