The Rule Was Proven. Now Every Single Decision Is, Too.
In November we machine-proved our selection rule can never let an excluded candidate win. That proves the rule, not the database row. Now every single decision becomes a hashed, signed, independently replayable object.
Earlier this month we wrote here about proving, with Lean 4, that our ad-placement selection rule can never let an already-excluded candidate win — machine-checked, not just tested. That was real progress. It was also incomplete, and we knew it while writing it: a proof about a function says nothing about what actually happened for a specific request at 2:32pm. For that, you have to trust a database row — or several, if different views (agent, publisher, commerce participant, auditor) each reconstruct the decision independently from live state. That was exactly our situation, and it went wrong. Not hypothetically. Two incidents that showed us the problem In August we deliberately switched two internal campaigns to a "house" pricing model — they bid and win normally but aren't billed. Our ad server had two separate delivery paths at the time, one for direct discovery requests and one for the MCP route agents use to search. The second path simply didn't recognize that pricing model, branched onto a different one, and billed the supposedly free campaigns anyway — and, once their budget emptied, stopped delivering them at all. In November we found a second, independent divergence: the same scoring function was called from two places with swapped parameter order — same function name, but position four held the weighting object in one call and the context-relevance score in the other. Both calls ran. Both produced numbers. The numbers meant different things. Neither bug was a math error in the formula itself. Both happened because the decision didn't live in one place — it was reconstructed, more than once, from tables that drifted slightly apart over time. A Lean proof about the formula would not have caught either one: it checks what the function does, not whether two callers invoke it the same way. The fix: one object instead of many reconstructions Since November 24–25, we treat every auction — every placement decision in the ad server, every discovery request on /v1/discover, every MCP search ( nexbid_search ) — as a single, immutable object. It is formed exactly once, at the moment the decision is made. After that, it is read-only. The object contains: the request, normalized and reduced to a hash plus length only (no raw text, no personal data); the full candidate set with the features the score actually saw — bid, content similarity, quality, context — not just the winner; …
- Author
- Nexbid Engineering
- Published
- 2026-12-01
- Topics
- Verification, Security, Ad Tech