nobroker's real record format, reimplemented in JavaScript — same frame, real CRC-32, real byte offsets. Crash a write mid-record and watch recovery find the tear. What's real and what's simulated →
A job queue is a to-do list that survives its program being killed. Work is written down first, then done later by something else — so a crash loses nothing that was already promised.
Everything on this page is that list, shown twice:
Jobs is what the queue believes — one card per job, with its state. The log file is what is actually on disk, record by record, with real byte offsets. The second one is the truth: the Jobs panel is rebuilt from it every time you press Recover. Keep an eye on both, because the whole design is that they can never disagree after a crash.
Nothing here is sent anywhere. It runs entirely in this tab, and reloading starts over.
ENQUEUE record appears in the log.
Look at the byte offsets — that record is
now on the disk, and the real thing would not have returned until it
was.
The five buttons at the top of the page do these sequences for you if you would rather watch than click. Hover any button for a one-line explanation of what it does.
jobs/default.000000.log[u32 length][u8 type][u32 crc32][json], little-endian, plus the 16-byte file header.zlib.crc32, over the type byte plus the payload.\uXXXX the way ensure_ascii does it.Verified, not asserted. The encoder was diffed against
nobroker.codec across file headers and every record type — identical hex
output, including a payload with non-ASCII characters.
fsync — durability is the one guarantee a browser cannot demonstrate.heapq heaps with lazy deletion; here n is tiny and the trick would only obscure the point.30.0 where JavaScript writes 30. The virtual clock is whole seconds so it never comes up here, but a log written by Python would differ in those bytes.The playground exists to make the failure modes tangible — a torn tail, a stale fencing token, a lease that expired while you weren't looking. For the durability guarantee itself, the evidence is the test suite: design notes.
Nothing here talks to a server. Reload to start over.