side-quest 2.6.0: /side-quest:reset command + synced, confirmed reset-ledger #4
Loading…
Reference in a new issue
No description provided.
Delete branch "side-quest-reset-command"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the reset command and makes
reset-ledgersafe and pool-wide-effective./side-quest:reset(commands/reset.md) — wrapsxp.sh reset-ledger, always shows the current total + target and gets an explicit yes from the user first.reset-ledgernow requires--yes. Without it: prints a pool-wide-impact warning and exits 1 without changing anything (dry run). Behaviour change from 2.5.0.resetis now a synced event kind.reset-ledgerpublishes aresetevent onsidequest/xp/events— online machines adopt the new total within seconds via their live subscription — in addition to the retainedsidequest/xp/statesnapshot for offline/new machines.apply_event->_apply_reset_eventadopts the carried total (up OR down) only when the event'sepochis newer than local; idempotent on replay, no-op on stale epoch. Previouslyreset-ledgeronly touched retained state, so a machine that stayed connected wouldn't see the reset until it reconnected.119 tests pass, ruff clean. Implements the reset half of issues #1/#2 groundwork.
Note: commit
bbc7fa7is unsigned — 1Password signing agent was unreachable in the session; can be--amend -S'd later.Pull request closed