0043: Role reductions bind policy records
- Status: superseded by 0046
- Date: 2026-10-25
- Superseded: 2026-11-14, by the change
policy-linear-chain. Policy is a linear chain, so a backdated record is void (stale-parent) and a removal is final once published. The passes, contests, held demotions and withdrawals below no longer exist. Version 1 also has no quorum (Ben, 2026-10-31):ProposeDemote,ApproveDemote,SetQuorumandvaultfold member approveare removed, and any root admin removes another root admin's admin role directly withmember ungrant. The text below describes the design as it was. - Amends: 0006 (the causal-past rule), 0017 (two passes become three, and role reductions are decided in them)
- Amended by: OpenSpec change
fix-reduction-pass2-bypass(proposed 2026-10-27; three passes become four, see "Amendment: a fourth pass" below)
Context
ADR 0006 makes an event by key K valid only if it is in the causal past
of every valid revocation of K. ADR 0017 decides that rule in two passes
over fold order. For policy records, both cover only revocations of a
key or a member (RevokeDevice, Supersede, RevokeMember). Every
other policy record is judged only against its own causal past.
Review of the OpenSpec change member-roles-and-rename (ticket
01M5S8EYCK6CHYPTT58EV2VQ53) showed what that allows. After a valid
RevokeRoles, or after the ApproveDemote that completes a demotion
quorum, the demoted member can author a record that needs the lost
right, choose parents from before the reduction and a late HLC, and
have every client accept it. A backdated grant of admin to itself
restores the role. Backdated grants to allies, member adds, approvals,
renames of others, collections and epochs work the same way. The test
TestTwoOfThree pinned this as intended. The hole exists today, but no
CLI command could author a role reduction until this change.
The re-review found two more problems. First, two admins of a non-root collection may remove each other's admin role, and a backdated record picks its own place in fold order, because its HLC only has to exceed its parents'. So the member removed second can backdate a counter-removal, win the arbitration and keep the role. Second, in the two-pass fold a revocation that phase 1 accepted stays an arbiter even when phase 2 rejects it. A revoked device can forge a backdated revocation of another member's device: every client rejects the forgery, yet the victim's later honest records are still rejected "revoked by concurrent record ". That lock-out exists today for revocations, and this change would have extended it to reductions.
Decision
- A role reduction is a valid
RevokeRoles, or theApproveDemotethat completes an admin demotion quorum (the demotion's reduction point). Proposals, and approvals that do not complete the quorum, reduce nothing. - A policy record P by member M is subject to a reduction R of M when P
is not in R's causal past and P would be unauthorized against P's
causal past joined with R and its causal past. A subject record is
rejected with
revoked-author. - Honest records concurrent with R are rejected too, and surfaced to admins, exactly as data events that race a revocation are. Records that need no right R removes are unaffected.
- Device revocations, member revocations, supersessions and role
reductions are the deciding records. The fold runs exactly three
passes over fold order, with no fixpoint:
- Pass 1 evaluates every record, as today, and collects the valid deciding records as arbiters.
- Pass 2 re-evaluates every record in fold order against the pass 1
arbiters, as the old phase 2 did, so each deciding record is judged
with consistent causal views. Only its verdicts on deciding records,
and on every
ProposeDemoteandApproveDemote, are final. A deciding record that becomes valid, or an approval that becomes completing, only in pass 2 also binds the records after it in pass 2, unless it would bind a record whose pass 2 verdict is final (a deciding record,ProposeDemoteorApproveDemote) already valid earlier in pass 2, in which case it is rejected with the dedicated reasonyields-to-decided, whatever its pass 1 verdict was, its binder being the record it would have bound, so contest detection sees the defeat and a yielding approval is not counted. Whether anApproveDemotecompletes the quorum is part of its verdict. Both rules keep the final valid set sound (every valid record by an author is in the causal past of every valid deciding record that binds that author, and no valid record by a member needs a right that a valid reduction of that member removes) without reversing a deciding verdict already made, which would be a fixpoint: in doubt, a deciding record is refused. Deciding demotion records in pass 2 settles whether a demotion completes where its completing approval binds; otherwise an approval valid only in pass 3 could complete a demotion that binds nothing, leaving the target's concurrent self-grant valid. - Pass 3 re-decides every other ordinary record against the deciding
records still valid after pass 2.
Passes 2 and 3 can disagree: through the conflict checks, pass 3 can
reject an ordinary record that pass 2 accepted and that a deciding
record valid after pass 2 rests on, for example one of two concurrent
mints of the same epoch number. This is narrow, and it is detected rather than prevented:
doctor reports
policy-dependency-rejected(error) for such a deciding record. It is a separate code fromcontested-policybecause no record by a target need be involved and its remedy differs. A demotion record whose pass 3 verdict would differ from its final pass 2 verdict in validity, reason or completion is reported aspolicy-demotion-held(error). Its advice has three branches: a new approval on the current frontier completes the demotion; when pass 2 rejected the proposal itself, an approval would be refused as an unknown proposal, so the demotion is proposed again on the current frontier; and a demotion that completes only under its pass 2 verdict is reviewed against the current membership. Concurrent deciding records are arbitrated by fold order, as before.
- Only a root admin may remove the admin role on any collection. A
collection admin who is not a root admin may remove only
writer,rotatorandreader, which gives the target nothing to counter with. Root admin authority can be reduced only through the quorum. - A data event anchored on a record rejected this way gets no authority from it (the existing rule that rejected policy records contribute no effect).
- Root-admin demotions are not final in format version 1, and this ADR
does not claim they are. Contests are detected. A demotion or
revocation against T is contested when it would take effect with each
of its records judged against its own causal past, it does not take
effect in the fold, and the record that defeated it, or a record in
its causal past outside the defeated record's, was authored by T. This
covers puppets that demote the approver, the proposer or another
approver, and it excludes races T is not part of, such as an admin's
own key rotation. A record rejected
yields-to-decidedis defeated by its binder. Detection is bounded: the authorship test runs before any sub-fold of a candidate's causal past, and sub-folds are memoized per distinct causal past, so their number is at most the number of distinct causal pasts among candidates that pass the authorship test; otherwise a revoked device could multiply the cost of every fold for free. Because an attacker can give every forgery a distinct causal past, detection also runs under a work budget: in fold order, the sub-folds run in one fold may together fold at most 4 times the fold's policy records, and the candidates left once it is spent are counted as unchecked in the State and reported by doctor ascontest-detection-incomplete(warning). Detection never changes a verdict, so the budget cannot affect soundness. Doctor reports it ascontested-policy(error), naming both records and the recovery paths, the recovery key or rebuilding the vault, andmember listandmember approvewarn about it. The CLI says "recorded", never "took effect", when an approval completes a demotion, and points at doctor.
Consequences
- A demoted member can no longer simply write its way back, or grant power to others, with backdated ordinary records: those are rejected by every client and the hosted service.
- A demotion of a root admin can still be contested. Concurrent deciding records are settled by fold order, and a backdating author chooses its own place in fold order. A demoted root admin can therefore place, before the completing approval, records that make the approval itself invalid. It can do this with member adds that manufacture puppet admins, their approvals of a demotion of the approver, or a revocation of the approver's device, and no honest signature is needed. The same holds for device-revocation proposals against a root admin's device. This is accepted for v1 only because it is detected and reported: every client computes the contest from the fold alone and doctor fails on it, so the remaining admins learn that the demotion was undone. Their remedies are the recovery key, or rebuilding the vault from a trusted copy. Tests pin both the open-proposal and the puppet-quorum cases together with the detection.
- Real finality is left to a follow-up change with its own ADR. It needs policy-level heads on deciding records plus a rule for deciding records that arrive late and concurrent, or an ordering witness such as the hosted service or the git branch history.
- A record rejected in pass 2 never invalidates an ordinary record, so a forged revocation or reduction cannot lock a device out of granting, linking, renaming or approving. Among deciding records the caution of ADR 0017 remains: a forged deciding record that pass 1 accepted can still refuse the victim's own later revocations, supersessions or reductions that are not in its causal past. Another device of the victim's member, or an admin, can still revoke or replace the victim's device.
- A demotion proposal can be stuck. A demotion takes effect at an approval
record, so when every eligible admin approves concurrently on separate
copies, the merged proposal has enough counted signatures but no single
approval completes it, and re-approving is refused as a duplicate. This
gap is in the existing quorum rule, not in this decision, and is
tracked as a follow-up (ticket 01M5WC949W).
member approvelists such a proposal as stalled. - A collection admin can no longer remove another collection admin's admin role; a root admin has to.
- An admin's honest grant that races its own demotion is lost and has to be granted again by a remaining admin. This is the same trade-off the data fold already makes.
- The fold becomes stricter. A build from before this rule and one from after it can disagree on a vault that holds such a record. None is known to exist, because no released or CLI path authored role reductions before this change. The hosted service must run the same rule as clients.
- This is still integrity, not prevention (ADR 0006): KEKs a demoted admin already holds stay usable to it, and only revocation with new epochs cuts off reads. Root-admin authority is reduced only through the quorum, and the CLI commands that change roles or approve a demotion are refused in agent sessions.
Alternatives considered
- Policy-level heads on reductions (a
policy_headsfield likeevent_heads). Rejected for now: it is more precise, because it would keep honest concurrent records the reducer had seen, but it changes the wire format of five record kinds. It can be added later on top of this rule. - Document that demotion binds only honest admins, and nothing more. Rejected: it would leave backdated ordinary records open, and nobody would notice an undone demotion. The decision above closes the ordinary records and detects contests of root-admin demotions.
- Iterate passes over deciding records until they settle. Rejected: that is the fixpoint ADR 0017 ruled out, because odd cycles of mutual revocation may not settle.
- Arbitrate the contest explicitly inside the fold, for example by freezing approvals by anyone who is the target of an open proposal. Rejected: it would let a single admin freeze another admin's approvals by proposing its demotion, and it would not stop puppet admins added by backdated records.
- Claim finality now. Rejected: no pass structure can settle deciding records that race each other when the attacker picks their fold order. It needs the follow-up described above.
- Treat the proposal, not the completing approval, as the reduction point. Rejected: until the quorum completes the target is still an admin, and invalidating its records from the proposal on would let a single admin freeze another admin's authority.
Amendment: a fourth pass (proposed, fix-reduction-pass2-bypass)
Review 2 of member-roles-and-rename group 0 (F1) found that the three passes above do not keep the guarantee that a demoted member cannot grant power to others. A deciding record that becomes valid only in pass 2 binds, in pass 2, only the records after it. So a demoted member that makes its own completing approval valid only in pass 2 (a backdated squat of the approver's member id, then a revocation of the squatting device) can place backdated grants before the approval in fold order. On the strength of those grants, allies' demotion of another root admin is accepted in pass 2 with a final verdict, although pass 3 rejects the grants. The same holds for a device revocation that is valid only in pass 2, and for a settled record placed after the late deciding record.
Decision, pending implementation of that change (its design.md has the class enumeration, the options and the bounded-pass argument):
- The fold runs exactly four passes. Passes 1 and 2 are unchanged. Pass 3 re-decides every record, settled records included (a revocation, supersession, revoke-roles, demotion proposal or approve-demote record), with the pass 1 arbiters and every deciding record valid after pass 2 binding at every position in fold order. There are two exceptions. A binder in a record's causal past that pass 3 rejects does not bind it, so the target of a withdrawn or forged deciding record can author again on top of it. And a record that becomes deciding only in pass 3 binds the records after it and yields if it would bind any valid record before it. A settled record accepted or completing in pass 2 that pass 3 rejects, or that stops completing in pass 3, is withdrawn. Settled verdicts are final after pass 3. Pass 4 is the former pass 3. No pass repeats, so there is still no fixpoint. The first version of this amendment kept every pass 2 rejection of a settled record. That locked the target of a withdrawn demotion out of settled records for good (group 1 test author's finding), and the revision above replaced it.
- Withdrawn records are rejected with the reason pass 3 gives and are
reported (doctor
policy-withdrawn, error) with the rejected records they rested on, the deciding records that bound those, and the member that authored them.policy-dependency-rejectedandpolicy-demotion-heldkeep their meaning one pass later. - Option (a) of the review, letting the late deciding record yield, was rejected: the demoted member would keep its role while its allies' demotion of another admin stood. Accepting the gap was rejected by the orchestrator.
- Residue, reported: a withdrawn deciding record still refuses, in passes 2 and 3, the settled records concurrent with it that it binds, as the caution of ADR 0017 says for refused arbiters. Ordinary records are never refused by it, and records written after it are not bound by it. A record that becomes deciding only in pass 3 (in practice a record its author re-authored on top of a withdrawn record) yields to any valid record of its target concurrent with it and before it in fold order, reported as contested. So a demoted member can still defeat, with a backdated record from the device concerned, the withdrawn record's target's revocation of that device. Admins the withdrawn record never affected are not limited this way.