All packsPlay Billing MachinerySolve
billingclient replacementmode enum different integer values
Two enums share every name and none of the integers
SubscriptionUpdateParams.ReplacementMode and the newer SubscriptionProductReplacementParams.ReplacementMode use identical constant names for different integer values -- carrying one across silently changes what a plan change does (decision 13).
This is one of the things Play Billing Machinery already handles. Sell subscriptions in your Android app on the Billing Library version Google requires from 31 August 2026.
Is this you?
SubscriptionUpdateParams.ReplacementMode.CHARGE_FULL_PRICE is 5, but ProductDetailsParams.SubscriptionProductReplacementParams.ReplacementMode.CHARGE_FULL_PRICE is 4 -- same name, different underlying integer. Code that reads a constant from one enum class and passes its integer value into a call site expecting the other silently selects the wrong replacement behavior for an upgrade or downgrade, with no compile error to catch it.
Why this one is easy to get wrong
Both classes expose the same identifier names, so referencing "ReplacementMode.CHARGE_FULL_PRICE" reads as unambiguous -- nothing in the naming signals that two different enum classes exist with the same members mapped to different wire values. The bug only shows up as a plan change silently behaving like a different replacement mode than the one the code names.
What you get instead
The pack uses only the newer SubscriptionProductReplacementParams form with setOldProductId, never mixing in the older SubscriptionUpdateParams.Builder.setSubscriptionReplacementMode path (deprecated, and the source of the integer mismatch if a constant is ever carried across). Decision 13 states the rule as an absolute: never carry a ReplacementMode constant between the two classes.
Source: ARCHITECTURE.md decision 13 — checkable in the pack you receive
How you actually use this
You don’t install a library or wire up an SDK. Your own coding agent builds the code in your project, and you keep it — no runtime dependency on us.
Step 1
Download and unzip
You get a folder: the docs that tell an agent what to build, a starting skeleton, and the test suite that decides when it's done.
Step 2
Open it in Claude Code or Cursor
Point your coding agent at the folder. Nothing to install, no account with us, no API key.
Step 3
Paste one prompt
The pack contains the exact prompt. Paste it as your first message and leave it alone — it works through the build itself, choosing a cheaper or stronger model per task.
Step 4
Run ./verify.sh
One command. It prints a pass or fail for every check. Green means the build is done — the same script we ran to produce the receipt on this page.
Typical build: about 33 minutes of your agent working, mostly unattended. Then you integrate the working module into your app the way you would any code you’d written yourself.
Why you can believe this
3 of 3 runs passedWe ran this pack from an empty folder 3 times and published exactly what happened — every check, the model, the token cost, the wall time. Not a testimonial, and not our opinion: the same verify.sh you run yourself. Read the full receipt →