Summary
Validate round IDs before the keeper queue persists or sorts them.
Why this matters
KeeperStore.addRound() currently accepts arbitrary strings. A value such as abc, -1, or 1.5 can be written to .keeper-store.json, after which listRounds() or the watch loop can throw while converting it to BigInt.
Scope
- Add a small shared round-ID parser/normalizer for keeper queue operations.
- Accept positive integer values supplied as
bigint, safe integer number, or decimal string.
- Reject zero, negative, fractional, empty, and non-numeric values before writing the store.
- Use the same validation in the queue CLI for
add and remove.
- Do not change the persisted JSON shape.
Acceptance criteria
Summary
Validate round IDs before the keeper queue persists or sorts them.
Why this matters
KeeperStore.addRound()currently accepts arbitrary strings. A value such asabc,-1, or1.5can be written to.keeper-store.json, after whichlistRounds()or the watch loop can throw while converting it toBigInt.Scope
bigint, safe integernumber, or decimalstring.addandremove.Acceptance criteria
1,1n, and"1"normalize to one queue entry.pnpm keeper:testand keeper typecheck pass.