-
Notifications
You must be signed in to change notification settings - Fork 0
dev server report
buildsbypat edited this page May 24, 2026
·
1 revision
- Added a standalone webhook runtime in
apps/webhook/main.py. - Added
GET /healthandPOST /throne/webhook/{creator_id}/{secret}inrob/throne/webhooks.py. - Added payload normalisation in
rob/throne/payloads.py. - Added webhook secret hashing/matching and optional signature verification helpers in
rob/throne/security.py. - Added maintenance-aware send recording through
rob/services/send_service.py. - Kept the webhook runtime independent from Discord settings so it can run without
DISCORD_TOKEN.
- Added a dedicated Discord runtime in
apps/bot/main.pyandrob/discord/client.py. - Added cogs for
/register domme,/register sub,/sendrequest,/leaderboard,/add, and/count set. - Added a background send queue worker in
rob/services/send_queue_service.py. - Added leaderboard refresh and counting services.
- Replaced runtime SQLite assumptions with PostgreSQL repository classes under
rob/database/repositories/. - Kept SQLite limited to the legacy import path in
rob/database/migrations/legacy/sqlite_to_postgres.py. - Public leaderboard queries now derive from posted sends only.
- Legacy imported sends are inserted as
posted, and the bot queue only fetchespending, so those imported rows are not reposted.
- Added split systemd units for webhook and bot dev services.
- Added first-time bootstrap scripts
deploy/scripts/install-webhook-dev.shanddeploy/scripts/install-bot-dev.sh. - Added
deploy/scripts/deploy-webhook-dev.sh. - Added
deploy/scripts/deploy-bot-dev.sh. - Added
scripts/robctlandscripts/ops.pyfor backend operations.
- Added a checks workflow for push and pull request validation.
- Added manual deploy workflows for webhook dev and bot dev.
- Added webhook server, bot server, deployment, maintenance, command, and backend control docs.
- Added this report as
docs/dev-server-report.md.
- Added reusable embed builders under
rob/ui/cards/. - Added dedicated cards for sends, leaderboards, registration, counting, maintenance, errors, and status.
- Moved the old single-process/event bot into
legacy/single-process-bot/. - Moved old event config and single-process install scripts into
legacy/. - Removed active runtime reliance on old
bot/and event-era paths.
- Base branch used:
rebuild/rob-v2-foundation - Base branch tip incorporated during final recheck:
3bfba90 - New branch name:
rebuild/dev-online-services - Commit summary:
- split webhook and Discord runtimes
- PostgreSQL repository/service layer
- send queue worker and maintenance flow
- bot commands and counting scaffold
- deploy scripts, systemd units, GitHub workflows
- docs, tests, and legacy archive cleanup
- Create runtime user
rob. - Either run
sudo DEPLOY_USER=deployuser bash deploy/scripts/install-webhook-dev.shor clone the repo branch into/opt/rob-webhook/appmanually. - Create
/opt/rob-webhook/app/.env. Webhook env does not needDISCORD_TOKEN. - Create
.venv. - Install dependencies from
requirements.txt. - Decide whether
THRONE_WEBHOOK_REQUIRE_SIGNATUREshould befalsefor early dev ortrueonce Throne signature settings are verified. - Verify
PYTHONPATH=. python -m apps.webhook.mainstarts with valid env and DB access. - Verify
curl http://127.0.0.1:8080/healthreturnsOK. - Install
deploy/systemd/rob-webhook-dev.service. - Copy or symlink
deploy/scripts/deploy-webhook-dev.shto/opt/rob-webhook/deploy-webhook-dev.sh. - Add a sudoers entry for the deploy SSH user so it can restart
rob-webhook-dev.servicewithout a password prompt. - Configure the Cloudflare Tunnel from
https://rob-dev.barecoding.comtohttp://127.0.0.1:8080. - Add GitHub deploy secrets.
- Run the manual
Deploy Webhook Devworkflow.
- Create runtime user
rob. - Either run
sudo DEPLOY_USER=deployuser bash deploy/scripts/install-bot-dev.shor clone the repo branch into/opt/rob-bot/appmanually. - Create
/opt/rob-bot/app/.env. - Create
.venv. - Install dependencies from
requirements.txt. - Verify
PYTHONPATH=. python -m apps.bot.mainstarts with valid env and DB access. - Install
deploy/systemd/rob-bot-dev.service. - Copy or symlink
deploy/scripts/deploy-bot-dev.shto/opt/rob-bot/deploy-bot-dev.sh. - Add a sudoers entry for the deploy SSH user so it can restart and inspect
rob-bot-dev.servicewithout a password prompt. - Add GitHub deploy secrets.
- Run the manual
Deploy Bot Devworkflow.
APP_ENVLOG_LEVELDATABASE_URLTHRONE_WEBHOOK_HOSTTHRONE_WEBHOOK_PORTTHRONE_WEBHOOK_BASE_URLTHRONE_WEBHOOK_REQUIRE_SIGNATURETHRONE_PUBLIC_KEY_PEMTHRONE_WEBHOOK_DEBUG_LOG_PAYLOADTHRONE_WEBHOOK_TIMESTAMP_HEADERTHRONE_WEBHOOK_SIGNATURE_HEADERTHRONE_WEBHOOK_SIGNED_MESSAGE_FORMATTHRONE_WEBHOOK_MAX_TIMESTAMP_SKEW_SECONDS
Webhook env must not include DISCORD_TOKEN.
Use THRONE_WEBHOOK_REQUIRE_SIGNATURE=false for early dev if you do not yet have verified Throne signing details. Switch it to true once the public key and signature format are confirmed for the dev webhook endpoint.
APP_ENVLOG_LEVELDATABASE_URLDISCORD_TOKENBOT_NAME
Bot env must include DISCORD_TOKEN.
WEBHOOK_DEV_HOSTWEBHOOK_DEV_USERWEBHOOK_DEV_SSH_KEYWEBHOOK_DEV_PORT
BOT_DEV_HOSTBOT_DEV_USERBOT_DEV_SSH_KEYBOT_DEV_PORT
- The database is
rob_dev. - PostgreSQL tables already exist through the migration foundation branch.
- Legacy data has already been imported or is importable with the legacy migration tooling.
- App servers use the application user such as
rob_dev_app. - Migrations and imports use the higher-privilege user such as
rob_migration.
- Provision the two DigitalOcean servers.
- Install Python and system packages.
- Create the
.envfiles on both servers. - Install the systemd unit files.
- Copy or symlink the deploy scripts into
/opt/rob-webhook/and/opt/rob-bot/. - Add sudoers entries for the SSH deploy users.
- Configure the Cloudflare Tunnel on the webhook server.
- Add the GitHub Actions deploy secrets.
- Run and verify the first manual deploy on both servers.
- Throne signature verification is implemented as an optional path, but live validation still depends on the correct production public key and exact signed-message format.
- The Discord command surface is intentionally minimal in this pass and does not include a broad admin suite.
- Leaderboard refresh is fully wired for posted sends and manual refresh requests, but richer multi-card/channel layouts can still be expanded.
-
robctl queue flushreleases queued maintenance sends back topending; actual Discord posting still depends on the running bot worker. - Send request approval/denial buttons from the old bot were not rebuilt yet.
- Production deployment and production-specific env separation are still to be done after the dev servers are proven out.