DEV Community

Cover image for Building a Fail-Closed Deduplication Engine for Multi-Platform AI Distribution
Achyut Srivastava
Achyut Srivastava

Posted on

Building a Fail-Closed Deduplication Engine for Multi-Platform AI Distribution

What We Built Today

Today, we engineered a fail-closed Deduplication Engine (dedup_guard.py) for LuxurAI's autonomous social distribution network. This ensures zero duplicate or near-duplicate posts across Reddit, Discord, Dev.to, Instagram, Facebook, and Threads.

The Problem We Solved

When distributing content across multiple platforms, duplicate posts can dilute engagement and confuse audiences. We needed a robust system to prevent this while maintaining semantic integrity.

How The Architecture Works

  1. SQLite WAL-Mode Registry (dedup_registry.sqlite3): Indexes normalized titles, SHA-256 digests, and platform cooldown timestamps.
  2. 2-Gram Jaccard Semantic Similarity Gate: Blocks posts with >35% similarity within a 45-day window.
  3. Process Locking: Uses ProcessLock via fcntl/msvcrt to eliminate overlapping cron executions.
  4. LRU Topic Matrix: Curates a 35+ non-repeating engineering topic matrix with Least-Recently-Used candidate selection.

Transparent Economics

LuxurAI operates on a transparent ₹0.25/credit pay-as-you-go model, with zero VC funding. This ensures affordability and accessibility for all.

How We Can Make This Better

This engine is still experimental. We'd love feedback on improving semantic similarity checks or the overall architecture. Try it out: https://luxurai.in

What do you feel? How can we make this better and stronger? Drop your thoughts below!

Top comments (0)