fix: /v1/prices ignored the lookup_keys filter - #67
Merged
Conversation
…r tenants' products GET /v1/prices?lookup_keys[]=... returned the full price list regardless of the filter. A caller that takes the first entry (a common SDK idiom) then picks a product belonging to a different tenant. Observed: a workspace-plan lookup asked for one tenant's yearly premium key and got another tenant's standard yearly price, so all six tier/period slots were filled with the wrong product and the upgrade screen rendered empty. filterPrices now checks lookup_keys[] (and the bare lookup_keys form). An absent or empty parameter keeps the previous behaviour of returning everything. go test ./... -count=1 green across all packages. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
midagedev
force-pushed
the
fix/prices-lookup-keys
branch
from
August 19, 2026 04:42
5834d65 to
8592690
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GET /v1/prices?lookup_keys[]=...returned the full price list regardless of thefilter. A caller that takes the first entry (a common SDK idiom) then picks a
product belonging to a different tenant.
Observed: a workspace-plan lookup asked for one tenant's yearly premium key and got
another tenant's standard yearly price, so all six tier/period slots were filled with
the wrong product and the upgrade screen rendered empty.
Fix
filterPricesnow checkslookup_keys[](and the barelookup_keysform). An absentor empty parameter keeps the previous behaviour of returning everything.
Verification
go test ./... -count=1green across all packages (12 ok). NewTestFilterPricesLookupKeyscovers single key, multiple keys (OR), no match, empty parameter, and combination with
other filters.