Delete dead JavaScript
with evidence, not guesses.

CodeReaper explores real UI paths, maps V8 coverage to AST nodes, and generates verified diffs with rollback — so you ship leaner bundles with zero risk.

FastAPIV8 CoverageReplayable Verification

Available as MCP for Cursor IDE

pip install codereaper
src/utils/analytics.jsRisk 0.02
function initTracker() {− loadLegacyPixel();− window.__tracker_v1 = true;+ // removed: 0 coverage across 14 passes }
Rationale: loadLegacyPixel showed 0 invocations across 14 exploration passes covering 97.3% of reachable UI paths. Safely removable.

Built for Mobile‑First, High‑Growth Digital Services

Across the UAE, government portals, logistics platforms, and real-estate super‑apps serve millions of users on mobile networks where every kilobyte counts. Dead JavaScript inflates bundles, drains bandwidth on 4G/5G links, and introduces silent failure points in services that must be reliable 24/7.

🚀

Performance

Eliminate unused code paths to cut parse + compile time. Faster First Contentful Paint on mid‑range devices across mobile‑first populations.

📡

Bandwidth

Smaller bundles mean lower data transfer costs and snappier load times for users on metered connections — critical for government and logistics services.

🛡️

Reliability

Dead code is untested code. Removing it reduces surface area for regressions and silent breakage in high‑availability platforms.

Five Steps to Verified Dead‑Code Removal

1

Scan

Agent autonomously explores every reachable UI path and interaction flow.

2

Analyze

V8 coverage data is collected and mapped to AST nodes across multiple passes.

3

Patch

Diffs are generated with per‑deletion rationale and a calibrated risk score.

4

Verify

Replay verification runs the full exploration suite against the patched build.

5

Rollback

One API call reverts any change. Zero‑downtime safety net.

Every Deletion is Backed by Proof

  • Zero‑execution evidence across N exploration passes — not a single invocation detected.
  • Risk score per deletion — calibrated probability the code could still be reached under untested conditions.
  • Replay verification — full UI exploration re‑runs against the patched build to confirm zero regressions.
  • Rollback in one call — revert any change set instantly via a single API endpoint.
14
Exploration passes completed
97.3%
UI paths covered
Verification Passed

System Overview

Client
Web App / Extension
FastAPI
Orchestration
Index + V8
Coverage Engine
AST Mapper
Node Resolution
Diffs
Verified Patches

Integrate in Minutes

Key Endpoints
  • POST/scanStart exploration
  • GET/scan/{id}/statusPoll progress
  • GET/scan/{id}/diffsRetrieve patches
  • POST/scan/{id}/verifyReplay verification
  • POST/scan/{id}/rollbackRevert changes
Request / Response
// Start a scan
POST /scan
{
  "target": "https://app.example.ae",
  "passes": 14,
  "mode": "autonomous"
}

// Response
{
  "scan_id": "sc_8f3a...d1e2",
  "status": "exploring",
  "eta_seconds": 120
}

Ready to ship leaner bundles?

Join the pilot program — no commitment, full rollback, real evidence.