#!/usr/bin/bash
# e2e-headless-guard v2 — DO NOT EDIT. Reinstall with ~/.claude/bin/install-headless-guard
if [ "${E2E_REMOTE_OK:-}" = "1" ]; then
  exec "/home/user/.cache/ms-playwright/webkit-2336/pw_run.sh.real" "$@"
fi
if [ "$(cat /etc/machine-id 2>/dev/null)" = "66b9bc7fcc6c43d0b08ecff18fa633de" ]; then
  exec "/home/user/.cache/ms-playwright/webkit-2336/pw_run.sh.real" "$@"
fi
cat >&2 <<'MSG'
BLOCKED: pw_run.sh may not run on this machine.

A headless browser and its dev server are one coupled pair and belong on
a buildbox — run on the workstation they pin ~250% CPU to the laptop. Launch the
whole pair with the wrapper, which starts BOTH halves remotely and rsyncs
artifacts back:

  ~/.claude/bin/e2e-remote --server "<dev-server> --host 127.0.0.1 --port <P>" \
    --wait-port <P> --env PORT=<P> --mkdir <outdir> -- <browser-client>

This host is not a buildbox: no host in ~/.claude/buildbox-hosts.json matches its
identity. If it IS one, fix its registry entry and rerun install-headless-guard
instead of exporting the override.

Deliberate local run (boxes down, headed debugging)? Export E2E_REMOTE_OK=1.
If this fired right after a browser version bump, rerun install-headless-guard.
MSG
exit 97
