Edge Runtime Compatibility Audit Checklist Builder

Audit a web app or API for edge runtime compatibility across Node APIs, dependencies, streaming, auth, databases, observability, and deployment risk.

Prompt Template

You are a senior platform engineer auditing whether a web app, API route, or middleware can safely run on an edge runtime. Build a compatibility checklist for:

Application or route: [Next.js route, Remix loader, API endpoint, middleware, auth callback, image service, webhook handler]
Target runtime: [Vercel Edge Runtime, Cloudflare Workers, Deno Deploy, Netlify Edge, Bun edge, other]
Current runtime: [Node.js server, serverless function, container, browser-only, hybrid]
Framework and language: [Next.js, Remix, SvelteKit, Astro, Hono, Express adapter, TypeScript, JavaScript]
Dependencies: [database client, ORM, auth library, crypto library, file parser, analytics SDK, payment SDK]
Runtime features used: [fs, net, tls, Buffer, crypto, streams, Web APIs, timers, environment variables, dynamic import]
Data access path: [Postgres, MySQL, Redis, HTTP API, edge config, KV, durable object, queue, cache]
Request behavior: [streaming, file upload, cookies, sessions, geolocation, personalization, long-running work]
Security constraints: [secrets, token signing, PII, regional data handling, auth callbacks, webhook verification]
Observability: [logs, traces, metrics, request IDs, provider dashboard, custom alerts]
Performance goals: [latency, cold start, global routing, cost, concurrency, cache hit rate]
Rollback options: [runtime flag, route split, provider setting, feature flag, previous deployment]

Create:
1. Dependency and API compatibility inventory.
2. Checklist for Node-only APIs, native modules, filesystem access, TCP sockets, and unsupported globals.
3. Web API replacement guidance for crypto, streams, fetch, URL, encoding, and request handling.
4. Database and auth compatibility review, including connection pooling and session behavior.
5. Runtime risk matrix for latency, regional data rules, timeout limits, bundle size, and provider quotas.
6. Local and staging test plan that proves behavior under the target edge runtime.
7. Observability checklist for logs, traces, request IDs, and runtime-specific failures.
8. Rollout plan with route-level canary, fallback path, and rollback triggers.
9. Code review checklist for future edge-safe changes.
10. Decision memo template: move to edge, keep on Node, or split routes.

Be specific about edge limitations. Do not assume Node libraries work unless the target runtime supports them.

Example Output

# Edge Runtime Compatibility Audit

Initial Verdict

The route can move to edge only after replacing the Node-only database client and removing Buffer usage from token parsing. The auth cookie logic is edge-safe, but webhook verification needs a Web Crypto test.

Compatibility Table

| Area | Finding | Action |

|---|---|---|

| fs module | Used to read email templates | Move templates into bundled constants or keep route on Node |

| Postgres client | Opens TCP connection | Use HTTP database proxy or keep data access server-side |

| crypto | Uses Node createHmac | Replace with Web Crypto subtle API and add test vectors |

| streaming | Uses Web Streams | Compatible with target runtime |

Rollout Gate

Canary 5 percent of traffic for one low-risk route, compare p95 latency, auth errors, runtime exceptions, and cache behavior. Roll back if auth failures or 5xx errors exceed the Node baseline.

Tips for Best Results

  • 💡Ask for the exact target runtime because edge providers differ in supported APIs and limits.
  • 💡Audit dependencies, not just application code; many failures hide inside SDKs.
  • 💡Test auth and crypto with known vectors before rollout.
  • 💡Keep a route-level rollback path until logs prove the edge version is stable.