Step 4 (c) of ADR 0044 (D20 to D22).
- `SharedSpaceKeys`: after each sync, opens the keys members' devices
sealed to the person and seals those this device holds to newcomers,
space by space, one failing holding back none of the others; keeps
each space's latest key, counting only keys whose sealed ID names
that space; makes a space's new key and shares it with its members.
- `Privacy`: a studyset in a shared space takes the space's latest key,
after its own signed record and the key it was last seen sealed with,
so a private studyset the instance claims is shared keeps its own
key. An item last seen under a space's key is written with that
space's latest (D22: earlier rows keep theirs). Writing is refused
while no key of the space is open (`spaceKeyMissing`), and a shared
studyset is never made readable nor given a key of the person's own
(`shared`, D21). Sweeps keep to studysets with a signed record, which
a shared one never has.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>