Inspiration
A flight recorder is trusted because it only records — it never interprets, never fills gaps, never guesses. Debugging tools for embedded systems do the opposite: logs scroll by, state is reconstructed from memory, and "what happened" becomes a matter of opinion. We wanted a flight recorder's discipline as a live developer tool on QNX: an immutable event ledger you can interrogate, where every answer comes with its evidence — and where "there is no record of that" is a first-class, trustworthy answer.
What it does
Stitched Blackbox runs on QNX Neutrino RTOS 8.0 as four small processes plus a host bridge:
- Ledger server — owns a fixed record table and a 256-entry static event ring, served over native QNX message passing (MsgReceive/MsgReply). After initialization there is no dynamic allocation anywhere in the system.
- Retrieval core + gate — answers questions about the ledger using an Aho-Corasick automaton for name matching and hash indexes for location/type/role. No per-query full scan, no probabilistic model in the answer path. Every answer cites its evidence cell as [row, column]. If the fact is not in the ledger, the answer is
ABSTAIN_NO_RECORD. If the answer cannot be produced inside a time budget derived from measured on-target timings, the answer isABSTAIN_TIMEOUT— the tool abstains rather than answer late. - Watchdog + fault injection — a mock sensor process is deliberately killed. The watchdog detects the death, writes a FAULT event into the ledger, respawns only the dead process, and writes RESPAWN when it is ready. The ledger server, isolated in its own address space by the QNX microkernel, never stops answering.
- Target verifier — runs a fixed 81-question acceptance exam on the target itself and streams JSON verdicts to the host, where an independent checker (sharing no code with the verifier) re-derives every verdict, and a bridge page renders the results with the evidence cells highlighted.
How we built it
The deterministic retrieval core was first built and measured as a browser-based tool (Stitched Ledger, Kiroween 2026). For QNX we re-implemented its semantics 1:1 in C11, then followed a factory-line process with separated maker and checker seats: the C core had to pass the same 81-question exam compiled for the host (gcc) before it was allowed onto the target; only then were the ledger server, watchdog, and verifier built around a frozen IPC protocol. The boot image is assembled with mkifs and runs under QEMU (qemu-system-x86_64), with the verifier executing automatically at boot.
Measured results (QNX 8.0 on QEMU 10.2, two consecutive runs)
- Retrieval 66/66 · trap abstention 15/15 · evidence coordinates 66/66 — identical in both runs, and the target verifier's verdicts matched the independent host checker on every question.
- Server retrieval time: median 0.037 ms, mean 0.091 ms (run 1). The time budget is derived per run as 20× the slowest measured retrieval (17.50 ms / 31.28 ms); re-running the full exam under that budget reproduced identical 81/81 verdicts with zero timeouts, and a deliberately impossible 1-cycle budget produced ABSTAIN_TIMEOUT on 3/3 test questions.
- Determinism: the 81 questions repeated 100 times — 8,100 queries, 0 mismatches, in both runs.
- Fault injection: sensor death detected in 15.5–15.8 ms; full recovery in 27.2–28.6 ms, with the ledger server's pid unchanged and FAULT/RESPAWN recorded in the ledger.
- Footprint: the four target binaries are 13.7–55.1 KB each; the boot image is 2,469,956 bytes.
- All timings were measured under QEMU emulation and are reported as distributions (medians), not as bare-metal claims.
Challenges we ran into
Porting a TypeScript reference core to C11 without changing its semantics surfaced a subtle suffix-link traversal bug in the Aho-Corasick output collection — caught by the host exam before the core ever reached the target, which is exactly what the maker/checker separation is for. On the target, the first question's warm-up dominates the maximum retrieval time under emulation, which is why the time budget is derived from measured maxima per run instead of being fixed in advance.
Accomplishments that we're proud of
A complete, working demonstration that an audit tool can be both deterministic and honest about its limits: perfect exam scores on a real RTOS target, abstention that triggers on both missing records and impossible deadlines, and a self-healing demo where the record-keeper survives the failure it records.
What we learned
Determinism is a design discipline, not a model choice: static memory, indexed retrieval, frozen question semantics, and a budget derived from measurement. QNX's message passing and process isolation make that discipline natural to implement — the ledger server's survival during fault injection needed no special code, just separate address spaces.
What's next
A record/replay front end that streams live target events (not just exam results) into the bridge UI, larger ledgers with the same static-allocation discipline, and timing characterization on physical QNX targets alongside the QEMU baseline.
A note on how this entry was made
Concept and specifications by Dukha Kim (Nexus Group). Implementation was carried out with AI assistance (Claude) under human direction, using the separated maker/checker process described above. Every figure in this submission is a measured value from the recorded target runs (full machine-readable results are in the repository under evidence/); no performance number is an estimate.
Built With
- c11
- html/css
- python
- qemu
- qnx-neutrino-rtos-8.0
- qnx-sdp-8.0