Apply demo-activity-bot: Bruno, the synthetic public-walk generator
Adds a background demo user (`bruno`) plus two pg-boss jobs that generate public trekking routes and activities in inner Berlin and prune them after 14 days. Disabled by default everywhere; flip `DEMO_BOT_ENABLED` only in prod. - Schema: `synthetic` boolean on routes + activities - `ensureDemoUser()` idempotent insert + badge on /users/bruno - Generation gate: 07-21 Berlin local, p=0.12, 40-route cap in 14d - Initial 4-walk backfill on first enable; retention via daily prune - Prometheus gauges `demo_bot_synthetic_routes_total` / `_activities_total` - Unit + DB-gated integration + E2E tests Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7304a9e904
commit
ba4c4e1b4f
16 changed files with 1003 additions and 43 deletions
|
|
@ -34,6 +34,13 @@ services:
|
|||
WAHOO_CLIENT_ID: ${WAHOO_CLIENT_ID:-}
|
||||
WAHOO_CLIENT_SECRET: ${WAHOO_CLIENT_SECRET:-}
|
||||
WAHOO_WEBHOOK_TOKEN: ${WAHOO_WEBHOOK_TOKEN:-}
|
||||
# Demo-activity-bot (Bruno). Disabled by default everywhere; flip to
|
||||
# "true" only in prod to let the background worker generate public
|
||||
# demo routes + activities and prune old ones. Region is a JSON blob
|
||||
# `{"bbox":[w,s,e,n]}`; retention is in days (default 14).
|
||||
DEMO_BOT_ENABLED: ${DEMO_BOT_ENABLED:-}
|
||||
DEMO_BOT_RETENTION_DAYS: ${DEMO_BOT_RETENTION_DAYS:-}
|
||||
DEMO_BOT_REGION: ${DEMO_BOT_REGION:-}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost:3000/api/health || exit 1"]
|
||||
interval: 15s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue