The plan that costs the most could download the least
A Max account was entitled to every tool but couldn't download any of them, and it turned out no permission was wrong at all, because the problem was a missing file.
What showed up
A live check for a Max account returned entitled=true right next to not_published for the Hub and Perch, while a Pro account on the same deployment could install both.
Why
Max gets builds first, so its release channel is early, which is derived from the plan on the server and never accepted from the client. The manifest for each app is read from its channel with no fallback, and nothing had ever been staged to early. So every plan on stable got a hit, while the one plan pinned to early got a miss.
Why the tests missed it
The manifest reader caches per module, so the test setup publishes both channels to stop tests seeing each other's stale state. That fixture made the suite reliable, but it also removed the only state in which the bug exists. The lesson isn't to drop the fixture, though, it's to ask the deployment a question every now and then, rather than only ever asking the tests.
The fix
Early means “gets builds first” rather than “gets different builds”, so when early is empty, Max falls back to stable. Download tickets are single-use and re-checked on redemption, so the old equality test between ticket channel and plan channel was replaced with an allow-list:
channelAllowed(plan, channel) stable -> always early -> only plans on early unknown -> refused
Unknown values are refused rather than allowed by omission. The new tests also use a separate app id so the cache can't hide a missing channel, and they assert the boring thing, which is that the most expensive plan can install the product.
This is a shorter version of a post on the Pioneering blog, so if you want the full story, read the original on pioneering.app.
Next postThe screenshot was lying about the app
