admin: reset-world --speed X (speed can only change on an emptied world)

Speed is stored scaled into rates and due times, so changing it under live rows would jump resources and mis-time events. reset-world now takes --speed to set the new world's speed in the same transaction.

Tested: test/admin-cli.test.js (speed asserted after reset), npm test green. NOT tested beyond that.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
This commit is contained in:
jvanvik 2026-10-12 19:20:45 +02:00
parent 3c23c51902
commit d7a27db563
3 changed files with 7 additions and 5 deletions

View file

@ -257,7 +257,7 @@ upstream-admin replay-events --until +6h --simulate # + run the real handlers
upstream-admin backup /var/lib/upstream/backups --keep 14
upstream-admin verify-backup /var/lib/upstream/backups/upstream-20261011T041500Z.db
upstream-admin grant 12 --fiber 5000 --capital 2000 --yes # testing only
upstream-admin reset-world 1 --yes-destroy --backup /var/lib/upstream/backups --new-seed
upstream-admin reset-world 1 --yes-destroy --backup /var/lib/upstream/backups --new-seed [--speed 3] # --speed is the only way to change a world's speed: it needs an emptied world
upstream-admin migrate # apply pending migrations without starting the server
```