Menu

Testing Stripe customer sweeps with FetchSandbox: refuse partial scans
📰

Testing Stripe customer sweeps with FetchSandbox: refuse partial scans

DEV Community: typescript·FetchSandbox·about 17 hours ago
#9HQ2cjMD
#devtotypescript#devto#dev#segment#declared
Reading 0:00
15s threshold

A Stripe customer metadata sweep pages through a segment using has_more and starting_after , flags anyone missing a required field like country , then writes corrections back. The business risk is that the sweep completes with fewer customers matching the requested segment than the segment is expected to hold. Without a guard, the worker treats that short count as a complete picture and writes anyway.

The guard compares scan.segment.length against input.expectedMin . If customers matching the requested segment fall short of that declared minimum, the workflow skips writes and sends a RevOps alert instead. That lower bound is not a total-customer count across all of Stripe, not a per-page size check, and not proof that every intended customer ID was present in the pages that arrived. It is a segment-count floor: a necessary condition, not a sufficient one.

The workflow source and executable contract are pinned to the source revision named by the October 27 app-declared version.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.