No reviewers
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#25
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/affiliates-module"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
circuitforge_core.affiliates—wrap_url()with eBay EPN + Amazon Associates builders, per-retailer disclosure copy, injectable preference resolution for opt-out + BYOK (closes #21)circuitforge_core.preferences—LocalFileStore(YAML),get_user_preference/set_user_preferencepublic helpers,PreferenceStoreprotocol for future Heimdall cloud backend (closes #22 self-hosted path)_affiliate_url()removed,wrap_url(retailer="ebay")wired (snipefeature/affiliate-links)Resolution order
wrap_url()follows the design doc priority:user_id) → user's affiliate idArchitecture notes
get_preferenceis an injected callable — module has zero hard dependency on Heimdall or any storage backendPreferenceStoreprotocol enables backend swap (Heimdall#5 → cloud backend) without touching callers_DEFAULT_STORElives inpreferences/store.pyfor reliable monkeypatching in tests_REGISTRYis module-global; future test isolation can add a snapshot/restore fixture if neededTest plan
pytest tests/test_affiliates/ tests/test_preferences.py -v— 352 tests passpytest tests/ -v— no regressions across full suiteEBAY_AFFILIATE_CAMPAIGN_IDunset → plain URLs returnedAMAZON_ASSOCIATES_TAGset →tag=merged into Amazon URLsget_preference) → plain URL regardless of env varuser_id=None) with BYOK configured → CF's id used_affiliate_url()no longer in codebaseRelated
circuitforge-plans/shared/2026-04-04-affiliate-links-design.mduser_preferencescolumn (cloud backend unblocked when that lands)