Introduce canonical reference rules via a payload entry in the identity
document. The payload is identified by xyz.radicle.crefs, and the payload
currently contains one key rules, which is followed by the set of rules. For
each rule, there is a reference pattern string to identify the rule, which in
turn is composed of the allow and threshold values. The canonical reference
rules are now used to check for canonical updates. However, if none are
available, then the threshold, delegates, and the project defaultBranch
are used to construct a single rule for the default branch as a fallback. Note
that if the rules are present, and there is no default branch rule then the
canonical reference for the default branch will not be computed.
Introduce canonical reference rules via a payload entry in the identity
document. The payload is identified by xyz.radicle.crefs, and the payload
currently contains one key rules, which is followed by the set of rules. For
each rule, there is a reference pattern string to identify the rule, which in
turn is composed of the allow and threshold values. The canonical reference
rules are now used to check for canonical updates. However, if none are
available, then the threshold, delegates, and the project defaultBranch
are used to construct a single rule for the default branch as a fallback. Note
that if the rules are present, and there is no default branch rule then the
canonical reference for the default branch will not be computed.
Introduce canonical reference rules via a payload entry in the identity
document. The payload is identified by xyz.radicle.crefs, and the payload
currently contains one key rules, which is followed by the set of rules. For
each rule, there is a reference pattern string to identify the rule, which in
turn is composed of the allow and threshold values. The canonical
reference rules are now used to check for canonical updates. The rule for the
defaultBranch of an xyz.radicle.project is synthesized from the identity
document fields: threshold and delegates. This means that a rule for that
reference is not allowed within the rule set. This checked when performing a
rad id update.
Changes from previous revision:
- Checks against default branch when updating
- Refactors business logic away from the CLI into an
doc::updatemodule - Includes pushing canonical tag example
- Reword CHANGELOG entry
Changes:
- Report matched rules when checking default branch
- Remove erroneous
eprintln - Reword to
commit for canonical reference - Reword docs for
Allowed::Set - Remove erroneous
no_run
Minor changes to wording, do not say “canonical head” but “canonical reference”. Rebase.