test: add unit tests for source-stripe utilities and transforms#302
Draft
test: add unit tests for source-stripe utilities and transforms#302
Conversation
Pulls stripe/sync-engine:v2 and runs it interactively on port 4020. Supports --pull-only, --no-pull, and --pretty (pino-pretty) flags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
…ngine.sh The Envoy egress proxy binds to 127.0.0.1, which is unreachable from inside Docker's bridge network. Switch to --network host so the container shares the host's network stack and can reach the proxy. Also forward http_proxy/https_proxy env vars so Node's --use-env-proxy picks them up. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
…d-start-engine.sh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
Covers retry logic, event processing, backfill dependencies, subscription items, entity expansion, and API key hashing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
846d4c1 to
b1d4c50
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.
Summary
packages/source-stripe:retry.ts— HTTP error detection and retry logic (getHttpErrorStatus,isRetryableHttpError,withHttpRetry)process-event.ts— Stripe webhook event processing and routing (fromStripeEvent,processStripeEvent)transforms/backfillDependencies.ts— dependency ordering for backfill segmentstransforms/subscriptionItems.ts— subscription item upsert and sync helpersutils/expandEntity.ts— nested list expansion via paginated API callsutils/hashApiKey.ts— deterministic SHA-256 hashing of API keysscripts/pull-and-start-engine.sh: forwardPG_*env vars, drop TTY flag, use localpino-prettyTest plan
pnpm testpasses (unit tests, no external deps needed)🤖 Generated with Claude Code