Playwright/Chromium microservice (mirrors modem-bridge: node:20-slim + Chromium, token auth, port 3302, serialized + rate-limited) that drives Cogeco's public address checker to determine if a competitor serves a given address. What works (proven on prod): - Anti-bot bypass: vanilla headless gets 403 on /boutique/api/register (reCAPTCHA Enterprise blocks datacenter headless). Adding playwright-extra + stealth flips it to 200 — register + autocomplete succeed. - Reaches Cogeco's address system and pulls real autocomplete suggestions. Confirmed it's Loqate/AddressComplete (id + next: Retrieve/Find shape). What's NOT reliable yet (do not use the verdict for decisions): - The serviceability verdict. The Loqate flow is multi-step (Find → Retrieve → Cogeco serviceability) and a single option click doesn't complete it, so the final yes/no API call isn't captured. - Current interpret() falls back to scanning UI text and produces FALSE POSITIVES (a rural out-of-Cogeco address returned available=true off generic marketing copy). Needs the real Retrieve+serviceability endpoint wired before it can be trusted. Next: capture the post-selection Retrieve + serviceability call (likely needs a "continue" step and handling the multi-dwelling "N Addresses" branch), then parse the real verdict + speeds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28 lines
752 B
YAML
28 lines
752 B
YAML
# cogeco-checker: Headless Chromium REST API for Cogeco serviceability checks
|
|
# targo-hub (3300) -> cogeco-checker (3302) -> cogeco.ca address checker
|
|
# Internal only (no Traefik), token auth, serialized + rate-limited.
|
|
# Needs outbound internet (reaches cogeco.ca), so it sits on the proxy net.
|
|
|
|
services:
|
|
cogeco-checker:
|
|
build: .
|
|
container_name: cogeco-checker
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./server.js:/app/server.js:ro
|
|
- ./lib:/app/lib:ro
|
|
environment:
|
|
- CHECKER_PORT=3302
|
|
- CHECKER_TOKEN=${CHECKER_TOKEN:-}
|
|
- CHECKER_MIN_GAP_MS=${CHECKER_MIN_GAP_MS:-4000}
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 768M
|
|
networks:
|
|
- proxy
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|