Example deliverable

A dry run agreed with the invoice. Both missed the latest price.

Synthetic sample, not customer work. Local test on released Kill Bill 0.24.19 with embedded H2.

The important comparison is between the invoice and an expected amount derived separately from the catalog timeline. Comparing the dry run with the final invoice alone would not catch this case.

One named scenario

For the public issue #2291 reproduction, a monthly subscription starts with a $100 price on July 1. Two subsequent catalog versions set $50 on July 15 and $150 on July 18, both intended to apply to existing subscriptions at the next aligned billing boundary. The target period is August 1 to September 1, 2026. This is a test fixture, not a customer's approved catalog.

CheckAmountBasis
Expected invoiceExpected $150Latest catalog version in the synthetic fixture, effective before the August billing boundary.
Invoice on original released codeObserved $50Our released-tag H2 test observed the invoice amount. The issue reporter separately reported the same wrong amount in the dry run.
Invoice after the proposed comparator patch$150 in the August and September periodsReleased-tag H2 regression reported in Kill Bill PR #2320.

What the sample result says

Mismatch: Our released-tag H2 test observed a $50 invoice for a period where the synthetic catalog timeline called for $150. The issue reporter says the dry run also returned $50, matching the wrong final invoice. We did not run the dry-run endpoint in our local H2 test. Their reported agreement was not independent evidence that the amount was correct.

Correction, October 1: An earlier version of this page described the dry-run and invoice observations together as our local released-tag test. Our test checked the generated invoice; the dry-run observation came from the upstream issue reporter.

Regression check: the new focused comparator test failed against the released code it replaced. The separate enabled invoice regression on released Kill Bill 0.24.19 with H2 observed $50 before the patch and $150 after it. The PR's verification notes describe the commands and scope. This sample is a presentation of that existing result, not a new customer study.

Run the bounded reference comparison

The checked-in Python comparator reads a synthetic JSON case. It selects the latest catalog price eligible under the declared rule and compares the amount and period with the recorded invoice line. It does not run Kill Bill, fetch a catalog, authenticate the input, or model all of Kill Bill's billing rules. A mismatch exits 1; a match exits 0; unsupported or incomplete input says REFUSED and exits 2.

python3 scripts/flat_recurring_replay.py examples/billing-flat-recurring-v1.json

For the published fixture it returns MISMATCH, expected 150.00, observed 50.00, difference 100.00. The source and fixture are small enough to inspect before trusting the result.

What remains unresolved

What the proposed study would add

For a buyer-supplied synthetic scenario, the study would document the approved price and effective-date rule, calculate the expected amount and period independently of the dry-run total, compare the two, and keep a runnable regression fixture if the inputs permit one. If the buyer's existing release tests already do this, the result should say so.

See the proposed study


Read the research and limits →