chore(deploy): configure PRICECHARTING_SELLER_ID in prod - #300
Conversation
Inventory > "Add from PC Collection" refuses to run without a seller id, so without this key the page 503s in production with its setup message. Added as a PLAIN value, not a __SECRET__ placeholder, for two reasons: it is the public 26-character PriceCharting user id (their own API docs publish an example one), and a placeholder with no matching entry in the secret store aborts every do-apply run. App-level scope like the token above it: the collection route is served by the API component, but keeping both PriceCharting keys together app-wide avoids the component-scope trap that silently broke the nightly sync on the worker in July. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConfigures the PRICECHARTING_SELLER_ID runtime environment variable in the production backend app manifest so that the Inventory "Add from PC Collection" route can call PriceCharting with a scoped seller and avoid 503s and cross-account data exposure, while explicitly keeping it as a non-secret plain value alongside the existing API token. Sequence diagram for Inventory AddFromPCCollection calling PriceCharting with PRICECHARTING_SELLER_IDsequenceDiagram
actor User
participant InventoryUI
participant BackendAPI
participant PriceChartingAPI
User->>InventoryUI: click Add from PC Collection
InventoryUI->>BackendAPI: GET /inventory/pricecharting_collection
BackendAPI->>PriceChartingAPI: GET /api/offers?seller=PRICECHARTING_SELLER_ID
PriceChartingAPI-->>BackendAPI: offers scoped to seller
BackendAPI-->>InventoryUI: 200 offers list
InventoryUI-->>User: display seller collection offers
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe backend app environment configuration adds the public ChangesPriceCharting configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
#300 added a comment that spelled the redacted-secret placeholder token literally. do-apply.ps1's final guard greps the WHOLE spec text — comments included — for that token and aborts, so the prose alone was enough to block every backend deploy: pwsh scripts/do-apply.ps1 backend -Validate -> Unresolved secret placeholder remains - aborting Reworded, and the comment now says why the token must never appear in prose. `pwsh scripts/do-apply.ps1 backend -Validate` passes again ("Validation OK"), with exactly the ten real placeholders left in the file. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Follow-up to #299. That page refuses to run without a seller id — deliberately, because PriceCharting's API token only authenticates and does not scope
/api/offersto our account; without asellerthe API answers with every user's offers. So until this key exists, Inventory › "Add from PC Collection" 503s in production with its setup message.Plain value, not a
__SECRET__placeholder, for two reasons:__SECRET__token with no matching entry in the secret store aborts everydo-applyrun, so adding one here would have broken unrelated deploys.App-level scope, sitting with the token above it: the collection route is served by the API component, but keeping both PriceCharting keys app-wide avoids the component-scope trap that silently left the nightly sync "no token" on the worker in July.
Verification
yaml.safe_load), 29 envs, the new key present as a plain value.__SECRET__tokens are the same before and after, so no new secret is required fordo-apply.status=collection|available|soldwith this seller all returnsuccess, where a username or a wrong id returns400 user not found.🤖 Generated with Claude Code
Summary by Sourcery
Build:
Summary by CodeRabbit