Repository navigation
feat(aws-marketplace): sell several listings from one integration through a product catalog - #9920
Conversation
…ough a product catalog
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge with the documented production configuration change. SummaryAdds a configured product catalog so one AWS Marketplace integration can sell several listings.
|
…env free of billing code, and drop derivable state
…ss, and refuse to boot on a malformed product catalog
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This comment has been minimized.
This comment has been minimized.
…ide access from the plan's dimension
|
Re the outside-diff finding (usage-only licenses go unrecorded): valid, fixed in 3caea36. The overloaded |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
aws-marketplace/products.ts); which product codes exist is deployment configuration,AWS_MARKETPLACE_PRODUCTS=<code>=<plan>,.... Every path resolves a license's product from the code AWS returned or the code on its row, so adding, repricing, or retiring a listing is a config change, not a branchcontract(unchanged behavior: any current entitlement grants access) andplatform-with-usage(access requires a currentplatformentitlement; usage dimensions never grant access on their own)entitlementCountstill counts every dimension AWS returned, so a license with usage but noplatformreadsinactive, notpendingResolveCustomerreturns, since all listings share the one fulfillment URL; a code this deployment doesn't sell is refused as beforeconfig.tsis the single parse point (memoized); a malformedAWS_MARKETPLACE_PRODUCTSthrows an error naming the bad entry on first use.env.tsstays free of billing codeDeploy prerequisite: this replaces
AWS_MARKETPLACE_PRODUCT_CODE. Before the release carrying this PR deploys, the production env secret must holdAWS_MARKETPLACE_PRODUCTS=<existing code>=contract; otherwise the Marketplace surfaces turn off. The new listing is added to that value (and to the infra event rule) once this is live.Type of Change
Testing
lifecycle.integration.ts+checkout-guard.integration.tson real Postgres (bun run test:integration): 75 pass, including two new ones — a usage-listing buyer is admitted only on a currentplatformentitlement (a usage-only license is recordedinactive), and a queued License Updated event for the usage listing is applied under its own plan (a lapsedplatformends access while usage is current). Both go red with the dimension filter removedentitlements.test.ts: 10 pass; the 3 new required-dimension cases go red with the filter removedtsc --noEmit,bun run lint, andcheck:boundaries,check:client-boundary,check:utils,check:file-names,check:comment-hygiene,check:source-conventions,check:explicit-any; full audits and suites run in CIChecklist
test-auditauthoring gate)