Know before you deploy.
The evidence layer Cloudflare Workers deploys need — differential proof that local workerd ≈ the real platform, before wrangler deploy.
Live Cloudflare demo · Acquisition brief · Commercial license
npx edgemirror verify
# Gold-standard gate before deploy:
npx edgemirror init --cloudflare-gate
npx edgemirror deployEdgeMirror is an independent source-available project (not open source) and is not affiliated with, endorsed by, or sponsored by Cloudflare, Inc. Evaluation use is permitted under LICENSE; production and commercial use require a paid license — see COMMERCIAL.md.
- What EdgeMirror is
- Why it exists (platform quality)
- Quickstart
- How it works
- Cloudflare support (all STABLE)
- CI gate — verify before deploy
- Deploy path & support-bundle
- Supercharger (shipped, optional)
- Benchmarks (measured)
- Evidence model
- Commands
- Status (honest)
- Installation
- Security
- Commercial license & acquisition
- Honesty rules
- Documentation index
- License
EdgeMirror is a CLI-first parity engine for Cloudflare Workers. It runs the same parity corpus against:
- Local —
wrangler dev --local(workerd) - Remote / preview — real Cloudflare Workers or preview URLs when credentials exist
It then normalizes nondeterminism, diffs traces, classifies differences, and writes evidence receipts (EM-###) you can share in a PR or attach to a Cloudflare support ticket.
When Cloudflare credentials are missing, EdgeMirror reports REMOTE_NOT_CONFIGURED. It never invents parity.
| Layer | What you get |
|---|---|
| Verify gate | Fail CI / deploy on divergence or insufficient evidence |
| Deploy path | edgemirror deploy = verify → wrangler deploy |
| Escalation | edgemirror support-bundle packages receipts + doctor + compat |
| Bindings | Full STABLE HTTP/WS-observable matrix |
| Supercharger | Optional DAG scheduler + CU budgets (not required for verify) |
Cloudflare’s Workers story depends on trust that local ≈ production. Wrangler and workerd are excellent — and still not identical to the production platform. Teams still ship Workers changes blind to local/prod drift unless they have differential evidence in the default path.
EdgeMirror owns that evidence loop:
- Default CI / deploy gate —
edgemirror verifyfails on divergence or insufficient evidence; scaffold withinit --cloudflare-gateand require the check before merge/deploy. - Wrangler-adjacent deploy path —
edgemirror deployruns verify, then shells out towrangler deploy. Failed verify aborts unless--force(loud warning). - Support escalation —
edgemirror support-bundleexportsEM-###receipts + doctor support-report + compat artifacts for Cloudflare tickets.
Acquisition / partnership brief: ACQUISITION.md · engineering one-pager: pitch/cloudflare/ENGINEERING_BRIEF.md
Requirements: Node.js ≥ 20, a Cloudflare Worker project (Wrangler config).
# From this monorepo
npm install
npm run build
cd fixtures/basic-worker
npx edgemirror init
npx edgemirror doctor
npx edgemirror verify --local
npx edgemirror demo # isolated DEMO divergence — never mixes with real corpusGold-standard Cloudflare gate + deploy:
npx edgemirror init --cloudflare-gate
npx edgemirror verify
npx edgemirror deploy # verify then wrangler deploy
npx edgemirror support-bundle # ticket packetWith CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID:
npx edgemirror verify
npx edgemirror preview
npx edgemirror pitch-demo # controlled local↔preview divergence for diligence demosAgent-friendly output: edgemirror verify --format agent
discover project
→ prepare local target
→ prepare remote/preview (or REMOTE_NOT_CONFIGURED)
→ execute the same ParityTest on both
→ capture ExecutionTrace → redact → normalize
→ diff → classify
→ evidence receipt + report
→ cleanup EdgeMirror-owned remote resources
Deep dive: docs/ARCHITECTURE.md
The following SVGs are illustrative / DEMO stand-ins — not live production metrics or recorded terminals:
| Asset | Notes |
|---|---|
| docs/assets/terminal-demo.svg | SVG stand-in (not a real gif/webm recording) |
| docs/assets/finding-example.svg | DEMO finding presentation |
| docs/assets/compatibility-matrix.svg | DEMO matrix illustration |
| docs/assets/github-check.svg | Illustrative CI mock |
| docs/assets/supercharger.svg | Illustrative gauge — real engine is CLI supercharge |
Dashboard UI fixtures (when present) are likewise DEMO-labeled. Brand guidelines: branding/BRAND.md · status vocabulary: branding/STATUS.md · badges: docs/assets/badges.md.
Claims come from the machine-readable support report (edgemirror doctor --support-report / .agent/cloudflare-support-report.json).
| Area | Parity (EdgeMirror) |
|---|---|
| HTTP fetch handler | STABLE |
| Plaintext vars | STABLE |
| KV / D1 / R2 / Durable Objects / service bindings | STABLE |
| Queues / Workflows / Hyperdrive / Vectorize / Workers AI / WebSockets / Crons | STABLE |
Full matrix: docs/CLOUDFLARE_INTEGRATION.md · docs/site/cloudflare/support-matrix.md · fixture: fixtures/bindings-http
Levels describe EdgeMirror capability, not Cloudflare product GA. Every surface above has HTTP/WS-observable corpus coverage (edgemirror doctor --bindings).
Cloudflare Workers teams should treat EdgeMirror as a required status check before merge/deploy:
npx edgemirror init --cloudflare-gate
# or
npx edgemirror init --github
npx edgemirror init --ciReusable workflow (call from any Worker repo):
jobs:
edgemirror-verify:
uses: theworker02/EdgeMirror/.github/workflows/reusable-edgemirror-verify.yml@main
with:
local-only: trueComposite action: integrations/github-actions/verify
| Code | Meaning |
|---|---|
| 0 | Parity established (or intentional local-only success) |
| 1 | Confirmed unexpected divergence |
| 2 | Configuration / execution failure |
| 3 | Insufficient evidence (e.g. remote attempted but not configured) |
npx edgemirror deploy # verify → wrangler deploy
npx edgemirror deploy --force # loud override — not the default
npx edgemirror support-bundle # alias: escalate — attach to a Cloudflare support ticketsupport-bundle packages EM-### receipts, doctor support-report output, and compat artifacts under a portable directory suitable for ticket attachment.
Pitch / diligence demo (credentials required for the remote side):
npx edgemirror pitch-demo
# Live static capture: https://theworker02.github.io/EdgeMirror/Optional performance layer: DAG scheduling, adaptive concurrency, content-addressed cache, incremental/--fast selection, Compute Unit (CU) budgets, and selectable schedulers.
Not required for edgemirror verify. Opt in with --supercharge / edgemirror supercharge ….
Schedulers (either/or): classic (default adaptive fan-out) · double-trouble (pair-wise / dyadic — groups of two).
Compute Units (CU) are accounting meters — not cryptocurrency, tokens, or tradable assets.
edgemirror supercharge doctor
edgemirror supercharge plan --cu 5
edgemirror supercharge plan --cu 500
edgemirror supercharge bench --jobs 500 --sleep-ms 8 --mode MAX --scheduler classic
edgemirror supercharge bench --jobs 500 --sleep-ms 8 --mode MAX --scheduler double-trouble
edgemirror verify --supercharge --scheduler double-trouble
edgemirror compat --supercharge
edgemirror badge
edgemirror reproduce EM-001
edgemirror emf EM-001CU budget changes which work packages are selected (deterministic optimizer). High budgets also expand independent fan-out units (scheduler capacity ≥500 jobs). Example package selection (builtin corpus, BALANCED mode):
| Budget | Depth | Selected packages | Base jobs (pre–fan-out) | Est. CU |
|---|---|---|---|---|
| 5 CU | 2 | required_parity, extended_parity |
5 | 5 |
| 500 CU | 4 | all packages incl. compat / historical / fuzz / research | ≥500 with fan-out | ≤500 |
Wall-time ranges printed by plan are ESTIMATES (heuristic). Scheduler wall times from supercharge bench are MEASURED. Details: docs/SUPERCHARGER.md · docs/BENCHMARKS.md
Public numbers below come from the shipped harness. They are not marketing claims about wrangler/workerd verify wall time.
Host: Windows / Node v24.16.0 / 32 CPUs · workload: 500 jobs × 8 ms · mode MAX · concurrency 128
| Scheduler | Sequential (ms) | Supercharger (ms) | Ratio | Notes |
|---|---|---|---|---|
| classic | 7783 | 63 | 123.5× | adaptive fan-out |
| double-trouble | 7791 | 62 | 125.7× | 250 pair waves |
Gates: PASS. Artifacts: benchmarks/microbench-500-classic-1789957641937.json · benchmarks/microbench-500-double-trouble-1789957649891.json
Host: Windows / Node v24.16.0 / 32 CPUs · workload: 24 jobs × 15 ms sleep · mode FAST
| Path | Wall (ms) | Jobs/s | Notes |
|---|---|---|---|
| Standard sequential | 382 | 62.82 | No Supercharger scheduler |
| Supercharger scheduler | 61 | 393.44 | concurrency 8 · CU used 24 |
| Measured wall ratio | 6.26× | standard.wallMs / supercharger.wallMs |
Performance gates: PASS (microbench-completes, scheduler-not-slower-than-3x, cu-accounting-present, no-fake-speedup-field).
Raw JSON: benchmarks/microbench-1789955011168.json · methodology: docs/BENCHMARKS.md · benchmarks/README.md
npm run build -w edgemirror
node packages/cli/dist/cli/bin.js supercharge bench --jobs 24 --sleep-ms 15 --mode FAST --jsonNot claimed: end-to-end edgemirror verify speedups against wrangler (environment-specific; re-measure locally). GPU/native acceleration is not enabled.
Runs write artifacts to .edgemirror/runs/<id>/ (traces, receipts, reports).
npx edgemirror bundle EM-001See docs/EVIDENCE_MODEL.md and docs/FINDING_FORMAT.md.
Classification is honest: confirmed divergence, expected nondeterminism, insufficient evidence, and REMOTE_NOT_CONFIGURED are first-class outcomes — never silent “green.”
| Command | Alias | Purpose |
|---|---|---|
| (bare) | Interactive onboarding (TTY) or safe local verify | |
init |
edgemirror.yaml + .edgemirror/; --github / --ci / --cloudflare-gate |
|
doctor |
Environment / Wrangler fingerprint; --bindings / --support-report |
|
verify |
v |
High-level checks; honest skips when remote unavailable; --supercharge [cu] |
test |
Local ↔ remote (or preview) differential corpus | |
preview |
Local ↔ preview URL differential | |
compat |
Compatibility-date local matrix; --supercharge |
|
bundle <id> |
Portable evidence under .edgemirror/bundles/ |
|
deploy |
verify then wrangler deploy; --force to override (loud) |
|
support-bundle |
escalate |
Cloudflare ticket packet (EM receipts + doctor + compat) |
demo / pitch-demo |
Isolated DEMO Worker with labeled divergence | |
supercharge |
doctor / plan / bench / minimize-demo |
| Capability | Status |
|---|---|
Bare edgemirror onboarding / --auto-verify |
Works |
doctor / discovery |
Works |
| Local execution | Works |
| Remote / preview differential | Requires Cloudflare credentials; otherwise REMOTE_NOT_CONFIGURED |
| Normalize → diff → evidence | Works |
verify / v |
Works |
compat (local matrix) |
Works; remote matrix not fabricated |
bundle EM-### |
Works |
demo / pitch-demo |
Works |
init --ci / --github / --cloudflare-gate |
Works — reusable workflow gate |
| GitHub Action + reusable workflow | Works — fail on divergence / insufficient evidence |
@edgemirror/vitest |
Thin reporter — does not replace Vitest |
| Supercharger | Shipped (optional) — CU budgets change selected work; microbench measured — docs/SUPERCHARGER.md · docs/BENCHMARKS.md |
| Hosted EdgeMirror Cloud | Catalog/scripts ready; Stripe test catalog + Checkout when keys configured — control plane not a public multi-tenant product yet |
| GitHub Pages demo | Static Cloudflare pitch landing in site/ |
support-bundle / escalate |
Works |
deploy (verify-then-wrangler) |
Works — refuses failed verify unless --force |
# From source (this monorepo)
npm install
npm run build
npm test
# Pack without publishing (proves installability)
npm run pack:cli
# → edgemirror-1.4.0.tgz
# In a Worker project (tarball today; npmjs.com when published)
npm install -D ./edgemirror-1.4.0.tgz
npx edgemirror init
npx edgemirror verifyCanonical public identity is the unscoped package edgemirror on npmjs.com — not GitHub Packages and not a personal @user/ scope. See docs/DISTRIBUTION.md. Prove a clean install with:
npm run gate:distributionThreat model and practices: SECURITY.md, docs/SECURITY.md, docs/THREAT_MODEL.md.
Report vulnerabilities privately to @theworker02.
EdgeMirror is source-available proprietary software:
| Use | Terms |
|---|---|
| Evaluation / diligence / non-production trial | LICENSE |
| Production, redistribution, SaaS, commercial | Paid license — COMMERCIAL.md |
| Acquisition / partnership (Cloudflare diligence) | ACQUISITION.md · docs/ACQUISITION_READINESS.md |
Contact: GitHub @theworker02
Demo acquisition page: https://theworker02.github.io/EdgeMirror/acquisition.html
Historical Apache-2.0 vs current proprietary terms: LICENSE_TRANSITION_NOTICE.md
EdgeMirror docs and CLI follow these non-negotiables:
- Never invent remote parity — missing credentials →
REMOTE_NOT_CONFIGURED/ insufficient evidence. - Label estimates vs measurements —
supercharge planwall times are ESTIMATES;supercharge benchratios are MEASURED. - CU ≠ money / crypto — Compute Units are accounting meters only.
- DEMO stays DEMO —
demo/pitch-demoreceipts never mix into the real corpus. - No Cloudflare endorsement claim — independent project; no “official” or certification language.
- No fabricated adoption metrics — only ship numbers you can re-run from this repo.
| Doc | Purpose |
|---|---|
| ACQUISITION.md | Acquisition / partnership brief for Cloudflare diligence |
| docs/ACQUISITION_READINESS.md | Technical diligence checklist |
| pitch/cloudflare/ENGINEERING_BRIEF.md | Engineering one-pager |
| docs/ARCHITECTURE.md | System architecture |
| docs/CLOUDFLARE_INTEGRATION.md | Bindings matrix (all STABLE) |
| docs/SUPERCHARGER.md | Optional scheduler / CU |
| docs/BENCHMARKS.md | Measured harness results + methodology |
| docs/EVIDENCE_MODEL.md | Receipts & classification |
| docs/SECURITY.md / SECURITY.md | Security policy & trust boundaries |
| docs/DISTRIBUTION.md | Pack / install gate |
| docs/site/ | Doc site sources |
| Live demo | https://theworker02.github.io/EdgeMirror/ |
Also: docs/TROUBLESHOOTING.md · CONTRIBUTING.md · CODE_OF_CONDUCT.md · ROADMAP.md · CHANGELOG.md
npx edgemirror compat --dates 2024-11-11,2025-04-01
npx edgemirror compat --superchargeLocal executions are real. Remote matrix cells are never invented.
Honest statuses in ROADMAP.md.
See CONTRIBUTING.md. Evaluation and contribution under the source-available terms; production use still requires a commercial license where applicable.
Source-available proprietary — evaluation under LICENSE; commercial / production use via COMMERCIAL.md. See also NOTICE and the License Transition & Enforcement Notice (historical Apache-2.0 vs current proprietary; enforcement by copyright holder and/or acquirer).
Contact: @theworker02
