Question: Tracebook adapter and public FIFO observation surface
Hi, I maintain Tracebook, a matching-engine conformance and failure-reduction toolkit. I am evaluating matcher as the next independently maintained native adapter and wanted to confirm the public semantic boundary before writing code.
This is not a performance-benchmark pitch or a bug report. Flash's matching-engine-benchmark adapter already reports that matcher is consensus-conforming as shipped. Tracebook's narrower contribution is deterministic lifecycle campaigns, complete queue-state comparison after every event, semantic coverage, JSON/JUnit evidence, and automatic reduction of a long divergent trace to a small CI regression.
I reviewed current main at b8d48356c8a2677e0d8a1965d754e3c4884bb947 and ran cargo test --all-targets from a clean clone: 59 unit tests, 3 integration tests, all examples, and all benchmark targets passed.
Proposed bounded integration
The first adapter would target only Tracebook's documented fifo-limit-v1 profile:
- one
OrderBookper symbol for isolated source-ID domains; - native
submit_eventsandcancel_eventsoutcomes and trades; - quantity reduction through
amend(id, None, Some(new_remaining)), preserving FIFO priority; - priority-losing replacement through cancel followed by fresh limit submission under the same source
OrderId; - clear by replacing only the selected symbol's book;
- authoritative resting order IDs, quantities, prices, and FIFO order after every event.
The initial profile intentionally excludes IOC, FOK, iceberg, post-only, STP, and performance claims. Those should not be mixed into the first adoption proof even though matcher supports several of them.
Contract questions
-
snapshot()documents FIFO emission and round-trip priority preservation. Is snapshot record order intended to be a stable public observation surface for external conformance tooling, or would you prefer a typed read-only resting-order iterator/accessor instead of consumers decoding the versioned bytes? -
Tracebook replacement is validated cancel-and-new: it may increase quantity or cross, and it always loses queue priority. Since native
amenddeliberately rejects quantity increases and crossing reprices, iscancel_events(id, ts)followed bysubmit_eventswith the sameOrderIdthe intended public representation of that broader replacement operation? -
If those mappings are sound, would you be open to a small optional adapter example and GitHub Actions conformance job that installs the public
tracebook-simpackage? I can also keep the adapter entirely in Tracebook and send only a focused typed-observation accessor here if that is a better ownership boundary.
For a concrete example of the output, this case study shows an externally discovered FIFO defect localized at event 173, reduced to four events, replayed exactly, and stored as a fixed-engine regression.
I will hold off on an adapter PR until you confirm the intended observation and replacement surfaces.
Small follow-up, mainly to lower the review burden rather than add another request.
Tracebook now has a structured engine qualification report for both successful and blocked attempts. It records time to evidence, adapter size, failed attempts, protocol questions, profile-boundary disagreements, and whether the result belongs in the candidate repository's CI.
If the snapshot and replacement assumptions in the original issue are acceptable, I can open a draft PR limited to:
- the adapter example;
- one CI job installing the public PyPI package; and
- JSON/JUnit qualification artifacts.
It would make no matcher-core changes, and a passing profile would be described as scoped evidence rather than certification. A short yes/no on the original questions is enough; "not interested in an upstream CI job" is useful evidence too.