Skip to content

// Logistics × Real-Time AI Audit

Auditing a freight tracking stack

A read of the wire contract, the write path, the connect handler and the history table — ending in the specific places your dispatch map is allowed to be wrong, and what each costs to close.

// The problem

Why this is hard

Almost every defect in a tracking stack is invisible until the day it is expensive. A payload with nowhere to put a capture time produces correct-looking data until a device buffers. A history table with no index is never slow until someone queries it. A connect handler that re-authorises is fine until a deploy. None of them appear in a metric, none produce an error, and all of them are visible in an afternoon to somebody reading the right four files in the right order.

// How we do it

The approach for this fit

The wire contract first

What a position payload can and cannot say, and what the server is therefore forced to invent. This is upstream of every other finding: a contract that cannot carry a capture time makes correct replay impossible rather than merely unimplemented.

The write path and its guards

Whether the live pointer is overwritten unconditionally, whether a retry can be told from a stop, and whether anything is idempotent. Read from the code, not inferred from behaviour.

The reconnect and re-subscribe path

What the client does on connect, and whether the server's room membership survives it. Transport recovery is not application recovery, and the difference is one handler.

The history table's access path

What is written, what reads it, and what the first real query will cost. The fastest-growing object in a tracking system is usually the last one anybody indexed, because nothing reads it yet.

// Proof

Measured on our own hardware

for one order's history, unindexed

115 ms

A Seq Scan at ten million rows against 0.04 ms with the index — and it produces no slow query until somebody writes the first reader, which is what makes it an audit finding rather than an incident.

loss on a link told to lose none

0.55%

Why a reported figure is not a finding. The same link's loss rate moved more than twentyfold with queue depth alone, so an audit reads where a number came from before it reads the number.

storage for the composite index

4.6×

301 MB against 65 MB at ten million rows. Two thirds of that is btree deduplication, which collapses a repeated foreign key and cannot touch a near-unique pair; the rest is the second column itself. The right index is a trade, and an audit is where you find out which way it goes.

Not a client outcome and not a vendor figure — numbers we took, on hardware we can name, with the method to be published alongside them.

// FAQ

Common questions

A written read of the four paths above, each finding tied to the file it came from, with what it costs to close and what it costs to leave. Days rather than weeks, because it is reading rather than measuring — where a claim needs a number we build the harness and publish the method, and where nobody has measured anything we say that instead of estimating.

That is the usual case and it is the point. Every finding in this sector is one that produces no symptom until it produces an expensive one: the index is not slow until the feature ships, the payload is not wrong until a device buffers, the subscription is fine until a deploy. An audit before the incident is the only version that is cheap.

Sometimes, and it is a separate decision made after you have the read — not a condition of getting one. The audit is written so your own team can act on it without us; if you would rather we operated the live path afterwards, that is a different engagement with a different shape.

// Part of

Where this sits

// Let's build

Building Auditing a freight tracking stack?

Tell us where you are. We reply within a day with a concrete next step.