Field notes

Notes from systems that had to keep working.

Field notes on data platforms, database lifecycle, distributed systems, production agentic AI, pipeline reliability, and self-hosted infrastructure.

Writing

52 notes

Browse topics
  1. Data platforms

    22 pieces · Streaming, lakehouse, data contracts, and the upgrades that break them

  2. Essay The data stack lab Measured on my own hardware

    The producer re-sent the fixed file. COPY INTO never read it.

    Ten days of files loaded six ways on Databricks. A truncated upload, fixed under the same name, was skipped by COPY INTO and Auto Loader: 1,638 events lost.

    • Databricks
    • Data quality & contracts

    8 min read

  3. Essay The data stack lab Measured on my own hardware

    Re-running one day of a Spark job deleted the other 364

    With Spark's default overwrite mode, rewriting one partitioned day deleted the other 364. Plus how many files a partitioned write makes, with and without AQE.

    • Apache Spark

    6 min read

  4. Essay The data stack lab Measured on my own hardware

    Wrong data and missing data are caught by different checks

    A month of deliveries with nine defects. Row tests caught wrong values; only control totals, volume and platform share saw rows that never arrived.

    • Data quality & contracts
    • Data modelling & dbt

    8 min read

  5. Essay The data stack lab Measured on my own hardware

    A Type 1 dimension put 15% of a year's revenue on the wrong plan

    Type 1 moved $152,227 of a year's revenue to the wrong plan. A Type 2 dimension from dbt snapshots got all 5,048 invoices right; only a unit test saw the bug.

    • Data modelling & dbt
    • Data quality & contracts

    11 min read

  6. Essay Reference systems, measured Measured on my own hardware

    Removing an optional field breaks consumers. Adding one breaks history.

    Schema changes teams call safe still break someone. A JSON Schema contract checker, 51 labelled changes, an oracle, and no breaking change passed as safe.

    • Data quality & contracts

    12 min read

  7. Essay Reference systems, measured Measured on my own hardware

    Exactly-once held through nine failures. The window counts did not.

    Kafka, Flink, ClickHouse and Iceberg stayed exact through nine failures, yet 10-second window counts fell to 59.8% of on-time events. Why, and the fixes.

    • Kafka & streaming
    • Data quality & contracts
    • ClickHouse

    13 min read

  8. Essay Notes from production Observed in production

    Validate said SUCCESS. The upgrade would have died halfway.

    A Hive Metastore 4 upgrade rehearsed on a clone: zero constraints, a validator that passed anyway, and why the plan became blue/green.

    • Iceberg & the lakehouse
    • Apache Spark
    • Observability & SLOs

    14 min read

  9. Essay Notes from production Observed in production

    The Spark 4 upgrade that succeeded and wrote nothing

    Spark 4.2 on hadoop-aws 3.5 read 9,029 records and wrote zero objects, and no task failed. Why the S3A committer was bypassed, and the tests that now catch it.

    • Apache Spark
    • Data quality & contracts

    17 min read

  10. Tutorial The lakehouse spine Measured on my own hardware

    A lakehouse spine: Trino, Iceberg and Polaris, with credentials that expire

    Build Trino 483 on Iceberg with Apache Polaris as the REST catalog, then prove the vended S3 credentials cannot read the table next door.

    • Iceberg & the lakehouse
    • Distributed databases

    ~45 min to a working stack; the credential-vending section is the part that takes the time

  11. Tutorial The lakehouse spine Measured on my own hardware

    Bronze, silver, gold on Iceberg: the dbt config that is silently ignored

    Build a medallion pipeline with dbt-trino on Iceberg, orchestrate it with Airflow 3, and find the partition spec dbt accepts and discards without a warning.

    • Iceberg & the lakehouse
    • Data quality & contracts

    ~40 min, most of it waiting on two container builds

  12. Tutorial The lakehouse spine Measured on my own hardware

    Iceberg maintenance: 20 files into 1, and a rollback I actually performed

    Measure what compaction buys on a small-files partition, then delete 909,968 rows and get them back — and find where the safety net stops.

    • Iceberg & the lakehouse
    • Observability & SLOs

    ~25 min, and the rollback itself takes under a second

  13. Essay

    The data platform is part of the product

    A practical operating model for reliable data and AI products: consumer-facing promises, typed decisions, idempotency, provenance, and repair.

    • AI agents in production
    • Data quality & contracts

    11 min read

  14. AI systems

    18 pieces · Evaluation, agents, retrieval and applied ML, measured

  15. Essay Agents in a real repository Operating model

    A gate's known limits are its next tests

    greenproof 0.4.0 set out to close the limits its own docs listed. Of 744 tamper probes none passes, and honest changes blocked fell from 35 to 18.

    • AI agents in production

    13 min read

  16. Essay Agents in a real repository Operating model

    Agents say done. Something outside them has to check.

    A stop hook for Claude Code, Codex CLI, Cursor and OpenCode that runs the repo's checks and flags weakened tests. On 698 real commits it blocked 75, 21 wrongly.

    • AI agents in production

    16 min read

  17. Essay Reference systems, measured Measured on my own hardware

    Validation picked the fraud model that had read the future

    A naively joined fraud model beat the point-in-time one on validation, 0.746 to 0.681 AUC-PR, then scored 0.363 to 0.941 on the next two weeks. Why it happened.

    • Applied ML & evaluation
    • Data quality & contracts

    16 min read

  18. Essay Reference systems, measured Measured on my own hardware

    The agent got 48 of 54 right. Three of the wrong ones published themselves.

    An analytics agent answered 48 of 54 questions correctly on a local model. What mattered was 3 of 37 auto-published answers wrong, and why no check saw them.

    • AI agents in production
    • Applied ML & evaluation

    11 min read

  19. Essay Agents in a real repository Operating model

    Agents read your definitions. Somebody has to own them.

    Agents fail on stale or contradictory knowledge before they fail on reasoning. One concept per file, an owner, a date, a Disputed section; generate the rest.

    • AI agents in production
    • RAG

    13 min read

  20. Essay

    Label the string, not the row: a short-text triage lab

    A generated 20,000-row multilingual lab: normalize to distinct keys, cluster them for one LLM call each, and why a cosine threshold needs a margin.

    • Applied ML & evaluation
    • Data quality & contracts

    15 min read

  21. Essay Agents in a real repository Operating model

    Ten gates, and the failure behind each one

    Every gate in this repository exists because something got through. Three of them because a suite reported success against a broken artifact.

    • AI agents in production
    • Data quality & contracts

    10 min read

  22. Essay Agents in a real repository Operating model

    Agents write the diff. The repo has to review it.

    How to run Cursor, Claude Code, and Codex in an existing repo: AGENTS.md, CODEOWNERS, CI gates, and the AI-generated PR pitfalls that blow up review.

    • AI agents in production
    • Career & craft

    16 min read

  23. Databases and distributed systems

    7 pieces · Sharding, failover, backup and restore on real clusters

  24. Essay Reference systems, measured Measured on my own hardware

    Citus removed the node. Its cleanup records stayed behind.

    Draining a Citus worker and removing it straight away left cleanup records for a node that no longer existed. A later rebalance retried one move 33 times.

    • Distributed databases
    • PostgreSQL

    11 min read

  25. Tutorial RHEL 8 Postgres lab on Apple Silicon Follow-along runbook

    pgBackRest against a Patroni cluster: archive, rebuild, and restore

    Wire pgBackRest into a Patroni cluster with Ansible over mutual TLS, then prove it: full backup, replica rebuilt from the repo, point-in-time restore (PITR).

    • PostgreSQL
    • Distributed databases

    ~90 min on an existing cluster; the restore drill itself is ~15 min

  26. Tutorial RHEL 8 Postgres lab on Apple Silicon Follow-along runbook

    Patroni HA on PostgreSQL 18 with etcd, proven by killing the primary

    Build a two-node Patroni cluster on Rocky 8 under QEMU, then SIGKILL the leader and measure the promotion, the timeline bump, and the pg_rewind rejoin.

    • PostgreSQL
    • Distributed databases

    ~2–3 h first bring-up (TCG is slow); ~5 min for the failover itself

  27. Tutorial RHEL 8 Postgres lab on Apple Silicon Follow-along runbook

    Dedicated pgBackRest TLS on RHEL 8 with Ansible—before Postgres

    Stand up a dedicated pgBackRest repository host running the TLS server on RHEL 8, with Ansible-issued certs, then prove server-ping and mTLS from a client VM.

    • PostgreSQL
    • Self-hosted ops

    ~90 min first bring-up (TCG + dnf)

  28. Tutorial The failover lab Measured on my own hardware

    PostgreSQL 18 won't take a volume at /var/lib/postgresql/data

    PostgreSQL 18's Docker image wants the volume at /var/lib/postgresql, PGDATA in 18/docker, so 12–17 compose files break. The fix, replication and PITR.

    • PostgreSQL

    ~35 min hands-on

  29. Tutorial The failover lab Measured on my own hardware

    nodetool refresh only reads the live table's upload/ directory

    Why a valid ScyllaDB snapshot restore can return zero rows with no error, the restore that works after a TRUNCATE, and the AIO limit that stops node three.

    • Distributed databases

    ~40 min hands-on

  30. Tutorial The failover lab Measured on my own hardware

    A failover lab: six database engines, eight scenarios, every one run

    Six database engines, eight failover scenarios, one 8-CPU Docker rig. The results matrix, the headline measurements, and how to run the first scenario.

    • Distributed databases
    • PostgreSQL

    ~45 min hands-on

  31. Delivery and infrastructure

    2 pieces · Progressive delivery and the lab infrastructure underneath

  32. Essay Reference systems, measured Measured on my own hardware

    My canary analysis aborted a good release and promoted a bad one

    A Prometheus canary analysis aborted a good release and promoted a bad one before it caught 6 of 6. Judge against stable, refuse empty windows, count requests.

    • Kubernetes
    • Observability & SLOs

    11 min read

  33. Tutorial

    amd64 Vagrant labs on Apple Silicon without broken host networking

    amd64 Vagrant boxes on Apple Silicon with QEMU and socket_vmnet, and why a lab that boots still fails host and mesh ping on aarch64 boxes or the Wi‑Fi subnet.

    • Self-hosted ops
    • PostgreSQL

    ~60–90 min first bring-up (TCG is slow)

  34. Self-hosted runbooks

    3 pieces · Follow-along setups for a VPS you own

  35. Tutorial Free OSS on your own VPS Follow-along runbook

    A free mailbox for your domain with Stalwart

    Want a free mailbox for your domain? Run the Stalwart mail server on Docker, skip ACME when 443 is taken, publish SPF/DKIM/DMARC, prove a Gmail round-trip.

    • Self-hosted ops

    ~60 min hands-on

  36. Tutorial Free OSS on your own VPS Follow-along runbook

    A free VPN on your VPS with WireGuard

    Want a free VPN you actually control? Pin wg-easy to :15, not :latest, mount /lib/modules, keep the UI off 80/443, and prove traffic exits from your VPS.

    • Self-hosted ops

    ~25 min hands-on

  37. Tutorial Free OSS on your own VPS Follow-along runbook

    A free private remote desktop with RustDesk

    Want a free private remote desktop? Self-host RustDesk on Docker, open UDP 21116, pin the key, and keep sessions past the public cutoff.

    • Self-hosted ops

    ~30 min hands-on