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.
What happened
each change reads the last op, then signs its update with
prevset to that op's CID, under the same host key. TwoaddRecoveryKeycalls at once (or an add and a remove) both point at the sameprev. The directory accepts the first. It refuses the second, a fork signed by a key no higher than the one it would override.publishturns 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/freshat 4636e6d, the code at: recovery.rs:150-154 (set_rotation_keys). Paths are undercrates/group-host/srcunless 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.