Skip to content

[codex] fix Polar provider edge cases#171

Draft
lassejlv wants to merge 1 commit intogetpaykit:mainfrom
lassejlv:codex/fix-polar-provider-edge-cases
Draft

[codex] fix Polar provider edge cases#171
lassejlv wants to merge 1 commit intogetpaykit:mainfrom
lassejlv:codex/fix-polar-provider-edge-cases

Conversation

@lassejlv
Copy link
Copy Markdown
Contributor

@lassejlv lassejlv commented May 6, 2026

Summary

  • Include normalized subscription data in successful Polar checkout webhooks so PayKit checkout completion can finalize subscriptions.
  • Re-link duplicate Polar customers using HTTP validation errors, exact email lookup, and Polar external IDs while preserving metadata.
  • Mark PayKit-managed Polar products and only archive tagged orphan products during sync.
  • Add focused mocked unit tests for Polar provider config, checkout webhooks, customer relinking, and product cleanup.

Validation

  • node ./node_modules/vitest/vitest.mjs run packages/polar/src/tests/polar-provider.test.ts --config vitest.unit.config.ts
  • bun --filter @paykitjs/polar typecheck
  • bunx oxlint packages/polar --deny-warnings
  • bunx oxfmt --check packages/polar/src/polar-provider.ts packages/polar/src/tests/polar-provider.test.ts
  • bun --filter @paykitjs/polar build

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
paykit Skipped Skipped May 6, 2026 8:22pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 09aa376f-82ad-4314-9de0-1a3c8de8859f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant