Expand description
MemberRef: the only way a member identity reaches Joy’s output (ADR-042).
In anonymous mode the at-rest member key is an opaque id (m-<short>). The
concept (Pseudonyme Identitäten und Löschrecht) requires that this id is
never user-visible: every Joy output that names a member resolves it to a
name (if members.yaml carries one) or the e-mail, and a path that cannot
resolve requests authentication instead of printing the id.
The guarantee is bound to the type, not to each output path. A member id is
wrapped in MemberRef; its [Display] and (in presentation mode) its
Serialize yield the resolved value, never the raw id. Code that needs
the raw id for an internal purpose (map lookup, verifier math) reaches for
the explicit MemberRef::id. A forgotten output path therefore fails
safe: it shows the resolved value (or an auth request), never the id.
Resolution reads from a thread-local MemberResolver installed once per
command (see install). In open mode the resolver is a pass-through (the
key is the e-mail). In anonymous mode it carries the decrypted
members.yaml, or None when the viewer is not authenticated.
Structs§
- Member
Ref - A member identity that resolves to a display value on output and never
exposes the raw at-rest id except via
MemberRef::id. - Member
Resolver - Resolves opaque member ids to a display value for the current command.
Constants§
- AUTH_
REQUIRED - Marker rendered when an opaque id cannot be resolved because
members.yamlis not unlocked. Never the raw id (fail-safe direction).
Functions§
- install
- Install the resolver for the current command (call once at dispatch).
- presentation_
active - Whether serialization is currently in presentation mode (
--jsonoutput). Lets aserialize_withon a map keyed by raw ids resolve its keys for output while keeping them raw on disk. - resolve_
str - Resolve a raw member string for display against the installed resolver.
- uninstall
- Remove any installed resolver (mainly for tests).
- with_
presentation - Run
fwith serialization in presentation mode, soMemberRefserializes the resolved value instead of the raw id. Used by the--jsonemitter.