I found this while writing a changelog entry, which is the least glamorous possible way to find a bug that had been live for months.

The changelog said the Pro plan now supported multiple stores. I went to the pricing page to link to it, read the Pro card, and stopped at one bullet: Multi-store support. Then I opened schema.prisma.

model Store { id String @id @default(cuid()) shop String @unique plan String @default("free") createdAt DateTime @default(now()) } 

shop @unique. One row per shop domain. The subscription lives on that row. There is no account entity above it, no ownerId, no join table, no path by which one merchant could hold two stores. The schema did not support multiple stores, and had never supported multiple stores, not even in the first commit.

So for some number of weeks, my marketing page, my in-admin plan comparison table, my billing config, my public llms.txt, and my JSON-LD offer block all agreed that Pro gave you more than one store. My database disagreed with all five of them.

The reason it survived: the promise was untestable from inside the product

Here is the part I keep coming back to. A second store on the same shop cannot exist. Not "is discouraged", not "is rate limited" — cannot exist. The unique index makes the insert fail.

Which means there was no screen where I could click "add store" and watch the feature work, because the feature was never built. Every test I had ran as a merchant with one store. Every merchant I had was a merchant with one store. The surface where the lie would become visible was a surface that could not be reached by any test I knew how to write.

That is the shape of this class of bug: the claim and the constraint live in different layers, and nothing in the system compares them. TypeScript can't see a pricing page. Prisma can't read marketing copy. My test suite tested behaviour that existed, and the claim was about behaviour that didn't.

Where it fires, and why the ordering is the worst available

The failure isn't a disabled button. It's a 500 during OAuth, on the install path, after the merchant has decided to pay:

PrismaClientKnownRequestError: Invalid `prisma.store.upsert()` invocation Unique constraint failed on the fields: (`shop`) code: P2002 

An upsert keyed on shop would have found the existing row and updated it. This one threw, because the key it was handed came from the OAuth callback — shop plus the new owner's id — and did not match the row that already existed. So Prisma took the create branch, and the unique index on shop rejected the insert. The index was right. The code that assumed a composite key was wrong, and the two had been disagreeing since the first version. The merchant who upgraded specifically to run a second store gets an error page during install, and the money has already been captured.

Money first, constraint error second. There is no ordering that makes a customer angrier, and no ordering that makes a developer slower to find the cause, because the only person who can reproduce it is someone who paid you.

The second bug: I couldn't verify my own fix

Fixing the copy is a grep job. Verifying it cost me an afternoon.

I changed the text, deployed, opened the app inside the Shopify admin, hard-refreshed with Ctrl+Shift+R, and saw the old comparison table. Deployed again. Old table. I checked the alias, the CDN cache headers, the commit hash rendered into the page footer — all correct. The page in front of me was still wrong.

Shopify admin loads embedded apps in an iframe. Ctrl+Shift+R reloads the outer admin frame, not the app document inside it. I was hard-refreshing the shell around the thing I wanted to reload, repeatedly, while the inner document sat in cache being perfectly consistent with a deployment from two hours earlier.

The fix wasn't a code change. I put a temporary build marker in the plan comparison component, then used DevTools → Network → Reload page, which reloads the frame devtools are actually attached to. Correct table, first try. The marker is still in the code, one line, and it has already paid for itself once.

If you build embedded admin apps: a build marker plus the devtools reload button is the only verification loop I trust. Everything else is guessing about which layer is stale.

What actually changed

Six places carried the wrong claim, and I fixed all six in one pass, because fixing five of six is how you end up with a pricing page that contradicts itself:

  1. app/routes/_index.tsx — the four plan cards on the marketing home page, plus the JSON-LD Offer block that search engines and LLM crawlers read.
  2. app/routes/app.billing.tsx — the in-admin plan cards and the comparison table.
  3. app/services/billing.server.ts — PLAN_CONFIGS, which is the thing the app actually enforces at runtime.
  4. app/routes/pricing.tsx — this one had a Pro bullet reading Multi-store support and no Business column at all, so the page was simultaneously wrong and incomplete.
  5. public/llms.txt — the file crawlers read, where the tiers had been described independently of every other surface.
  6. A repository-wide grep for multi-store and multiple stores, which now returns zero.

Five commits, about a day including the verification detour. Zero migrations. Zero risk to live rows. And the grep is the part I'd keep even if I changed nothing else: two patterns, multi-store and multiple stores, searched across the whole repo. It is a two-second check that would have caught this on day one, and it now runs before every deploy that touches billing or pricing.

The number that had quietly lost its unit

Here's the bit that made me wince. PLAN_LIMITS was never about stores:

const PLAN_LIMITS = { free: 10, starter: 50, pro: 500, business: Infinity, } 

Those are conversation counts. They always were. Somewhere between writing that object and writing marketing copy, 500 stopped meaning "500 conversations per month" and started meaning "500 of whatever the reader is worried about" — and the reader is worried about stores. Nobody lied. The number simply drifted away from its unit, and once a number loses its unit, copy can say anything about it and still feel sourced.

I now write the unit into the constant name (CONVERSATIONS_PER_MONTH) and render pricing bullets from that object rather than retyping them. It's a boring constraint that makes a whole category of drift impossible.

The tradeoff I actually made

The honest fix is to make the schema match the promise: drop the unique index on shop, introduce an account entity, move the subscription up to it, and then answer the question I'd been avoiding — what does shop/redact mean when a merchant has two stores and deletes one? That is a data migration on live rows, a billing model change, and a compliance semantics change, all in the same release, for a product with a small number of paying merchants.

I did the other thing. I moved the promise down to the schema, wrote 1 store on every tier in all six places, and left the plan limits alone as conversation quotas.

It cost me a day, and it cost me the pricing story. Business at $149 for one store is a hard sell. I'm not going to pretend otherwise, and I didn't soften it with copy that implies a second store is coming. Unlimited conversations is a real benefit; it's just not the benefit someone comparing tools is scanning the table for.

So the tradeoff is explicit: I chose a smaller true promise over a larger expensive-to-fulfil one, and I chose it knowing the top tier now looks overpriced on the page. That's a product problem I have to solve with product. What I won't do is ship a plan card describing a data model I don't have. The distance between a pricing page and a schema is exactly the distance a customer falls when they find out.

The rule I kept

Every bullet on a pricing page should map to a line of code or a row in a table. If it doesn't, it isn't a feature, it's a wish — and the wish will eventually be discovered by someone who paid for it.

I also merged the comparison table into a single source that both the marketing page and the admin page import. That doesn't stop me writing a wrong bullet. It does stop me writing two different wrong bullets and calling the difference "a discrepancy".

If your pricing page and your schema disagreed tomorrow, which one would you change first — and what would tell you before a customer's card clears?