Skip to main content

wupbro

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.7053 (6 commits)
  • 👤 Human dev: ~$700 (7.0h @ $100/h, 30min dedup)

Generated on 2026-07-06 using openrouter/qwen/qwen3-coder-next


FastAPI backend + minimal HTML dashboard for the WUP regression watcher.

Architecture

┌──────────────────────┐   POST /events    ┌──────────────────────┐
│  WUP agent (shell)   │ ───────────────▶  │  wupbro (FastAPI)    │
│  - file watcher      │                   │  - /events (sink)    │
│  - testql runner     │                   │  - /drivers/*        │
│  - visual diff       │                   │  - /dashboard (UI)   │
└──────────────────────┘                   └──────────────────────┘
                                                      │
                                                      ▼
                                            ┌─────────────────┐
                                            │ Browser UI      │
                                            │ (auto-refresh)  │
                                            └─────────────────┘

Endpoints

Path Method Purpose
/events POST Receive event from a WUP agent
/events GET List recent events (filter by type/service)
/events/stats GET Aggregate counts by type
/events DELETE Clear store (admin/debug)
/drivers/dom-diff/capture POST One-shot Playwright DOM snapshot + diff
/drivers/browserless/screenshot POST Proxy to a browserless/chrome container
/drivers/anomaly/report POST Record numeric anomaly as ANOMALY event
/drivers/health GET Driver capability discovery
/, /dashboard GET HTML dashboard
/healthz GET Liveness probe
/openapi.json, /docs GET OpenAPI spec + Swagger UI

Event types

REGRESSION, PASS, ANOMALY, VISUAL_DIFF, HEALTH_TRANSITION.

Schema (Pydantic):

{
  "type": "REGRESSION",
  "service": "users-web",
  "file": "app/users/routes.py",
  "endpoint": "/api/users",
  "status": "fail",
  "stage": "quick",
  "reason": "TestQL exit code 1",
  "timestamp": 1730000000
}

Extra fields are preserved via model_config = {"extra": "allow"}.

Run

# Install
pip install -e wupbro/

# Dev server (auto-reload)
wupbro --reload --port 8000

# Or directly
uvicorn wupbro.main:app --host 0.0.0.0 --port 8000 --reload

Dashboard: http://localhost:8000/

OpenAPI docs: http://localhost:8000/docs

Configure WUP agent to send events

In your wup.yaml:

web:
  enabled: true
  endpoint: "http://localhost:8000"
  endpoint_env: "WUPBRO_ENDPOINT"   # fallback if endpoint is empty
  timeout_s: 2.0                     # short — must not block watcher
  api_key: ""                        # optional bearer token

Or via environment variable:

export WUPBRO_ENDPOINT=http://localhost:8000
wup watch . --mode testql

The agent will POST events fire-and-forget on:

  • service health transitions (up ↔ down)
  • regressions (when TestQL fails)
  • visual DOM diffs (when significant changes detected)

Browserless integration

docker run -d --name browserless -p 3000:3000 browserless/chrome
export BROWSERLESS_URL=http://localhost:3000
wupbro

Then:

curl -X POST http://localhost:8000/drivers/browserless/screenshot \
  -H "Content-Type: application/json" \
  -d '{"url": "http://example.com", "full_page": true}'

Storage

Events are kept in an in-memory ring buffer (capacity 1000) and persisted to .wupbro/events.jsonl for restart durability.

Tests

PYTHONPATH=wupbro python3 -m pytest wupbro/tests/ -v

17 tests covering events router, drivers (anomaly, browserless, dom-diff, health), dashboard HTML, OpenAPI schema.

License

Licensed under Apache-2.0.

Metadata

Release files for wupbro 0.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wupbro 0.1.17
File Size Uploaded Provenance Actions
wupbro-0.1.17.tar.gz 28.3 kB Without provenance Details for wupbro-0.1.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wupbro 0.1.17
File Interpreter ABI Platform Actions
wupbro-0.1.17-py3-none-any.whl Python 3 none any Details for wupbro-0.1.17-py3-none-any.whl

Total release size: 56.9 kB

Release files / wupbro-0.1.17.tar.gz

Download URL wupbro-0.1.17.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d5872fc2286e33083c0e9858f4b477a21a0a8be19d14c3e5567c31c06fa03d5e
BLAKE2b-256 checksum
How to use checksums
1e030520d3812a2b0c25d455ce0eb84b0356795d42e1d9afdb62ded17671350b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / wupbro-0.1.17-py3-none-any.whl

Download URL wupbro-0.1.17-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca76b4ab3e3d2550625675223ff07f4f4825cb92fdc8c35d3f8474ffd90b5d63
BLAKE2b-256 checksum
How to use checksums
905947c32126572d64fa8369ba9c9f499768998de3c57cb58af13a4a607adc01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for wupbro 0.1.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page