Behind the scenes

When My Code Mistook Traditional Persimmon Treats for Spam Ads

Prefer Korean? Read the original →
When My Code Mistook Traditional Persimmon Treats for Spam Ads

A Missing Batch of Chuseok Product Photos

Ahead of Chuseok (the Korean autumn harvest holiday), I decided to list a holiday gift set on Coupang Partners, the affiliate marketing arm of Korea's largest e-commerce platform. The product was gotgam hodu-mari, a traditional treat made by rolling whole walnuts inside sweet, chewy dried persimmons.

I went through product detail pages by hand and carefully picked five appetizing close-up photos. I queued them up in my custom automation tool to generate short-form videos and marketing image cards, expecting everything to be ready after a quick coffee break.

Instead, I came back to an error alert: 'Asset generation failed due to insufficient images.' Checking the output, all five photos I had uploaded were completely gone. Only the single main thumbnail remained.

The Culprit Behind the Deletion

I opened the system logs to see what happened. Line after line read: 'Excluded: suspected promotional banner for another product.' My manually selected persimmon photos had been flagged as spam and tossed into the trash.

I built that banner filter a while ago after a funny disaster with web-scraped listings. During a run on Naver Smart Store (a popular Korean e-commerce marketplace platform), the bot scraped a vibrant 'Summer Bedding Clearance' promo banner in the middle of a body pillow listing, slotting the bright ad right into the final video.

To prevent that, I wrote a rule with Claude to detect ads. Commercial banners usually rely on flashy, primary colors to grab attention, so the script was set to dump any image where more than 2% of the pixels had high color saturation. It worked well on random discount flyers, but the vibrant, deep orange flesh of dried persimmon slices triggered that exact threshold.

Fixing the Logic Instead of the Thresholds

At first, I considered loosening the color threshold from 2% up to 5% or 10%. But tweaking saturation values was a band-aid. Raise it too high, and sneaky promo ads slip through; lower it, and any bright red or yellow product photo gets deleted.

The real issue was architectural. The script treated scraped web images and manually uploaded local files identically, sending both through the same aggressive sanity checks.

Images picked by hand do not need automated spam detection because a human has already vetted them. I updated the pipeline with Claude to flag manual uploads so they bypass the banner filter entirely. Once patched, all five persimmon images loaded smoothly into the video asset generator.

A Practical Lesson in Automation Pipelines

Building automation filters requires planning for the exceptions from the start. Human-curated inputs and raw web-scraped inputs should almost never share the exact same ingestion path.

Forcing mechanical validation rules on data you already verified by hand just turns your own safety guards into obstacles. It took half a day to rescue a handful of dried persimmon pictures, but the fix was done before my kid, Yulli, returned from kindergarten.

Common questions

What is gotgam hodu-mari?

Gotgam hodu-mari is a traditional Korean dessert made by wrapping peeled, dried persimmons around whole walnuts and slicing them into pinwheels. It is a popular gift during traditional Korean holidays like Chuseok and Seollal.

What is Coupang Partners?

Coupang Partners is an affiliate marketing program run by Coupang, South Korea's largest online retailer. Content creators and marketers share product links to earn a commission on resulting sales.

Why did the image filter delete the persimmon photos?

The script contained a rule that discarded images with more than 2% high-saturation pixels to filter out flashy promo banners. The rich orange color of the dried persimmons matched the high-saturation profile and was falsely flagged as spam.