Expand description
Privacy-mode migration (ADR-042).
Switches a project’s working .joy/ files between open (cleartext
e-mail) and anonymous (opaque ids + encrypted members.yaml). The switch
is one atomic, deliberate operation: it rekeys the member map, writes the
verifier and the encrypted members file, and rewrites every item and log so
no member e-mail remains in any working file. Switching back restores them.
Git commit history is deliberately out of scope: old commits keep their e-mails, which only a history rewrite could change. The guarantee here is about the working tree.
The migration requires the operator’s unlocked identity seed (auth) and the
manage capability; both are enforced by the caller (joy project set).
Functions§
- email_
for - The single source of a member’s e-mail (the concept’s
email_for). - erase_
member - GDPR Art. 17 erasure: remove a member’s e-mail and name from the encrypted
members.yamland re-encrypt, severing the id -> PII resolution. The opaque id, theemail_matchverifier and the whole audit trail in the versioned files are deliberately left intact (Art. 17(3): the audit trail rests on a legitimate interest). After this, no Joy output can resolve that id to a person. Anonymous mode only; needs an operator seed with members.yaml access. Returns whether an entry was actually removed. - member_
key_ for_ email - Resolve the member-map key for a git e-mail, honoring the privacy mode. In
openmode the key is the e-mail itself; inanonymousmode it is the opaque id whose storedemail_matchverifies against the e-mail. ReturnsNonewhen the e-mail is not a member. - switch_
to_ anonymous - Switch a project from
opentoanonymous. - switch_
to_ open - Switch a project from
anonymousback toopen.