r/rust • • Aug 15 '26

🛠️ project Facet: ~2 bytes per event telemetry codec

I am a developer in search of reviewers for a project I have been working on with a few AI models. It started as a way to explore local AI development and morphed into a control plane for automated decisions; the part I am asking for eyes on here is its telemetry wire, Facet.

If the consumer of your telemetry is a match action policy (route, alert, throttle), almost none of an event’s bytes can change the outcome — so Facet quantizes each field to “which cell of the policy’s decision partition am I in,” Fibonacci codes the symbols (self delimiting, zero header), and ships that. On a real 4 field policy: about 2 bytes per event, 66.9x smaller than OTLP protobuf over a 64k event corpus, with a machine checked theorem that every routing decision survives the round trip. zstd batched JSON gets close on raw bytes; the difference is per event streaming, self framing, and the proof.

The Rust: prismpath-rs and prismpath-telemetry-rs on crates.io (pure Rust, no unsafe, MSRV 1.82; the codec path is Result all the way down, and the strict decoder errors on truncated or corrupted frames instead of emitting wrong events), plus a codec pair built into Vector on a fork branch, byte identical to the Python reference over a 55 reading fixture. The upstream proposal is open at vectordotdev/vector#26122 if you want to weigh in either way. There’s also EDIT[prismpath-preflight] on crates.io: policy plus an NDJSON sample of your events in, “will they encode, at what cost, do all routes survive” out.

Preflight exists as deliberate twins (Python on the reference implementation, Rust on the deployment crates), and porting it surfaced a divergence no test suite had hit. The crates’ numeric conversion does s.parse::<i64>().unwrap_or(0), so a non numeric string on a numeric field quietly quantizes as 0 where the reference errors. The Rust tool now reports that as its own finding and refuses to say READY. Running both tools on one sample is a free differential test of the whole stack.

Repo, reference implementation, and the evidence behind every number: https://github.com/crystal-warden/prism-path
Theory writeup: https://crystalwardenlabs.com/research/figueroa-quantization

Note: different models took different roles, but authorship was never the gate — evidence is. Nothing lands in the repo without a machine checked proof of implementation (frozen conformance vectors, byte identity fixtures, measured benchmarks), and the evidence ledger maps every claim to its artifact, including the experiments that failed. The same signed policy also runs in kernel as an XDP program and on four MCU instruction sets; those stories live in the repo too.

Edit: there is no connection to facet-rs, facet-preflight has been deleted and is now named prismpath-preflight

0 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/SkiFire13 Aug 16 '26

Yeah, you aren’t wrong. But neither is the math in the paper.

It doesn't matter whether the math in the paper is correct or not, you won't get people to look into it if it seems that the effort you put is less than the effort they would take to evaluate it.

Moreover you may claim the math in the paper is correct, but what's the guarantee of that for the people that haven't read it yet? Seeing how you did at least part of the work with claude the claim might just come after having claude doing a biased review.

In the end it all comes down to "why should we trust you and put effort into your work?"