side-quest 2.6.0: /side-quest:reset command + synced, confirmed reset-ledger #4

Closed
trtmn wants to merge 0 commits from side-quest-reset-command into main
Owner

Adds the reset command and makes reset-ledger safe and pool-wide-effective.

  • New /side-quest:reset (commands/reset.md) — wraps xp.sh reset-ledger, always shows the current total + target and gets an explicit yes from the user first.
  • reset-ledger now requires --yes. Without it: prints a pool-wide-impact warning and exits 1 without changing anything (dry run). Behaviour change from 2.5.0.
  • reset is now a synced event kind. reset-ledger publishes a reset event on sidequest/xp/events — online machines adopt the new total within seconds via their live subscription — in addition to the retained sidequest/xp/state snapshot for offline/new machines. apply_event -> _apply_reset_event adopts the carried total (up OR down) only when the event's epoch is newer than local; idempotent on replay, no-op on stale epoch. Previously reset-ledger only 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 bbc7fa7 is unsigned — 1Password signing agent was unreachable in the session; can be --amend -S'd later.

Adds the reset command and makes `reset-ledger` safe and pool-wide-effective. - **New `/side-quest:reset`** (`commands/reset.md`) — wraps `xp.sh reset-ledger`, always shows the current total + target and gets an explicit yes from the user first. - **`reset-ledger` now requires `--yes`.** Without it: prints a pool-wide-impact warning and exits 1 without changing anything (dry run). Behaviour change from 2.5.0. - **`reset` is now a synced event kind.** `reset-ledger` publishes a `reset` event on `sidequest/xp/events` — online machines adopt the new total within seconds via their live subscription — in addition to the retained `sidequest/xp/state` snapshot for offline/new machines. `apply_event` -> `_apply_reset_event` adopts the carried total (up OR down) only when the event's `epoch` is newer than local; idempotent on replay, no-op on stale epoch. Previously `reset-ledger` only 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 `bbc7fa7` is unsigned — 1Password signing agent was unreachable in the session; can be `--amend -S`'d later.
trtmn closed this pull request 2026-08-27 19:32:01 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
CR1
CR2
CR3
CR4
CR5
P0
P1
P2
P3
P4
P5
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trtmn/agent-plugins!4
No description provided.