Show HN: ShadowDiff – Shadow testing and SQL diffing for AI-migrated back ends A developer released ShadowDiff, a network proxy and analysis engine that mirrors live HTTP traffic to both a legacy backend and its AI-refactored replacement to isolate regressions before production deployment. ShadowDiff targets the roughly 5% of hidden edge cases that AI code migration engines miss, including serialization discrepancies such as Jackson omitting empty lists versus Go serializing null, timezone truncations, float precision drift, and database state regressions like missing audit writes and N+1 query loops. The tool integrates with Envoy Proxy and Istio service mesh via request_mirror_policies, filters non-deterministic noise by comparing twin baseline instances, and uses Google Gemini to generate Go and Jest tests from detected differences. Eliminating the 5% risk that stops enterprise CTOs from deploying AI-modernized backends to production. 🌐 Interactive Live Cloud Sandbox : https://shadowdiff-demo.fly.dev https://shadowdiff-demo.fly.dev/ Self-driving dual-traffic simulator active Enterprises are actively modernizing mission-critical legacy backends Java 7/8 Spring monoliths, Python 2 Django, PHP 5.6 backends into modern cloud-native services Go, TypeScript/Node, FastAPI using AI code migration engines. While AI generates ~95% of refactored code accurately, the remaining 5% of hidden edge cases make production deployment an unacceptable risk : - Subtle Serialization Discrepancies : Jackson omitting empty lists vs Go serializing null , datetime timezone truncations, float precision drift. - Implicit Framework Quirks : Legacy servlet filter quirks, undocumented fallback headers, HTTP 200 responses with embedded error payloads. - Database State Regressions : Silent differences in database transaction boundaries, missing audit writes, or N+1 query loop explosions. ShadowDiff is a high-performance network proxy and analysis engine that duplicates real staging or production HTTP traffic, sending identical payloads to both the legacy service and the AI-refactored service simultaneously. Live Inbound Traffic │ ▼ ┌─────────────────────────────┐ │ Envoy Gateway / Mesh │ │ request mirror policies │ └──────────────┬──────────────┘ │ ┌───────────────────┴───────────────────┐ ▼ ▼ ┌───────────────────┐ ┌───────────────────┐ │ Legacy Service │ │ ShadowDiff Core │ │ Target │ │ Analysis Engine │ └─────────┬─────────┘ └─────────┬─────────┘ │ │ │ Live Response to Client ▼ │ ┌───────────────────┐ │ │ AI-Refactored │ │ │ Candidate S │ │ └─────────┬─────────┘ │ │ └───────────────────┬───────────────────┘ ▼ ┌─────────────────────────────┐ │ 3-Way Diff & SQL Comparator │ │ - P1 ⊕ P2 Noise Filter │ │ - SQL Mutation Interceptor │ │ - N+1 Query Loop Detector │ └──────────────┬──────────────┘ │ Pure Regressions Isolated ▼ ┌─────────────────────────────┐ │ Automated AI Test Generator │ │ - Powered by Google Gemini │ │ - Synthesizes Go/Jest Tests │ │ - Root Cause Code Fixes │ └─────────────────────────────┘ ShadowDiff integrates directly with Envoy Proxy and Istio Service Mesh using request mirror policies . Traffic is cloned asynchronously at line rate in the network layer with zero application latency penalty . Automatically filters out non-deterministic runtime noise timestamps, UUIDs, session nonces by evaluating twin baseline instances: Captures and correlates SQL statements executed by both services for each HTTP trace: - Missing Writes : Flags when legacy wrote to audit logs or ledger tables that modern code omitted. - Transaction Leaks : Warns if legacy used BEGIN...COMMIT and modern ran autocommit statements. - N+1 Query Explosions : Detects when modern ORMs loop and execute$\ge 3\times$ more queries than legacy. Every isolated edge case is analyzed by Google Gemini gemini-2.0-flash , which writes a turnkey integration test Go httptest or Vitest and diagnoses the code fix. Eliminates manual triaging by directly integrating with the GitHub API: - Automatic Branching : Spins up shadowdiff/fix-