Welcome, Guest | Browse

Software Factory Archive

← Previous Work All Works Next Work →

Interop Tests

Rating:
General Audiences
Fandom:
StrongDM Software Factory
Characters:
Jay Taylor Navan Chauhan Justin McCarthy
Tags:
CXDB Interop Testing Go Client Rust Server Cross-Language
Words:
462
Published:
2026-01-10

The Go client and the Rust server agreed on nothing, and that was the problem.

They agreed on the protocol. They agreed on the port number. They agreed on the Msgpack encoding and the BLAKE3 hashing and the field tag numbering. They agreed on every specification document and every design decision. But when the Go client sent a turn to the Rust server for the first time, the server rejected it with a two-hundred-line error that boiled down to: the bytes were wrong.

"Endianness?" Jay guessed.

"Endianness," Navan confirmed, thirty minutes later. The Go Msgpack library encoded integers in big-endian by default. The Rust Msgpack library expected big-endian too, but the length prefix on the binary protocol frame was being written in little-endian by Jay's Go code because he'd used binary.Write with binary.LittleEndian instead of binary.BigEndian. Four bytes. One constant. An hour of debugging.

Jay fixed it. The next test produced a different error. Then another. Then five more. Each one was small—a timestamp precision mismatch, an optional field encoded as null instead of absent, a string length counted in bytes in Go and in UTF-8 code points in Rust. Each one was the kind of bug that only appears when two implementations of the same spec meet for the first time.

"This is why we need interop tests," Jay said, writing the fourteenth fix of the day. "Unit tests in each language pass because they test against themselves. The Go tests use a Go mock server. The Rust tests use Rust test data. Nobody finds the disagreements until you wire the real things together."

They built the interop test suite over three days. Thirty-seven tests. Each one started the real Rust server, used the real Go client, performed a real operation, and verified the result end-to-end. Create a context. Append a turn. Read the turn back. Verify the hash. Fork a branch. Append to both branches. Verify the DAG structure. Read a blob. Verify deduplication. Check the projection output against expected typed JSON.

The first run: eleven failures.

Jay and Navan worked through them methodically. Each failure revealed a misunderstanding between the two implementations. Each fix brought the Go client and Rust server into closer alignment. By the second run, three failures remained. By the third run, one. By the fourth run, at 10:07 AM on the third day, the terminal displayed thirty-seven lines of green.

Navan stood up from his chair. Jay stood up from his. They looked at each other across their desks.

"Champagne?" Navan suggested.

"It's 10 AM," Jay said.

"Metaphorical champagne."

"Metaphorical champagne it is." Jay raised his coffee mug. Navan raised his water bottle. They clinked them together over the gap between their desks.

Justin walked by, saw the green terminal, saw the raised beverages, and nodded once. That nod contained more approval than most people could fit into a speech.

The interop tests ran in CI from that day forward. They never went green-to-red again.

Kudos: 74

endian_warrior 2026-01-12

binary.LittleEndian instead of binary.BigEndian. Four bytes. One constant. An hour of debugging. This is the most realistic cross-language integration story I've ever read.

green_bar_gang 2026-01-13

The metaphorical champagne at 10 AM is the purest expression of engineering joy. Also Justin's nod being worth more than a speech is so perfectly observed.

← Previous Work All Works Next Work →