A tap in a tunnel
Money-carrying taps wait. They do not vanish. That is three apps, one rule, and one bug we only found by asking who owns a frame.
Nick Khan27 August 20262 min
A driver finishes a ride in a dead zone and taps Complete. The socket is gone. On most systems that tap is lost, the office chases it, and the driver is told on Friday that the job is not on their sheet.
The fix is not clever. Anything that carries money — a job status, an answer to an offer — is written to the phone's own storage before it is sent, and the next socket sends whatever the last one could not. It is replayed in order, sent once, and aged out after a day: a completion replayed later than that meets a job the office has long since dealt with by hand.
Memory is exactly what a refresh empties
The first version held the queue in memory. That is wrong in the case the feature exists for: a refresh, a crashed tab and a phone reboot are the moments a driver most needs the tap to survive, and all three empty memory. It is written to storage, keyed to the session, and read back by the next socket on the same key.
A frame is owed until the socket says it went
This is the part we got wrong, and it is worth writing down because it looked finished.
The iOS flush handed each frame to URLSession and counted it delivered on the spot, discarding the completion the ordinary send path had always honoured. A connection dying part way through a flush therefore dropped everything after it, silently — which is a completion tapped in a tunnel, the exact thing the outbox exists to prevent, reintroduced by the code meant to prevent it.
Each entry now re-queues itself when its own send fails, keeping the moment it was tapped so the day-old cutoff still measures the tap rather than the last retry.
The two phones differ, and the difference is the platform's
OkHttp's send answers immediately, so Android can stop at the first refusal
and re-queue the tail: a prefix really did go. URLSession's answers later and
out of order, so there is no prefix to reason about.
The pure "what is still owed after n sent" helper the iOS side had was worse than useless. Nothing could produce a partial n for it, so the test beside it passed on every run and the bug lived underneath. It is gone. Android keeps its own, which its synchronous send earns.
What you can do with it
Put a phone in flight mode, complete a job, come back. The office has it. That is the whole demonstration, and it is the one we run first.
Read next
Fewer notes than a news feed, and each one about a decision rather than an announcement.
3 min
Why we tell a driver why the job was not theirs
A rule nobody can check is a rule nobody believes. So ours is a threshold, not a weight, and the driver can read it back.
See OneTaxi working with your own team.
Book a 30-minute call. We’ll help set up your firm, walk you through a booking and show you the dispatch process in action.