Billing replay study

The match was the mistake.

Billed $50. Expected $150.

The issue reporter says the dry run repeated a wrong $50 invoice. Our released-tag H2 test reproduced the $50 invoice. We did not run the dry-run endpoint.

Proposed $2,500 study. One scenario, one release test. No customer deployment yet.

Flat recurring
Mismatch

August 1 – September 1, 2026

Issued
$50
Owed
$150

Unseen$100

The preview and the invoice agreed. The approved price did not.

What happened

Nothing in the path disagreed.

  1. 01

    Approved price

    $150 for the month.

  2. 02

    What the system said

    Dry run and invoice: $50.

  3. 03

    What was missing

    An independent check of the approved price, before issuance.

The record

Found in other people's billing code.

Merged into Kong's OpenMeter

Three fixes in the billing engine. A zero-usage tier read from an unsorted price (5347), a prior discount never netted out of a split line (5367), and a package count that rounded past its own boundary (5372).

A rule in their contributor guide

Nine lines now in OpenMeter's AGENTS.md, constraining how division and rounding may be used before a boundary decision. Written here, merged there, and binding on everyone who writes in that engine next.

Reported at Medusa

Three billing defects, each closed as completed: a campaign budget type the API accepted but no code enforced (17268), a null quantity satisfying a required validation (17513), and an override price list ignored when a sale list sorted first (17529).

The study

One billing-accuracy check, before release.

We calculate the expected amount ourselves, compare it with a dry run, and leave a regression test. No production access. No customer payment data.

Read the scope
  • Price$2,500, proposed
  • ScopeOne scenario
  • StatusNo buyer yet

Where this stands

Said plainly.

Runnable today

Open-source checks for completeness, window, and truncation, with a published method. The HTTP decision API and Observe Mode wrapper are implemented and tested locally. They are not deployed or running in anyone's production path.

Not yet

Nobody is blocking live orders through Nobulex. The separate gateway prototype returns permit, block, or escalate and has no customer result. Nothing is published from the registry; every issued record is held.

Why the audit and not the gateway

On the measured corpus a thirty-line in-house version catches the same thirteen faults and blocks none of the clean cases. The only margin is abstention, five of five. Selling the gateway would need an adoption claim the record does not have, so it stays a prior prototype and the audit is the work.

Questions

Short answers.

What are you actually selling?

A proposed study of one billing change. Not a deployed billing product, and not a customer result.

Is anyone running this in production?

No. The checks are open source. The gateway is local. This page will keep saying so until that changes.

Why does the main repository return 451?

A DMCA notice, and it was correct. One test file in it was a byte-identical copy of an AGPL-licensed file, redistributed under MIT with the author's notice stripped. That was my mistake. The removal is prepared, it covers ten files rather than the one named, and the repository stays down until GitHub acts. The open-source checks and the method are unaffected and still published.

Does a signature prove the amount was right?

No. A signature shows who signed a decision. It cannot turn a wrong source into a right one.

Where is this going?

Billing accuracy for usage-based products. A fixed-fee audit now, a read-only scanner for self-contradictions in design, mutation checks in CI after that, and each layer gets built only once the one before it pays. The approach, with its limits stated.

Next

Check one price before it ships.

Tell us how you check invoice amounts before release.

nobulex.dev@gmail.com