- MAX_LINK_DISTANCE_KM (default 500): flat cap on link length. Real
Ingress scales this off portal/resonator level (up to ~655km); Regress
has no leveling system to scale off of, so this is a single ceiling.
- PORTAL_TIMEOUT_BLOCKS (default 2100): claims stamp the current Bitcoin
block height (claimed_at_block, new migration) and expire back to
neutral after this many blocks — the game's clock is block height, not
wall-clock. Current height comes from mempool.space (BlockHeightService,
60s cache), same trust model as the BTC Map dependency. A background
sweep actively reverts timed-out claims (tearing down their links, same
as a normal recapture); claim/link routes also check inline so
correctness doesn't depend on sweep timing between runs.
- Pre-existing claims (already live in production) get backfilled with
the real current block height once at startup rather than a guessed
historical value — dry-run verified against an actual copy of the live
production database before deploying.
- Score now reports link count per team alongside places/fields/area
(backend already computed this; only the frontend display was missing).
22 new tests (53 total): pure expiry-logic unit tests plus full
claim/link/sweep integration tests using a network-free fake block-height
provider (BlockHeightProvider interface + FakeBlockHeight test double).
DNS now exists for the subdomain, so retired the podsteadr.atobitcoin.io/regress/
path-prefix arrangement in favor of a clean root deployment on its own
domain: real Let's Encrypt cert (certbot certonly --webroot, same method
as podsteadr's own cert), independent nginx server blocks, no more
ROUTE_PREFIX/VITE_BASE needed for the live deploy (though still supported
and tested for future use elsewhere). Removed the now-dead /regress/
location from podsteadr's own nginx config.
Regress needs to live at podsteadr.atobitcoin.io/regress/ since / is
already podsteadr. Two coordinated pieces:
- VITE_BASE build arg (frontend asset/script paths, %BASE_URL% in
index.html for the nostr-provider.js script tag)
- ROUTE_PREFIX runtime env (backend routes registered under the prefix
via Fastify's plugin-encapsulation, including /api/health)
The nginx location must forward the prefix unstripped (proxy_pass with
no trailing path) — NIP-98 login signs the exact URL it calls, so a
stripped prefix makes the backend reconstruct a different URL than what
was signed and every login fails. Caught this with a real nginx+docker
integration test locally before it could break the live migration, then
fixed a matching bug in auth.ts (it was signing the unprefixed URL while
api.ts fetched the prefixed one). New routePrefix.test.ts proves the
prefix is actually enforced, including a negative case. 40 tests passing.
Also fixes a latent bug: import.meta.env usage had no vite/client type
reference, so it only ever passed typecheck by accident in earlier local
runs — added the standard vite-env.d.ts.
Dark CARTO basemap (was default bright OSM tiles), Orbitron/Share Tech
Mono fonts, neon cyan/magenta HUD chrome with glassmorphism panels,
glowing divIcon portal markers (pulsing when claimed) replacing plain
circle dots, neon drop-shadow filters on links/fields, and a subtle
scanline overlay. Login and team-pick screens restyled to match.
Collapsed-by-default 'paste an nsec (unsafe)' option on the login screen,
signs the NIP-98 login event client-side with nostr-tools and never
persists the key (used once in memory, discarded) — for testing/kiosk
use without a NIP-07 extension. Clearly labeled as unsafe in the UI.
Dedicated nginx server block on :8543 (not proxied under the dashboard's
80/443) because the dashboard sets Permissions-Policy: geolocation=()
server-wide, which would silently break Regress's core claim/link
mechanic. Also documents a found-but-not-fixed gap: the dashboard's
app iframe has no allow="geolocation", so the in-dashboard launch path
won't get location access either until that shared component is patched.
A new link can no longer cross any existing link from either team —
segmentsIntersect() does a standard orientation-based segment test,
and routes/links.ts excludes shared-endpoint pairs (fanning multiple
links out of the same portal is fine, that's not a crossing). 6 new
tests; 37 total passing.
- Server: NIP-98 nostr auth (session cookies), BTC Map sync, claim/link/field
routes, physical-presence checks via geolocation distance. 31 tests passing.
- Frontend: Leaflet map, team pick, claim/link UI, Archipelago identity
bridge vendored (nostr-provider.js) for dashboard launch support.
- Verified end-to-end against the live BTC Map API (167 real Madeira places)
and via genuine NIP-98-signed HTTP requests against the built app.