~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Two key changes at once: the second fails with a 500

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

each change reads the last op, then signs its update with prev set to that op's CID, under the same host key. Two addRecoveryKey calls at once (or an add and a remove) both point at the same prev. The directory accepts the first. It refuses the second, a fork signed by a key no higher than the one it would override. publish turns that refusal into an internal 500, though asking again would succeed. Nothing serialises these per group. No test covers it.

How to see it

Read against docs/fresh at 4636e6d, the code at: recovery.rs:150-154 (set_rotation_keys). Paths are under crates/group-host/src unless they say otherwise. Severity: low.

What you expected

Hold a per-group lock (or the host's write lock) across read, sign and publish. Or map a directory refusal to a 409-style conflict, such as InvalidOperation, that tells the caller to try again.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.