rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood936f7ab3fe258eb5f2769189a64cafe19ddb4ff8
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "fd6784135ec9bf317cfd9c824841b547e36a2718",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"title": "Patches: Add support for custom merge destination",
"state": {
"status": "open",
"conflicts": []
},
"before": "1f40b32b6aedaaff2016cb20f9e2a3d9c681c651",
"after": "936f7ab3fe258eb5f2769189a64cafe19ddb4ff8",
"commits": [
"936f7ab3fe258eb5f2769189a64cafe19ddb4ff8",
"45284c0fa11f23a9dbb58934499946e1d225c1f4",
"17757cf8d7adbb04fa3ecb56860c15e80a05370e",
"57a59e78b02863176f4771d2b8096e7167888a9d",
"b43dab5f2543810a02433f9cdcab3c155707b633",
"1eca72cc9cc861f36acf77157912bd9757e2d494",
"5b983e8f7ca3a6c49ef04c9c9ac0e69dbe52431e",
"d67b79002211c2d40f11362a0253bb4f7b62e907",
"9b096ccbfce2299cc046a10d53e948241537ce02",
"07c3e51baefd9625c68bf128d6fed282dc826c2d",
"956c227c029cb0965965ed2b93843aa903bfe2cd",
"2c8653cacff6c5f0ab6b1d4e7195e2c3192842a7",
"cbb1572b58182966330c80fdb2f2ba962880f81c",
"941ef722814623c0138c90d6192def94a01e457c",
"7da057c7db4889596ced8f06c5ec41694c4f1d7e",
"5e806c18807bc247dce3c50cf34e8620e8539775",
"d934ed23836052292bd56381e89f2ed73014b8bc",
"15912bcabce8e7ed364fc844c16d3ac85449bff9"
],
"target": "6b460c44298afad6599b223e48bdaa3c7f3ad5cc",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "fd6784135ec9bf317cfd9c824841b547e36a2718",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "This patch introduces the ability to specify a target branch for patches using\nthe `patch.destination` push option. Previously patches implicitly targeted the \nrepository's default branch. Furthermore this patch introduces strict isolation \nfor merges and reverts: a patch will now only be marked as merged or reverted \nif the commits are pushed to its explicitly intended destination branch.",
"base": "caee776c388ffac2ea55cc9d1e3d7fa108ca6df5",
"oid": "75d35fa458b3166ccf50e1f945574a8e8c852ac9",
"timestamp": 1778683486
},
{
"id": "c6bc2c718da5e039f27c0b57a02c5cd6d143001d",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "Replaces `patch.destination` with `patch.target` and breaks forwards compatibility.",
"base": "caee776c388ffac2ea55cc9d1e3d7fa108ca6df5",
"oid": "d31ef1e6d051a73f11a472b8b6b8747c2e7f12f4",
"timestamp": 1778770594
},
{
"id": "2fb8f3455c8e9d2cf1f2ef894fbbb0372c7d2d07",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "- Update wording of the CHANGELOG\n- Rename all instances of 'destination' with 'target'\n- Enforce branches only for `MergeTarget::Branch` via prefix check `refs/heads/`\n- Add magic push ref `refs/for/<branch>`\n- Add git configuration override `rad.magicPushPrefix` to change magic push ref",
"base": "1f40b32b6aedaaff2016cb20f9e2a3d9c681c651",
"oid": "45284c0fa11f23a9dbb58934499946e1d225c1f4",
"timestamp": 1779203854
},
{
"id": "f161555dabe6502b83ab692462ea51d2bafbd11b",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "Adds magic push prefix to changelog",
"base": "1f40b32b6aedaaff2016cb20f9e2a3d9c681c651",
"oid": "936f7ab3fe258eb5f2769189a64cafe19ddb4ff8",
"timestamp": 1779204667
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "91b8d635-7d88-49ab-a0f5-1420a691ac3a"
},
"info_url": "https://cci.rad.levitte.org//91b8d635-7d88-49ab-a0f5-1420a691ac3a.html"
}
Started at: 2026-05-19 18:01:18.358450+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 164 issues · 46 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout fd6784135ec9bf317cfd9c824841b547e36a2718
✓ Switched to branch patch/fd67841 at revision f161555
✓ Branch patch/fd67841 setup to track rad/patches/fd6784135ec9bf317cfd9c824841b547e36a2718
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 936f7ab3fe258eb5f2769189a64cafe19ddb4ff8
HEAD is now at 936f7ab3 radicle: Add magic push prefix to changelog
Exit code: 0
$ rad patch show fd6784135ec9bf317cfd9c824841b547e36a2718 -p
╭─────────────────────────────────────────────────────────────────────────────────────────╮
│ Title Patches: Add support for custom merge destination │
│ Patch fd6784135ec9bf317cfd9c824841b547e36a2718 │
│ Author ade z6MkwGo…yS2aagA │
│ Head 936f7ab3fe258eb5f2769189a64cafe19ddb4ff8 │
│ Base 1f40b32b6aedaaff2016cb20f9e2a3d9c681c651 │
│ Branches patch/fd67841 │
│ Commits ahead 40, behind 0 │
│ Status open │
│ │
│ This patch introduces the ability to specify a target branch for patches using │
│ the `patch.destination` push option. Previously patches implicitly targeted the │
│ repository's default branch. Furthermore this patch introduces strict isolation │
│ for merges and reverts: a patch will now only be marked as merged or reverted │
│ if the commits are pushed to its explicitly intended destination branch. │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│ 936f7ab radicle: Add magic push prefix to changelog │
│ 45284c0 remote-helper: Make magic push prefix configurable │
│ 17757cf remote-helper: Introduce magic push ref 'refs/for/' │
│ 57a59e7 cob: Restrict `MergeTarget::Branch` to 'refs/heads' only │
│ b43dab5 patch: Rename usage of 'destination' with 'target' │
│ 1eca72c radicle: Update changelogs │
│ 5b983e8 cli/example: Update references to `patch.destination` with `patch.target` │
│ d67b790 remote-helper: Replace `patch.destination` with `patch.target` │
│ 9b096cc cob: Replace ReadRepository trait with direct Repository in MergeTarget::head │
│ 07c3e51 cob: Extend 'MergeTarget' with Branch variant │
│ 956c227 lint: Fixes │
│ 2c8653c remote-helper: Isolate merges and reverts │
│ cbb1572 remote-helper: Add 'patch.destination' │
│ 941ef72 cob: Enforce patch destination matching on merge │
│ 7da057c cob: Support qualified and unqualified refs for patch destination │
│ 5e806c1 cob: Replace 'git2::Oid' -> 'git::raw::Oid' │
│ d934ed2 cob: Add `destination` field to patch actions for custom merge targets │
│ 15912bc cli/examples: Introduce a suite of merge and revert tests for patch.destination │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision fd67841 @ caee776..75d35fa by ade z6MkwGo…yS2aagA 6 days ago │
│ ↑ Revision c6bc2c7 @ caee776..d31ef1e by ade z6MkwGo…yS2aagA 5 days ago │
│ ↑ Revision 2fb8f34 @ 1f40b32..45284c0 by ade z6MkwGo…yS2aagA 43 minutes ago │
│ ↑ Revision f161555 @ 1f40b32..936f7ab by ade z6MkwGo…yS2aagA 30 minutes ago │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
commit 936f7ab3fe258eb5f2769189a64cafe19ddb4ff8
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 16:30:43 2026 +0100
radicle: Add magic push prefix to changelog
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70dd892be..9e62608d5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,15 @@ COB type names and payload IDs remain unchanged for backwards compatibility.
Furthermore, strict merge and revert isolation is now enforced: patches are
only marked as merged or reverted if the commits are pushed to the target
branch of the patch explicitly.
+- Additionally a configurable magic push reference has been introduced to
+ shortcut the usage of the aforementioned push option `patch.target`.
+ `refs/for/<branch>` can be used to set the `patch.target` when used as a push
+ target e.g. `git push rad HEAD:refs/for/backport`. This will use the
+ `refs/heads/backport` canonical reference as its `patch.target` in place of
+ using the push option. This can be configured via the git config value
+ `rad.magicPushPrefix`. Setting it to some other prefix such as `refs/@/`
+ will cause the remote-helper to use it in place of the default e.g.
+ `refs/@/backport`
- Teach `rad patch show` to show the full commit range for each revision.
Previously, it would only show the head of the range, but not the base.
It now shows `<base>..<head>`, where the shortened OID is used when not
commit 45284c0fa11f23a9dbb58934499946e1d225c1f4
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 16:11:28 2026 +0100
remote-helper: Make magic push prefix configurable
Supports setting `rad.magicPushPrefix` to overload the default push
prefix `refs/for/`.
diff --git a/crates/radicle-cli/examples/rad-patch-magic-push.md b/crates/radicle-cli/examples/rad-patch-magic-push.md
index fb5e590e0..aedffdc51 100644
--- a/crates/radicle-cli/examples/rad-patch-magic-push.md
+++ b/crates/radicle-cli/examples/rad-patch-magic-push.md
@@ -106,3 +106,20 @@ $ git push -o patch.target=accepted rad HEAD:refs/for/accepted
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new reference] HEAD -> refs/for/accepted
```
+
+We can also configure a custom magic push prefix using standard Git configuration. Let's change it to `refs/rad/@/`:
+
+```
+$ git config rad.magicPushPrefix "refs/rad/@/"
+$ git checkout -b feature/3 -q
+$ git commit -m "Add a third feature" --allow-empty -q
+```
+
+Now we can push using the new custom prefix:
+
+``` (stderr)
+$ git push rad HEAD:refs/rad/@/accepted
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/rad/@/accepted
+```
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 0f959aea5..5488d3f32 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -228,10 +228,10 @@ enum PushAction {
}
impl PushAction {
- fn new(dst: &git::fmt::RefString) -> Result<Self, error::PushAction> {
+ fn new(dst: &git::fmt::RefString, magic_prefix: &str) -> Result<Self, error::PushAction> {
if dst == &*rad::PATCHES_REFNAME {
Ok(Self::OpenPatch { target: None })
- } else if let Some(stripped) = dst.as_str().strip_prefix(rad::PATCHES_FOR_PREFIX) {
+ } else if let Some(stripped) = dst.as_str().strip_prefix(magic_prefix) {
let target = cob::patch::TargetBranch::try_from(stripped).map_err(|_| {
error::PushAction::InvalidRef {
refname: dst.clone(),
@@ -316,6 +316,11 @@ pub(super) fn run(
// Rely on the environment variable `GIT_DIR`.
let working = git::raw::Repository::open_from_env()?;
+ let magic_prefix = working
+ .config()
+ .and_then(|cfg| cfg.get_string(rad::GIT_CONFIG_MAGICPUSHPREFIX))
+ .unwrap_or_else(|_| rad::PATCHES_FOR_PREFIX.to_string());
+
// For each refspec, push a ref or delete a ref.
for spec in specs {
let cmd = Command::parse(&spec, &working)?;
@@ -338,7 +343,7 @@ pub(super) fn run(
Command::Push(git::fmt::refspec::Refspec { src, dst, force }) => {
let signer = profile.signer()?;
let patches = crate::patches_mut(profile, stored, &signer)?;
- let action = PushAction::new(dst)?;
+ let action = PushAction::new(dst, &magic_prefix)?;
match action {
PushAction::OpenPatch { target } => {
diff --git a/crates/radicle/src/rad.rs b/crates/radicle/src/rad.rs
index d0d126c37..7e321a2a3 100644
--- a/crates/radicle/src/rad.rs
+++ b/crates/radicle/src/rad.rs
@@ -29,6 +29,7 @@ pub static REMOTE_COMPONENT: LazyLock<git::fmt::Component> =
pub static PATCHES_REFNAME: LazyLock<git::fmt::RefString> =
LazyLock::new(|| git::fmt::refname!("refs/patches"));
pub static PATCHES_FOR_PREFIX: &str = "refs/for/";
+pub static GIT_CONFIG_MAGICPUSHPREFIX: &str = "rad.magicPushPrefix";
#[derive(Error, Debug)]
pub enum InitError {
commit 17757cf8d7adbb04fa3ecb56860c15e80a05370e
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 15:51:32 2026 +0100
remote-helper: Introduce magic push ref 'refs/for/'
Introduces support for Gerrit-style magic push references via
`refs/for/<branch>`. Pushing to this ref automatically extracts the
target branch and opens a patch against it, bypassing the need for the
push option `patch.target`. Example:
```
$ git push rad HEAD:refs/for/accepted
```
Will open a patch with its `patch.target` set to `refs/heads/accepted`.
diff --git a/crates/radicle-cli/examples/rad-patch-magic-push.md b/crates/radicle-cli/examples/rad-patch-magic-push.md
new file mode 100644
index 000000000..fb5e590e0
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-magic-push.md
@@ -0,0 +1,108 @@
+# Magic Push Reference
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch, allowing delegates to merge into it.
+
+```
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": "delegates" } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it to the repository so it becomes a tracked canonical reference:
+
+``` (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+
+```
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+We can then use the magic push reference `refs/for/<branch>` to open a patch targeting a specific branch without needing to use push options.
+
+```
+$ git checkout -b feature/1 -q
+$ git commit -m "Add new feature" --allow-empty -q
+```
+
+Pushing to the magic reference:
+
+``` (stderr)
+$ git push rad HEAD:refs/for/accepted
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/for/accepted
+```
+
+We can see the patch is open:
+
+```
+$ rad patch list --open
+╭──────────────────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├──────────────────────────────────────────────────────────────────────────────────────────┤
+│ ● [..] Initialize accepted branch alice (you) - [..] +0 -0 now │
+╰──────────────────────────────────────────────────────────────────────────────────────────╯
+```
+
+Now we merge the feature into the `accepted` branch:
+
+``` (stderr)
+$ git checkout accepted
+Switched to branch 'accepted'
+```
+
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+```
+
+``` (stderr)
+$ git push rad accepted
+✓ Patch [..] merged
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] accepted -> accepted
+```
+
+We can now verify that the patch has been successfully marked as merged:
+
+```
+$ rad patch list --merged
+╭──────────────────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├──────────────────────────────────────────────────────────────────────────────────────────┤
+│ ✓ [..] Initialize accepted branch alice (you) - [..] +0 -0 now │
+╰──────────────────────────────────────────────────────────────────────────────────────────╯
+```
+
+Alternative, attempting to provide conflicting targets fails:
+
+``` (fail) (stderr)
+$ git push -o patch.target=master rad HEAD:refs/for/accepted
+error: conflicting merge targets: push option 'master' and magic ref 'accepted' specified
+error: failed to push some refs to 'rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi'
+```
+
+However, if the push option and the magic ref match, it succeeds:
+
+```
+$ git checkout -b feature/2 -q
+$ git commit -m "Add another feature" --allow-empty -q
+```
+
+``` (stderr)
+$ git push -o patch.target=accepted rad HEAD:refs/for/accepted
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/for/accepted
+```
diff --git a/crates/radicle-cli/tests/commands/patch.rs b/crates/radicle-cli/tests/commands/patch.rs
index b1bd7ebcf..24bd2b1b2 100644
--- a/crates/radicle-cli/tests/commands/patch.rs
+++ b/crates/radicle-cli/tests/commands/patch.rs
@@ -458,3 +458,8 @@ fn rad_patch_revert_isolation() {
fn rad_patch_merge_strict_destination() {
Environment::alice(["rad-init", "rad-patch-merge-strict-destination"]);
}
+
+#[test]
+fn rad_patch_magic_push() {
+ Environment::alice(["rad-init", "rad-patch-magic-push"]);
+}
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 810274db6..0f959aea5 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -114,6 +114,9 @@ pub(super) enum Error {
UnknownObjectType { oid: git::Oid },
#[error(transparent)]
FindObjects(#[from] git::canonical::error::FindObjectsError),
+ /// Conflicting merge targets.
+ #[error("conflicting merge targets: push option '{0}' and magic ref '{1}' specified")]
+ ConflictingTargets(cob::patch::TargetBranch, cob::patch::TargetBranch),
/// Default branch error.
#[error(transparent)]
DefaultBranch(#[from] radicle::identity::doc::DefaultBranchError),
@@ -212,7 +215,9 @@ impl Command {
}
enum PushAction {
- OpenPatch,
+ OpenPatch {
+ target: Option<cob::patch::TargetBranch>,
+ },
UpdatePatch {
dst: git::fmt::Qualified<'static>,
patch: patch::PatchId,
@@ -225,7 +230,17 @@ enum PushAction {
impl PushAction {
fn new(dst: &git::fmt::RefString) -> Result<Self, error::PushAction> {
if dst == &*rad::PATCHES_REFNAME {
- Ok(Self::OpenPatch)
+ Ok(Self::OpenPatch { target: None })
+ } else if let Some(stripped) = dst.as_str().strip_prefix(rad::PATCHES_FOR_PREFIX) {
+ let target = cob::patch::TargetBranch::try_from(stripped).map_err(|_| {
+ error::PushAction::InvalidRef {
+ refname: dst.clone(),
+ }
+ })?;
+
+ Ok(Self::OpenPatch {
+ target: Some(target),
+ })
} else {
let dst = git::fmt::Qualified::from_refstr(dst)
.ok_or_else(|| error::PushAction::InvalidRef {
@@ -326,17 +341,24 @@ pub(super) fn run(
let action = PushAction::new(dst)?;
match action {
- PushAction::OpenPatch => patch_open(
- src,
- &remote,
- &nid,
- &working,
- stored,
- patches,
- profile,
- opts.clone(),
- git,
- ),
+ PushAction::OpenPatch { target } => {
+ let mut push_opts = opts.clone();
+ if let Some(magic_target) = target {
+ if let cob::patch::MergeTarget::Branch(opt_target) = &opts.target
+ && magic_target != *opt_target
+ {
+ return Err(Error::ConflictingTargets(
+ opt_target.clone(),
+ magic_target,
+ ));
+ }
+ push_opts.target = cob::patch::MergeTarget::Branch(magic_target);
+ }
+
+ patch_open(
+ src, &remote, &nid, &working, stored, patches, profile, push_opts, git,
+ )
+ }
PushAction::UpdatePatch { dst, patch } => patch_update(
src,
&dst,
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index 4d1292d9d..ce8da8f5b 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -450,6 +450,12 @@ impl std::str::FromStr for TargetBranch {
}
}
+impl std::fmt::Display for TargetBranch {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}", self.0)
+ }
+}
+
impl std::ops::Deref for TargetBranch {
type Target = git::fmt::RefString;
diff --git a/crates/radicle/src/rad.rs b/crates/radicle/src/rad.rs
index 7af413b23..d0d126c37 100644
--- a/crates/radicle/src/rad.rs
+++ b/crates/radicle/src/rad.rs
@@ -28,6 +28,7 @@ pub static REMOTE_COMPONENT: LazyLock<git::fmt::Component> =
/// Refname used for pushing patches.
pub static PATCHES_REFNAME: LazyLock<git::fmt::RefString> =
LazyLock::new(|| git::fmt::refname!("refs/patches"));
+pub static PATCHES_FOR_PREFIX: &str = "refs/for/";
#[derive(Error, Debug)]
pub enum InitError {
commit 57a59e78b02863176f4771d2b8096e7167888a9d
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 14:04:31 2026 +0100
cob: Restrict `MergeTarget::Branch` to 'refs/heads' only
Introduces a `TargetBranch` type that enforces construction with a
qualified ref that starts with `refs/heads` only. This will restrict the
subject of the `push.target` for the remote-helper.
Updates the remote-helper to incorporate the new type for `push.target`.
diff --git a/crates/radicle-remote-helper/src/main.rs b/crates/radicle-remote-helper/src/main.rs
index 712133061..5fc451959 100644
--- a/crates/radicle-remote-helper/src/main.rs
+++ b/crates/radicle-remote-helper/src/main.rs
@@ -442,8 +442,10 @@ fn push_option(args: &[&str], opts: &mut Options) -> Result<(), Error> {
opts.branch = Branch::Provided(git::fmt::RefString::try_from(val)?)
}
"patch.target" => {
- opts.target =
- cob::patch::MergeTarget::Branch(git::fmt::RefString::try_from(val)?);
+ let target = val.parse::<cob::patch::TargetBranch>().map_err(|e| {
+ Error::UnsupportedPushOption(format!("invalid patch.target '{val}': {e}"))
+ })?;
+ opts.target = cob::patch::MergeTarget::Branch(target);
}
other => {
return Err(Error::UnsupportedPushOption(other.to_owned()));
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index 5da6f0d47..4d1292d9d 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -123,6 +123,12 @@ pub enum Error {
MissingIdentity,
#[error(transparent)]
DefaultBranch(#[from] DefaultBranchError),
+ /// Invalid merge target.
+ #[error("invalid merge target '{0}': must be a branch")]
+ InvalidMergeTarget(git::fmt::RefString),
+ /// Invalid reference format.
+ #[error(transparent)]
+ RefFormat(#[from] git::fmt::Error),
/// Review is empty.
#[error("empty review; verdict or summary not provided")]
EmptyReview,
@@ -402,6 +408,67 @@ impl<R: WriteRepository> Merged<'_, R> {
}
}
+/// A valid target branch for a patch
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
+#[serde(try_from = "git::fmt::RefString", into = "git::fmt::RefString")]
+pub struct TargetBranch(git::fmt::RefString);
+
+impl TryFrom<git::fmt::RefString> for TargetBranch {
+ type Error = Error;
+
+ fn try_from(refstr: git::fmt::RefString) -> Result<Self, Self::Error> {
+ if let Some(q) = git::fmt::Qualified::from_refstr(&refstr)
+ && !q.as_str().starts_with("refs/heads/")
+ {
+ return Err(Error::InvalidMergeTarget(refstr));
+ }
+
+ Ok(Self(refstr))
+ }
+}
+
+impl From<TargetBranch> for git::fmt::RefString {
+ fn from(tb: TargetBranch) -> Self {
+ tb.0
+ }
+}
+
+impl TryFrom<&str> for TargetBranch {
+ type Error = Error;
+
+ fn try_from(s: &str) -> Result<Self, Self::Error> {
+ let refstr = git::fmt::RefString::try_from(s)?;
+ Self::try_from(refstr)
+ }
+}
+
+impl std::str::FromStr for TargetBranch {
+ type Err = Error;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ Self::try_from(s)
+ }
+}
+
+impl std::ops::Deref for TargetBranch {
+ type Target = git::fmt::RefString;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
+impl TargetBranch {
+ /// Return the fully qualified branch reference.
+ pub fn qualified(&self) -> git::fmt::Qualified<'static> {
+ if let Some(q) = git::fmt::Qualified::from_refstr(self.as_refstr()) {
+ q.to_owned()
+ } else {
+ git::fmt::lit::refs_heads(&self.0).into()
+ }
+ }
+}
+
/// Where a patch is intended to be merged.
#[derive(Default, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -413,7 +480,7 @@ pub enum MergeTarget {
#[default]
Delegates,
/// Intended for a specific branch.
- Branch(git::fmt::RefString),
+ Branch(TargetBranch),
}
impl MergeTarget {
@@ -425,15 +492,12 @@ impl MergeTarget {
Ok(target)
}
MergeTarget::Branch(branch) => {
- let refname = git::fmt::Qualified::from_refstr(branch);
let doc = repo.identity_doc()?;
+
Ok(doc
.canonical_refs()?
.rules()
- .canonical(
- refname.expect("MergeTarget::Branch unable to qualify branch name"),
- repo,
- )
+ .canonical(branch.qualified(), repo)
.ok_or(RepositoryError::MissingBranchRule)?
.find_objects()?
.quorum()?)
@@ -515,34 +579,17 @@ impl Patch {
&self.target
}
- /// Resolves a target branch from an optional reference string.
- /// If the reference is omitted, it falls back to the project's default branch.
- fn resolve_target<'a>(
- target: Option<&'a git::fmt::RefString>,
- doc: &'a Doc,
- ) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
- if let Some(dest) = target {
- if let Some(q) = git::fmt::Qualified::from_refstr(dest) {
- Ok(q.to_owned())
- } else {
- Ok(git::fmt::lit::refs_heads(dest).into())
- }
- } else {
- doc.default_branch()
- }
- }
-
/// Resolves the intended target branch for this patch.
///
- /// If a custom targetwas specified, it returns that branch.
+ /// If a custom target was specified, it returns that branch.
/// Otherwise, it falls back to the project's default branch.
pub fn merge_target_branch<'a>(
&'a self,
doc: &'a Doc,
- ) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
+ ) -> Result<git::fmt::Qualified<'a>, Error> {
match &self.target {
- MergeTarget::Delegates => doc.default_branch(),
- MergeTarget::Branch(branch) => Ok(Self::resolve_target(Some(branch), doc)?),
+ MergeTarget::Delegates => Ok(doc.default_branch()?),
+ MergeTarget::Branch(branch) => Ok(branch.qualified()),
}
}
@@ -2974,6 +3021,32 @@ mod test {
(id, revision)
}
+ #[test]
+ fn test_target_branch() {
+ let unqualified = TargetBranch::try_from("master").unwrap();
+ assert_eq!(unqualified.as_str(), "master");
+ assert_eq!(unqualified.qualified().as_str(), "refs/heads/master");
+
+ let qualified = TargetBranch::try_from("refs/heads/feature/1").unwrap();
+ assert_eq!(qualified.as_str(), "refs/heads/feature/1");
+ assert_eq!(qualified.qualified().as_str(), "refs/heads/feature/1");
+
+ assert!(matches!(
+ TargetBranch::try_from("refs/tags/v1.0"),
+ Err(Error::InvalidMergeTarget(refname)) if refname.as_str() == "refs/tags/v1.0"
+ ));
+
+ assert!(matches!(
+ TargetBranch::try_from("refs/remotes/origin/master"),
+ Err(Error::InvalidMergeTarget(refname)) if refname.as_str() == "refs/remotes/origin/master"
+ ));
+
+ assert!(matches!(
+ TargetBranch::try_from("invalid branch name"),
+ Err(Error::RefFormat(_))
+ ));
+ }
+
#[test]
fn test_json_serialisation_target() {
let edit_none = Action::Edit {
@@ -2987,9 +3060,7 @@ mod test {
let edit_some = Action::Edit {
title: cob::Title::new("My patch").unwrap(),
- target: MergeTarget::Branch(
- git::fmt::RefString::try_from("refs/heads/accepted").unwrap(),
- ),
+ target: MergeTarget::Branch(TargetBranch::try_from("refs/heads/accepted").unwrap()),
};
assert_eq!(
serde_json::to_string(&edit_some).unwrap(),
@@ -3029,7 +3100,7 @@ mod test {
let patch_unqualified = Patch::new(
cob::Title::new("My patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(TargetBranch::try_from("accepted").unwrap()),
revision(),
);
assert_eq!(
@@ -3042,7 +3113,7 @@ mod test {
let patch_qualified_branch = Patch::new(
cob::Title::new("My patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ MergeTarget::Branch(TargetBranch::try_from("refs/heads/accepted").unwrap()),
revision(),
);
assert_eq!(
@@ -3052,19 +3123,6 @@ mod test {
.as_str(),
"refs/heads/accepted"
);
-
- let patch_qualified_tag = Patch::new(
- cob::Title::new("My patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
- revision(),
- );
- assert_eq!(
- patch_qualified_tag
- .merge_target_branch(&doc)
- .unwrap()
- .as_str(),
- "refs/tags/v1.0"
- );
}
#[test]
@@ -3105,7 +3163,7 @@ mod test {
let patch_unqualified = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(TargetBranch::try_from("accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3128,7 +3186,7 @@ mod test {
let patch_qualified_branch = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ MergeTarget::Branch(TargetBranch::try_from("refs/heads/accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3148,29 +3206,6 @@ mod test {
.unwrap(),
Authorization::Allow
);
-
- let patch_qualified_tag = Patch::new(
- cob::Title::new("My Patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
- (
- RevisionId(arbitrary::entry_id()),
- Revision::new(
- RevisionId(arbitrary::entry_id()),
- Author::new(alice.did()),
- String::new(),
- base,
- oid,
- env::local_time().into(),
- Default::default(),
- ),
- ),
- );
- assert_eq!(
- patch_qualified_tag
- .authorization(&merge_action, &alice.did().into(), &doc)
- .unwrap(),
- Authorization::Allow
- );
}
#[test]
@@ -3204,7 +3239,7 @@ mod test {
let doc = raw_doc.verified().unwrap();
let patch = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(TargetBranch::try_from("accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3263,7 +3298,7 @@ mod test {
let doc = raw_doc.verified().unwrap();
let patch = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(TargetBranch::try_from("accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
commit b43dab5f2543810a02433f9cdcab3c155707b633
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 12:12:14 2026 +0100
patch: Rename usage of 'destination' with 'target'
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 691332d3c..810274db6 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -878,7 +878,7 @@ where
.collect::<Vec<_>>();
for (id, patch) in merged {
- if !merge_destinations_match(pushed_dst, identity, id, &patch) {
+ if !merge_targets_match(pushed_dst, identity, id, &patch) {
continue;
}
@@ -912,21 +912,21 @@ where
Ok(())
}
-fn merge_destinations_match(
- pushed_dst: &git::fmt::Qualified,
+fn merge_targets_match(
+ pushed_target: &git::fmt::Qualified,
identity: &cob::identity::Identity,
id: cob::ObjectId,
patch: &patch::Patch,
) -> bool {
- let expected_dst = match patch.merge_destination(identity.doc()) {
+ let expected_target = match patch.merge_target_branch(identity.doc()) {
Ok(dst) => dst,
Err(e) => {
- log::warn!(target: "push", "Failed to resolve merge destination for patch {}: {}", id, e);
+ log::warn!(target: "push", "Failed to resolve merge target for patch {}: {}", id, e);
return false;
}
};
- expected_dst == *pushed_dst
+ expected_target == *pushed_target
}
/// Merge all patches that have been included in the base branch.
@@ -968,7 +968,7 @@ where
.filter_map(|patch| patch.ok())
.collect::<Vec<_>>();
for (id, patch) in open {
- if !merge_destinations_match(pushed_dst, identity, id, &patch) {
+ if !merge_targets_match(pushed_dst, identity, id, &patch) {
continue;
}
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index 1dcf655d6..5da6f0d47 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -532,11 +532,11 @@ impl Patch {
}
}
- /// Resolves the intended destination branch for this patch.
+ /// Resolves the intended target branch for this patch.
///
- /// If a custom destination was specified, it returns that branch.
+ /// If a custom targetwas specified, it returns that branch.
/// Otherwise, it falls back to the project's default branch.
- pub fn merge_destination<'a>(
+ pub fn merge_target_branch<'a>(
&'a self,
doc: &'a Doc,
) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
@@ -751,7 +751,7 @@ impl Patch {
}
Action::Assign { .. } => Authorization::Deny,
Action::Merge { .. } => {
- let expected_dest = self.merge_destination(doc)?;
+ let expected_dest = self.merge_target_branch(doc)?;
if let Ok(crefs) = doc.canonical_refs()
&& let Some((_, rule)) = crefs.rules().matches(&expected_dest).next()
@@ -1145,7 +1145,7 @@ impl Patch {
return Ok(());
};
- let expected_branch = self.merge_destination(identity)?;
+ let expected_branch = self.merge_target_branch(identity)?;
// Nb. We don't return an error in case the merge commit is not an
// ancestor of the default branch. The default branch can change
@@ -3000,10 +3000,10 @@ mod test {
}
#[test]
- fn test_merge_destination_resolution() {
+ fn test_merge_target_resolution() {
let alice = Actor::<MockSigner>::default();
let project = Project::new(
- ProjectName::from_str("test_merge_destination_resolution").unwrap(),
+ ProjectName::from_str("test_merge_target_resolution").unwrap(),
String::from(""),
BranchName::from(git::fmt::RefString::try_from("master").unwrap()),
);
@@ -3023,7 +3023,7 @@ mod test {
revision(),
);
assert_eq!(
- patch_none.merge_destination(&doc).unwrap().as_str(),
+ patch_none.merge_target_branch(&doc).unwrap().as_str(),
"refs/heads/master"
);
@@ -3033,7 +3033,10 @@ mod test {
revision(),
);
assert_eq!(
- patch_unqualified.merge_destination(&doc).unwrap().as_str(),
+ patch_unqualified
+ .merge_target_branch(&doc)
+ .unwrap()
+ .as_str(),
"refs/heads/accepted"
);
@@ -3044,7 +3047,7 @@ mod test {
);
assert_eq!(
patch_qualified_branch
- .merge_destination(&doc)
+ .merge_target_branch(&doc)
.unwrap()
.as_str(),
"refs/heads/accepted"
@@ -3057,7 +3060,7 @@ mod test {
);
assert_eq!(
patch_qualified_tag
- .merge_destination(&doc)
+ .merge_target_branch(&doc)
.unwrap()
.as_str(),
"refs/tags/v1.0"
commit 1eca72cc9cc861f36acf77157912bd9757e2d494
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 12:41:35 2026 +0100
radicle: Update changelogs
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 87202d744..70dd892be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,13 @@ COB type names and payload IDs remain unchanged for backwards compatibility.
## New Features
+- The remote helper (`git-remote-rad`) now supports the push option
+ `patch.target`. This allows users to explicitly specify a target canonical
+ reference when opening or updating a patch. For example, to open a patch that
+ targets the branch "backport", use `git push -o patch.target=refs/heads/backport`.
+ Furthermore, strict merge and revert isolation is now enforced: patches are
+ only marked as merged or reverted if the commits are pushed to the target
+ branch of the patch explicitly.
- Teach `rad patch show` to show the full commit range for each revision.
Previously, it would only show the head of the range, but not the base.
It now shows `<base>..<head>`, where the shortened OID is used when not
diff --git a/crates/radicle/CHANGELOG.md b/crates/radicle/CHANGELOG.md
index 08b1bb126..349b02d6c 100644
--- a/crates/radicle/CHANGELOG.md
+++ b/crates/radicle/CHANGELOG.md
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
+- `radicle::cob::patch::MergeTarget` has a new `Branch(RefString)` variant to support custom target branches.
+- `radicle::storage::ReadRepository` has a new required method `canonical_reference_oid` to resolve the object ID of a reference by its string name.
+
### Changed
### Removed
commit 5b983e8f7ca3a6c49ef04c9c9ac0e69dbe52431e
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu May 14 15:38:37 2026 +0100
cli/example: Update references to `patch.destination` with `patch.target`
diff --git a/crates/radicle-cli/examples/rad-cob-show.md b/crates/radicle-cli/examples/rad-cob-show.md
index aed650329..673f88788 100644
--- a/crates/radicle-cli/examples/rad-cob-show.md
+++ b/crates/radicle-cli/examples/rad-cob-show.md
@@ -72,7 +72,7 @@ We can show the patch COB too.
```
$ rad cob show --repo rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --type xyz.radicle.patch --object d1f7f869fde9fac19c1779c4c2e77e8361333f91
-{"title":"Start drafting peace treaty","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"state":{"status":"open"},"target":"delegates","destination":null,"labels":[],"merges":{},"revisions":{"d1f7f869fde9fac19c1779c4c2e77e8361333f91":{"id":"d1f7f869fde9fac19c1779c4c2e77e8361333f91","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"description":[{"author":"z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi","timestamp":1671125284000,"body":"See details.","embeds":[]}],"base":"f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354","oid":"575ed68c716d6aae81ea6b718fd9ac66a8eae532","discussion":{"comments":{},"timeline":[]},"reviews":{},"timestamp":1671125284000,"resolves":[],"reactions":[]}},"assignees":[],"timeline":["d1f7f869fde9fac19c1779c4c2e77e8361333f91"],"reviews":{}}
+{"title":"Start drafting peace treaty","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"state":{"status":"open"},"target":"delegates","labels":[],"merges":{},"revisions":{"d1f7f869fde9fac19c1779c4c2e77e8361333f91":{"id":"d1f7f869fde9fac19c1779c4c2e77e8361333f91","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"description":[{"author":"z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi","timestamp":1671125284000,"body":"See details.","embeds":[]}],"base":"f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354","oid":"575ed68c716d6aae81ea6b718fd9ac66a8eae532","discussion":{"comments":{},"timeline":[]},"reviews":{},"timestamp":1671125284000,"resolves":[],"reactions":[]}},"assignees":[],"timeline":["d1f7f869fde9fac19c1779c4c2e77e8361333f91"],"reviews":{}}
```
Finally let's update the issue and see the output of `rad cob show` also changes.
diff --git a/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md b/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md
index 91b52ce86..1b1ff1253 100644
--- a/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md
+++ b/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md
@@ -26,7 +26,7 @@ To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkE
* [new branch] accepted -> accepted
```
-Next, we create a feature branch and open a patch. We use the `patch.destination` push option to explicitly state that this patch is intended for `refs/heads/accepted` rather than the default branch (`master`).
+Next, we create a feature branch and open a patch. We use the `patch.target` push option to explicitly state that this patch is intended for `refs/heads/accepted` rather than the default branch (`master`).
``` (stderr)
$ git checkout -b feature/1
@@ -43,7 +43,7 @@ $ git commit -m "Add new feature"
```
``` (stderr)
-$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+$ git push -o patch.message="Add new feature" -o patch.target="refs/heads/accepted" rad HEAD:refs/patches
✓ Patch [..] opened
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new reference] HEAD -> refs/patches
diff --git a/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md b/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md
index 370ef003c..0eb420d4c 100644
--- a/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md
+++ b/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md
@@ -54,7 +54,7 @@ $ git commit -m "Add new feature"
create mode 100644 FEATURE.md
```
``` ~bob (stderr)
-$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+$ git push -o patch.message="Add new feature" -o patch.target="refs/heads/accepted" rad HEAD:refs/patches
✓ Patch [..] opened
✓ Synced with 1 seed(s)
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
diff --git a/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md b/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md
index bf7e65978..bf3f34f6c 100644
--- a/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md
+++ b/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md
@@ -39,7 +39,7 @@ $ git commit -m "Add new feature"
create mode 100644 FEATURE.md
```
``` (stderr)
-$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+$ git push -o patch.message="Add new feature" -o patch.target="refs/heads/accepted" rad HEAD:refs/patches
✓ Patch [..] opened
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new reference] HEAD -> refs/patches
diff --git a/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md b/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md
index 4d37dda0e..3a2bd5317 100644
--- a/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md
+++ b/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md
@@ -39,7 +39,7 @@ $ git commit -m "Add new feature"
create mode 100644 FEATURE.md
```
``` (stderr)
-$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+$ git push -o patch.message="Add new feature" -o patch.target="refs/heads/accepted" rad HEAD:refs/patches
✓ Patch [..] opened
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new reference] HEAD -> refs/patches
diff --git a/crates/radicle-cli/examples/rad-patch-revert-isolation.md b/crates/radicle-cli/examples/rad-patch-revert-isolation.md
index ed9cef5d1..1382e371f 100644
--- a/crates/radicle-cli/examples/rad-patch-revert-isolation.md
+++ b/crates/radicle-cli/examples/rad-patch-revert-isolation.md
@@ -39,7 +39,7 @@ $ git commit -m "Add new feature"
create mode 100644 FEATURE.md
```
``` (stderr)
-$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+$ git push -o patch.message="Add new feature" -o patch.target="refs/heads/accepted" rad HEAD:refs/patches
✓ Patch [..] opened
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new reference] HEAD -> refs/patches
commit d67b79002211c2d40f11362a0253bb4f7b62e907
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu May 14 15:33:31 2026 +0100
remote-helper: Replace `patch.destination` with `patch.target`
diff --git a/crates/radicle-remote-helper/src/main.rs b/crates/radicle-remote-helper/src/main.rs
index bab8dd816..712133061 100644
--- a/crates/radicle-remote-helper/src/main.rs
+++ b/crates/radicle-remote-helper/src/main.rs
@@ -207,8 +207,8 @@ struct Options {
message: cli::patch::Message,
/// Create a branch and set its upstream when opening a patch.
branch: Branch,
- /// Patch destination branch to use, when opening or updating a patch.
- destination: Option<git::fmt::RefString>,
+ /// Patch target to use, when opening or updating a patch.
+ target: cob::patch::MergeTarget,
verbosity: Verbosity,
}
@@ -441,8 +441,9 @@ fn push_option(args: &[&str], opts: &mut Options) -> Result<(), Error> {
"patch.branch" => {
opts.branch = Branch::Provided(git::fmt::RefString::try_from(val)?)
}
- "patch.destination" => {
- opts.destination = Some(git::fmt::RefString::try_from(val)?);
+ "patch.target" => {
+ opts.target =
+ cob::patch::MergeTarget::Branch(git::fmt::RefString::try_from(val)?);
}
other => {
return Err(Error::UnsupportedPushOption(other.to_owned()));
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 732f5a67f..691332d3c 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -582,25 +582,9 @@ where
term::patch::get_create_message(opts.message, &stored.backend, &base.into(), &head.into())?;
let patch = if opts.draft {
- patches.draft(
- title,
- &description,
- patch::MergeTarget::default(),
- opts.destination.clone(),
- base,
- *head,
- &[],
- )
+ patches.draft(title, &description, opts.target.clone(), base, *head, &[])
} else {
- patches.create(
- title,
- &description,
- patch::MergeTarget::default(),
- opts.destination.clone(),
- base,
- *head,
- &[],
- )
+ patches.create(title, &description, opts.target.clone(), base, *head, &[])
}?;
let action = if patch.is_draft() {
@@ -764,15 +748,7 @@ where
// and pushed, but the patch hasn't yet been updated. On push to the patch branch,
// it'll seem like the patch is "empty", because the changes are already in the base branch.
if base == *head && patch_mut.is_open() {
- let destination = patch_mut.destination().cloned();
- patch_merge(
- patch_mut,
- revision.id(),
- *head,
- destination,
- working,
- signer,
- )?;
+ patch_merge(patch_mut, revision.id(), *head, working, signer)?;
} else {
eprintln!(
"To compare against your previous revision {}, run:\n\n {}\n",
@@ -840,12 +816,11 @@ where
&& rule.allowed().contains(&me)
{
let old = old.peel_to_commit()?.id();
- let destination = Some(stripped_dst.to_ref_string());
patch_revert_all(
old.into(),
head,
- destination.clone(),
+ &stripped_dst,
&stored.backend,
&mut patches,
&identity,
@@ -853,7 +828,7 @@ where
patch_merge_all(
old.into(),
head,
- destination,
+ &stripped_dst,
working,
&mut patches,
signer,
@@ -868,7 +843,7 @@ where
fn patch_revert_all<Signer>(
old: git::Oid,
new: git::Oid,
- destination: Option<git::fmt::RefString>,
+ pushed_dst: &git::fmt::Qualified,
stored: &git::raw::Repository,
patches: &mut patch::Cache<
'_,
@@ -903,7 +878,7 @@ where
.collect::<Vec<_>>();
for (id, patch) in merged {
- if !merge_destinations_match(&destination, identity, id, &patch) {
+ if !merge_destinations_match(pushed_dst, identity, id, &patch) {
continue;
}
@@ -938,7 +913,7 @@ where
}
fn merge_destinations_match(
- destination: &Option<git::fmt::RefString>,
+ pushed_dst: &git::fmt::Qualified,
identity: &cob::identity::Identity,
id: cob::ObjectId,
patch: &patch::Patch,
@@ -950,16 +925,15 @@ fn merge_destinations_match(
return false;
}
};
- let pushed_dst = git::fmt::Qualified::from_refstr(destination.as_ref().unwrap());
- pushed_dst.is_some() && Some(expected_dst) == pushed_dst
+ expected_dst == *pushed_dst
}
/// Merge all patches that have been included in the base branch.
fn patch_merge_all<Signer>(
old: git::Oid,
new: git::Oid,
- destination: Option<git::fmt::RefString>,
+ pushed_dst: &git::fmt::Qualified,
working: &git::raw::Repository,
patches: &mut patch::Cache<
'_,
@@ -994,7 +968,7 @@ where
.filter_map(|patch| patch.ok())
.collect::<Vec<_>>();
for (id, patch) in open {
- if !merge_destinations_match(&destination, identity, id, &patch) {
+ if !merge_destinations_match(pushed_dst, identity, id, &patch) {
continue;
}
@@ -1011,14 +985,7 @@ where
for commit in &commits {
if let Some((revision_id, head)) = revisions.iter().find(|(_, head)| commit == head) {
let patch = patch::PatchMut::new(id, patch, patches);
- patch_merge(
- patch,
- *revision_id,
- *head,
- destination.clone(),
- working,
- signer,
- )?;
+ patch_merge(patch, *revision_id, *head, working, signer)?;
break;
}
@@ -1031,7 +998,6 @@ fn patch_merge<Signer, C>(
mut patch: patch::PatchMut<'_, '_, '_, storage::git::Repository, Signer, C>,
revision: patch::RevisionId,
commit: git::Oid,
- destination: Option<git::fmt::RefString>,
working: &git::raw::Repository,
signer: &Signer,
) -> Result<(), Error>
@@ -1043,7 +1009,7 @@ where
C: cob::cache::Update<patch::Patch>,
{
let (latest, _) = patch.latest();
- let merged = patch.merge(revision, commit, destination)?;
+ let merged = patch.merge(revision, commit)?;
if revision == latest {
eprintln!(
commit 9b096ccbfce2299cc046a10d53e948241537ce02
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 19 12:27:13 2026 +0100
cob: Replace ReadRepository trait with direct Repository in MergeTarget::head
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index e2f24125f..1dcf655d6 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -29,10 +29,12 @@ use crate::cob::thread::{Comment, CommentId, Edit, Reactions};
use crate::cob::{ActorId, Embed, EntryId, ObjectId, TypeName, Uri, op, store};
use crate::crypto::PublicKey;
use crate::git;
+use crate::git::canonical::Quorum;
use crate::identity::PayloadError;
use crate::identity::doc::{DefaultBranchError, DocAt, DocError};
use crate::prelude::*;
use crate::storage;
+use crate::storage::git::Repository;
pub use cache::Cache;
@@ -416,7 +418,7 @@ pub enum MergeTarget {
impl MergeTarget {
/// Get the head of the target branch.
- pub fn head<R: ReadRepository>(&self, repo: &R) -> Result<git::Oid, RepositoryError> {
+ pub fn head(&self, repo: &Repository) -> Result<git::Oid, RepositoryError> {
match self {
MergeTarget::Delegates => {
let (_, target) = repo.head()?;
@@ -424,9 +426,18 @@ impl MergeTarget {
}
MergeTarget::Branch(branch) => {
let refname = git::fmt::Qualified::from_refstr(branch);
- repo.canonical_reference_oid(
- refname.expect("MergeTarget::Branch unable to qualify branch name"),
- )
+ let doc = repo.identity_doc()?;
+ Ok(doc
+ .canonical_refs()?
+ .rules()
+ .canonical(
+ refname.expect("MergeTarget::Branch unable to qualify branch name"),
+ repo,
+ )
+ .ok_or(RepositoryError::MissingBranchRule)?
+ .find_objects()?
+ .quorum()?)
+ .map(|Quorum { object, .. }| object.id())
}
}
}
commit 07c3e51baefd9625c68bf128d6fed282dc826c2d
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu May 14 14:55:09 2026 +0100
cob: Extend 'MergeTarget' with Branch variant
Replace the standalone `destination` field in `Patch`, `Merge::Edit` and
`Action::Merge` with a new `Branch(RefString)` variant. A decision was
made to drop forward compatibility and to simplify the corresponding feature.
Serde's default external tagging will continue to represent
`MergeTarget::Delegates` as `"target": "delegates"`, maintaining
backwards compatibility. The new `Branch(RefString)` variant will
introduce `"target": {"branch": "<ref>"}`.
diff --git a/crates/radicle-cli/src/commands/patch/edit.rs b/crates/radicle-cli/src/commands/patch/edit.rs
index d85eb8031..5f495195d 100644
--- a/crates/radicle-cli/src/commands/patch/edit.rs
+++ b/crates/radicle-cli/src/commands/patch/edit.rs
@@ -57,13 +57,12 @@ where
}
let (root, _) = patch.root();
- let target = patch.target();
- let destination = patch.destination().cloned();
+ let target = patch.target().clone();
let embeds = patch.embeds().to_owned();
patch.transaction("Edit root", |tx| {
if let Some(t) = title {
- tx.edit(t, target, destination)?;
+ tx.edit(t, target)?;
}
if let Some(d) = description {
tx.edit_revision(root, d, embeds)?;
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index 145c93a40..e2f24125f 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -180,8 +180,6 @@ pub enum Action {
Edit {
title: cob::Title,
target: MergeTarget,
- #[serde(default, skip_serializing_if = "Option::is_none")]
- destination: Option<git::fmt::RefString>,
},
#[serde(rename = "label")]
Label { labels: BTreeSet<Label> },
@@ -193,8 +191,6 @@ pub enum Action {
Merge {
revision: RevisionId,
commit: git::Oid,
- #[serde(default, skip_serializing_if = "Option::is_none")]
- destination: Option<git::fmt::RefString>,
},
//
@@ -405,7 +401,7 @@ impl<R: WriteRepository> Merged<'_, R> {
}
/// Where a patch is intended to be merged.
-#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
+#[derive(Default, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum MergeTarget {
/// Intended for the default branch of the project delegates.
@@ -414,6 +410,8 @@ pub enum MergeTarget {
/// If it were otherwise, patches could become un-mergeable.
#[default]
Delegates,
+ /// Intended for a specific branch.
+ Branch(git::fmt::RefString),
}
impl MergeTarget {
@@ -424,6 +422,12 @@ impl MergeTarget {
let (_, target) = repo.head()?;
Ok(target)
}
+ MergeTarget::Branch(branch) => {
+ let refname = git::fmt::Qualified::from_refstr(branch);
+ repo.canonical_reference_oid(
+ refname.expect("MergeTarget::Branch unable to qualify branch name"),
+ )
+ }
}
}
}
@@ -440,8 +444,6 @@ pub struct Patch {
pub(super) state: State,
/// Target this patch is meant to be merged in.
pub(super) target: MergeTarget,
- /// The specific branch this patch targets, if not the default branch.
- pub(super) destination: Option<git::fmt::RefString>,
/// Associated labels.
/// Labels can be added and removed at will.
pub(super) labels: BTreeSet<Label>,
@@ -471,7 +473,6 @@ impl Patch {
pub fn new(
title: cob::Title,
target: MergeTarget,
- destination: Option<git::fmt::RefString>,
(id, revision): (RevisionId, Revision),
) -> Self {
Self {
@@ -479,7 +480,6 @@ impl Patch {
author: revision.author.clone(),
state: State::default(),
target,
- destination,
labels: BTreeSet::default(),
merges: BTreeMap::default(),
revisions: BTreeMap::from_iter([(id, Some(revision))]),
@@ -500,13 +500,8 @@ impl Patch {
}
/// Target this patch is meant to be merged in.
- pub fn target(&self) -> MergeTarget {
- self.target
- }
-
- /// The specific branch this patch targets, if not the default branch.
- pub fn destination(&self) -> Option<&git::fmt::RefString> {
- self.destination.as_ref()
+ pub fn target(&self) -> &MergeTarget {
+ &self.target
}
/// Resolves a target branch from an optional reference string.
@@ -534,7 +529,10 @@ impl Patch {
&'a self,
doc: &'a Doc,
) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
- Self::resolve_target(self.destination.as_ref(), doc)
+ match &self.target {
+ MergeTarget::Delegates => doc.default_branch(),
+ MergeTarget::Branch(branch) => Ok(Self::resolve_target(Some(branch), doc)?),
+ }
}
/// Timestamp of the first revision of the patch.
@@ -741,17 +739,11 @@ impl Patch {
}
}
Action::Assign { .. } => Authorization::Deny,
- Action::Merge { destination, .. } => {
- let dest = Self::resolve_target(destination.as_ref(), doc)?;
+ Action::Merge { .. } => {
let expected_dest = self.merge_destination(doc)?;
- // Ensure the merge action matches the patch's intended destination.
- if dest != expected_dest {
- return Ok(Authorization::Deny);
- }
-
if let Ok(crefs) = doc.canonical_refs()
- && let Some((_, rule)) = crefs.rules().matches(&dest).next()
+ && let Some((_, rule)) = crefs.rules().matches(&expected_dest).next()
{
return Ok(Authorization::from(rule.allowed().contains(&actor.into())));
}
@@ -884,14 +876,9 @@ impl Patch {
repo: &R,
) -> Result<(), Error> {
match action {
- Action::Edit {
- title,
- target,
- destination,
- } => {
+ Action::Edit { title, target } => {
self.title = title;
self.target = target;
- self.destination = destination;
}
Action::Lifecycle { state } => {
let valid = self.state == State::Draft
@@ -1141,30 +1128,21 @@ impl Patch {
}
}
}
- Action::Merge {
- revision,
- commit,
- destination,
- } => {
+ Action::Merge { revision, commit } => {
// If the revision was redacted before the merge, ignore the merge.
if lookup::revision_mut(self, &revision)?.is_none() {
return Ok(());
};
- let branch = Self::resolve_target(destination.as_ref(), identity)?;
let expected_branch = self.merge_destination(identity)?;
- if branch != expected_branch {
- return Ok(());
- }
-
// Nb. We don't return an error in case the merge commit is not an
// ancestor of the default branch. The default branch can change
// *after* the merge action is created, which is out of the control
// of the merge author. We simply skip it, which allows archiving in
// case of a rebase off the master branch, or a redaction of the
// merge.
- let Ok(head) = repo.reference_oid(&author, &branch) else {
+ let Ok(head) = repo.reference_oid(&author, &expected_branch) else {
return Ok(());
};
if commit != head && !repo.is_ancestor_of(commit, head)? {
@@ -1297,12 +1275,7 @@ impl store::Cob for Patch {
else {
return Err(Error::Init("the first action must be of type `revision`"));
};
- let Some(Action::Edit {
- title,
- target,
- destination,
- }) = actions.next()
- else {
+ let Some(Action::Edit { title, target }) = actions.next() else {
return Err(Error::Init("the second action must be of type `edit`"));
};
let revision = Revision::new(
@@ -1314,7 +1287,7 @@ impl store::Cob for Patch {
op.timestamp,
resolves,
);
- let mut patch = Patch::new(title, target, destination, (RevisionId(op.id), revision));
+ let mut patch = Patch::new(title, target, (RevisionId(op.id), revision));
for action in actions {
match patch.authorization(&action, &op.author, &doc)? {
@@ -1827,17 +1800,8 @@ impl Review {
}
impl<R: ReadRepository> store::Transaction<Patch, R> {
- pub fn edit(
- &mut self,
- title: cob::Title,
- target: MergeTarget,
- destination: Option<git::fmt::RefString>,
- ) -> Result<(), store::Error> {
- self.push(Action::Edit {
- title,
- target,
- destination,
- })
+ pub fn edit(&mut self, title: cob::Title, target: MergeTarget) -> Result<(), store::Error> {
+ self.push(Action::Edit { title, target })
}
pub fn edit_revision(
@@ -2085,17 +2049,8 @@ impl<R: ReadRepository> store::Transaction<Patch, R> {
}
/// Merge a patch revision.
- pub fn merge(
- &mut self,
- revision: RevisionId,
- commit: git::Oid,
- destination: Option<git::fmt::RefString>,
- ) -> Result<(), store::Error> {
- self.push(Action::Merge {
- revision,
- commit,
- destination,
- })
+ pub fn merge(&mut self, revision: RevisionId, commit: git::Oid) -> Result<(), store::Error> {
+ self.push(Action::Merge { revision, commit })
}
/// Update a patch with a new revision.
@@ -2195,13 +2150,8 @@ where
}
/// Edit patch metadata.
- pub fn edit(
- &mut self,
- title: cob::Title,
- target: MergeTarget,
- destination: Option<git::fmt::RefString>,
- ) -> Result<EntryId, Error> {
- self.transaction("Edit", |tx| tx.edit(title, target, destination))
+ pub fn edit(&mut self, title: cob::Title, target: MergeTarget) -> Result<EntryId, Error> {
+ self.transaction("Edit", |tx| tx.edit(title, target))
}
/// Edit revision metadata.
@@ -2426,12 +2376,9 @@ where
&mut self,
revision: RevisionId,
commit: git::Oid,
- destination: Option<git::fmt::RefString>,
) -> Result<Merged<'_, Repo>, Error> {
// TODO: Don't allow merging the same revision twice?
- let entry = self.transaction("Merge revision", |tx| {
- tx.merge(revision, commit, destination)
- })?;
+ let entry = self.transaction("Merge revision", |tx| tx.merge(revision, commit))?;
Ok(Merged {
entry,
@@ -2666,7 +2613,6 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
- destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -2682,7 +2628,6 @@ where
title,
description,
target,
- destination,
base,
oid,
labels,
@@ -2697,7 +2642,6 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
- destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -2712,7 +2656,6 @@ where
title,
description,
target,
- destination,
base,
oid,
labels,
@@ -2746,7 +2689,6 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
- destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -2762,7 +2704,7 @@ where
{
let (id, patch) = Transaction::initial("Create patch", &mut self.raw, |tx, _| {
tx.revision(description, base, oid)?;
- tx.edit(title, target, destination)?;
+ tx.edit(title, target)?;
if !labels.is_empty() {
tx.label(labels.to_owned())?;
@@ -3022,50 +2964,10 @@ mod test {
}
#[test]
- fn test_destination_forwards_compatibility() {
- #[allow(dead_code)]
- #[derive(Debug, Deserialize)]
- #[serde(tag = "type", rename_all = "camelCase")]
- enum OldAction {
- #[serde(rename = "edit")]
- Edit { title: String, target: String },
- #[serde(rename = "merge")]
- Merge { revision: String, commit: String },
- }
-
- let new_edit_json = serde_json::json!({
- "type": "edit",
- "title": "My patch",
- "target": "delegates",
- "destination": "refs/heads/accepted"
- });
-
- let new_merge_json = serde_json::json!({
- "type": "merge",
- "revision": arbitrary::entry_id().to_string(),
- "commit": arbitrary::oid().to_string(),
- "destination": "refs/heads/accepted"
- });
-
- let old_edit: OldAction = serde_json::from_value(new_edit_json).expect(
- "Old client should successfully ignore the unknown `destination` field in Edit",
- );
-
- assert!(matches!(old_edit, OldAction::Edit { .. }));
-
- let old_merge: OldAction = serde_json::from_value(new_merge_json).expect(
- "Old client should successfully ignore the unknown `destination` field in Merge",
- );
-
- assert!(matches!(old_merge, OldAction::Merge { .. }));
- }
-
- #[test]
- fn test_json_serialisation_destination() {
+ fn test_json_serialisation_target() {
let edit_none = Action::Edit {
title: cob::Title::new("My patch").unwrap(),
target: MergeTarget::Delegates,
- destination: None,
};
assert_eq!(
serde_json::to_string(&edit_none).unwrap(),
@@ -3074,13 +2976,14 @@ mod test {
let edit_some = Action::Edit {
title: cob::Title::new("My patch").unwrap(),
- target: MergeTarget::Delegates,
- destination: Some(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ target: MergeTarget::Branch(
+ git::fmt::RefString::try_from("refs/heads/accepted").unwrap(),
+ ),
};
assert_eq!(
serde_json::to_string(&edit_some).unwrap(),
String::from(
- r#"{"type":"edit","title":"My patch","target":"delegates","destination":"refs/heads/accepted"}"#
+ r#"{"type":"edit","title":"My patch","target":{"branch":"refs/heads/accepted"}}"#
)
);
}
@@ -3106,7 +3009,6 @@ mod test {
let patch_none = Patch::new(
cob::Title::new("My patch").unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
assert_eq!(
@@ -3116,8 +3018,7 @@ mod test {
let patch_unqualified = Patch::new(
cob::Title::new("My patch").unwrap(),
- MergeTarget::Delegates,
- Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
revision(),
);
assert_eq!(
@@ -3127,8 +3028,7 @@ mod test {
let patch_qualified_branch = Patch::new(
cob::Title::new("My patch").unwrap(),
- MergeTarget::Delegates,
- Some(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ MergeTarget::Branch(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
revision(),
);
assert_eq!(
@@ -3141,8 +3041,7 @@ mod test {
let patch_qualified_tag = Patch::new(
cob::Title::new("My patch").unwrap(),
- MergeTarget::Delegates,
- Some(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
+ MergeTarget::Branch(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
revision(),
);
assert_eq!(
@@ -3184,10 +3083,15 @@ mod test {
);
let doc = raw_doc.verified().unwrap();
- let patch = Patch::new(
+
+ let merge_action = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ };
+
+ let patch_unqualified = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Delegates,
- None,
+ MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3201,79 +3105,39 @@ mod test {
),
),
);
-
- let merge_unqualified = Action::Merge {
- revision: RevisionId(arbitrary::entry_id()),
- commit: oid,
- destination: Some(git::fmt::RefString::try_from("accepted").unwrap()),
- };
assert_eq!(
- patch
- .authorization(&merge_unqualified, &alice.did().into(), &doc)
+ patch_unqualified
+ .authorization(&merge_action, &alice.did().into(), &doc)
.unwrap(),
Authorization::Allow
);
- let merge_qualified_branch = Action::Merge {
- revision: RevisionId(arbitrary::entry_id()),
- commit: oid,
- destination: Some(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
- };
- assert_eq!(
- patch
- .authorization(&merge_qualified_branch, &alice.did().into(), &doc)
- .unwrap(),
- Authorization::Allow
+ let patch_qualified_branch = Patch::new(
+ cob::Title::new("My Patch").unwrap(),
+ MergeTarget::Branch(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ (
+ RevisionId(arbitrary::entry_id()),
+ Revision::new(
+ RevisionId(arbitrary::entry_id()),
+ Author::new(alice.did()),
+ String::new(),
+ base,
+ oid,
+ env::local_time().into(),
+ Default::default(),
+ ),
+ ),
);
-
- let merge_qualified_tag = Action::Merge {
- revision: RevisionId(arbitrary::entry_id()),
- commit: oid,
- destination: Some(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
- };
assert_eq!(
- patch
- .authorization(&merge_qualified_tag, &alice.did().into(), &doc)
+ patch_qualified_branch
+ .authorization(&merge_action, &alice.did().into(), &doc)
.unwrap(),
Authorization::Allow
);
- }
-
- #[test]
- fn test_patch_merge_mismatched_destination_rejected() {
- let base = git::Oid::from_str("cb18e95ada2bb38aadd8e6cef0963ce37a87add3").unwrap();
- let oid = git::Oid::from_str("518d5069f94c03427f694bb494ac1cd7d1339380").unwrap();
- let alice = Actor::<MockSigner>::default();
- let bob = Actor::<MockSigner>::default();
-
- let mut raw_doc = RawDoc::new(
- r#gen::<Project>(1),
- vec![bob.did()],
- 1,
- identity::Visibility::Public,
- );
- let rules = serde_json::json!({
- "refs/heads/accepted": {
- "allow": "delegates",
- "threshold": 1
- },
- "refs/heads/master": {
- "allow": "delegates",
- "threshold": 1
- }
- });
- let crefs = serde_json::json!({ "rules": rules });
- raw_doc.payload.insert(
- identity::doc::PayloadId::canonical_refs(),
- identity::doc::Payload::from(crefs),
- );
-
- let doc = raw_doc.verified().unwrap();
- let patch = Patch::new(
+ let patch_qualified_tag = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Delegates,
- Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3287,21 +3151,11 @@ mod test {
),
),
);
-
- // Alice is a delegate for both `accepted` and `master`.
- // But the patch is intended for `accepted`.
- // If she tries to merge it into `master`, it should be denied.
- let merge_action = Action::Merge {
- revision: RevisionId(arbitrary::entry_id()),
- commit: oid,
- destination: Some(git::fmt::RefString::try_from("master").unwrap()),
- };
-
assert_eq!(
- patch
+ patch_qualified_tag
.authorization(&merge_action, &alice.did().into(), &doc)
.unwrap(),
- Authorization::Deny
+ Authorization::Allow
);
}
@@ -3336,8 +3190,7 @@ mod test {
let doc = raw_doc.verified().unwrap();
let patch = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Delegates,
- Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3355,7 +3208,6 @@ mod test {
let merge_action = Action::Merge {
revision: RevisionId(arbitrary::entry_id()),
commit: oid,
- destination: Some(git::fmt::RefString::try_from("accepted").unwrap()),
};
assert_eq!(
@@ -3397,8 +3249,7 @@ mod test {
let doc = raw_doc.verified().unwrap();
let patch = Patch::new(
cob::Title::new("My Patch").unwrap(),
- MergeTarget::Delegates,
- Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ MergeTarget::Branch(git::fmt::RefString::try_from("accepted").unwrap()),
(
RevisionId(arbitrary::entry_id()),
Revision::new(
@@ -3416,7 +3267,6 @@ mod test {
let merge_action = Action::Merge {
revision: RevisionId(arbitrary::entry_id()),
commit: oid,
- destination: Some(git::fmt::RefString::try_from("accepted").unwrap()),
};
assert_eq!(
@@ -3492,8 +3342,7 @@ mod test {
.create(
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
- target,
- None,
+ target.clone(),
branch.base,
branch.oid,
&[],
@@ -3507,7 +3356,7 @@ mod test {
assert_eq!(patch.description(), "Blah blah blah.");
assert_eq!(patch.author().id(), &author);
assert_eq!(patch.state(), &State::Open { conflicts: vec![] });
- assert_eq!(patch.target(), target);
+ assert_eq!(patch.target(), &target);
assert_eq!(patch.version(), 0);
let (rev_id, revision) = patch.latest();
@@ -3533,7 +3382,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3566,7 +3414,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3575,7 +3422,7 @@ mod test {
let id = patch.id;
let (rid, _) = patch.revisions().next().unwrap();
- let _merge = patch.merge(rid, branch.base, None).unwrap();
+ let _merge = patch.merge(rid, branch.base).unwrap();
let patch = patches.get(&id).unwrap().unwrap();
let merges = patch.merges.iter().collect::<Vec<_>>();
@@ -3597,7 +3444,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3648,7 +3494,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3694,7 +3539,6 @@ mod test {
Action::Edit {
title: cob::Title::new("My patch").unwrap(),
target: MergeTarget::Delegates,
- destination: None,
},
]);
let a2 = alice.op::<Patch>([Action::Revision {
@@ -3715,7 +3559,6 @@ mod test {
let a5 = alice.op::<Patch>([Action::Merge {
revision: RevisionId(a2.id()),
commit: oid,
- destination: None,
}]);
let mut patch = Patch::from_ops([a1, a2], &repo).unwrap();
@@ -3747,7 +3590,6 @@ mod test {
Action::Edit {
title: cob::Title::new("Some patch").unwrap(),
target: MergeTarget::Delegates,
- destination: None,
},
],
time.into(),
@@ -3808,7 +3650,6 @@ mod test {
Action::Edit {
title: cob::Title::new("My patch").unwrap(),
target: MergeTarget::Delegates,
- destination: None,
},
]);
let a2 = alice.op::<Patch>([Action::RevisionReact {
@@ -3840,7 +3681,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3878,7 +3718,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3909,7 +3748,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -3959,7 +3797,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -4005,7 +3842,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -4054,7 +3890,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
@@ -4103,7 +3938,6 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
- None,
branch.base,
branch.oid,
&[],
diff --git a/crates/radicle/src/cob/patch/cache.rs b/crates/radicle/src/cob/patch/cache.rs
index 994dd1c0c..58532e329 100644
--- a/crates/radicle/src/cob/patch/cache.rs
+++ b/crates/radicle/src/cob/patch/cache.rs
@@ -121,7 +121,6 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
- destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -134,7 +133,6 @@ where
title,
description,
target,
- destination,
base,
oid,
labels,
@@ -150,7 +148,6 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
- destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -163,7 +160,6 @@ where
title,
description,
target,
- destination,
base,
oid,
labels,
@@ -785,7 +781,6 @@ mod tests {
let patch = Patch::new(
Title::new("Patch #1").unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
let id = ObjectId::from_str("47799cbab2eca047b6520b9fce805da42b49ecab").unwrap();
@@ -796,7 +791,6 @@ mod tests {
..Patch::new(
Title::new("Patch #2").unwrap(),
MergeTarget::Delegates,
- None,
revision(),
)
};
@@ -831,7 +825,6 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
cache
@@ -845,7 +838,6 @@ mod tests {
..Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
)
};
@@ -860,7 +852,6 @@ mod tests {
..Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
)
};
@@ -878,7 +869,6 @@ mod tests {
..Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
)
};
@@ -917,7 +907,6 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
cache
@@ -950,7 +939,6 @@ mod tests {
let mut patch = Patch::new(
Title::new(&patch_id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
(*rev_id, rev.clone()),
);
let timeline = revisions.keys().copied().collect::<Vec<_>>();
@@ -991,7 +979,6 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
cache
@@ -1023,7 +1010,6 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
cache
@@ -1054,7 +1040,6 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
- None,
revision(),
);
cache
diff --git a/crates/radicle/src/cob/test.rs b/crates/radicle/src/cob/test.rs
index bbb440e5e..e976cbb0a 100644
--- a/crates/radicle/src/cob/test.rs
+++ b/crates/radicle/src/cob/test.rs
@@ -237,7 +237,6 @@ impl<G: Signer> Actor<G> {
patch::Action::Edit {
title,
target: patch::MergeTarget::default(),
- destination: None,
},
]),
repo,
commit 956c227c029cb0965965ed2b93843aa903bfe2cd
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Wed May 13 15:36:59 2026 +0100
lint: Fixes
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 1de5cdf19..732f5a67f 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -836,29 +836,29 @@ where
// If we're pushing to a valid canonical branch, we want to see if any patches got
// merged or reverted, and if so, update the patch COB.
- if let Some((_, rule)) = rules.matches(&stripped_dst).next() {
- if rule.allowed().contains(&me) {
- let old = old.peel_to_commit()?.id();
- let destination = Some(stripped_dst.to_ref_string());
-
- patch_revert_all(
- old.into(),
- head,
- destination.clone(),
- &stored.backend,
- &mut patches,
- &identity,
- )?;
- patch_merge_all(
- old.into(),
- head,
- destination,
- working,
- &mut patches,
- signer,
- &identity,
- )?;
- }
+ if let Some((_, rule)) = rules.matches(&stripped_dst).next()
+ && rule.allowed().contains(&me)
+ {
+ let old = old.peel_to_commit()?.id();
+ let destination = Some(stripped_dst.to_ref_string());
+
+ patch_revert_all(
+ old.into(),
+ head,
+ destination.clone(),
+ &stored.backend,
+ &mut patches,
+ &identity,
+ )?;
+ patch_merge_all(
+ old.into(),
+ head,
+ destination,
+ working,
+ &mut patches,
+ signer,
+ &identity,
+ )?;
}
}
Ok(Some(ExplorerResource::Tree { oid: head }))
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index 1dcedc149..145c93a40 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -750,10 +750,10 @@ impl Patch {
return Ok(Authorization::Deny);
}
- if let Ok(crefs) = doc.canonical_refs() {
- if let Some((_, rule)) = crefs.rules().matches(&dest).next() {
- return Ok(Authorization::from(rule.allowed().contains(&actor.into())));
- }
+ if let Ok(crefs) = doc.canonical_refs()
+ && let Some((_, rule)) = crefs.rules().matches(&dest).next()
+ {
+ return Ok(Authorization::from(rule.allowed().contains(&actor.into())));
}
Authorization::Deny
commit 2c8653cacff6c5f0ab6b1d4e7195e2c3192842a7
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 12 16:41:56 2026 +0100
remote-helper: Isolate merges and reverts
Update push logic to verify the pushed branch matches the patch's
expected destination before marking it as merged or reverted.
Additionally check cref rules to ensure the pusher is authorised for the
target branch before processing the merge/revert.
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 3271b8cd9..1de5cdf19 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -114,6 +114,9 @@ pub(super) enum Error {
UnknownObjectType { oid: git::Oid },
#[error(transparent)]
FindObjects(#[from] git::canonical::error::FindObjectsError),
+ /// Default branch error.
+ #[error(transparent)]
+ DefaultBranch(#[from] radicle::identity::doc::DefaultBranchError),
/// Error sending pack from the working copy to storage.
#[error(
@@ -824,17 +827,37 @@ where
)?;
if let Some(old) = old {
- let proj = stored.project()?;
- let master = &*git::fmt::Qualified::from(git::fmt::lit::refs_heads(proj.default_branch()));
+ let identity = stored.identity()?;
+ let crefs = identity.doc().canonical_refs()?;
+ let rules = crefs.rules();
+ let me = Did::from(nid);
+
+ let stripped_dst = dst.strip_namespace();
- // If we're pushing to the project's default branch, we want to see if any patches got
+ // If we're pushing to a valid canonical branch, we want to see if any patches got
// merged or reverted, and if so, update the patch COB.
- if &*dst.strip_namespace() == master {
- let old = old.peel_to_commit()?.id();
- // Only delegates affect the merge state of the COB.
- if stored.delegates()?.contains(&nid.into()) {
- patch_revert_all(old.into(), head, &stored.backend, &mut patches)?;
- patch_merge_all(old.into(), head, working, &mut patches, signer)?;
+ if let Some((_, rule)) = rules.matches(&stripped_dst).next() {
+ if rule.allowed().contains(&me) {
+ let old = old.peel_to_commit()?.id();
+ let destination = Some(stripped_dst.to_ref_string());
+
+ patch_revert_all(
+ old.into(),
+ head,
+ destination.clone(),
+ &stored.backend,
+ &mut patches,
+ &identity,
+ )?;
+ patch_merge_all(
+ old.into(),
+ head,
+ destination,
+ working,
+ &mut patches,
+ signer,
+ &identity,
+ )?;
}
}
}
@@ -853,6 +876,7 @@ fn patch_revert_all<Signer>(
WriteAs<'_, Signer>,
cob::cache::StoreWriter,
>,
+ identity: &radicle::identity::Identity,
) -> Result<(), Error>
where
Signer: crypto::signature::Keypair<VerifyingKey = crypto::PublicKey>,
@@ -879,6 +903,10 @@ where
.collect::<Vec<_>>();
for (id, patch) in merged {
+ if !merge_destinations_match(&destination, identity, id, &patch) {
+ continue;
+ }
+
let revisions = patch
.revisions()
.map(|(id, r)| (id, r.head()))
@@ -909,6 +937,24 @@ where
Ok(())
}
+fn merge_destinations_match(
+ destination: &Option<git::fmt::RefString>,
+ identity: &cob::identity::Identity,
+ id: cob::ObjectId,
+ patch: &patch::Patch,
+) -> bool {
+ let expected_dst = match patch.merge_destination(identity.doc()) {
+ Ok(dst) => dst,
+ Err(e) => {
+ log::warn!(target: "push", "Failed to resolve merge destination for patch {}: {}", id, e);
+ return false;
+ }
+ };
+ let pushed_dst = git::fmt::Qualified::from_refstr(destination.as_ref().unwrap());
+
+ pushed_dst.is_some() && Some(expected_dst) == pushed_dst
+}
+
/// Merge all patches that have been included in the base branch.
fn patch_merge_all<Signer>(
old: git::Oid,
@@ -922,6 +968,7 @@ fn patch_merge_all<Signer>(
cob::cache::StoreWriter,
>,
signer: &Signer,
+ identity: &radicle::identity::Identity,
) -> Result<(), Error>
where
Signer: crypto::signature::Keypair<VerifyingKey = crypto::PublicKey>,
@@ -947,6 +994,10 @@ where
.filter_map(|patch| patch.ok())
.collect::<Vec<_>>();
for (id, patch) in open {
+ if !merge_destinations_match(&destination, identity, id, &patch) {
+ continue;
+ }
+
// Later revisions are more likely to be merged, so we build the list backwards.
let revisions = patch
.revisions()
commit cbb1572b58182966330c80fdb2f2ba962880f81c
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 12 16:40:44 2026 +0100
remote-helper: Add 'patch.destination'
diff --git a/crates/radicle-remote-helper/src/main.rs b/crates/radicle-remote-helper/src/main.rs
index e3c14b215..bab8dd816 100644
--- a/crates/radicle-remote-helper/src/main.rs
+++ b/crates/radicle-remote-helper/src/main.rs
@@ -207,6 +207,8 @@ struct Options {
message: cli::patch::Message,
/// Create a branch and set its upstream when opening a patch.
branch: Branch,
+ /// Patch destination branch to use, when opening or updating a patch.
+ destination: Option<git::fmt::RefString>,
verbosity: Verbosity,
}
@@ -439,6 +441,9 @@ fn push_option(args: &[&str], opts: &mut Options) -> Result<(), Error> {
"patch.branch" => {
opts.branch = Branch::Provided(git::fmt::RefString::try_from(val)?)
}
+ "patch.destination" => {
+ opts.destination = Some(git::fmt::RefString::try_from(val)?);
+ }
other => {
return Err(Error::UnsupportedPushOption(other.to_owned()));
}
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index 10e7f99df..3271b8cd9 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -583,7 +583,7 @@ where
title,
&description,
patch::MergeTarget::default(),
- None, // TODO(Ade): Implement
+ opts.destination.clone(),
base,
*head,
&[],
@@ -593,7 +593,7 @@ where
title,
&description,
patch::MergeTarget::default(),
- None, // TODO(Ade): Implement
+ opts.destination.clone(),
base,
*head,
&[],
@@ -761,7 +761,15 @@ where
// and pushed, but the patch hasn't yet been updated. On push to the patch branch,
// it'll seem like the patch is "empty", because the changes are already in the base branch.
if base == *head && patch_mut.is_open() {
- patch_merge(patch_mut, revision.id(), *head, working, signer)?;
+ let destination = patch_mut.destination().cloned();
+ patch_merge(
+ patch_mut,
+ revision.id(),
+ *head,
+ destination,
+ working,
+ signer,
+ )?;
} else {
eprintln!(
"To compare against your previous revision {}, run:\n\n {}\n",
@@ -837,6 +845,7 @@ where
fn patch_revert_all<Signer>(
old: git::Oid,
new: git::Oid,
+ destination: Option<git::fmt::RefString>,
stored: &git::raw::Repository,
patches: &mut patch::Cache<
'_,
@@ -904,6 +913,7 @@ where
fn patch_merge_all<Signer>(
old: git::Oid,
new: git::Oid,
+ destination: Option<git::fmt::RefString>,
working: &git::raw::Repository,
patches: &mut patch::Cache<
'_,
@@ -950,7 +960,14 @@ where
for commit in &commits {
if let Some((revision_id, head)) = revisions.iter().find(|(_, head)| commit == head) {
let patch = patch::PatchMut::new(id, patch, patches);
- patch_merge(patch, *revision_id, *head, working, signer)?;
+ patch_merge(
+ patch,
+ *revision_id,
+ *head,
+ destination.clone(),
+ working,
+ signer,
+ )?;
break;
}
@@ -963,6 +980,7 @@ fn patch_merge<Signer, C>(
mut patch: patch::PatchMut<'_, '_, '_, storage::git::Repository, Signer, C>,
revision: patch::RevisionId,
commit: git::Oid,
+ destination: Option<git::fmt::RefString>,
working: &git::raw::Repository,
signer: &Signer,
) -> Result<(), Error>
@@ -974,7 +992,7 @@ where
C: cob::cache::Update<patch::Patch>,
{
let (latest, _) = patch.latest();
- let merged = patch.merge(revision, commit, None)?; // TODO(Ade): Implement
+ let merged = patch.merge(revision, commit, destination)?;
if revision == latest {
eprintln!(
commit 941ef722814623c0138c90d6192def94a01e457c
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 12 16:25:16 2026 +0100
cob: Enforce patch destination matching on merge
Updates patch COB authorization to reflect merges if the destination
branch does not match the intended target. Additionally updates `apply`
logic to ignore merges into mismatched branches.
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index 024640a46..1dcedc149 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -2,7 +2,6 @@ pub mod cache;
mod actions;
pub use actions::ReviewEdit;
-use radicle_git_ref_format::RefStr;
mod encoding;
@@ -744,6 +743,12 @@ impl Patch {
Action::Assign { .. } => Authorization::Deny,
Action::Merge { destination, .. } => {
let dest = Self::resolve_target(destination.as_ref(), doc)?;
+ let expected_dest = self.merge_destination(doc)?;
+
+ // Ensure the merge action matches the patch's intended destination.
+ if dest != expected_dest {
+ return Ok(Authorization::Deny);
+ }
if let Ok(crefs) = doc.canonical_refs() {
if let Some((_, rule)) = crefs.rules().matches(&dest).next() {
@@ -1147,6 +1152,11 @@ impl Patch {
};
let branch = Self::resolve_target(destination.as_ref(), identity)?;
+ let expected_branch = self.merge_destination(identity)?;
+
+ if branch != expected_branch {
+ return Ok(());
+ }
// Nb. We don't return an error in case the merge commit is not an
// ancestor of the default branch. The default branch can change
@@ -3229,6 +3239,72 @@ mod test {
);
}
+ #[test]
+ fn test_patch_merge_mismatched_destination_rejected() {
+ let base = git::Oid::from_str("cb18e95ada2bb38aadd8e6cef0963ce37a87add3").unwrap();
+ let oid = git::Oid::from_str("518d5069f94c03427f694bb494ac1cd7d1339380").unwrap();
+ let alice = Actor::<MockSigner>::default();
+ let bob = Actor::<MockSigner>::default();
+
+ let mut raw_doc = RawDoc::new(
+ r#gen::<Project>(1),
+ vec![bob.did()],
+ 1,
+ identity::Visibility::Public,
+ );
+
+ let rules = serde_json::json!({
+ "refs/heads/accepted": {
+ "allow": "delegates",
+ "threshold": 1
+ },
+ "refs/heads/master": {
+ "allow": "delegates",
+ "threshold": 1
+ }
+ });
+ let crefs = serde_json::json!({ "rules": rules });
+ raw_doc.payload.insert(
+ identity::doc::PayloadId::canonical_refs(),
+ identity::doc::Payload::from(crefs),
+ );
+
+ let doc = raw_doc.verified().unwrap();
+ let patch = Patch::new(
+ cob::Title::new("My Patch").unwrap(),
+ MergeTarget::Delegates,
+ Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ (
+ RevisionId(arbitrary::entry_id()),
+ Revision::new(
+ RevisionId(arbitrary::entry_id()),
+ Author::new(alice.did()),
+ String::new(),
+ base,
+ oid,
+ env::local_time().into(),
+ Default::default(),
+ ),
+ ),
+ );
+
+ // Alice is a delegate for both `accepted` and `master`.
+ // But the patch is intended for `accepted`.
+ // If she tries to merge it into `master`, it should be denied.
+ let merge_action = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ destination: Some(git::fmt::RefString::try_from("master").unwrap()),
+ };
+
+ assert_eq!(
+ patch
+ .authorization(&merge_action, &alice.did().into(), &doc)
+ .unwrap(),
+ Authorization::Deny
+ );
+ }
+
#[test]
fn test_patch_merge_custom_destination_authorized() {
let base = git::Oid::from_str("cb18e95ada2bb38aadd8e6cef0963ce37a87add3").unwrap();
commit 7da057c7db4889596ced8f06c5ec41694c4f1d7e
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 12 16:20:04 2026 +0100
cob: Support qualified and unqualified refs for patch destination
Handles both fully qualified references `refs/heads/main`,
`refs/tags/v1.0` and unqualified branch names `main`, `v1.0`. Falls back
to default branch when omitted.
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index c9d852897..024640a46 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -510,6 +510,23 @@ impl Patch {
self.destination.as_ref()
}
+ /// Resolves a target branch from an optional reference string.
+ /// If the reference is omitted, it falls back to the project's default branch.
+ fn resolve_target<'a>(
+ target: Option<&'a git::fmt::RefString>,
+ doc: &'a Doc,
+ ) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
+ if let Some(dest) = target {
+ if let Some(q) = git::fmt::Qualified::from_refstr(dest) {
+ Ok(q.to_owned())
+ } else {
+ Ok(git::fmt::lit::refs_heads(dest).into())
+ }
+ } else {
+ doc.default_branch()
+ }
+ }
+
/// Resolves the intended destination branch for this patch.
///
/// If a custom destination was specified, it returns that branch.
@@ -518,11 +535,7 @@ impl Patch {
&'a self,
doc: &'a Doc,
) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
- if let Some(dest) = &self.destination {
- Ok(git::fmt::lit::refs_heads(strip_refs_heads(dest)).into())
- } else {
- doc.default_branch()
- }
+ Self::resolve_target(self.destination.as_ref(), doc)
}
/// Timestamp of the first revision of the patch.
@@ -730,11 +743,7 @@ impl Patch {
}
Action::Assign { .. } => Authorization::Deny,
Action::Merge { destination, .. } => {
- let dest = if let Some(d) = destination {
- git::fmt::lit::refs_heads(strip_refs_heads(d)).into()
- } else {
- doc.default_branch()?
- };
+ let dest = Self::resolve_target(destination.as_ref(), doc)?;
if let Ok(crefs) = doc.canonical_refs() {
if let Some((_, rule)) = crefs.rules().matches(&dest).next() {
@@ -1137,12 +1146,7 @@ impl Patch {
return Ok(());
};
- let branch = if let Some(d) = &destination {
- git::fmt::lit::refs_heads(strip_refs_heads(d)).into()
- } else {
- let proj = identity.project()?;
- git::refs::branch(proj.default_branch())
- };
+ let branch = Self::resolve_target(destination.as_ref(), identity)?;
// Nb. We don't return an error in case the merge commit is not an
// ancestor of the default branch. The default branch can change
@@ -1261,12 +1265,6 @@ impl Patch {
}
}
-/// Strips `refs/heads` prefix
-fn strip_refs_heads(d: &radicle_git_ref_format::RefString) -> &RefStr {
- d.strip_prefix(git::fmt::refname!("refs/heads"))
- .unwrap_or(d.as_refstr())
-}
-
impl cob::store::CobWithType for Patch {
fn type_name() -> &'static TypeName {
&TYPENAME
@@ -2970,6 +2968,7 @@ mod test {
use crate::cob::common::CodeRange;
use crate::cob::test::Actor;
use crate::crypto::test::signer::MockSigner;
+ use crate::git::BranchName;
use crate::identity;
use crate::identity::doc::RawDoc;
use crate::identity::project::{Project, ProjectName};
@@ -3105,16 +3104,129 @@ mod test {
"refs/heads/master"
);
- let patch_some = Patch::new(
+ let patch_unqualified = Patch::new(
cob::Title::new("My patch").unwrap(),
MergeTarget::Delegates,
Some(git::fmt::RefString::try_from("accepted").unwrap()),
revision(),
);
assert_eq!(
- patch_some.merge_destination(&doc).unwrap().as_str(),
+ patch_unqualified.merge_destination(&doc).unwrap().as_str(),
"refs/heads/accepted"
);
+
+ let patch_qualified_branch = Patch::new(
+ cob::Title::new("My patch").unwrap(),
+ MergeTarget::Delegates,
+ Some(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ revision(),
+ );
+ assert_eq!(
+ patch_qualified_branch
+ .merge_destination(&doc)
+ .unwrap()
+ .as_str(),
+ "refs/heads/accepted"
+ );
+
+ let patch_qualified_tag = Patch::new(
+ cob::Title::new("My patch").unwrap(),
+ MergeTarget::Delegates,
+ Some(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
+ revision(),
+ );
+ assert_eq!(
+ patch_qualified_tag
+ .merge_destination(&doc)
+ .unwrap()
+ .as_str(),
+ "refs/tags/v1.0"
+ );
+ }
+
+ #[test]
+ fn test_patch_merge_authorization_ref_formats() {
+ let base = git::Oid::from_str("cb18e95ada2bb38aadd8e6cef0963ce37a87add3").unwrap();
+ let oid = git::Oid::from_str("518d5069f94c03427f694bb494ac1cd7d1339380").unwrap();
+ let alice = Actor::<MockSigner>::default();
+
+ let mut raw_doc = RawDoc::new(
+ r#gen::<Project>(1),
+ vec![alice.did()],
+ 1,
+ identity::Visibility::Public,
+ );
+
+ let rules = serde_json::json!({
+ "refs/heads/accepted": {
+ "allow": "delegates",
+ "threshold": 1
+ },
+ "refs/tags/v1.0": {
+ "allow": "delegates",
+ "threshold": 1
+ }
+ });
+ let crefs = serde_json::json!({ "rules": rules });
+ raw_doc.payload.insert(
+ identity::doc::PayloadId::canonical_refs(),
+ identity::doc::Payload::from(crefs),
+ );
+
+ let doc = raw_doc.verified().unwrap();
+ let patch = Patch::new(
+ cob::Title::new("My Patch").unwrap(),
+ MergeTarget::Delegates,
+ None,
+ (
+ RevisionId(arbitrary::entry_id()),
+ Revision::new(
+ RevisionId(arbitrary::entry_id()),
+ Author::new(alice.did()),
+ String::new(),
+ base,
+ oid,
+ env::local_time().into(),
+ Default::default(),
+ ),
+ ),
+ );
+
+ let merge_unqualified = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ destination: Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ };
+ assert_eq!(
+ patch
+ .authorization(&merge_unqualified, &alice.did().into(), &doc)
+ .unwrap(),
+ Authorization::Allow
+ );
+
+ let merge_qualified_branch = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ destination: Some(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ };
+ assert_eq!(
+ patch
+ .authorization(&merge_qualified_branch, &alice.did().into(), &doc)
+ .unwrap(),
+ Authorization::Allow
+ );
+
+ let merge_qualified_tag = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ destination: Some(git::fmt::RefString::try_from("refs/tags/v1.0").unwrap()),
+ };
+ assert_eq!(
+ patch
+ .authorization(&merge_qualified_tag, &alice.did().into(), &doc)
+ .unwrap(),
+ Authorization::Allow
+ );
}
#[test]
commit 5e806c18807bc247dce3c50cf34e8620e8539775
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 12 13:41:11 2026 +0100
cob: Replace 'git2::Oid' -> 'git::raw::Oid'
diff --git a/crates/radicle/src/cob/test.rs b/crates/radicle/src/cob/test.rs
index c34ba3920..bbb440e5e 100644
--- a/crates/radicle/src/cob/test.rs
+++ b/crates/radicle/src/cob/test.rs
@@ -11,7 +11,7 @@ use crate::cob::store::encoding;
use crate::cob::{Entry, History, Manifest, Timestamp, Version};
use crate::cob::{Title, patch};
use crate::crypto::Signer;
-use crate::git::Oid;
+use crate::git::{self, Oid};
use crate::node::device::Device;
use crate::prelude::Did;
use crate::profile::env;
@@ -268,7 +268,7 @@ fn encoded<T: Cob, G: Signer>(
email: signer.public_key().to_human(),
time: Time::new(timestamp.as_secs() as i64, 0),
};
- let commit = CommitData::<git2::Oid, git2::Oid>::new::<_, _, OwnedTrailer>(
+ let commit = CommitData::<git::raw::Oid, git::raw::Oid>::new::<_, _, OwnedTrailer>(
oid,
parents,
author.clone(),
commit d934ed23836052292bd56381e89f2ed73014b8bc
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue May 12 13:36:06 2026 +0100
cob: Add `destination` field to patch actions for custom merge targets
This introduces an optional `destination` field to `Action::Edit` and
`Action::Merge` in the Patch COB, allowing patches to explicitly target
non-default cref branches.
Explicitly storing the destination in the COB ledger is necessary
because inferring it dynamically from Git ancestry is problematic:
- A commit might exist in multiple cref branches making it
ambiguous.
- Different cref branches can have different delegate rules and
thresholds.
- If a branch is deleted or force-pushed, inference would fail during
COB replay, causing merged patches to silently revert to an open state.
This schema change should be both forwards and backwards compatible:
- Backwards because new clients reading old patches will de-serialise the
missing field as `None` and fall back to the default branch.
- Forwards because old clients reading new patches will ignore the
unknown `destination` JSON field. They will degrade into assuming the
default branch, leaving a branch with a destination in the `open`
state locally if the commit is not in the default branch.
diff --git a/crates/radicle-cli/examples/rad-cob-show.md b/crates/radicle-cli/examples/rad-cob-show.md
index 673f88788..aed650329 100644
--- a/crates/radicle-cli/examples/rad-cob-show.md
+++ b/crates/radicle-cli/examples/rad-cob-show.md
@@ -72,7 +72,7 @@ We can show the patch COB too.
```
$ rad cob show --repo rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --type xyz.radicle.patch --object d1f7f869fde9fac19c1779c4c2e77e8361333f91
-{"title":"Start drafting peace treaty","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"state":{"status":"open"},"target":"delegates","labels":[],"merges":{},"revisions":{"d1f7f869fde9fac19c1779c4c2e77e8361333f91":{"id":"d1f7f869fde9fac19c1779c4c2e77e8361333f91","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"description":[{"author":"z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi","timestamp":1671125284000,"body":"See details.","embeds":[]}],"base":"f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354","oid":"575ed68c716d6aae81ea6b718fd9ac66a8eae532","discussion":{"comments":{},"timeline":[]},"reviews":{},"timestamp":1671125284000,"resolves":[],"reactions":[]}},"assignees":[],"timeline":["d1f7f869fde9fac19c1779c4c2e77e8361333f91"],"reviews":{}}
+{"title":"Start drafting peace treaty","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"state":{"status":"open"},"target":"delegates","destination":null,"labels":[],"merges":{},"revisions":{"d1f7f869fde9fac19c1779c4c2e77e8361333f91":{"id":"d1f7f869fde9fac19c1779c4c2e77e8361333f91","author":{"id":"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"},"description":[{"author":"z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi","timestamp":1671125284000,"body":"See details.","embeds":[]}],"base":"f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354","oid":"575ed68c716d6aae81ea6b718fd9ac66a8eae532","discussion":{"comments":{},"timeline":[]},"reviews":{},"timestamp":1671125284000,"resolves":[],"reactions":[]}},"assignees":[],"timeline":["d1f7f869fde9fac19c1779c4c2e77e8361333f91"],"reviews":{}}
```
Finally let's update the issue and see the output of `rad cob show` also changes.
diff --git a/crates/radicle-cli/src/commands/patch/edit.rs b/crates/radicle-cli/src/commands/patch/edit.rs
index ccaa32ed7..d85eb8031 100644
--- a/crates/radicle-cli/src/commands/patch/edit.rs
+++ b/crates/radicle-cli/src/commands/patch/edit.rs
@@ -58,11 +58,12 @@ where
let (root, _) = patch.root();
let target = patch.target();
+ let destination = patch.destination().cloned();
let embeds = patch.embeds().to_owned();
patch.transaction("Edit root", |tx| {
if let Some(t) = title {
- tx.edit(t, target)?;
+ tx.edit(t, target, destination)?;
}
if let Some(d) = description {
tx.edit_revision(root, d, embeds)?;
diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs
index ec6b25b49..10e7f99df 100644
--- a/crates/radicle-remote-helper/src/push.rs
+++ b/crates/radicle-remote-helper/src/push.rs
@@ -583,6 +583,7 @@ where
title,
&description,
patch::MergeTarget::default(),
+ None, // TODO(Ade): Implement
base,
*head,
&[],
@@ -592,6 +593,7 @@ where
title,
&description,
patch::MergeTarget::default(),
+ None, // TODO(Ade): Implement
base,
*head,
&[],
@@ -972,7 +974,7 @@ where
C: cob::cache::Update<patch::Patch>,
{
let (latest, _) = patch.latest();
- let merged = patch.merge(revision, commit)?;
+ let merged = patch.merge(revision, commit, None)?; // TODO(Ade): Implement
if revision == latest {
eprintln!(
diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs
index aef44798f..c9d852897 100644
--- a/crates/radicle/src/cob/patch.rs
+++ b/crates/radicle/src/cob/patch.rs
@@ -2,6 +2,7 @@ pub mod cache;
mod actions;
pub use actions::ReviewEdit;
+use radicle_git_ref_format::RefStr;
mod encoding;
@@ -30,7 +31,7 @@ use crate::cob::{ActorId, Embed, EntryId, ObjectId, TypeName, Uri, op, store};
use crate::crypto::PublicKey;
use crate::git;
use crate::identity::PayloadError;
-use crate::identity::doc::{DocAt, DocError};
+use crate::identity::doc::{DefaultBranchError, DocAt, DocError};
use crate::prelude::*;
use crate::storage;
@@ -119,6 +120,8 @@ pub enum Error {
/// Identity document is missing.
#[error("missing identity document")]
MissingIdentity,
+ #[error(transparent)]
+ DefaultBranch(#[from] DefaultBranchError),
/// Review is empty.
#[error("empty review; verdict or summary not provided")]
EmptyReview,
@@ -178,6 +181,8 @@ pub enum Action {
Edit {
title: cob::Title,
target: MergeTarget,
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ destination: Option<git::fmt::RefString>,
},
#[serde(rename = "label")]
Label { labels: BTreeSet<Label> },
@@ -189,6 +194,8 @@ pub enum Action {
Merge {
revision: RevisionId,
commit: git::Oid,
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ destination: Option<git::fmt::RefString>,
},
//
@@ -434,6 +441,8 @@ pub struct Patch {
pub(super) state: State,
/// Target this patch is meant to be merged in.
pub(super) target: MergeTarget,
+ /// The specific branch this patch targets, if not the default branch.
+ pub(super) destination: Option<git::fmt::RefString>,
/// Associated labels.
/// Labels can be added and removed at will.
pub(super) labels: BTreeSet<Label>,
@@ -463,6 +472,7 @@ impl Patch {
pub fn new(
title: cob::Title,
target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
(id, revision): (RevisionId, Revision),
) -> Self {
Self {
@@ -470,6 +480,7 @@ impl Patch {
author: revision.author.clone(),
state: State::default(),
target,
+ destination,
labels: BTreeSet::default(),
merges: BTreeMap::default(),
revisions: BTreeMap::from_iter([(id, Some(revision))]),
@@ -494,6 +505,26 @@ impl Patch {
self.target
}
+ /// The specific branch this patch targets, if not the default branch.
+ pub fn destination(&self) -> Option<&git::fmt::RefString> {
+ self.destination.as_ref()
+ }
+
+ /// Resolves the intended destination branch for this patch.
+ ///
+ /// If a custom destination was specified, it returns that branch.
+ /// Otherwise, it falls back to the project's default branch.
+ pub fn merge_destination<'a>(
+ &'a self,
+ doc: &'a Doc,
+ ) -> Result<git::fmt::Qualified<'a>, DefaultBranchError> {
+ if let Some(dest) = &self.destination {
+ Ok(git::fmt::lit::refs_heads(strip_refs_heads(dest)).into())
+ } else {
+ doc.default_branch()
+ }
+ }
+
/// Timestamp of the first revision of the patch.
pub fn timestamp(&self) -> Timestamp {
self.updates()
@@ -698,9 +729,21 @@ impl Patch {
}
}
Action::Assign { .. } => Authorization::Deny,
- Action::Merge { .. } => match self.target() {
- MergeTarget::Delegates => Authorization::Deny,
- },
+ Action::Merge { destination, .. } => {
+ let dest = if let Some(d) = destination {
+ git::fmt::lit::refs_heads(strip_refs_heads(d)).into()
+ } else {
+ doc.default_branch()?
+ };
+
+ if let Ok(crefs) = doc.canonical_refs() {
+ if let Some((_, rule)) = crefs.rules().matches(&dest).next() {
+ return Ok(Authorization::from(rule.allowed().contains(&actor.into())));
+ }
+ }
+
+ Authorization::Deny
+ }
// Anyone can submit a review.
Action::Review { .. } => Authorization::Allow,
Action::ReviewRedact { review, .. } => {
@@ -827,9 +870,14 @@ impl Patch {
repo: &R,
) -> Result<(), Error> {
match action {
- Action::Edit { title, target } => {
+ Action::Edit {
+ title,
+ target,
+ destination,
+ } => {
self.title = title;
self.target = target;
+ self.destination = destination;
}
Action::Lifecycle { state } => {
let valid = self.state == State::Draft
@@ -1079,30 +1127,36 @@ impl Patch {
}
}
}
- Action::Merge { revision, commit } => {
+ Action::Merge {
+ revision,
+ commit,
+ destination,
+ } => {
// If the revision was redacted before the merge, ignore the merge.
if lookup::revision_mut(self, &revision)?.is_none() {
return Ok(());
};
- match self.target() {
- MergeTarget::Delegates => {
- let proj = identity.project()?;
- let branch = git::refs::branch(proj.default_branch());
-
- // Nb. We don't return an error in case the merge commit is not an
- // ancestor of the default branch. The default branch can change
- // *after* the merge action is created, which is out of the control
- // of the merge author. We simply skip it, which allows archiving in
- // case of a rebase off the master branch, or a redaction of the
- // merge.
- let Ok(head) = repo.reference_oid(&author, &branch) else {
- return Ok(());
- };
- if commit != head && !repo.is_ancestor_of(commit, head)? {
- return Ok(());
- }
- }
+
+ let branch = if let Some(d) = &destination {
+ git::fmt::lit::refs_heads(strip_refs_heads(d)).into()
+ } else {
+ let proj = identity.project()?;
+ git::refs::branch(proj.default_branch())
+ };
+
+ // Nb. We don't return an error in case the merge commit is not an
+ // ancestor of the default branch. The default branch can change
+ // *after* the merge action is created, which is out of the control
+ // of the merge author. We simply skip it, which allows archiving in
+ // case of a rebase off the master branch, or a redaction of the
+ // merge.
+ let Ok(head) = repo.reference_oid(&author, &branch) else {
+ return Ok(());
+ };
+ if commit != head && !repo.is_ancestor_of(commit, head)? {
+ return Ok(());
}
+
self.merges.insert(
author,
Merge {
@@ -1207,6 +1261,12 @@ impl Patch {
}
}
+/// Strips `refs/heads` prefix
+fn strip_refs_heads(d: &radicle_git_ref_format::RefString) -> &RefStr {
+ d.strip_prefix(git::fmt::refname!("refs/heads"))
+ .unwrap_or(d.as_refstr())
+}
+
impl cob::store::CobWithType for Patch {
fn type_name() -> &'static TypeName {
&TYPENAME
@@ -1229,7 +1289,12 @@ impl store::Cob for Patch {
else {
return Err(Error::Init("the first action must be of type `revision`"));
};
- let Some(Action::Edit { title, target }) = actions.next() else {
+ let Some(Action::Edit {
+ title,
+ target,
+ destination,
+ }) = actions.next()
+ else {
return Err(Error::Init("the second action must be of type `edit`"));
};
let revision = Revision::new(
@@ -1241,7 +1306,7 @@ impl store::Cob for Patch {
op.timestamp,
resolves,
);
- let mut patch = Patch::new(title, target, (RevisionId(op.id), revision));
+ let mut patch = Patch::new(title, target, destination, (RevisionId(op.id), revision));
for action in actions {
match patch.authorization(&action, &op.author, &doc)? {
@@ -1754,8 +1819,17 @@ impl Review {
}
impl<R: ReadRepository> store::Transaction<Patch, R> {
- pub fn edit(&mut self, title: cob::Title, target: MergeTarget) -> Result<(), store::Error> {
- self.push(Action::Edit { title, target })
+ pub fn edit(
+ &mut self,
+ title: cob::Title,
+ target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
+ ) -> Result<(), store::Error> {
+ self.push(Action::Edit {
+ title,
+ target,
+ destination,
+ })
}
pub fn edit_revision(
@@ -2003,8 +2077,17 @@ impl<R: ReadRepository> store::Transaction<Patch, R> {
}
/// Merge a patch revision.
- pub fn merge(&mut self, revision: RevisionId, commit: git::Oid) -> Result<(), store::Error> {
- self.push(Action::Merge { revision, commit })
+ pub fn merge(
+ &mut self,
+ revision: RevisionId,
+ commit: git::Oid,
+ destination: Option<git::fmt::RefString>,
+ ) -> Result<(), store::Error> {
+ self.push(Action::Merge {
+ revision,
+ commit,
+ destination,
+ })
}
/// Update a patch with a new revision.
@@ -2104,8 +2187,13 @@ where
}
/// Edit patch metadata.
- pub fn edit(&mut self, title: cob::Title, target: MergeTarget) -> Result<EntryId, Error> {
- self.transaction("Edit", |tx| tx.edit(title, target))
+ pub fn edit(
+ &mut self,
+ title: cob::Title,
+ target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
+ ) -> Result<EntryId, Error> {
+ self.transaction("Edit", |tx| tx.edit(title, target, destination))
}
/// Edit revision metadata.
@@ -2330,9 +2418,12 @@ where
&mut self,
revision: RevisionId,
commit: git::Oid,
+ destination: Option<git::fmt::RefString>,
) -> Result<Merged<'_, Repo>, Error> {
// TODO: Don't allow merging the same revision twice?
- let entry = self.transaction("Merge revision", |tx| tx.merge(revision, commit))?;
+ let entry = self.transaction("Merge revision", |tx| {
+ tx.merge(revision, commit, destination)
+ })?;
Ok(Merged {
entry,
@@ -2567,6 +2658,7 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -2582,6 +2674,7 @@ where
title,
description,
target,
+ destination,
base,
oid,
labels,
@@ -2596,6 +2689,7 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -2610,6 +2704,7 @@ where
title,
description,
target,
+ destination,
base,
oid,
labels,
@@ -2643,6 +2738,7 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -2658,7 +2754,7 @@ where
{
let (id, patch) = Transaction::initial("Create patch", &mut self.raw, |tx, _| {
tx.revision(description, base, oid)?;
- tx.edit(title, target)?;
+ tx.edit(title, target, destination)?;
if !labels.is_empty() {
tx.label(labels.to_owned())?;
@@ -2875,6 +2971,8 @@ mod test {
use crate::cob::test::Actor;
use crate::crypto::test::signer::MockSigner;
use crate::identity;
+ use crate::identity::doc::RawDoc;
+ use crate::identity::project::{Project, ProjectName};
use crate::patch::cache::Patches as _;
use crate::profile::env;
use crate::test;
@@ -2884,6 +2982,263 @@ mod test {
use cob::migrate;
+ fn revision() -> (RevisionId, Revision) {
+ let author = arbitrary::r#gen::<Did>(1);
+ let description = arbitrary::r#gen::<String>(1);
+ let base = arbitrary::oid();
+ let oid = arbitrary::oid();
+ let timestamp = env::local_time();
+ let resolves = BTreeSet::new();
+ let id = RevisionId::from(arbitrary::oid());
+ let mut revision = Revision::new(
+ id,
+ Author { id: author },
+ description,
+ base,
+ oid,
+ timestamp.into(),
+ resolves,
+ );
+ let comment = Comment::new(
+ *author,
+ "#1 comment".to_string(),
+ None,
+ None,
+ vec![],
+ timestamp.into(),
+ );
+ let thread = Thread::new(arbitrary::oid(), comment);
+ revision.discussion = thread;
+ (id, revision)
+ }
+
+ #[test]
+ fn test_destination_forwards_compatibility() {
+ #[allow(dead_code)]
+ #[derive(Debug, Deserialize)]
+ #[serde(tag = "type", rename_all = "camelCase")]
+ enum OldAction {
+ #[serde(rename = "edit")]
+ Edit { title: String, target: String },
+ #[serde(rename = "merge")]
+ Merge { revision: String, commit: String },
+ }
+
+ let new_edit_json = serde_json::json!({
+ "type": "edit",
+ "title": "My patch",
+ "target": "delegates",
+ "destination": "refs/heads/accepted"
+ });
+
+ let new_merge_json = serde_json::json!({
+ "type": "merge",
+ "revision": arbitrary::entry_id().to_string(),
+ "commit": arbitrary::oid().to_string(),
+ "destination": "refs/heads/accepted"
+ });
+
+ let old_edit: OldAction = serde_json::from_value(new_edit_json).expect(
+ "Old client should successfully ignore the unknown `destination` field in Edit",
+ );
+
+ assert!(matches!(old_edit, OldAction::Edit { .. }));
+
+ let old_merge: OldAction = serde_json::from_value(new_merge_json).expect(
+ "Old client should successfully ignore the unknown `destination` field in Merge",
+ );
+
+ assert!(matches!(old_merge, OldAction::Merge { .. }));
+ }
+
+ #[test]
+ fn test_json_serialisation_destination() {
+ let edit_none = Action::Edit {
+ title: cob::Title::new("My patch").unwrap(),
+ target: MergeTarget::Delegates,
+ destination: None,
+ };
+ assert_eq!(
+ serde_json::to_string(&edit_none).unwrap(),
+ String::from(r#"{"type":"edit","title":"My patch","target":"delegates"}"#)
+ );
+
+ let edit_some = Action::Edit {
+ title: cob::Title::new("My patch").unwrap(),
+ target: MergeTarget::Delegates,
+ destination: Some(git::fmt::RefString::try_from("refs/heads/accepted").unwrap()),
+ };
+ assert_eq!(
+ serde_json::to_string(&edit_some).unwrap(),
+ String::from(
+ r#"{"type":"edit","title":"My patch","target":"delegates","destination":"refs/heads/accepted"}"#
+ )
+ );
+ }
+
+ #[test]
+ fn test_merge_destination_resolution() {
+ let alice = Actor::<MockSigner>::default();
+ let project = Project::new(
+ ProjectName::from_str("test_merge_destination_resolution").unwrap(),
+ String::from(""),
+ BranchName::from(git::fmt::RefString::try_from("master").unwrap()),
+ );
+
+ let doc = RawDoc::new(
+ project.unwrap(),
+ vec![alice.did()],
+ 1,
+ identity::Visibility::Public,
+ )
+ .verified()
+ .unwrap();
+
+ let patch_none = Patch::new(
+ cob::Title::new("My patch").unwrap(),
+ MergeTarget::Delegates,
+ None,
+ revision(),
+ );
+ assert_eq!(
+ patch_none.merge_destination(&doc).unwrap().as_str(),
+ "refs/heads/master"
+ );
+
+ let patch_some = Patch::new(
+ cob::Title::new("My patch").unwrap(),
+ MergeTarget::Delegates,
+ Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ revision(),
+ );
+ assert_eq!(
+ patch_some.merge_destination(&doc).unwrap().as_str(),
+ "refs/heads/accepted"
+ );
+ }
+
+ #[test]
+ fn test_patch_merge_custom_destination_authorized() {
+ let base = git::Oid::from_str("cb18e95ada2bb38aadd8e6cef0963ce37a87add3").unwrap();
+ let oid = git::Oid::from_str("518d5069f94c03427f694bb494ac1cd7d1339380").unwrap();
+ let alice = Actor::<MockSigner>::default();
+ let bob = Actor::<MockSigner>::default();
+
+ let mut raw_doc = RawDoc::new(
+ r#gen::<Project>(1),
+ vec![bob.did()],
+ 1,
+ identity::Visibility::Public,
+ );
+
+ let rules = serde_json::json!({
+ "refs/heads/accepted": {
+ "allow": [alice.did()],
+ "threshold": 1
+ }
+ });
+ let crefs = serde_json::json!({
+ "rules": rules
+ });
+ raw_doc.payload.insert(
+ identity::doc::PayloadId::canonical_refs(),
+ identity::doc::Payload::from(crefs),
+ );
+
+ let doc = raw_doc.verified().unwrap();
+ let patch = Patch::new(
+ cob::Title::new("My Patch").unwrap(),
+ MergeTarget::Delegates,
+ Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ (
+ RevisionId(arbitrary::entry_id()),
+ Revision::new(
+ RevisionId(arbitrary::entry_id()),
+ Author::new(bob.did()),
+ String::new(),
+ base,
+ oid,
+ env::local_time().into(),
+ Default::default(),
+ ),
+ ),
+ );
+
+ let merge_action = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ destination: Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ };
+
+ assert_eq!(
+ patch
+ .authorization(&merge_action, &alice.did().into(), &doc)
+ .unwrap(),
+ Authorization::Allow,
+ );
+ }
+
+ #[test]
+ fn test_patch_merge_custom_destination_unauthorized() {
+ let base = git::Oid::from_str("cb18e95ada2bb38aadd8e6cef0963ce37a87add3").unwrap();
+ let oid = git::Oid::from_str("518d5069f94c03427f694bb494ac1cd7d1339380").unwrap();
+ let alice = Actor::<MockSigner>::default();
+ let bob = Actor::<MockSigner>::default();
+
+ let mut raw_doc = RawDoc::new(
+ r#gen::<Project>(1),
+ vec![alice.did()],
+ 1,
+ identity::Visibility::Public,
+ );
+
+ let rules = serde_json::json!({
+ "refs/heads/accepted": {
+ "allow": [alice.did()],
+ "threshold": 1
+ }
+ });
+ let crefs = serde_json::json!({
+ "rules": rules
+ });
+ raw_doc.payload.insert(
+ identity::doc::PayloadId::canonical_refs(),
+ identity::doc::Payload::from(crefs),
+ );
+
+ let doc = raw_doc.verified().unwrap();
+ let patch = Patch::new(
+ cob::Title::new("My Patch").unwrap(),
+ MergeTarget::Delegates,
+ Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ (
+ RevisionId(arbitrary::entry_id()),
+ Revision::new(
+ RevisionId(arbitrary::entry_id()),
+ Author::new(alice.did()),
+ String::new(),
+ base,
+ oid,
+ env::local_time().into(),
+ Default::default(),
+ ),
+ ),
+ );
+
+ let merge_action = Action::Merge {
+ revision: RevisionId(arbitrary::entry_id()),
+ commit: oid,
+ destination: Some(git::fmt::RefString::try_from("accepted").unwrap()),
+ };
+
+ assert_eq!(
+ patch
+ .authorization(&merge_action, &bob.did().into(), &doc)
+ .unwrap(),
+ Authorization::Deny,
+ );
+ }
+
#[test]
fn test_json_serialization() {
let edit = Action::Label {
@@ -2950,6 +3305,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
target,
+ None,
branch.base,
branch.oid,
&[],
@@ -2989,6 +3345,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3021,6 +3378,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3029,7 +3387,7 @@ mod test {
let id = patch.id;
let (rid, _) = patch.revisions().next().unwrap();
- let _merge = patch.merge(rid, branch.base).unwrap();
+ let _merge = patch.merge(rid, branch.base, None).unwrap();
let patch = patches.get(&id).unwrap().unwrap();
let merges = patch.merges.iter().collect::<Vec<_>>();
@@ -3051,6 +3409,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3101,6 +3460,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3146,6 +3506,7 @@ mod test {
Action::Edit {
title: cob::Title::new("My patch").unwrap(),
target: MergeTarget::Delegates,
+ destination: None,
},
]);
let a2 = alice.op::<Patch>([Action::Revision {
@@ -3166,6 +3527,7 @@ mod test {
let a5 = alice.op::<Patch>([Action::Merge {
revision: RevisionId(a2.id()),
commit: oid,
+ destination: None,
}]);
let mut patch = Patch::from_ops([a1, a2], &repo).unwrap();
@@ -3197,6 +3559,7 @@ mod test {
Action::Edit {
title: cob::Title::new("Some patch").unwrap(),
target: MergeTarget::Delegates,
+ destination: None,
},
],
time.into(),
@@ -3257,6 +3620,7 @@ mod test {
Action::Edit {
title: cob::Title::new("My patch").unwrap(),
target: MergeTarget::Delegates,
+ destination: None,
},
]);
let a2 = alice.op::<Patch>([Action::RevisionReact {
@@ -3288,6 +3652,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3325,6 +3690,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3355,6 +3721,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3404,6 +3771,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3449,6 +3817,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3497,6 +3866,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
@@ -3545,6 +3915,7 @@ mod test {
cob::Title::new("My first patch").unwrap(),
"Blah blah blah.",
MergeTarget::Delegates,
+ None,
branch.base,
branch.oid,
&[],
diff --git a/crates/radicle/src/cob/patch/cache.rs b/crates/radicle/src/cob/patch/cache.rs
index 58532e329..994dd1c0c 100644
--- a/crates/radicle/src/cob/patch/cache.rs
+++ b/crates/radicle/src/cob/patch/cache.rs
@@ -121,6 +121,7 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -133,6 +134,7 @@ where
title,
description,
target,
+ destination,
base,
oid,
labels,
@@ -148,6 +150,7 @@ where
title: cob::Title,
description: impl ToString,
target: MergeTarget,
+ destination: Option<git::fmt::RefString>,
base: impl Into<git::Oid>,
oid: impl Into<git::Oid>,
labels: &[Label],
@@ -160,6 +163,7 @@ where
title,
description,
target,
+ destination,
base,
oid,
labels,
@@ -781,6 +785,7 @@ mod tests {
let patch = Patch::new(
Title::new("Patch #1").unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
);
let id = ObjectId::from_str("47799cbab2eca047b6520b9fce805da42b49ecab").unwrap();
@@ -791,6 +796,7 @@ mod tests {
..Patch::new(
Title::new("Patch #2").unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
)
};
@@ -825,6 +831,7 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
);
cache
@@ -838,6 +845,7 @@ mod tests {
..Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
)
};
@@ -852,6 +860,7 @@ mod tests {
..Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
)
};
@@ -869,6 +878,7 @@ mod tests {
..Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
)
};
@@ -907,6 +917,7 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
);
cache
@@ -939,6 +950,7 @@ mod tests {
let mut patch = Patch::new(
Title::new(&patch_id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
(*rev_id, rev.clone()),
);
let timeline = revisions.keys().copied().collect::<Vec<_>>();
@@ -979,6 +991,7 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
);
cache
@@ -1010,6 +1023,7 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
);
cache
@@ -1040,6 +1054,7 @@ mod tests {
let patch = Patch::new(
Title::new(&id.to_string()).unwrap(),
MergeTarget::Delegates,
+ None,
revision(),
);
cache
diff --git a/crates/radicle/src/cob/test.rs b/crates/radicle/src/cob/test.rs
index b2c50a933..c34ba3920 100644
--- a/crates/radicle/src/cob/test.rs
+++ b/crates/radicle/src/cob/test.rs
@@ -237,6 +237,7 @@ impl<G: Signer> Actor<G> {
patch::Action::Edit {
title,
target: patch::MergeTarget::default(),
+ destination: None,
},
]),
repo,
commit 15912bcabce8e7ed364fc844c16d3ac85449bff9
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu May 7 16:42:42 2026 +0100
cli/examples: Introduce a suite of merge and revert tests for patch.destination
diff --git a/crates/radicle-cli/examples/rad-patch-merge-default-branch.md b/crates/radicle-cli/examples/rad-patch-merge-default-branch.md
new file mode 100644
index 000000000..59a1dae83
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-merge-default-branch.md
@@ -0,0 +1,55 @@
+# Merging patches into the default branch
+
+We create a feature branch and open a patch without specifying a target branch.
+
+``` (stderr)
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+```
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push -o patch.message="Add new feature" rad HEAD:refs/patches
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/patches
+```
+
+Now, Alice merges the feature into the `master` branch and pushes it.
+
+``` (stderr)
+$ git checkout master
+Switched to branch 'master'
+```
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push rad master
+✓ Patch [..] merged
+✓ Canonical reference refs/heads/master updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] master -> master
+```
+
+Finally, we verify that the patch has been successfully marked as merged.
+
+```
+$ rad patch list --merged
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ✓ [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md b/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md
new file mode 100644
index 000000000..91b52ce86
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-merge-into-canonical-ref-branch.md
@@ -0,0 +1,96 @@
+# Merging patches into non-default canonical branches
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch, allowing delegates to merge into it.
+
+```
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": "delegates" } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it to the repository so it becomes a tracked canonical reference:
+
+``` (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+
+```
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+Next, we create a feature branch and open a patch. We use the `patch.destination` push option to explicitly state that this patch is intended for `refs/heads/accepted` rather than the default branch (`master`).
+
+``` (stderr)
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+
+```
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+
+``` (stderr)
+$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/patches
+```
+
+We can verify the patch is open:
+
+```
+$ rad patch
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ● [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
+
+Now, Alice merges the feature into the `accepted` branch and pushes it. Because `accepted` is a valid canonical reference and Alice is a delegate, the remote helper should detect the merge and update the patch status.
+
+``` (stderr)
+$ git checkout accepted
+Switched to branch 'accepted'
+```
+
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+
+``` (stderr)
+$ git push rad accepted
+✓ Patch [..] merged
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] accepted -> accepted
+```
+
+Finally, we verify that the patch has been successfully marked as merged, even though it wasn't merged into the default branch.
+
+```
+$ rad patch list --merged
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ✓ [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/examples/rad-patch-merge-strict-destination.md b/crates/radicle-cli/examples/rad-patch-merge-strict-destination.md
new file mode 100644
index 000000000..834fd0be0
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-merge-strict-destination.md
@@ -0,0 +1,82 @@
+# Merging patches has a strict destination
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch.
+
+```
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": "delegates" } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it:
+
+``` (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+```
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+Next, we create a feature branch and open a patch. We do *not* specify a destination, so it defaults to `master`.
+
+``` (stderr)
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+```
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push -o patch.message="Add new feature" rad HEAD:refs/patches
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/patches
+```
+
+Now, Alice merges the feature into the `accepted` branch instead of `master`.
+
+``` (stderr)
+$ git checkout accepted
+Switched to branch 'accepted'
+```
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] accepted -> accepted
+```
+
+Because the patch was implicitly targeted for `master`, pushing the commit to `accepted` should not mark it as merged. It should remain open.
+
+```
+$ rad patch list --merged
+Nothing to show.
+```
+```
+$ rad patch list --open
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ● [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md b/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md
new file mode 100644
index 000000000..370ef003c
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-merge-unauthorized-branch.md
@@ -0,0 +1,97 @@
+# Merging patches into an unauthorized branch
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch, but we only allow Alice to merge into it.
+
+``` ~alice
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": ["did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"] } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it:
+
+``` ~alice (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+``` ~alice
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+``` ~alice (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+✓ Synced with 1 seed(s)
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+Next, Bob clones the repository and opens a patch targeting `accepted`.
+
+``` ~bob
+$ rad clone rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
+✓ Creating checkout in ./heartwood..
+✓ Remote alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi added
+✓ Remote-tracking branch alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi/master created for z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+✓ Repository successfully cloned under [..]
+╭────────────────────────────────────╮
+│ heartwood │
+│ Radicle Heartwood Protocol & Stack │
+│ 0 issues · 0 patches │
+╰────────────────────────────────────╯
+Run `cd ./heartwood` to go to the repository directory.
+```
+``` ~bob (stderr)
+$ cd heartwood
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+``` ~bob
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` ~bob (stderr)
+$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+✓ Patch [..] opened
+✓ Synced with 1 seed(s)
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
+ * [new reference] HEAD -> refs/patches
+```
+
+Now, Bob tries to merge the feature into the `accepted` branch and push it.
+
+``` ~bob (stderr)
+$ git checkout -t rad/accepted
+Switched to a new branch 'accepted'
+```
+``` ~bob
+$ git merge feature/1
+Merge made by the 'ort' strategy.
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` ~bob (stderr)
+$ git push rad accepted
+✓ Synced with 1 seed(s)
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
+ * [new branch] accepted -> accepted
+```
+
+Notice that the canonical reference was *not* updated because Bob is not authorized. The patch should remain open.
+
+``` ~bob
+$ rad patch list --merged
+Nothing to show.
+```
+``` ~bob
+$ rad patch list --open
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ● [..] Add new feature bob (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md b/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md
new file mode 100644
index 000000000..bf7e65978
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-merge-wrong-branch.md
@@ -0,0 +1,82 @@
+# Merging patches into the wrong branch
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch.
+
+```
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": "delegates" } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it:
+
+``` (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+```
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+Next, we create a feature branch and open a patch targeting `accepted`.
+
+``` (stderr)
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+```
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/patches
+```
+
+Now, Alice accidentally merges the feature into the `master` branch instead of `accepted`.
+
+``` (stderr)
+$ git checkout master
+Switched to branch 'master'
+```
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push rad master
+✓ Canonical reference refs/heads/master updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] master -> master
+```
+
+Because the patch was explicitly targeted for `accepted`, it should remain open.
+
+```
+$ rad patch list --merged
+Nothing to show.
+```
+```
+$ rad patch list --open
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ● [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md b/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md
new file mode 100644
index 000000000..4d37dda0e
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-revert-custom-branch.md
@@ -0,0 +1,108 @@
+# Reverting a patch on a custom canonical branch
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch.
+
+```
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": "delegates" } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it:
+
+``` (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+```
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+Next, we create a feature branch and open a patch targeting `accepted`.
+
+``` (stderr)
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+```
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/patches
+```
+
+Alice merges the feature into the `accepted` branch and pushes it.
+
+``` (stderr)
+$ git checkout accepted
+Switched to branch 'accepted'
+```
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push rad accepted
+✓ Patch [..] merged
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] accepted -> accepted
+```
+
+We verify the patch is merged.
+
+```
+$ rad patch list --merged
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ✓ [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
+
+Now, Alice realizes she made a mistake and resets the `accepted` branch, dropping the merge commit, and force pushes.
+
+```
+$ git reset --hard HEAD~1
+HEAD is now at [..] Initialize accepted branch
+```
+``` (stderr)
+$ git push rad accepted --force
+! Patch [..] reverted at revision [..]
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ + [..]...[..] accepted -> accepted (forced update)
+```
+
+The patch should now be open again.
+
+```
+$ rad patch list --merged
+Nothing to show.
+```
+```
+$ rad patch list --open
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ● [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/examples/rad-patch-revert-isolation.md b/crates/radicle-cli/examples/rad-patch-revert-isolation.md
new file mode 100644
index 000000000..ed9cef5d1
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-patch-revert-isolation.md
@@ -0,0 +1,107 @@
+# Revert isolation (Force-pushing the wrong branch)
+
+First, we update the identity document to add a canonical reference rule for a new `accepted` branch.
+
+```
+$ rad id update --title "Add accepted branch" --payload xyz.radicle.crefs rules '{ "refs/heads/accepted": { "threshold": 1, "allow": "delegates" } }' -q
+[..]
+```
+
+Now, let's create the `accepted` branch and push it:
+
+``` (stderr)
+$ git checkout -b accepted
+Switched to a new branch 'accepted'
+```
+```
+$ git commit --allow-empty -m "Initialize accepted branch"
+[accepted [..]] Initialize accepted branch
+```
+``` (stderr)
+$ git push rad accepted
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new branch] accepted -> accepted
+```
+
+Next, we create a feature branch and open a patch targeting `accepted`.
+
+``` (stderr)
+$ git checkout -b feature/1
+Switched to a new branch 'feature/1'
+$ touch FEATURE.md
+$ git add FEATURE.md
+```
+```
+$ git commit -m "Add new feature"
+[feature/1 [..]] Add new feature
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push -o patch.message="Add new feature" -o patch.destination="refs/heads/accepted" rad HEAD:refs/patches
+✓ Patch [..] opened
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ * [new reference] HEAD -> refs/patches
+```
+
+Alice merges the feature into the `accepted` branch and pushes it.
+
+``` (stderr)
+$ git checkout accepted
+Switched to branch 'accepted'
+```
+```
+$ git merge feature/1
+Updating [..]
+Fast-forward
+ FEATURE.md | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 FEATURE.md
+```
+``` (stderr)
+$ git push rad accepted
+✓ Patch [..] merged
+✓ Canonical reference refs/heads/accepted updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ [..]..[..] accepted -> accepted
+```
+
+We verify the patch is merged.
+
+```
+$ rad patch list --merged
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ✓ [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
+
+Now, Alice switches to `master`, resets it to drop a commit, and force pushes. This simulates a scenario where commits are dropped from a branch *other* than the patch's destination.
+
+``` (stderr)
+$ git checkout master
+Switched to branch 'master'
+```
+```
+$ git reset --hard HEAD~1
+HEAD is now at [..] Initial commit
+```
+``` (stderr)
+$ git push rad master --force
+✓ Canonical reference refs/heads/master updated to target commit [..]
+To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
+ + [..]...[..] master -> master (forced update)
+```
+
+Because the patch was merged into `accepted`, dropping commits on `master` should not revert the patch. It should remain merged.
+
+```
+$ rad patch list --merged
+╭───────────────────────────────────────────────────────────────────────────────╮
+│ ● ID Title Author Reviews Head + - Updated │
+├───────────────────────────────────────────────────────────────────────────────┤
+│ ✓ [..] Add new feature alice (you) - [..] +0 -0 now │
+╰───────────────────────────────────────────────────────────────────────────────╯
+```
diff --git a/crates/radicle-cli/tests/commands/patch.rs b/crates/radicle-cli/tests/commands/patch.rs
index 341eb0acf..b1bd7ebcf 100644
--- a/crates/radicle-cli/tests/commands/patch.rs
+++ b/crates/radicle-cli/tests/commands/patch.rs
@@ -386,3 +386,75 @@ fn rad_merge_no_ff() {
.tests(["rad-init", "rad-merge-no-ff"], &alice)
.unwrap();
}
+
+#[test]
+fn rad_patch_merge_into_canonical_ref_branch() {
+ Environment::alice(["rad-init", "rad-patch-merge-into-canonical-ref-branch"]);
+}
+
+#[test]
+fn rad_patch_merge_default_branch() {
+ Environment::alice(["rad-init", "rad-patch-merge-default-branch"]);
+}
+
+#[test]
+fn rad_patch_merge_wrong_branch() {
+ Environment::alice(["rad-init", "rad-patch-merge-wrong-branch"]);
+}
+
+#[test]
+fn rad_patch_merge_unauthorized_branch() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.handle.seed(acme, Scope::All).unwrap();
+ alice.connect(&bob).converge([&bob]);
+
+ formula(
+ &environment.tempdir(),
+ "examples/rad-patch-merge-unauthorized-branch.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_revert_custom_branch() {
+ Environment::alice(["rad-init", "rad-patch-revert-custom-branch"]);
+}
+
+#[test]
+fn rad_patch_revert_isolation() {
+ Environment::alice(["rad-init", "rad-patch-revert-isolation"]);
+}
+
+#[test]
+fn rad_patch_merge_strict_destination() {
+ Environment::alice(["rad-init", "rad-patch-merge-strict-destination"]);
+}
Exit code: 0
shell: 'export RUSTDOCFLAGS=''-D warnings'' cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps --all-features cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 91b8d635-7d88-49ab-a0f5-1420a691ac3a -v /opt/radcis/ci.rad.levitte.org/cci/state/91b8d635-7d88-49ab-a0f5-1420a691ac3a/s:/91b8d635-7d88-49ab-a0f5-1420a691ac3a/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w:/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w -w /91b8d635-7d88-49ab-a0f5-1420a691ac3a/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /91b8d635-7d88-49ab-a0f5-1420a691ac3a/s/script.sh
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ cargo --version
info: syncing channel updates for '1.95-x86_64-unknown-linux-gnu'
info: latest update on 2026-04-16, rust version 1.95.0 (59807616e 2026-04-14)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.95.0 (f2d3ce0bd 2026-03-21)
+ rustc --version
rustc 1.95.0 (59807616e 2026-04-14)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded adler2 v2.0.1
Downloaded amplify_derive v4.0.1
Downloaded crossterm v0.29.0
Downloaded aho-corasick v1.1.4
Downloaded base256emoji v1.0.2
Downloaded icu_properties v2.1.2
Downloaded ghash v0.5.1
Downloaded base32 v0.4.0
Downloaded diff v0.1.13
Downloaded console v0.16.3
Downloaded curve25519-dalek-derive v0.1.1
Downloaded anstyle-query v1.1.5
Downloaded dunce v1.0.5
Downloaded humantime v2.3.0
Downloaded ctr v0.9.2
Downloaded cpufeatures v0.2.17
Downloaded aead v0.5.2
Downloaded human-panic v2.0.6
Downloaded data-encoding v2.10.0
Downloaded bytesize v2.3.1
Downloaded icu_normalizer_data v2.1.1
Downloaded hmac v0.12.1
Downloaded erased-serde v0.4.10
Downloaded idna_adapter v1.2.1
Downloaded litemap v0.8.1
Downloaded icu_provider v2.1.1
Downloaded document-features v0.2.12
Downloaded matchers v0.2.0
Downloaded gix-chunk v0.7.1
Downloaded gix-utils v0.3.2
Downloaded multibase v0.9.2
Downloaded num-cmp v0.1.0
Downloaded pbkdf2 v0.12.2
Downloaded inout v0.1.4
Downloaded icu_properties_data v2.1.2
Downloaded percent-encoding v2.3.2
Downloaded lock_api v0.4.14
Downloaded nonempty v0.9.0
Downloaded keccak v0.1.6
Downloaded crossbeam-utils v0.8.21
Downloaded either v1.15.0
Downloaded iana-time-zone v0.1.65
Downloaded quick-error v1.2.3
Downloaded parking_lot_core v0.9.12
Downloaded pkg-config v0.3.32
Downloaded pin-project-lite v0.2.17
Downloaded sha2 v0.10.9
Downloaded ref-cast-impl v1.0.25
Downloaded chacha20poly1305 v0.10.1
Downloaded siphasher v0.3.11
Downloaded rand_xorshift v0.4.0
Downloaded scopeguard v1.2.0
Downloaded same-file v1.0.6
Downloaded phf_shared v0.11.3
Downloaded num-traits v0.2.19
Downloaded ref-cast v1.0.25
Downloaded sha1 v0.10.6
Downloaded scrypt v0.11.0
Downloaded semver v1.0.27
Downloaded polyval v0.6.2
Downloaded itoa v1.0.17
Downloaded serde_spanned v1.0.4
Downloaded sval_json v2.17.0
Downloaded snapbox v0.4.17
Downloaded socks5-client v0.4.3
Downloaded signature v1.6.4
Downloaded spki v0.7.3
Downloaded sval_fmt v2.17.0
Downloaded num v0.4.3
Downloaded qcheck v1.0.0
Downloaded sval_ref v2.17.0
Downloaded miniz_oxide v0.8.9
Downloaded sval_dynamic v2.17.0
Downloaded unarray v0.1.4
Downloaded tinyvec_macros v0.1.1
Downloaded synstructure v0.13.2
Downloaded radicle-std-ext v0.2.0
Downloaded shlex v1.3.0
Downloaded tinystr v0.8.2
Downloaded thiserror v1.0.69
Downloaded unicode-display-width v0.3.0
Downloaded toml_datetime v0.7.5+spec-1.1.0
Downloaded proc-macro2 v1.0.106
Downloaded tree-sitter-json v0.24.8
Downloaded toml_writer v1.0.7+spec-1.1.0
Downloaded tree-sitter-highlight v0.24.7
Downloaded socket2 v0.5.10
Downloaded utf8_iter v1.0.4
Downloaded sharded-slab v0.1.7
Downloaded utf8parse v0.2.2
Downloaded value-bag-serde1 v1.12.0
Downloaded sem_safe v0.2.1
Downloaded zerofrom-derive v0.1.6
Downloaded zerofrom v0.1.6
Downloaded yoke-derive v0.8.1
Downloaded uuid-simd v0.8.0
Downloaded toml v0.9.12+spec-1.1.0
Downloaded syn v1.0.109
Downloaded zerovec-derive v0.11.2
Downloaded zeroize v1.8.2
Downloaded yoke v0.8.1
Downloaded vsimd v0.8.0
Downloaded uuid v1.22.0
Downloaded value-bag v1.12.0
Downloaded unicode-ident v1.0.24
Downloaded typenum v1.19.0
Downloaded p384 v0.13.1
Downloaded test-log-macros v0.2.19
Downloaded zerotrie v0.2.3
Downloaded unicode-segmentation v1.12.0
Downloaded regex v1.12.3
Downloaded radicle-git-ext v0.12.0
Downloaded url v2.5.8
Downloaded qcheck-macros v1.0.0
Downloaded libz-sys v1.1.25
Downloaded zerovec v0.11.5
Downloaded tree-sitter-python v0.23.6
Downloaded ssh-agent-lib v0.5.2
Downloaded curve25519-dalek v4.1.3
Downloaded wait-timeout v0.2.1
Downloaded zlib-rs v0.6.3
Downloaded writeable v0.6.2
Downloaded zerocopy v0.8.42
Downloaded tree-sitter-md v0.3.2
Downloaded zmij v1.0.21
Downloaded tracing-log v0.2.0
Downloaded prodash v31.0.0
Downloaded tempfile v3.27.0
Downloaded rustix v1.1.4
Downloaded yansi v1.0.1
Downloaded tinyvec v1.11.0
Downloaded xattr v1.6.1
Downloaded unicode-normalization v0.1.25
Downloaded tree-sitter v0.24.7
Downloaded tree-sitter-go v0.23.4
Downloaded tree-sitter-ruby v0.23.1
Downloaded syn v2.0.117
Downloaded vcpkg v0.2.15
Downloaded regex-automata v0.4.14
Downloaded unicode-width v0.2.2
Downloaded libc v0.2.183
Downloaded tree-sitter-rust v0.23.3
Downloaded sval v2.17.0
Downloaded strsim v0.11.1
Downloaded ssh-key v0.6.7
Downloaded test-log v0.2.19
Downloaded tracing v0.1.44
Downloaded rand v0.8.5
Downloaded radicle-surf v0.27.1
Downloaded tar v0.4.45
Downloaded tree-sitter-typescript v0.23.2
Downloaded sha3 v0.10.8
Downloaded tokio v1.50.0
Downloaded sha1-checked v0.10.0
Downloaded portable-atomic v1.13.1
Downloaded libgit2-sys v0.18.3+1.9.2
Downloaded tracing-core v0.1.36
Downloaded subtle v2.6.1
Downloaded regex-syntax v0.8.10
Downloaded quote v1.0.45
Downloaded object v0.37.3
Downloaded value-bag-sval2 v1.12.0
Downloaded tree-sitter-language v0.1.7
Downloaded tracing-subscriber v0.3.23
Downloaded tree-sitter-c v0.23.4
Downloaded bstr v1.12.1
Downloaded walkdir v2.5.0
Downloaded similar v2.7.0
Downloaded simd-adler32 v0.3.8
Downloaded proptest v1.10.0
Downloaded version_check v0.9.5
Downloaded systemd-journal-logger v2.2.2
Downloaded tree-sitter-bash v0.23.3
Downloaded sysinfo v0.37.2
Downloaded streaming-iterator v0.1.9
Downloaded rand_core v0.6.4
Downloaded bloomy v1.2.0
Downloaded sval_serde v2.17.0
Downloaded structured-logger v1.0.5
Downloaded sqlite3-sys v0.18.0
Downloaded sqlite v0.37.0
Downloaded smallvec v1.15.1
Downloaded siphasher v1.0.2
Downloaded secrecy v0.10.3
Downloaded rusty-fork v0.3.1
Downloaded proc-macro-error2 v2.0.1
Downloaded proc-macro-error-attr2 v2.0.0
Downloaded jiff v0.2.23
Downloaded ssh-encoding v0.2.0
Downloaded ssh-cipher v0.2.0
Downloaded snapbox-macros v0.3.10
Downloaded serde_fmt v1.1.0
Downloaded serde_derive_internals v0.29.1
Downloaded noise-framework v0.4.1
Downloaded serde_json v1.0.149
Downloaded generic-array v0.14.7
Downloaded serde v1.0.228
Downloaded rsa v0.9.10
Downloaded rand v0.9.2
Downloaded p521 v0.13.3
Downloaded universal-hash v0.5.1
Downloaded clap_builder v4.6.0
Downloaded unit-prefix v0.5.2
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded tree-sitter-css v0.23.2
Downloaded schemars v1.2.1
Downloaded jsonschema v0.30.0
Downloaded gix-packetline v0.21.3
Downloaded sec1 v0.7.3
Downloaded poly1305 v0.8.0
Downloaded num-bigint-dig v0.8.6
Downloaded cyphernet v0.5.4
Downloaded tree-sitter-html v0.23.2
Downloaded signals_receipts v0.2.5
Downloaded signal-hook v0.3.18
Downloaded serde_derive v1.0.228
Downloaded potential_utf v0.1.4
Downloaded thiserror-impl v1.0.69
Downloaded gix-pack v0.70.0
Downloaded gix-object v0.60.0
Downloaded gimli v0.32.3
Downloaded flate2 v1.1.9
Downloaded linux-raw-sys v0.12.1
Downloaded emojis v0.6.4
Downloaded aes-gcm v0.10.3
Downloaded aes v0.8.4
Downloaded typeid v1.0.3
Downloaded timeago v0.4.2
Downloaded thread_local v1.1.9
Downloaded thiserror-impl v2.0.18
Downloaded thiserror v2.0.18
Downloaded spin v0.9.8
Downloaded serde_core v1.0.228
Downloaded salsa20 v0.10.2
Downloaded litrs v1.0.0
Downloaded sval_nested v2.17.0
Downloaded primeorder v0.13.6
Downloaded rand_chacha v0.9.0
Downloaded indicatif v0.18.4
Downloaded gix-odb v0.80.0
Downloaded sval_buffer v2.17.0
Downloaded signal-hook-registry v1.4.8
Downloaded find-msvc-tools v0.1.9
Downloaded ryu v1.0.23
Downloaded lexopt v0.3.2
Downloaded indexmap v2.13.0
Downloaded gix-quote v0.7.1
Downloaded p256 v0.13.2
Downloaded once_cell v1.21.4
Downloaded gix-actor v0.41.0
Downloaded fnv v1.0.7
Downloaded pretty_assertions v1.4.1
Downloaded num-bigint v0.4.6
Downloaded mio v1.1.1
Downloaded memchr v2.8.0
Downloaded escargot v0.5.15
Downloaded schemars_derive v1.2.1
Downloaded hash32 v0.3.1
Downloaded gix-hash v0.25.0
Downloaded lazy_static v1.5.0
Downloaded gix-protocol v0.61.0
Downloaded gix-lock v23.0.0
Downloaded derive_more-impl v2.1.1
Downloaded serde-untagged v0.1.9
Downloaded crypto-bigint v0.5.5
Downloaded stable_deref_trait v1.2.1
Downloaded sqlite3-src v0.7.0
Downloaded signature v2.2.0
Downloaded signal-hook-mio v0.2.5
Downloaded shell-words v1.1.1
Downloaded referencing v0.30.0
Downloaded parking_lot v0.12.5
Downloaded is_terminal_polyfill v1.70.2
Downloaded rustversion v1.0.22
Downloaded gix-error v0.2.3
Downloaded rustc-demangle v0.1.27
Downloaded ppv-lite86 v0.2.21
Downloaded jiff-static v0.2.23
Downloaded icu_normalizer v2.1.1
Downloaded crossbeam-channel v0.5.15
Downloaded rand_core v0.9.5
Downloaded pkcs8 v0.10.2
Downloaded elliptic-curve v0.13.8
Downloaded derive_more v2.1.1
Downloaded backtrace v0.3.76
Downloaded gix-tempfile v23.0.0
Downloaded memmap2 v0.9.10
Downloaded itertools v0.14.0
Downloaded rand_chacha v0.3.1
Downloaded rustc_version v0.4.1
Downloaded pem-rfc7468 v0.7.0
Downloaded nu-ansi-term v0.50.3
Downloaded base64 v0.21.7
Downloaded pkcs1 v0.7.5
Downloaded bytes v1.11.1
Downloaded num-complex v0.4.6
Downloaded fast-glob v0.3.3
Downloaded rfc6979 v0.4.0
Downloaded opaque-debug v0.3.1
Downloaded num-iter v0.1.45
Downloaded inquire v0.9.4
Downloaded idna v1.1.0
Downloaded icu_collections v2.1.1
Downloaded gix-ref v0.63.0
Downloaded fraction v0.15.3
Downloaded ed25519-dalek v2.2.0
Downloaded der v0.7.10
Downloaded log v0.4.29
Downloaded getrandom v0.4.2
Downloaded clap v4.6.0
Downloaded clap_complete v4.6.0
Downloaded bitflags v2.11.0
Downloaded ahash v0.8.12
Downloaded phf v0.11.3
Downloaded gix-refspec v0.41.0
Downloaded gix-hashtable v0.15.0
Downloaded getrandom v0.3.4
Downloaded fastrand v2.3.0
Downloaded gix-fs v0.21.1
Downloaded gix-features v0.48.0
Downloaded cc v1.2.57
Downloaded ec25519 v0.1.0
Downloaded crc32fast v1.5.0
Downloaded anyhow v1.0.102
Downloaded gix-sec v0.14.0
Downloaded git-ref-format v0.6.0
Downloaded faster-hex v0.10.0
Downloaded ed25519 v2.2.3
Downloaded heck v0.5.0
Downloaded gix-date v0.15.3
Downloaded gix-config-value v0.18.0
Downloaded gix-commitgraph v0.37.0
Downloaded gix-command v0.9.0
Downloaded getrandom v0.2.17
Downloaded filetime v0.2.27
Downloaded email_address v0.2.9
Downloaded convert_case v0.10.0
Downloaded arc-swap v1.9.1
Downloaded num-rational v0.4.2
Downloaded num-integer v0.1.46
Downloaded maybe-async v0.2.10
Downloaded libm v0.2.16
Downloaded jobserver v0.1.34
Downloaded gix-transport v0.57.0
Downloaded gix-prompt v0.15.0
Downloaded gix-negotiate v0.31.0
Downloaded gix-diff v0.63.0
Downloaded git-ref-format-macro v0.6.0
Downloaded env_logger v0.11.9
Downloaded ecdsa v0.16.9
Downloaded const-oid v0.9.6
Downloaded chacha20 v0.9.1
Downloaded bit-vec v0.8.0
Downloaded anstream v0.6.21
Downloaded digest v0.10.7
Downloaded cipher v0.4.4
Downloaded block-buffer v0.10.4
Downloaded anstyle-parse v1.0.0
Downloaded fancy-regex v0.14.0
Downloaded displaydoc v0.2.5
Downloaded pastey v0.2.1
Downloaded outref v0.5.2
Downloaded nonempty v0.12.0
Downloaded normalize-line-endings v0.3.0
Downloaded match-lookup v0.1.2
Downloaded gix-credentials v0.38.0
Downloaded git2 v0.20.4
Downloaded ff v0.13.1
Downloaded env_filter v1.0.0
Downloaded ct-codecs v1.1.6
Downloaded errno v0.3.14
Downloaded ed25519 v1.5.3
Downloaded blowfish v0.9.1
Downloaded amplify_num v0.5.3
Downloaded data-encoding-macro v0.1.19
Downloaded cyphergraphy v0.3.1
Downloaded base16ct v0.2.0
Downloaded data-encoding-macro-internal v0.1.17
Downloaded clap_lex v1.1.0
Downloaded cfg-if v1.0.4
Downloaded anstream v1.0.0
Downloaded amplify_syn v2.0.1
Downloaded heapless v0.8.0
Downloaded equivalent v1.0.2
Downloaded dyn-clone v1.0.20
Downloaded hashbrown v0.16.1
Downloaded group v0.13.0
Downloaded gix-shallow v0.12.0
Downloaded fluent-uri v0.3.2
Downloaded cypheraddr v0.4.1
Downloaded icu_locale_core v2.1.1
Downloaded gix-url v0.36.0
Downloaded gix-traverse v0.57.0
Downloaded gix-trace v0.1.19
Downloaded gix-revision v0.45.0
Downloaded gix-path v0.12.0
Downloaded git-ref-format-core v0.6.0
Downloaded gix-glob v0.26.0
Downloaded gix-validate v0.11.1
Downloaded gix-revwalk v0.31.0
Downloaded bit-set v0.8.0
Downloaded base-x v0.2.11
Downloaded borrow-or-share v0.2.4
Downloaded colored v2.2.0
Downloaded colorchoice v1.0.5
Downloaded block-padding v0.3.3
Downloaded bcrypt-pbkdf v0.10.0
Downloaded base64ct v1.8.3
Downloaded crypto-common v0.1.7
Downloaded chrono v0.4.44
Downloaded bytecount v0.6.9
Downloaded base64 v0.22.1
Downloaded autocfg v1.5.0
Downloaded anstyle-parse v0.2.7
Downloaded const-str v0.4.3
Downloaded byteorder v1.5.0
Downloaded anstyle v1.0.14
Downloaded form_urlencoded v1.2.2
Downloaded clap_derive v4.6.0
Downloaded ascii v1.1.0
Downloaded cbc v0.1.2
Downloaded addr2line v0.25.1
Downloaded amplify v4.9.0
Compiling libc v0.2.183
Compiling proc-macro2 v1.0.106
Compiling unicode-ident v1.0.24
Compiling quote v1.0.45
Checking cfg-if v1.0.4
Checking zeroize v1.8.2
Compiling version_check v0.9.5
Compiling typenum v1.19.0
Compiling generic-array v0.14.7
Checking getrandom v0.2.17
Compiling syn v2.0.117
Checking rand_core v0.6.4
Checking memchr v2.8.0
Compiling jobserver v0.1.34
Compiling shlex v1.3.0
Compiling find-msvc-tools v0.1.9
Checking crypto-common v0.1.7
Compiling cc v1.2.57
Checking subtle v2.6.1
Compiling serde_core v1.0.228
Checking regex-syntax v0.8.10
Checking aho-corasick v1.1.4
Checking const-oid v0.9.6
Checking smallvec v1.15.1
Checking block-buffer v0.10.4
Checking cpufeatures v0.2.17
Checking digest v0.10.7
Checking stable_deref_trait v1.2.1
Compiling thiserror v2.0.18
Checking fastrand v2.3.0
Checking regex-automata v0.4.14
Compiling parking_lot_core v0.9.12
Checking scopeguard v1.2.0
Checking lock_api v0.4.14
Checking bitflags v2.11.0
Checking parking_lot v0.12.5
Compiling typeid v1.0.3
Checking gix-trace v0.1.19
Compiling erased-serde v0.4.10
Compiling crc32fast v1.5.0
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.11.0
Compiling serde v1.0.228
Checking unicode-normalization v0.1.25
Checking itoa v1.0.17
Checking byteorder v1.5.0
Checking gix-utils v0.3.2
Checking serde_fmt v1.1.0
Checking hashbrown v0.16.1
Checking value-bag-serde1 v1.12.0
Compiling synstructure v0.13.2
Checking bstr v1.12.1
Compiling thiserror-impl v2.0.18
Compiling serde_derive v1.0.228
Checking gix-validate v0.11.1
Checking value-bag v1.12.0
Compiling zerofrom-derive v0.1.6
Checking log v0.4.29
Checking same-file v1.0.6
Checking walkdir v2.5.0
Compiling yoke-derive v0.8.1
Checking gix-path v0.12.0
Checking zerofrom v0.1.6
Checking prodash v31.0.0
Checking zlib-rs v0.6.3
Compiling heapless v0.8.0
Checking yoke v0.8.1
Compiling pkg-config v0.3.32
Compiling rustix v1.1.4
Compiling zerovec-derive v0.11.2
Checking hash32 v0.3.1
Compiling autocfg v1.5.0
Checking gix-features v0.48.0
Checking linux-raw-sys v0.12.1
Compiling libm v0.2.16
Compiling num-traits v0.2.19
Checking zerovec v0.11.5
Compiling displaydoc v0.2.5
Compiling getrandom v0.4.2
Checking faster-hex v0.10.0
Checking block-padding v0.3.3
Compiling zerocopy v0.8.42
Checking inout v0.1.4
Checking sha1 v0.10.6
Checking sha2 v0.10.9
Checking sha1-checked v0.10.0
Checking cipher v0.4.4
Checking tinystr v0.8.2
Checking writeable v0.6.2
Checking once_cell v1.21.4
Checking percent-encoding v2.3.2
Checking litemap v0.8.1
Checking gix-hash v0.25.0
Checking icu_locale_core v2.1.1
Checking zerotrie v0.2.3
Checking potential_utf v0.1.4
Compiling zmij v1.0.21
Compiling icu_properties_data v2.1.2
Compiling icu_normalizer_data v2.1.1
Checking icu_provider v2.1.1
Checking icu_collections v2.1.1
Checking der v0.7.10
Compiling serde_json v1.0.149
Checking equivalent v1.0.2
Checking indexmap v2.13.0
Compiling vcpkg v0.2.15
Compiling ref-cast v1.0.25
Compiling thiserror v1.0.69
Compiling syn v1.0.109
Checking icu_normalizer v2.1.1
Compiling libz-sys v1.1.25
Checking icu_properties v2.1.2
Checking tempfile v3.27.0
Compiling ref-cast-impl v1.0.25
Compiling thiserror-impl v1.0.69
Checking ppv-lite86 v0.2.21
Checking spin v0.9.8
Checking lazy_static v1.5.0
Checking num-integer v0.1.46
Checking idna_adapter v1.2.1
Checking hmac v0.12.1
Checking universal-hash v0.5.1
Checking opaque-debug v0.3.1
Checking utf8_iter v1.0.4
Checking dyn-clone v1.0.20
Compiling tree-sitter-language v0.1.7
Checking idna v1.1.0
Checking spki v0.7.3
Compiling libgit2-sys v0.18.3+1.9.2
Checking signature v2.2.0
Checking ff v0.13.1
Checking base16ct v0.2.0
Checking sec1 v0.7.3
Checking group v0.13.0
Checking rand_chacha v0.3.1
Checking form_urlencoded v1.2.2
Compiling serde_derive_internals v0.29.1
Checking crypto-bigint v0.5.5
Compiling schemars_derive v1.2.1
Checking elliptic-curve v0.13.8
Compiling amplify_syn v2.0.1
Checking url v2.5.8
Checking rand v0.8.5
Checking num-iter v0.1.45
Checking aead v0.5.2
Compiling semver v1.0.27
Checking signature v1.6.4
Checking ed25519 v1.5.3
Checking schemars v1.2.1
Compiling rustc_version v0.4.1
Compiling amplify_derive v4.0.1
Checking poly1305 v0.8.0
Checking rfc6979 v0.4.0
Checking chacha20 v0.9.1
Checking amplify_num v0.5.3
Checking ascii v1.1.0
Checking ct-codecs v1.1.6
Checking ec25519 v0.1.0
Checking ecdsa v0.16.9
Compiling curve25519-dalek v4.1.3
Checking git-ref-format-core v0.6.0
Checking amplify v4.9.0
Checking primeorder v0.13.6
Checking polyval v0.6.2
Compiling num-bigint-dig v0.8.6
Checking base64ct v1.8.3
Checking cyphergraphy v0.3.1
Checking ghash v0.5.1
Checking pkcs8 v0.10.2
Checking pbkdf2 v0.12.2
Checking pem-rfc7468 v0.7.0
Checking ctr v0.9.2
Checking aes v0.8.4
Compiling sqlite3-src v0.7.0
Checking gix-error v0.2.3
Compiling curve25519-dalek-derive v0.1.1
Checking keccak v0.1.6
Checking aes-gcm v0.10.3
Checking sha3 v0.10.8
Checking ssh-encoding v0.2.0
Checking pkcs1 v0.7.5
Checking ed25519 v2.2.3
Checking cbc v0.1.2
Checking blowfish v0.9.1
Checking base32 v0.4.0
Compiling crossbeam-utils v0.8.21
Compiling data-encoding v2.10.0
Checking cypheraddr v0.4.1
Checking rsa v0.9.10
Compiling data-encoding-macro-internal v0.1.17
Checking bcrypt-pbkdf v0.10.0
Checking ssh-cipher v0.2.0
Checking ed25519-dalek v2.2.0
Checking p521 v0.13.3
Checking p384 v0.13.1
Checking p256 v0.13.2
Checking chacha20poly1305 v0.10.1
Checking qcheck v1.0.0
Compiling match-lookup v0.1.2
Checking const-str v0.4.3
Checking data-encoding-macro v0.1.19
Checking ssh-key v0.6.7
Checking base256emoji v1.0.2
Checking noise-framework v0.4.1
Checking socks5-client v0.4.3
Checking secrecy v0.10.3
Checking base-x v0.2.11
Checking crossbeam-channel v0.5.15
Checking multibase v0.9.2
Checking ssh-agent-lib v0.5.2
Checking cyphernet v0.5.4
Checking anstyle-query v1.1.5
Checking errno v0.3.14
Checking jiff v0.2.23
Checking utf8parse v0.2.2
Checking nonempty v0.9.0
Checking siphasher v1.0.2
Checking radicle-localtime v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-localtime)
Checking radicle-git-metadata v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-metadata)
Checking radicle-dag v0.10.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-dag)
Checking colorchoice v1.0.5
Checking is_terminal_polyfill v1.70.2
Checking anstyle v1.0.14
Checking radicle-git-ref-format v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-ref-format)
Checking gix-hashtable v0.15.0
Checking base64 v0.21.7
Compiling radicle v0.24.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle)
Compiling unicode-segmentation v1.12.0
Compiling signal-hook v0.3.18
Compiling convert_case v0.10.0
Checking gix-date v0.15.3
Checking gix-actor v0.41.0
Checking signal-hook-registry v1.4.8
Checking gix-object v0.60.0
Checking serde-untagged v0.1.9
Checking bytesize v2.3.1
Checking memmap2 v0.9.10
Checking nonempty v0.12.0
Checking fast-glob v0.3.3
Checking dunce v1.0.5
Compiling derive_more-impl v2.1.1
Checking gix-chunk v0.7.1
Checking mio v1.1.1
Checking regex v1.12.3
Checking sem_safe v0.2.1
Checking unicode-width v0.2.2
Compiling portable-atomic v1.13.1
Compiling litrs v1.0.0
Checking signals_receipts v0.2.5
Checking derive_more v2.1.1
Compiling document-features v0.2.12
Checking signal-hook-mio v0.2.5
Checking gix-commitgraph v0.37.0
Checking anstyle-parse v0.2.7
Checking crossterm v0.29.0
Checking anstream v0.6.21
Checking gix-revwalk v0.31.0
Checking console v0.16.3
Checking gix-fs v0.21.1
Checking unit-prefix v0.5.2
Checking gix-tempfile v23.0.0
Checking indicatif v0.18.4
Checking inquire v0.9.4
Checking unicode-display-width v0.3.0
Checking radicle-signals v0.11.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-signals)
Checking gix-quote v0.7.1
Checking shell-words v1.1.1
Checking either v1.15.0
Checking iana-time-zone v0.1.65
Checking chrono v0.4.44
Checking gix-command v0.9.0
Checking colored v2.2.0
Compiling object v0.37.3
Compiling rustversion v1.0.22
Checking gix-lock v23.0.0
Checking gix-url v0.36.0
Checking gix-config-value v0.18.0
Checking gix-sec v0.14.0
Checking gimli v0.32.3
Checking adler2 v2.0.1
Checking miniz_oxide v0.8.9
Checking gix-prompt v0.15.0
Checking addr2line v0.25.1
Checking gix-traverse v0.57.0
Checking gix-revision v0.45.0
Checking gix-diff v0.63.0
Checking gix-packetline v0.21.3
Checking gix-glob v0.26.0
Compiling tree-sitter v0.24.7
Checking rustc-demangle v0.1.27
Compiling anyhow v1.0.102
Checking backtrace v0.3.76
Checking gix-refspec v0.41.0
Checking gix-transport v0.57.0
Checking gix-pack v0.70.0
Checking arc-swap v1.9.1
Checking gix-credentials v0.38.0
Checking gix-ref v0.63.0
Checking gix-shallow v0.12.0
Checking gix-negotiate v0.31.0
Compiling maybe-async v0.2.10
Compiling proc-macro-error-attr2 v2.0.0
Compiling simd-adler32 v0.3.8
Compiling getrandom v0.3.4
Checking gix-protocol v0.61.0
Compiling proc-macro-error2 v2.0.1
Checking gix-odb v0.80.0
Compiling xattr v1.6.1
Compiling filetime v0.2.27
Checking anstyle-parse v1.0.0
Checking uuid v1.22.0
Checking bytes v1.11.1
Checking anstream v1.0.0
Compiling flate2 v1.1.9
Compiling tar v0.4.45
Compiling git-ref-format-macro v0.6.0
Checking snapbox-macros v0.3.10
Checking salsa20 v0.10.2
Checking siphasher v0.3.11
Checking clap_lex v1.1.0
Checking streaming-iterator v0.1.9
Checking strsim v0.11.1
Checking normalize-line-endings v0.3.0
Compiling heck v0.5.0
Checking similar v2.7.0
Compiling clap_derive v4.6.0
Checking snapbox v0.4.17
Checking clap_builder v4.6.0
Checking bloomy v1.2.0
Checking scrypt v0.11.0
Compiling radicle-surf v0.27.1
Checking git-ref-format v0.6.0
Checking systemd-journal-logger v2.2.2
Checking serde_spanned v1.0.4
Checking toml_datetime v0.7.5+spec-1.1.0
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-rust v0.23.3
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-c v0.23.4
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-css v0.23.2
Compiling tree-sitter-python v0.23.6
Checking pin-project-lite v0.2.17
Checking radicle-std-ext v0.2.0
Checking toml_writer v1.0.7+spec-1.1.0
Checking toml v0.9.12+spec-1.1.0
Checking tokio v1.50.0
Checking sqlite3-sys v0.18.0
Checking sqlite v0.37.0
Checking radicle-crypto v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-crypto)
Checking clap v4.6.0
Checking sysinfo v0.37.2
Checking yansi v1.0.1
Compiling radicle-cli v0.21.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli)
Compiling radicle-node v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-node)
Checking diff v0.1.13
Checking pretty_assertions v1.4.1
Checking human-panic v2.0.6
Checking clap_complete v4.6.0
Checking structured-logger v1.0.5
Checking radicle-systemd v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-systemd)
Checking tree-sitter-highlight v0.24.7
Checking itertools v0.14.0
Compiling qcheck-macros v1.0.0
Checking socket2 v0.5.10
Checking humantime v2.3.0
Checking lexopt v0.3.2
Compiling escargot v0.5.15
Checking timeago v0.4.2
Checking bit-vec v0.8.0
Checking bit-set v0.8.0
Checking rand_core v0.9.5
Checking num-bigint v0.4.6
Compiling ahash v0.8.12
Checking num-complex v0.4.6
Checking env_filter v1.0.0
Checking borrow-or-share v0.2.4
Checking fluent-uri v0.3.2
Checking env_logger v0.11.9
Checking phf_shared v0.11.3
Compiling test-log-macros v0.2.19
Checking num-rational v0.4.2
Checking wait-timeout v0.2.1
Checking outref v0.5.2
Checking quick-error v1.2.3
Checking fnv v1.0.7
Checking num v0.4.3
Compiling radicle-remote-helper v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-remote-helper)
Checking vsimd v0.8.0
Checking fraction v0.15.3
Checking uuid-simd v0.8.0
Checking rusty-fork v0.3.1
Checking test-log v0.2.19
Checking phf v0.11.3
Checking referencing v0.30.0
Checking rand_xorshift v0.4.0
Checking rand_chacha v0.9.0
Checking rand v0.9.2
Checking fancy-regex v0.14.0
Checking email_address v0.2.9
Checking base64 v0.22.1
Checking unarray v0.1.4
Checking bytecount v0.6.9
Checking num-cmp v0.1.0
Checking proptest v1.10.0
Checking emojis v0.6.4
Checking jsonschema v0.30.0
Compiling pastey v0.2.1
Checking radicle-windows v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-windows)
Checking git2 v0.20.4
Checking radicle-oid v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-oid)
Checking radicle-term v0.18.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-term)
Checking radicle-git-ext v0.12.0
Checking radicle-cob v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cob)
Checking radicle-core v0.3.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-core)
Checking radicle-log v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-log)
Checking radicle-fetch v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-fetch)
Checking radicle-cli-test v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli-test)
Checking radicle-schemars v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-schemars)
Checking radicle-protocol v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-protocol)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 42.41s
+ cargo build --all-targets --workspace
Compiling libc v0.2.183
Compiling cfg-if v1.0.4
Compiling zeroize v1.8.2
Compiling typenum v1.19.0
Compiling memchr v2.8.0
Compiling shlex v1.3.0
Compiling subtle v2.6.1
Compiling regex-syntax v0.8.10
Compiling generic-array v0.14.7
Compiling getrandom v0.2.17
Compiling jobserver v0.1.34
Compiling rand_core v0.6.4
Compiling cc v1.2.57
Compiling crypto-common v0.1.7
Compiling aho-corasick v1.1.4
Compiling serde_core v1.0.228
Compiling const-oid v0.9.6
Compiling regex-automata v0.4.14
Compiling smallvec v1.15.1
Compiling block-buffer v0.10.4
Compiling digest v0.10.7
Compiling cpufeatures v0.2.17
Compiling stable_deref_trait v1.2.1
Compiling bitflags v2.11.0
Compiling fastrand v2.3.0
Compiling thiserror v2.0.18
Compiling scopeguard v1.2.0
Compiling lock_api v0.4.14
Compiling parking_lot_core v0.9.12
Compiling gix-trace v0.1.19
Compiling tinyvec_macros v0.1.1
Compiling tinyvec v1.11.0
Compiling parking_lot v0.12.5
Compiling typeid v1.0.3
Compiling erased-serde v0.4.10
Compiling unicode-normalization v0.1.25
Compiling byteorder v1.5.0
Compiling itoa v1.0.17
Compiling gix-utils v0.3.2
Compiling serde v1.0.228
Compiling crc32fast v1.5.0
Compiling serde_fmt v1.1.0
Compiling hashbrown v0.16.1
Compiling value-bag-serde1 v1.12.0
Compiling value-bag v1.12.0
Compiling same-file v1.0.6
Compiling bstr v1.12.1
Compiling log v0.4.29
Compiling walkdir v2.5.0
Compiling gix-validate v0.11.1
Compiling zerofrom v0.1.6
Compiling gix-path v0.12.0
Compiling prodash v31.0.0
Compiling zlib-rs v0.6.3
Compiling yoke v0.8.1
Compiling hash32 v0.3.1
Compiling linux-raw-sys v0.12.1
Compiling heapless v0.8.0
Compiling zerovec v0.11.5
Compiling libm v0.2.16
Compiling rustix v1.1.4
Compiling faster-hex v0.10.0
Compiling block-padding v0.3.3
Compiling inout v0.1.4
Compiling num-traits v0.2.19
Compiling getrandom v0.4.2
Compiling sha2 v0.10.9
Compiling sha1 v0.10.6
Compiling cipher v0.4.4
Compiling sha1-checked v0.10.0
Compiling zerocopy v0.8.42
Compiling tinystr v0.8.2
Compiling litemap v0.8.1
Compiling once_cell v1.21.4
Compiling writeable v0.6.2
Compiling percent-encoding v2.3.2
Compiling icu_locale_core v2.1.1
Compiling gix-features v0.48.0
Compiling gix-hash v0.25.0
Compiling zerotrie v0.2.3
Compiling potential_utf v0.1.4
Compiling icu_provider v2.1.1
Compiling icu_collections v2.1.1
Compiling der v0.7.10
Compiling equivalent v1.0.2
Compiling indexmap v2.13.0
Compiling zmij v1.0.21
Compiling icu_normalizer_data v2.1.1
Compiling icu_properties_data v2.1.2
Compiling libz-sys v1.1.25
Compiling icu_properties v2.1.2
Compiling serde_json v1.0.149
Compiling icu_normalizer v2.1.1
Compiling ppv-lite86 v0.2.21
Compiling tempfile v3.27.0
Compiling spin v0.9.8
Compiling lazy_static v1.5.0
Compiling ref-cast v1.0.25
Compiling idna_adapter v1.2.1
Compiling num-integer v0.1.46
Compiling hmac v0.12.1
Compiling universal-hash v0.5.1
Compiling dyn-clone v1.0.20
Compiling utf8_iter v1.0.4
Compiling opaque-debug v0.3.1
Compiling idna v1.1.0
Compiling thiserror v1.0.69
Compiling spki v0.7.3
Compiling libgit2-sys v0.18.3+1.9.2
Compiling signature v2.2.0
Compiling ff v0.13.1
Compiling base16ct v0.2.0
Compiling group v0.13.0
Compiling sec1 v0.7.3
Compiling rand_chacha v0.3.1
Compiling form_urlencoded v1.2.2
Compiling crypto-bigint v0.5.5
Compiling url v2.5.8
Compiling rand v0.8.5
Compiling num-iter v0.1.45
Compiling aead v0.5.2
Compiling signature v1.6.4
Compiling ed25519 v1.5.3
Compiling schemars v1.2.1
Compiling elliptic-curve v0.13.8
Compiling poly1305 v0.8.0
Compiling rfc6979 v0.4.0
Compiling chacha20 v0.9.1
Compiling amplify_num v0.5.3
Compiling ascii v1.1.0
Compiling ct-codecs v1.1.6
Compiling ec25519 v0.1.0
Compiling ecdsa v0.16.9
Compiling amplify v4.9.0
Compiling primeorder v0.13.6
Compiling git-ref-format-core v0.6.0
Compiling polyval v0.6.2
Compiling base64ct v1.8.3
Compiling ghash v0.5.1
Compiling cyphergraphy v0.3.1
Compiling pem-rfc7468 v0.7.0
Compiling pkcs8 v0.10.2
Compiling pbkdf2 v0.12.2
Compiling aes v0.8.4
Compiling ctr v0.9.2
Compiling sqlite3-src v0.7.0
Compiling gix-error v0.2.3
Compiling keccak v0.1.6
Compiling aes-gcm v0.10.3
Compiling sha3 v0.10.8
Compiling curve25519-dalek v4.1.3
Compiling pkcs1 v0.7.5
Compiling ssh-encoding v0.2.0
Compiling num-bigint-dig v0.8.6
Compiling ed25519 v2.2.3
Compiling blowfish v0.9.1
Compiling cbc v0.1.2
Compiling base32 v0.4.0
Compiling cypheraddr v0.4.1
Compiling rsa v0.9.10
Compiling ssh-cipher v0.2.0
Compiling bcrypt-pbkdf v0.10.0
Compiling ed25519-dalek v2.2.0
Compiling p256 v0.13.2
Compiling p521 v0.13.3
Compiling p384 v0.13.1
Compiling chacha20poly1305 v0.10.1
Compiling qcheck v1.0.0
Compiling data-encoding v2.10.0
Compiling const-str v0.4.3
Compiling data-encoding-macro v0.1.19
Compiling noise-framework v0.4.1
Compiling base256emoji v1.0.2
Compiling ssh-key v0.6.7
Compiling crossbeam-utils v0.8.21
Compiling socks5-client v0.4.3
Compiling secrecy v0.10.3
Compiling base-x v0.2.11
Compiling multibase v0.9.2
Compiling ssh-agent-lib v0.5.2
Compiling cyphernet v0.5.4
Compiling crossbeam-channel v0.5.15
Compiling anstyle-query v1.1.5
Compiling errno v0.3.14
Compiling utf8parse v0.2.2
Compiling jiff v0.2.23
Compiling nonempty v0.9.0
Compiling siphasher v1.0.2
Compiling radicle-localtime v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-localtime)
Compiling radicle-dag v0.10.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-dag)
Compiling radicle-git-metadata v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-metadata)
Compiling anstyle v1.0.14
Compiling unicode-segmentation v1.12.0
Compiling colorchoice v1.0.5
Compiling is_terminal_polyfill v1.70.2
Compiling radicle-git-ref-format v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-ref-format)
Compiling gix-hashtable v0.15.0
Compiling base64 v0.21.7
Compiling radicle v0.24.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle)
Compiling convert_case v0.10.0
Compiling gix-date v0.15.3
Compiling gix-actor v0.41.0
Compiling gix-object v0.60.0
Compiling signal-hook-registry v1.4.8
Compiling tree-sitter-language v0.1.7
Compiling serde-untagged v0.1.9
Compiling bytesize v2.3.1
Compiling memmap2 v0.9.10
Compiling nonempty v0.12.0
Compiling fast-glob v0.3.3
Compiling dunce v1.0.5
Compiling signal-hook v0.3.18
Compiling derive_more-impl v2.1.1
Compiling gix-chunk v0.7.1
Compiling mio v1.1.1
Compiling regex v1.12.3
Compiling sem_safe v0.2.1
Compiling unicode-width v0.2.2
Compiling signals_receipts v0.2.5
Compiling signal-hook-mio v0.2.5
Compiling derive_more v2.1.1
Compiling gix-commitgraph v0.37.0
Compiling anstyle-parse v0.2.7
Compiling adler2 v2.0.1
Compiling anstream v0.6.21
Compiling gix-revwalk v0.31.0
Compiling crossterm v0.29.0
Compiling console v0.16.3
Compiling portable-atomic v1.13.1
Compiling gix-fs v0.21.1
Compiling unit-prefix v0.5.2
Compiling indicatif v0.18.4
Compiling gix-tempfile v23.0.0
Compiling inquire v0.9.4
Compiling radicle-signals v0.11.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-signals)
Compiling unicode-display-width v0.3.0
Compiling gix-quote v0.7.1
Compiling iana-time-zone v0.1.65
Compiling either v1.15.0
Compiling shell-words v1.1.1
Compiling gix-command v0.9.0
Compiling chrono v0.4.44
Compiling colored v2.2.0
Compiling gix-lock v23.0.0
Compiling gix-url v0.36.0
Compiling gix-config-value v0.18.0
Compiling gix-sec v0.14.0
Compiling gimli v0.32.3
Compiling gix-prompt v0.15.0
Compiling object v0.37.3
Compiling addr2line v0.25.1
Compiling gix-revision v0.45.0
Compiling gix-traverse v0.57.0
Compiling miniz_oxide v0.8.9
Compiling gix-diff v0.63.0
Compiling gix-glob v0.26.0
Compiling gix-packetline v0.21.3
Compiling tree-sitter v0.24.7
Compiling rustc-demangle v0.1.27
Compiling backtrace v0.3.76
Compiling gix-transport v0.57.0
Compiling sqlite3-sys v0.18.0
Compiling sqlite v0.37.0
Compiling gix-refspec v0.41.0
Compiling radicle-crypto v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-crypto)
Compiling gix-pack v0.70.0
Compiling arc-swap v1.9.1
Compiling gix-credentials v0.38.0
Compiling gix-ref v0.63.0
Compiling gix-shallow v0.12.0
Compiling gix-negotiate v0.31.0
Compiling gix-protocol v0.61.0
Compiling gix-odb v0.80.0
Compiling xattr v1.6.1
Compiling anstyle-parse v1.0.0
Compiling uuid v1.22.0
Compiling filetime v0.2.27
Compiling bytes v1.11.1
Compiling tar v0.4.45
Compiling git-ref-format-macro v0.6.0
Compiling anstream v1.0.0
Compiling flate2 v1.1.9
Compiling anyhow v1.0.102
Compiling getrandom v0.3.4
Compiling snapbox-macros v0.3.10
Compiling salsa20 v0.10.2
Compiling strsim v0.11.1
Compiling streaming-iterator v0.1.9
Compiling siphasher v0.3.11
Compiling clap_lex v1.1.0
Compiling normalize-line-endings v0.3.0
Compiling similar v2.7.0
Compiling clap_builder v4.6.0
Compiling snapbox v0.4.17
Compiling bloomy v1.2.0
Compiling scrypt v0.11.0
Compiling radicle-surf v0.27.1
Compiling git-ref-format v0.6.0
Compiling systemd-journal-logger v2.2.2
Compiling toml_datetime v0.7.5+spec-1.1.0
Compiling serde_spanned v1.0.4
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-c v0.23.4
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-rust v0.23.3
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-python v0.23.6
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-css v0.23.2
Compiling tree-sitter-typescript v0.23.2
Compiling pin-project-lite v0.2.17
Compiling toml_writer v1.0.7+spec-1.1.0
Compiling radicle-std-ext v0.2.0
Compiling toml v0.9.12+spec-1.1.0
Compiling tokio v1.50.0
Compiling clap v4.6.0
Compiling sysinfo v0.37.2
Compiling yansi v1.0.1
Compiling radicle-cli v0.21.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli)
Compiling radicle-node v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-node)
Compiling diff v0.1.13
Compiling pretty_assertions v1.4.1
Compiling human-panic v2.0.6
Compiling clap_complete v4.6.0
Compiling structured-logger v1.0.5
Compiling radicle-systemd v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-systemd)
Compiling tree-sitter-highlight v0.24.7
Compiling itertools v0.14.0
Compiling socket2 v0.5.10
Compiling lexopt v0.3.2
Compiling timeago v0.4.2
Compiling humantime v2.3.0
Compiling bit-vec v0.8.0
Compiling bit-set v0.8.0
Compiling escargot v0.5.15
Compiling rand_core v0.9.5
Compiling num-bigint v0.4.6
Compiling num-complex v0.4.6
Compiling env_filter v1.0.0
Compiling borrow-or-share v0.2.4
Compiling fluent-uri v0.3.2
Compiling num-rational v0.4.2
Compiling num v0.4.3
Compiling env_logger v0.11.9
Compiling ahash v0.8.12
Compiling phf_shared v0.11.3
Compiling wait-timeout v0.2.1
Compiling outref v0.5.2
Compiling fnv v1.0.7
Compiling quick-error v1.2.3
Compiling radicle-remote-helper v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-remote-helper)
Compiling vsimd v0.8.0
Compiling rusty-fork v0.3.1
Compiling test-log v0.2.19
Compiling uuid-simd v0.8.0
Compiling phf v0.11.3
Compiling referencing v0.30.0
Compiling fraction v0.15.3
Compiling rand_xorshift v0.4.0
Compiling git2 v0.20.4
Compiling rand v0.9.2
Compiling rand_chacha v0.9.0
Compiling fancy-regex v0.14.0
Compiling email_address v0.2.9
Compiling bytecount v0.6.9
Compiling base64 v0.22.1
Compiling num-cmp v0.1.0
Compiling unarray v0.1.4
Compiling jsonschema v0.30.0
Compiling proptest v1.10.0
Compiling emojis v0.6.4
Compiling radicle-oid v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-oid)
Compiling radicle-cob v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cob)
Compiling radicle-core v0.3.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-core)
Compiling radicle-term v0.18.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-term)
Compiling radicle-git-ext v0.12.0
Compiling radicle-log v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-log)
Compiling radicle-windows v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-windows)
Compiling radicle-fetch v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-fetch)
Compiling radicle-protocol v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-protocol)
Compiling radicle-cli-test v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli-test)
Compiling radicle-schemars v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-schemars)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 57.82s
+ cargo doc --workspace --no-deps --all-features
Checking regex-automata v0.4.14
Compiling num-traits v0.2.19
Checking once_cell v1.21.4
Compiling syn v1.0.109
Checking tempfile v3.27.0
Checking idna v1.1.0
Checking url v2.5.8
Checking num-integer v0.1.46
Checking git2 v0.20.4
Checking num-iter v0.1.45
Checking num-bigint-dig v0.8.6
Compiling amplify_syn v2.0.1
Checking bstr v1.12.1
Checking gix-validate v0.11.1
Checking git-ref-format-core v0.6.0
Checking gix-path v0.12.0
Compiling amplify_derive v4.0.1
Checking gix-features v0.48.0
Checking gix-error v0.2.3
Checking gix-hash v0.25.0
Checking rsa v0.9.10
Checking radicle-git-ref-format v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-ref-format)
Checking gix-date v0.15.3
Checking radicle-oid v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-oid)
Checking rusty-fork v0.3.1
Checking ssh-key v0.6.7
Checking gix-actor v0.41.0
Checking gix-hashtable v0.15.0
Checking proptest v1.10.0
Checking gix-object v0.60.0
Checking ssh-agent-lib v0.5.2
Checking radicle-localtime v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-localtime)
Checking radicle-git-metadata v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-metadata)
Checking radicle-dag v0.10.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-dag)
Checking amplify v4.9.0
Checking gix-chunk v0.7.1
Checking gix-fs v0.21.1
Checking gix-commitgraph v0.37.0
Checking cyphergraphy v0.3.1
Checking gix-tempfile v23.0.0
Checking gix-revwalk v0.31.0
Checking gix-quote v0.7.1
Checking cypheraddr v0.4.1
Checking noise-framework v0.4.1
Checking regex v1.12.3
Checking inquire v0.9.4
Checking radicle-signals v0.11.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-signals)
Checking gix-command v0.9.0
Checking socks5-client v0.4.3
Checking chrono v0.4.44
Checking gix-lock v23.0.0
Checking cyphernet v0.5.4
Checking gix-url v0.36.0
Checking radicle-crypto v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-crypto)
Checking radicle-term v0.18.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-term)
Checking gix-config-value v0.18.0
Checking radicle-core v0.3.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-core)
Checking radicle-cob v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cob)
Checking gix-prompt v0.15.0
Checking gix-traverse v0.57.0
Checking gix-revision v0.45.0
Checking gix-diff v0.63.0
Checking gix-glob v0.26.0
Checking gix-packetline v0.21.3
Checking radicle v0.24.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle)
Checking tree-sitter v0.24.7
Checking gix-transport v0.57.0
Checking gix-refspec v0.41.0
Checking gix-pack v0.70.0
Checking radicle-log v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-log)
Checking git-ref-format v0.6.0
Checking gix-credentials v0.38.0
Checking gix-ref v0.63.0
Checking gix-shallow v0.12.0
Checking gix-negotiate v0.31.0
Checking radicle-git-ext v0.12.0
Checking gix-protocol v0.61.0
Checking uuid v1.22.0
Checking gix-odb v0.80.0
Compiling radicle-cli v0.21.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli)
Checking human-panic v2.0.6
Checking radicle-surf v0.27.1
Checking tree-sitter-toml-ng v0.6.0
Checking tree-sitter-highlight v0.24.7
Checking radicle-systemd v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-systemd)
Documenting radicle-systemd v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-systemd)
Documenting radicle v0.24.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle)
Documenting radicle-log v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-log)
Documenting radicle-core v0.3.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-core)
Documenting radicle-cob v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cob)
Documenting radicle-term v0.18.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-term)
Documenting radicle-crypto v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-crypto)
Documenting radicle-signals v0.11.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-signals)
Documenting radicle-oid v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-oid)
Documenting radicle-git-ref-format v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-ref-format)
Documenting radicle-localtime v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-localtime)
Documenting radicle-git-metadata v0.2.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-git-metadata)
Documenting radicle-dag v0.10.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-dag)
Documenting radicle-windows v0.1.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-windows)
Checking radicle-fetch v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-fetch)
Documenting radicle-cli v0.21.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli)
Documenting radicle-cli-test v0.13.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-cli-test)
Checking radicle-protocol v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-protocol)
Documenting radicle-protocol v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-protocol)
Documenting radicle-node v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-node)
Documenting radicle-fetch v0.20.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-fetch)
Documenting radicle-schemars v0.8.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-schemars)
Documenting radicle-remote-helper v0.17.0 (/91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/crates/radicle-remote-helper)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.09s
Generated /91b8d635-7d88-49ab-a0f5-1420a691ac3a/w/target/doc/radicle/index.html and 21 other files
+ cargo test --workspace --no-fail-fast
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.15s
Running unittests src/lib.rs (target/debug/deps/radicle-63aebd2d0d2f288c)
running 381 tests
test canonical::formatter::test::ascii_control_characters ... ok
test canonical::formatter::test::securesystemslib_asserts ... ok
test canonical::formatter::test::ordered_nested_object ... ok
test cob::cache::tests::test_check_version ... ok
test cob::cache::migrations::_2::tests::test_patch_json_deserialization ... ok
test cob::common::test::test_color ... ok
test cob::common::test::test_title ... ok
test cob::cache::tests::test_migrate_to ... ok
test cob::cache::migrations::_2::tests::test_migration_2 ... ok
test cob::common::test::test_emojis ... ok
test cob::identity::test::prop_json_eq_str ... ok
test cob::identity::test::test_identity_redact_revision ... ok
test cob::identity::test::test_identity_remove_delegate_concurrent ... ok
test cob::identity::test::test_identity_reject_concurrent ... ok
test cob::identity::test::test_identity_update_rejected ... ok
test cob::identity::test::test_identity_updates ... ok
test cob::issue::cache::tests::test_counts ... ok
test cob::issue::cache::tests::test_get ... ok
test cob::issue::cache::tests::test_is_empty ... ok
test cob::issue::cache::tests::test_list ... ok
test cob::issue::cache::tests::test_list_by_status ... ok
test cob::issue::cache::tests::test_remove ... ok
test cob::identity::test::test_identity_updates_concurrent ... ok
test cob::identity::test::test_valid_identity ... ok
test cob::issue::test::test_embeds ... ok
test cob::issue::test::test_embeds_edit ... ok
test cob::identity::test::test_identity_updates_concurrent_outdated ... ok
test cob::issue::test::test_invalid_actions ... ok
test cob::issue::test::test_invalid_cob ... ok
test cob::issue::test::test_invalid_tx ... ok
test cob::issue::test::test_invalid_tx_reference ... ok
test cob::issue::test::test_concurrency ... ok
test cob::issue::test::test_issue_all ... ok
test cob::issue::test::test_issue_comment ... ok
test cob::issue::test::test_issue_comment_redact ... ok
test cob::issue::test::test_issue_create_and_change_state ... ok
test cob::issue::test::test_issue_create_and_assign ... ok
test cob::issue::test::test_issue_create_and_get ... ok
test cob::issue::test::test_issue_create_and_unassign ... ok
test cob::issue::test::test_issue_create_and_reassign ... ok
test cob::issue::test::test_issue_edit ... ok
test cob::issue::test::test_issue_edit_description ... ok
test cob::issue::test::test_issue_multilines ... ok
test cob::issue::test::test_issue_state_serde ... ok
test cob::issue::test::test_ordering ... ok
test cob::patch::actions::test::test_review_edit ... ok
test cob::issue::test::test_issue_label ... ok
test cob::issue::test::test_issue_react ... ok
test cob::issue::test::test_issue_reply ... ok
test cob::patch::cache::tests::test_is_empty ... ok
test cob::patch::cache::tests::test_get ... ok
test cob::patch::cache::tests::test_list_by_status ... ok
test cob::patch::cache::tests::test_remove ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_null_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_with_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_without_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_v2 ... ok
test cob::patch::encoding::review::test::test_review_summary ... ok
test cob::patch::test::test_json ... ok
test cob::patch::test::test_json_serialisation_target ... ok
test cob::patch::test::test_json_serialization ... ok
test cob::patch::test::test_merge_target_resolution ... ok
test cob::patch::cache::tests::test_list ... ok
test cob::patch::test::test_patch_create_and_get ... ok
test cob::patch::cache::tests::test_counts ... ok
test cob::patch::test::test_patch_merge_authorization_ref_formats ... ok
test cob::patch::test::test_patch_merge_custom_destination_authorized ... ok
test cob::patch::test::test_patch_merge_custom_destination_unauthorized ... ok
test cob::patch::test::test_patch_discussion ... ok
test cob::patch::test::test_patch_merge ... ok
test cob::patch::test::test_patch_redact ... ok
test cob::patch::test::test_patch_review ... ok
test cob::patch::test::test_patch_review_comment ... ok
test cob::patch::test::test_patch_review_duplicate ... ok
test cob::patch::test::test_patch_review_edit ... ok
test cob::patch::test::test_patch_review_edit_comment ... ok
test cob::patch::test::test_patch_review_remove_summary ... ok
test cob::patch::test::test_reactions_json_serialization ... ok
test cob::patch::test::test_revision_edit_redact ... ok
test cob::patch::test::test_revision_reaction ... ok
test cob::patch::test::test_revision_review_merge_redacted ... ok
test cob::patch::test::test_target_branch ... ok
test cob::patch::test::test_patch_review_revision_redact ... ok
test cob::stream::tests::test_all_from ... ok
test cob::stream::tests::test_all_until ... ok
test cob::stream::tests::test_all_from_until ... ok
test cob::stream::tests::test_regression_from_until ... ok
test cob::stream::tests::test_from_until ... ok
test cob::thread::tests::test_comment_edit_missing ... ok
test cob::thread::tests::test_comment_edit_redacted ... ok
test cob::thread::tests::test_comment_redact_missing ... ok
test cob::thread::tests::test_duplicate_comments ... ok
test cob::thread::tests::test_edit_comment ... ok
test cob::thread::tests::test_redact_comment ... ok
test cob::thread::tests::test_timeline ... ok
test git::canonical::protect::tests::refs_rad ... ok
test git::canonical::protect::tests::refs_rad_id ... ok
test git::canonical::protect::tests::refs_radieschen ... ok
test git::canonical::quorum::test::merge_base_commutative ... ok
test git::canonical::quorum::test::test_merge_bases ... ok
test cob::patch::test::test_patch_update ... ok
test git::canonical::rules::test::deserialization ... ok
test git::canonical::rules::test::deserialize_extensions ... ok
test git::canonical::rules::test::matches_exactly_curly_braces ... ok
test git::canonical::rules::test::matches_expands_globs_appropriately ... ok
test git::canonical::rules::test::ordering ... ok
test git::canonical::rules::test::property::identity ... ok
test git::canonical::rules::test::property::prefix ... ok
test git::canonical::rules::test::property::prefix_negative ... ok
test git::canonical::rules::test::property::suffix ... ok
test git::canonical::rules::test::canonical ... ok
test git::canonical::rules::test::property::suffix_negative ... ok
test git::canonical::rules::test::roundtrip ... ok
test git::canonical::rules::test::property::trailing_asterisk_partial_component ... ok
test git::canonical::rules::test::rule_validate_success ... ok
test git::canonical::rules::test::special_branches ... ok
test git::canonical::symbolic::test::deserialize_infinite ... ok
test git::canonical::symbolic::test::deserialize_order ... ok
test git::canonical::symbolic::test::deserialize_valid ... ok
test git::canonical::symbolic::test::infinite_extend ... ok
test git::canonical::symbolic::test::infinite_multi ... ok
test git::canonical::symbolic::test::infinite_single ... ok
test git::canonical::symbolic::test::reclassification_combine ... ok
test git::canonical::symbolic::test::reclassification_combine_reverse ... ok
test git::canonical::symbolic::test::reclassification_diamond ... ok
test git::canonical::symbolic::test::reclassification_order_invariant ... ok
test git::canonical::symbolic::test::reclassification_reverse_chain ... ok
test git::canonical::symbolic::test::resolve_two_hop_chain ... ok
test git::canonical::symbolic::test::target_classification ... ok
test git::canonical::symbolic::test::target_classification_symbolic ... ok
test git::canonical::symbolic::test::target_reclassification ... ok
test git::canonical::symbolic::test::target_reclassification_commutative ... ok
test git::canonical::tests::test_commit_quorum_fork_of_a_fork ... ok
test git::canonical::tests::test_commit_quorum_forked_merge_commits ... ok
test git::canonical::tests::test_commit_quorum_groups ... ok
test git::canonical::tests::test_commit_quorum_linear ... ok
test git::canonical::tests::test_commit_quorum_merges ... ok
test git::canonical::tests::test_commit_quorum_single ... ok
test git::canonical::tests::test_commit_quorum_three_way_fork ... ok
test git::canonical::tests::test_commit_quorum_two_way_fork ... ok
test git::canonical::tests::test_quorum_different_types ... ok
test git::canonical::rules::test::rule_validate_failures ... ok
test git::canonical::tests::test_tag_quorum ... ok
test git::test::test_version_from_str ... ok
test git::test::test_version_ord ... ok
test identity::crefs::tests::invalid_clash ... ok
test identity::crefs::tests::invalid_clash_asterisk_name ... ok
test identity::crefs::tests::invalid_dangling ... ok
test identity::crefs::tests::omit_symbolic ... ok
test identity::crefs::tests::valid ... ok
test identity::crefs::tests::valid_asterisk_target ... ok
test identity::did::test::test_did_encode_decode ... ok
test identity::did::test::test_did_vectors ... ok
test identity::doc::test::default_branch_clash ... ok
test identity::doc::test::default_branch_without_project ... ok
test git::canonical::tests::test_quorum_properties ... ok
test identity::doc::test::test_canonical_doc ... ok
test identity::doc::test::test_canonical_example ... ok
test identity::doc::test::test_duplicate_dids ... ok
test identity::doc::test::test_future_version_error ... ok
test identity::doc::test::test_is_valid_version ... ok
test cob::thread::tests::prop_ordering ... ok
test identity::doc::test::test_not_found ... ok
test identity::doc::test::test_parse_version ... ok
test identity::doc::test::test_visibility_json ... ok
test identity::doc::update::test::test_can_update_crefs ... ok
test identity::doc::update::test::test_cannot_include_default_branch_rule ... ok
test identity::doc::update::test::test_default_branch_rule_exists_after_verification ... ok
test identity::project::test::test_project_name ... ok
test node::address::store::test::test_alias ... ok
test node::address::store::test::test_disconnected ... ok
test node::address::store::test::test_disconnected_ban ... ok
test cob::patch::cache::tests::test_find_by_revision ... ok
test node::address::store::test::test_entries ... ok
test node::address::store::test::test_entries_skips_unparsable_address ... ok
test node::address::store::test::test_get_none ... ok
test node::address::store::test::test_insert_and_get ... ok
test node::address::store::test::test_insert_and_remove ... ok
test node::address::store::test::test_empty ... ok
test node::address::store::test::test_insert_and_update ... ok
test node::address::store::test::test_insert_duplicate ... ok
test node::address::store::test::test_remove_nothing ... ok
test node::command::test::command_result ... ok
test node::config::test::deserialize_migrating_scope ... ok
test node::config::test::fetch_level_min ... ok
test node::config::test::onion_absent ... ok
test node::config::test::onion_null ... ok
test node::config::test::partial ... ok
test node::config::test::regression_ipv6_address_brackets ... ok
test node::config::test::regression_ipv6_address_no_brackets ... ok
test node::config::test::serialize_migrating_scope ... ok
test node::config::test::user_agent_custom ... ok
test node::address::store::test::test_node_aliases ... ok
test node::config::test::user_agent_default ... ok
test node::config::test::user_agent_opt_out ... ok
test node::db::config::test::database_config_valid_combinations ... ok
test node::config::test::user_agent_default_explicit ... ok
test node::db::config::test::invalid ... ok
test node::db::test::migration_8::all_ipv6_formatted_dns_addresses_are_retyped ... ok
test node::db::test::migration_8::dns_address_starting_with_bracket_but_missing_closing_bracket_colon_is_unaffected ... ok
test node::db::test::migration_8::dns_address_with_bracket_not_at_start_is_unaffected ... ok
test node::db::test::migration_8::ipv4_address_is_unaffected ... ok
test node::db::test::migration_8::ipv6_formatted_dns_address_is_deleted_when_correct_ipv6_row_already_exists ... ok
test node::db::test::migration_8::ipv6_formatted_dns_address_is_retyped_to_ipv6 ... ok
test node::db::test::migration_8::migration_applies_to_all_nodes ... ok
test node::db::test::migration_8::plain_dns_hostname_without_brackets_is_unaffected ... ok
test node::db::test::migration_8::retype_preserves_address_metadata ... ok
test node::db::test::migration_9::bracketed_non_ipv6_garbage_is_deleted ... ok
test node::db::test::migration_9::dns_row_is_unaffected_even_when_inner_part_has_no_colon ... ok
test node::db::test::migration_9::empty_brackets_ipv6_row_is_deleted ... ok
test node::db::test::migration_9::full_ipv6_address_is_kept ... ok
test node::db::test::migration_9::loopback_address_is_kept ... ok
test node::db::test::migration_9::ipv4_row_is_unaffected ... ok
test node::db::test::migration_9::unspecified_address_is_kept ... ok
test node::features::test::test_operations ... ok
test node::notifications::store::test::test_branch_notifications ... ok
test node::db::test::test_version ... ok
test node::notifications::store::test::test_clear ... ok
test node::notifications::store::test::test_cob_notifications ... ok
test node::notifications::store::test::test_counts_by_repo ... ok
test node::notifications::store::test::test_duplicate_notifications ... ok
test node::notifications::store::test::test_notification_status ... ok
test node::policy::store::test::test_follow_and_unfollow_node ... ok
test node::policy::store::test::test_node_policies ... ok
test node::policy::store::test::test_node_aliases ... ok
test node::policy::store::test::test_node_policy ... ok
test node::policy::store::test::test_repo_policies ... ok
test node::policy::store::test::test_seed_and_unseed_repo ... ok
test node::policy::store::test::test_repo_policy ... ok
test node::policy::store::test::test_update_scope ... ok
test node::policy::store::test::test_update_alias ... ok
test node::refs::store::test::test_count ... ok
test node::refs::store::test::test_set_and_delete ... ok
test node::refs::store::test::test_set_and_get ... ok
test node::routing::test::test_count ... ok
test node::routing::test::test_entries ... ok
test node::routing::test::test_insert_and_get ... ok
test node::routing::test::test_insert_and_get_resources ... ok
test node::routing::test::test_insert_duplicate ... ok
test node::routing::test::test_insert_and_remove ... ok
test node::routing::test::test_insert_existing_updated_time ... ok
test node::routing::test::test_len ... ok
test node::routing::test::test_remove_many ... ok
test node::routing::test::test_remove_redundant ... ok
test node::routing::test::test_update_existing_multi ... ok
test node::sync::announce::test::all_synced_nodes_are_preferred_seeds ... ok
test node::sync::announce::test::announcer_adapts_target_to_reach ... ok
test identity::doc::test::test_max_delegates ... ok
test node::routing::test::test_prune ... ok
test node::sync::announce::test::announcer_preferred_seeds_or_replica_factor ... ok
test node::sync::announce::test::announcer_reached_min_replication_target ... ok
test node::sync::announce::test::announcer_reached_max_replication_target ... ok
test node::sync::announce::test::announcer_reached_preferred_seeds ... ok
test node::sync::announce::test::announcer_with_replication_factor_zero_and_preferred_seeds ... ok
test node::sync::announce::test::announcer_synced_with_unknown_node ... ok
test node::sync::announce::test::announcer_timed_out ... ok
test node::sync::announce::test::construct_node_appears_in_multiple_input_sets ... ok
test node::sync::announce::test::construct_only_preferred_seeds_provided ... ok
test node::sync::announce::test::invariant_progress_should_match_state ... ok
test node::sync::announce::test::cannot_construct_announcer ... ok
test node::sync::announce::test::local_node_in_multiple_sets ... ok
test node::sync::announce::test::local_node_in_preferred_seeds ... ok
test node::sync::announce::test::local_node_only_in_all_sets_results_in_no_seeds_error ... ok
test node::sync::announce::test::local_node_in_unsynced_set ... ok
test node::sync::announce::test::local_node_in_synced_set ... ok
test node::sync::announce::test::synced_with_local_node_is_ignored ... ok
test node::sync::announce::test::synced_with_same_node_multiple_times ... ok
test node::sync::announce::test::preferred_seeds_already_synced ... ok
test node::sync::announce::test::timed_out_after_reaching_success ... ok
test node::sync::fetch::test::all_nodes_are_candidates ... ok
test node::sync::fetch::test::could_not_reach_target ... ok
test node::sync::fetch::test::ignores_duplicates_and_local_node ... ok
test node::sync::fetch::test::all_nodes_are_fetchable ... ok
test node::sync::fetch::test::preferred_seeds_target_returned_over_replicas ... ok
test node::sync::fetch::test::reaches_target_of_max_replicas ... ok
test node::sync::test::ensure_replicas_construction ... ok
test node::sync::test::replicas_constrain_to ... ok
test node::test::test_address ... ok
test node::test::test_alias ... ok
test node::test::test_command_result ... ok
test node::test::test_user_agent ... ok
test node::timestamp::tests::test_timestamp_max ... ok
test node::sync::fetch::test::reaches_target_of_preferred_seeds ... ok
test profile::test::canonicalize_home ... ok
test node::sync::fetch::test::reaches_target_of_replicas ... ok
test profile::test::test_config ... ok
test rad::tests::test_checkout ... ok
test rad::tests::test_fork ... ok
test rad::tests::test_init ... ok
test storage::git::tests::test_references_of ... ok
test storage::git::transport::local::url::test::test_url_parse ... ok
test storage::git::transport::local::url::test::test_url_to_string ... ok
test storage::git::transport::remote::url::test::test_url_parse ... ok
test storage::git::tests::test_sign_refs ... ok
test profile::config::test::schema ... ok
test identity::doc::test::prop_encode_decode ... ok
test storage::refs::sigrefs::git::properties::idempotent_write ... ok
test storage::refs::sigrefs::git::properties::initial_commit_roundtrip ... ok
test storage::refs::sigrefs::read::test::commit_reader::identity_root_error ... ok
test storage::refs::sigrefs::read::test::commit_reader::missing_commit ... ok
test storage::refs::sigrefs::read::test::commit_reader::read_ok ... ok
test storage::refs::sigrefs::read::test::commit_reader::too_many_parents ... ok
test storage::refs::sigrefs::read::test::commit_reader::tree_error ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::doc_blob_error ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::missing_identity ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::read_ok_none ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::read_ok_some ... ok
test storage::refs::sigrefs::read::test::resolve_tip::find_reference_error ... ok
test storage::refs::sigrefs::read::test::resolve_tip::missing_sigrefs ... ok
test storage::refs::sigrefs::read::test::resolve_tip::resolve_tip_ok ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::detect_parent::root_without_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::detect_parent::root_without_root ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::restore ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::root ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::root_with_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::head_commit_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::head_verify_mismatched_identity_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::head_verify_signature_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::invalid_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::read_ok_no_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::read_ok_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::read_ok_root ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::alternating ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::chain ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::multiple ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::root_at_head ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::single_commit ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::two_commits ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::walk_commit_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::walk_verify_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::missing_both ... ok
test storage::refs::sigrefs::read::test::tree_reader::missing_refs ... ok
test storage::refs::sigrefs::read::test::tree_reader::missing_signature ... ok
test storage::refs::sigrefs::read::test::tree_reader::parse_refs_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::parse_signature_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::read_ok ... ok
test storage::refs::sigrefs::read::test::tree_reader::read_refs_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::read_signature_error ... ok
test storage::refs::sigrefs::write::test::commit_writer::tree_error ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_commit_error ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_empty_refs ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_root_ok ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_with_parent_ok ... ok
test storage::refs::sigrefs::write::test::head_reader::no_head ... ok
test storage::refs::sigrefs::write::test::head_reader::read_ok ... ok
test storage::refs::sigrefs::write::test::head_reader::reference_error ... ok
test storage::refs::sigrefs::write::test::head_reader::refs_blob_error ... ok
test storage::refs::sigrefs::write::test::head_reader::refs_blob_missing ... ok
test storage::refs::sigrefs::write::test::head_reader::refs_parse_error ... ok
test storage::refs::sigrefs::write::test::head_reader::signature_blob_error ... ok
test storage::refs::sigrefs::write::test::head_reader::signature_blob_missing ... ok
test storage::refs::sigrefs::write::test::head_reader::signature_parse_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::commit_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::head_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::never_write_rad_sigrefs ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::reference_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::unchanged ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::unchanged_force_writes_new_commit ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::write_empty_refs ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::write_root_ok ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::write_with_parent_ok ... ok
test storage::refs::sigrefs::write::test::tree_writer::sign_error ... ok
test storage::refs::sigrefs::write::test::tree_writer::write_ok ... ok
test storage::refs::sigrefs::write::test::tree_writer::write_tree_error ... ok
test storage::refs::tests::prop_canonical_roundtrip ... ok
test storage::refs::tests::test_rid_verification ... ok
test storage::tests::test_storage ... ok
test test::assert::test::assert_with_message ... ok
test test::assert::test::test_assert_no_move ... ok
test test::assert::test::test_assert_panic_0 - should panic ... ok
test test::assert::test::test_assert_panic_1 - should panic ... ok
test test::assert::test::test_assert_panic_2 - should panic ... ok
test test::assert::test::test_assert_succeed ... ok
test test::assert::test::test_panic_message ... ok
test version::test::test_version ... ok
test web::test::description_only ... ok
test web::test::pinned_empty ... ok
test storage::refs::sigrefs::property::idempotent ... ok
test storage::refs::sigrefs::property::roundtrip ... ok
test storage::refs::sigrefs::git::properties::chain_roundtrip ... ok
test result: ok. 381 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.35s
Running unittests src/lib.rs (target/debug/deps/radicle_cli-a0f46bb150e04764)
running 46 tests
test commands::block::args::test::should_not_parse ... ok
test commands::block::args::test::should_parse_nid ... ok
test commands::block::args::test::should_parse_rid ... ok
test commands::clone::args::test::should_parse_rid_non_urn ... ok
test commands::clone::args::test::should_parse_rid_urn ... ok
test commands::clone::args::test::should_parse_rid_url ... ok
test commands::cob::args::test::should_allow_log_json_format ... ok
test commands::cob::args::test::should_allow_show_json_format ... ok
test commands::cob::args::test::should_allow_update_json_format ... ok
test commands::cob::args::test::should_not_allow_show_pretty_format ... ok
test commands::cob::args::test::should_not_allow_update_pretty_format ... ok
test commands::fork::args::test::should_parse_rid_urn ... ok
test commands::cob::args::test::should_allow_log_pretty_format ... ok
test commands::fork::args::test::should_parse_rid_non_urn ... ok
test commands::fork::args::test::should_not_parse_rid_url ... ok
test commands::id::args::test::should_not_parse_into_payload - should panic ... ok
test commands::id::args::test::should_not_clobber_payload_args ... ok
test commands::id::args::test::should_not_parse_single_payload ... ok
test commands::id::args::test::should_not_parse_single_payloads ... ok
test commands::id::args::test::should_parse_into_payload ... ok
test commands::id::args::test::should_parse_multiple_payloads ... ok
test commands::init::args::test::should_not_parse_rid_url ... ok
test commands::id::args::test::should_parse_single_payload ... ok
test commands::init::args::test::should_parse_rid_non_urn ... ok
test commands::init::args::test::should_parse_rid_urn ... ok
test commands::inspect::test::test_tree ... ok
test commands::patch::review::builder::tests::test_review_comments_basic ... ok
test commands::patch::review::builder::tests::test_review_comments_before ... ok
test commands::patch::review::builder::tests::test_review_comments_multiline ... ok
test commands::patch::review::builder::tests::test_review_comments_split_hunk ... ok
test commands::publish::args::test::should_not_parse_rid_url ... ok
test commands::publish::args::test::should_parse_rid_urn ... ok
test commands::publish::args::test::should_parse_rid_non_urn ... ok
test git::ddiff::tests::diff_encode_decode_ddiff_hunk ... ok
test git::pretty_diff::test::test_pretty ... ignored
test git::unified_diff::test::test_diff_content_encode_decode_content ... ok
test commands::watch::args::test::should_parse_ref_str ... ok
test terminal::args::test::should_not_parse ... ok
test git::unified_diff::test::test_diff_encode_decode_diff ... ok
test terminal::args::test::should_parse_rid ... ok
test terminal::args::test::should_parse_nid ... ok
test terminal::format::test::test_bytes ... ok
test terminal::format::test::test_strip_comments ... ok
test terminal::patch::test::test_edit_display_message ... ok
test terminal::patch::test::test_create_display_message ... ok
test terminal::patch::test::test_update_display_message ... ok
test result: ok. 45 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.02s
Running unittests src/main.rs (target/debug/deps/rad-b663e956fcb62c5f)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/commands.rs (target/debug/deps/commands-b765312b876a9c09)
running 126 tests
test commands::checkout::rad_checkout ... ok
test commands::clone::rad_clone_bare ... ok
test commands::clone::rad_clone ... ok
test commands::clone::rad_clone_all ... ok
test commands::clone::rad_clone_scope ... ok
test commands::clone::rad_clone_connect ... ok
test commands::clone::rad_clone_unknown ... ok
test commands::clone::rad_clone_directory ... ok
test commands::clone::rad_clone_partial_fail ... ok
test commands::cob::rad_cob_multiset ... ok
test commands::clone::test_clone_without_seeds ... ok
test commands::cob::rad_cob_migrate ... ok
test commands::cob::rad_cob_log ... ok
test commands::cob::rad_cob_operations ... ok
test commands::cob::rad_cob_show ... ok
test commands::cob::rad_cob_update_identity ... ok
test commands::cob::rad_cob_update ... ok
test commands::cob::test_cob_deletion ... ok
test commands::cob::test_cob_replication ... ok
test commands::git::git_push_amend ... ok
test commands::git::git_push_and_fetch ... ok
test commands::git::git_push_canonical_lightweight_tags ... ok
test commands::git::git_push_diverge ... ok
test commands::git::git_push_force_with_lease ... ok
test commands::git::git_push_canonical ... ok
test commands::git::git_push_converge ... ok
test commands::id::rad_id_collaboration ... ignored, slow
test commands::id::rad_id ... ok
test commands::git::git_push_rollback ... ok
test commands::git::git_tag ... ok
test commands::id::rad_id_private ... ok
test commands::id::rad_id_threshold_soft_fork ... ok
test commands::id::rad_id_conflict ... ok
test commands::id::rad_id_unknown_field ... ok
test commands::id::rad_id_threshold ... ok
test commands::id::rad_id_update_delete_field ... ok
test commands::init::rad_init ... ignored, part of many other tests
test commands::id::rad_id_unauthorized_delegate ... ok
test commands::init::rad_init_detached_head ... ok
test commands::id::rad_id_multi_delegate ... ok
test commands::init::rad_init_bare ... ok
test commands::init::rad_init_no_git ... ok
test commands::init::rad_init_existing ... ok
test commands::init::rad_init_existing_bare ... ok
test commands::init::rad_init_no_seed ... ok
test commands::init::rad_init_private ... ok
test commands::init::rad_init_private_no_seed ... ok
test commands::init::rad_init_private_clone ... ok
test commands::inbox::rad_inbox ... ok
test commands::init::rad_init_private_clone_seed ... ok
test commands::init::rad_init_private_seed ... ok
test commands::init::rad_init_sync_not_connected ... ok
test commands::init::rad_init_sync_preferred ... ok
test commands::init::rad_init_with_existing_remote ... ok
test commands::init::rad_publish ... ok
test commands::issue::rad_issue ... ok
test commands::jj::rad_jj_bare ... ignored, the bare repository does not have a `rad` remote, and so it cannot determine the RID of the repository
test commands::jj::rad_jj_colocated_patch ... ok
test commands::issue::rad_issue_list ... ok
test commands::node::rad_node_connect ... ok
test commands::node::rad_node_connect_without_address ... ok
test commands::patch::rad_merge_after_update ... ok
test commands::node::rad_node ... ok
test commands::patch::rad_merge_no_ff ... ok
test commands::patch::rad_merge_via_push ... ok
test commands::patch::rad_patch ... ok
test commands::patch::rad_patch_ahead_behind ... ok
test commands::patch::rad_patch_change_base ... ok
test commands::patch::rad_patch_checkout ... ok
test commands::init::rad_init_sync_and_clone ... ok
test commands::init::rad_init_sync_timeout ... ok
test commands::patch::rad_patch_checkout_revision ... ok
test commands::patch::rad_patch_detached_head ... ok
test commands::patch::rad_patch_checkout_force ... ok
test commands::patch::rad_patch_diff ... ok
test commands::patch::rad_patch_draft ... ok
test commands::patch::rad_patch_fetch_2 ... ok
test commands::patch::rad_patch_edit ... ok
test commands::patch::rad_patch_fetch_1 ... ok
test commands::patch::rad_patch_merge_default_branch ... ok
test commands::patch::rad_patch_magic_push ... ok
test commands::patch::rad_patch_delete ... ok
test commands::patch::rad_patch_merge_draft ... ok
test commands::patch::rad_patch_merge_into_canonical_ref_branch ... ok
test commands::patch::rad_patch_merge_strict_destination ... ok
test commands::patch::rad_patch_merge_wrong_branch ... ok
test commands::patch::rad_patch_revert_custom_branch ... ok
test commands::patch::rad_patch_open_explore ... ok
test commands::patch::rad_patch_merge_unauthorized_branch ... ok
test commands::patch::rad_patch_revert_isolation ... ok
test commands::patch::rad_patch_update ... ok
test commands::patch::rad_patch_revert_merge ... ok
test commands::patch::rad_review_by_hunk ... ok
test commands::policy::rad_block ... ok
test commands::policy::rad_seed_and_follow ... ok
test commands::patch::rad_patch_via_push ... ok
test commands::policy::rad_seed_policy_allow_no_scope ... ok
test commands::policy::rad_seed_scope ... ok
test commands::policy::rad_unseed ... ok
test commands::policy::rad_seed_many ... ok
test commands::policy::rad_unseed_many ... ok
test commands::sigpipe::config ... ok
test commands::sigpipe::help ... ok
test commands::sigpipe::rad_self ... ok
test commands::patch::rad_push_and_pull_patches ... ok
test commands::remote::rad_remote ... ok
test commands::sync::rad_sync_without_node ... ok
test commands::sync::rad_sync ... ok
test commands::utility::framework_home ... ok
test commands::utility::rad_auth ... ok
test commands::utility::rad_auth_errors ... ok
test commands::patch::rad_patch_pull_update ... ok
test commands::utility::rad_config ... ok
test commands::utility::rad_diff ... ok
test commands::utility::rad_clean ... ok
test commands::utility::rad_help ... ok
test commands::utility::rad_inspect ... ok
test commands::utility::rad_key_mismatch ... ok
test commands::utility::rad_self ... ok
test commands::utility::rad_warn_old_nodes ... ok
test commands::watch::rad_watch ... ok
test commands::sync::rad_fetch ... ok
test rad_remote ... ok
test commands::workflow::rad_workflow ... ok
test commands::sync::test_replication_via_seed ... ok
test commands::utility::rad_fork ... ok
test result: ok. 123 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 74.41s
Running unittests src/lib.rs (target/debug/deps/radicle_cli_test-8661b40f0b4e6c38)
running 3 tests
test tests::test_parse ... ok
test tests::test_run ... ok
test tests::test_example_spaced_brackets ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_cob-bc7cf3ae6e1cdd03)
running 9 tests
test object::tests::test_serde ... ok
test tests::git::roundtrip ... ok
test tests::invalid_parse_refstr ... ok
test tests::git::update_cob ... ok
test type_name::test::invalid_typenames ... ok
test type_name::test::valid_typenames ... ok
test tests::git::traverse_cobs ... ok
test tests::git::list_cobs ... ok
test tests::parse_refstr ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running unittests src/lib.rs (target/debug/deps/radicle_core-8832683f7f0214ca)
running 4 tests
test repo::test::valid ... ok
test repo::test::invalid ... ok
test repo::test::assert_prop_roundtrip_parse ... ok
test repo::serde_impls::test::assert_prop_roundtrip_serde_json ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_crypto-36cb56f976df174a)
running 11 tests
test ssh::agent::test::test_agent_encoding_remove ... ok
test ssh::agent::test::test_agent_encoding_sign ... ok
test ssh::fmt::test::test_key ... ok
test ssh::fmt::test::test_fingerprint ... ok
test ssh::keystore::tests::test_init_no_passphrase ... ok
test tests::prop_encode_decode ... ok
test tests::test_e25519_dh ... ok
test tests::test_encode_decode ... ok
test tests::prop_key_equality ... ok
test ssh::keystore::tests::test_signer ... ok
test ssh::keystore::tests::test_init_passphrase ... ok
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.82s
Running unittests src/lib.rs (target/debug/deps/radicle_dag-e10cdde88570a8e0)
running 20 tests
test tests::test_contains ... ok
test tests::test_cycle ... ok
test tests::test_dependencies ... ok
test tests::test_diamond ... ok
test tests::test_fold_diamond ... ok
test tests::test_complex ... ok
test tests::test_fold_multiple_roots ... ok
test tests::test_fold_reject ... ok
test tests::test_fold_sorting_2 ... ok
test tests::test_fold_sorting_1 ... ok
test tests::test_get ... ok
test tests::test_is_empty ... ok
test tests::test_len ... ok
test tests::test_merge_1 ... ok
test tests::test_merge_2 ... ok
test tests::test_prune_1 ... ok
test tests::test_prune_2 ... ok
test tests::test_prune_by_sorting ... ok
test tests::test_remove ... ok
test tests::test_siblings ... ok
test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_fetch-7d6ff5a1183ebc01)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_git_metadata-41b02b9ef3e2236d)
running 24 tests
test commit::parse::test::error::invalid_author ... ok
test commit::parse::test::error::invalid_committer ... ok
test commit::parse::test::error::invalid_format_continuation_without_preceding_header ... ok
test commit::parse::test::error::invalid_parent ... ok
test commit::parse::test::error::invalid_tree ... ok
test commit::parse::test::error::missing_author ... ok
test commit::parse::test::error::missing_committer ... ok
test commit::parse::test::error::missing_header_body_separator ... ok
test commit::parse::test::success::commit_gpgsig_is_preserved_and_strip_removes_it ... ok
test commit::parse::test::error::missing_tree_empty_header ... ok
test commit::parse::test::error::missing_tree_wrong_first_line ... ok
test commit::parse::test::success::commit_last_paragraph_kept_in_message_when_not_all_trailers ... ok
test commit::parse::test::success::commit_with_extra_headers ... ok
test commit::parse::test::success::commit_with_trailers ... ok
test commit::parse::test::success::merge_commit ... ok
test commit::parse::test::success::commit_with_multiline_gpgsig ... ok
test commit::parse::test::success::commit_with_single_parent ... ok
test commit::parse::test::success::root_commit ... ok
test commit::parse::test::unit::body_no_paragraph_separator_means_no_trailers ... ok
test commit::parse::test::unit::trailers_accepts_empty_input ... ok
test commit::parse::test::unit::trailers_rejects_invalid_token_chars ... ok
test commit::parse::test::success::roundtrip ... ok
test commit::parse::test::unit::body_last_paragraph_not_trailers_stays_in_message ... ok
test commit::parse::test::unit::trailers_rejects_line_without_separator ... ok
test result: ok. 24 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_git_ref_format-2868a65b3ff2c590)
running 9 tests
test test::component ... ok
test test::pattern ... ok
test test::component_invalid - should panic ... ok
test test::qualified ... ok
test test::qualified_invalid - should panic ... ok
test test::qualified_pattern ... ok
test test::qualified_pattern_invalid - should panic ... ok
test test::refname ... ok
test test::refname_invalid - should panic ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_localtime-ec55a7767b981c91)
running 1 test
test serde_impls::test::test_localtime ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_log-aa8a5607eeb05b0d)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_node-9733cebb203a5f67)
running 80 tests
test control::tests::test_control_socket ... ok
test reactor::timer::tests::test_next ... ok
test reactor::timer::tests::test_wake ... ok
test reactor::timer::tests::test_wake_exact ... ok
test control::tests::test_seed_unseed ... ok
test fingerprint::tests::matching ... ok
test tests::e2e::fetch_does_not_contain_rad_sigrefs_parent ... ok
test tests::e2e::missing_default_branch ... ok
test tests::e2e::missing_delegate_default_branch ... ok
test tests::e2e::test_background_foreground_fetch ... ok
test tests::e2e::test_block_prevents_connection ... ok
test tests::e2e::test_block_active_connection ... ok
test tests::e2e::test_block_prevents_fetch ... ok
test tests::e2e::test_catchup_on_refs_announcements ... ok
test tests::e2e::test_channel_reader_limit ... ok
test tests::e2e::test_clone ... ok
test tests::e2e::test_connection_crossing ... ok
test tests::e2e::test_dont_fetch_owned_refs ... ok
test tests::e2e::test_fetch_emits_canonical_ref_update_partial_glob ... ok
test tests::e2e::test_fetch_preserve_owned_refs ... ok
test tests::e2e::test_fetch_followed_remotes ... ok
test tests::e2e::test_concurrent_fetches ... ok
test tests::e2e::test_fetch_unseeded ... ok
test tests::e2e::test_inventory_sync_basic ... ok
test tests::e2e::test_fetch_up_to_date ... ok
test tests::e2e::test_fetch_emits_canonical_ref_update ... ok
test tests::e2e::test_large_fetch ... ok
test tests::e2e::test_migrated_clone ... ok
test tests::e2e::test_missing_remote ... ok
test tests::e2e::test_multiple_offline_inits ... ok
test tests::e2e::test_non_fast_forward_identity_doc ... ok
test tests::e2e::test_non_fast_forward_sigrefs ... ok
test tests::e2e::test_outdated_delegate_sigrefs ... ok
test tests::e2e::test_outdated_sigrefs ... ok
test tests::e2e::test_replication ... ok
test tests::e2e::test_inventory_sync_bridge ... ok
test tests::e2e::test_inventory_sync_ring ... ok
test tests::e2e::test_inventory_sync_star ... ok
test tests::e2e::test_replication_invalid ... ok
test tests::e2e::test_replication_ref_in_sigrefs ... ok
test tests::test_announcement_rebroadcast ... ok
test tests::test_announcement_rebroadcast_duplicates ... ok
test tests::test_announcement_rebroadcast_timestamp_filtered ... ok
test tests::test_connection_kept_alive ... ok
test tests::test_announcement_relay ... ok
test tests::test_disconnecting_unresponsive_peer ... ok
test tests::test_fetch_missing_inventory_on_gossip ... ok
test tests::test_fetch_missing_inventory_on_schedule ... ok
test tests::test_inbound_connection ... ok
test tests::test_inventory_decode ... ok
test tests::test_init_and_seed ... ok
test tests::test_inventory_relay ... ok
test tests::test_inventory_relay_bad_timestamp ... ok
test tests::test_inventory_sync ... ok
test tests::test_maintain_connections ... ok
test tests::test_maintain_connections_failed_attempt ... ok
test tests::test_maintain_connections_transient ... ok
test tests::test_outbound_connection ... ok
test tests::test_inventory_pruning ... ok
test tests::test_persistent_peer_connect ... ok
test tests::test_persistent_peer_reconnect_attempt ... ok
test tests::test_persistent_peer_reconnect_success ... ok
test tests::test_ping_response ... ok
test tests::test_queued_fetch_from_ann_same_rid ... ok
test tests::test_queued_fetch_max_capacity ... ok
test tests::test_queued_fetch_from_command_same_rid ... ok
test tests::test_redundant_connect ... ok
test tests::test_refs_announcement_fetch_trusted_no_inventory ... ok
test tests::test_refs_announcement_followed ... ok
test tests::test_refs_announcement_no_subscribe ... ok
test tests::test_refs_announcement_offline ... ok
test tests::test_refs_announcement_relay_private ... ok
test tests::test_refs_announcement_relay_public ... ok
test tests::test_seed_repo_subscribe ... ok
test tests::test_announcement_message_amplification ... ok
test wire::test::test_inventory_ann_with_extension ... ok
test wire::test::test_pong_message_with_extension ... ok
test tests::prop_inventory_exchange_dense ... ok
test tests::test_seeding ... ok
test tests::test_refs_synced_event ... ok
test result: ok. 80 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 15.61s
Running unittests src/main.rs (target/debug/deps/radicle_node-73906b99b97538c7)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_oid-f350725ba9f62eb5)
running 10 tests
test fmt::test::zero ... ok
test fmt::test::fixture ... ok
test git2::test::zero ... ok
test gix::test::zero ... ok
test str::test::fixture ... ok
test fmt::test::git2 ... ok
test str::test::zero ... ok
test str::test::git2_roundtrip ... ok
test str::test::gix_roundtrip ... ok
test fmt::test::gix ... ok
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_protocol-007c2c3d588c03b2)
running 99 tests
test deserializer::test::test_unparsed ... ok
test deserializer::test::test_decode_next ... ok
test deserializer::test::prop_decode_next ... ok
test fetcher::service::tests::test_fetch_coalescing_different_refs ... ok
test fetcher::test::queue::properties::capacity::rejection ... ok
test fetcher::test::queue::properties::capacity::bounded ... ok
test fetcher::test::queue::properties::dequeue::empty_queue_returns_none ... ok
test fetcher::test::queue::properties::dequeue::enables_reenqueue ... ok
test fetcher::test::queue::properties::capacity::restored_after_dequeue ... ok
test fetcher::test::queue::properties::capacity::capacity_reached_returns_same_item ... ok
test fetcher::test::queue::properties::dequeue::drained_queue_returns_none ... ok
test fetcher::test::queue::properties::fifo::interleaved_operations ... ok
test fetcher::test::queue::properties::fifo::ordering ... ok
test fetcher::test::queue::properties::equality::reflexive ... ok
test fetcher::test::queue::properties::merge::different_rid_accepted ... ok
test fetcher::test::queue::properties::equality::symmetric ... ok
test fetcher::test::queue::properties::equality::transitive ... ok
test fetcher::test::queue::properties::merge::longer_timeout_preserved ... ok
test fetcher::test::queue::properties::merge::combines_refs ... ok
test fetcher::test::queue::properties::merge::does_not_increase_queue_length ... ok
test fetcher::test::queue::unit::capacity_takes_precedence_over_merge_for_new_items ... ok
test fetcher::test::queue::unit::empty_refs_items_can_be_equal ... ok
test fetcher::test::queue::unit::max_timeout_accepted ... ok
test fetcher::test::queue::unit::merge_preserves_position_in_queue ... ok
test fetcher::test::queue::unit::zero_timeout_accepted ... ok
test fetcher::test::state::command::cancel::cancellation_is_isolated ... ok
test fetcher::test::state::command::cancel::non_existent_returns_unexpected ... ok
test fetcher::test::queue::properties::merge::empty_refs_fetches_all ... ok
test fetcher::test::state::command::cancel::ongoing_and_queued ... ok
test fetcher::test::state::command::cancel::single_ongoing ... ok
test fetcher::test::state::command::fetch::fetch_after_previous_completed ... ok
test fetcher::test::state::command::fetch::fetch_different_repo_same_node_within_capacity ... ok
test fetcher::test::state::command::fetch::fetch_duplicate_returns_already_fetching ... ok
test fetcher::test::state::command::fetch::fetch_at_capacity_enqueues ... ok
test fetcher::test::state::command::fetch::fetch_queue_merge_takes_longer_timeout ... ok
test fetcher::test::state::command::fetch::fetch_queue_merge_empty_refs_fetches_all ... ok
test fetcher::test::state::command::fetch::fetch_queue_rejected_capacity_reached ... ok
test fetcher::test::state::command::fetch::fetch_queue_merges_already_queued ... ok
test fetcher::test::state::command::fetch::fetch_same_repo_different_nodes_queues_second ... ok
test fetcher::test::queue::properties::merge::succeed_when_at_capacity ... ok
test fetcher::test::state::command::fetch::fetch_same_repo_different_refs_enqueues ... ok
test fetcher::test::state::command::fetch::fetch_start_first_fetch_for_node ... ok
test fetcher::test::state::command::fetched::complete_one_of_multiple ... ok
test fetcher::test::state::command::fetched::complete_single_ongoing ... ok
test fetcher::test::state::command::fetched::non_existent_returns_not_found ... ok
test fetcher::test::queue::properties::merge::same_rid_merges_anywhere_in_queue ... ok
test fetcher::test::state::concurrent::fetched_then_cancel ... ok
test fetcher::test::state::command::fetched::complete_then_dequeue_fifo ... ok
test fetcher::test::state::concurrent::interleaved_operations ... ok
test fetcher::test::state::config::min_queue_size ... ok
test fetcher::test::state::dequeue::empty_queue_returns_none ... ok
test fetcher::test::state::dequeue::cannot_dequeue_while_node_at_capacity ... ok
test fetcher::test::state::invariant::queue_integrity_after_merge ... ok
test fetcher::test::state::dequeue::maintains_fifo_order ... ok
test service::filter::test::compatible ... ok
test service::filter::test::test_parameters ... ok
test fetcher::test::state::multinode::independent_queues ... ok
test service::gossip::store::test::test_announced ... ok
test service::limiter::test::test_limiter_different_rates ... ok
test service::filter::test::test_sizes ... ok
test service::limiter::test::test_limiter_refill ... ok
test service::limiter::test::test_limiter_multi ... ok
test service::message::tests::test_inventory_limit ... ok
test fetcher::test::state::config::high_concurrency ... ok
test service::message::tests::test_ref_remote_limit ... ok
test wire::frame::test::test_encode_git_large ... ok
test wire::frame::test::test_stream_id ... ok
test fetcher::test::state::multinode::high_count ... ok
test wire::message::tests::prop_roundtrip_address ... ok
test service::message::tests::prop_refs_announcement_signing ... ok
test wire::message::tests::prop_zero_bytes_encode_decode ... ok
test wire::message::tests::test_inv_ann_max_size ... ok
test wire::message::tests::test_node_ann_max_size ... ok
test wire::message::tests::test_ping_encode_size_overflow - should panic ... ok
test wire::message::tests::test_pingpong_encode_max_size ... ok
test wire::message::tests::test_pong_encode_size_overflow - should panic ... ok
test service::message::tests::test_node_announcement_validate ... ok
test wire::tests::prop_oid ... ok
test wire::tests::prop_roundtrip_filter ... ok
test wire::tests::prop_roundtrip_publickey ... ok
test wire::tests::prop_roundtrip_refs ... ok
test wire::tests::prop_roundtrip_repoid ... ok
test wire::tests::prop_roundtrip_tuple ... ok
test wire::tests::prop_roundtrip_u16 ... ok
test wire::tests::prop_roundtrip_u32 ... ok
test wire::tests::prop_roundtrip_u64 ... ok
test wire::tests::prop_roundtrip_vec ... ok
test wire::tests::prop_signature ... ok
test wire::tests::prop_string ... ok
test wire::tests::test_alias ... ok
test wire::tests::test_bounded_vec_limit ... ok
test wire::tests::test_filter_invalid ... ok
test wire::tests::test_string ... ok
test wire::varint::test::prop_roundtrip_varint ... ok
test wire::varint::test::test_encode_overflow - should panic ... ok
test wire::varint::test::test_encoding ... ok
test wire::message::tests::prop_roundtrip_message ... ok
test wire::message::tests::test_refs_ann_max_size ... ok
test wire::message::tests::prop_message_decoder ... ok
test result: ok. 99 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.04s
Running unittests src/main.rs (target/debug/deps/git_remote_rad-cf9d6c21cc0dac38)
running 12 tests
test protocol::tests::test_capabilities ... ok
test protocol::tests::test_empty ... ok
test protocol::tests::test_fetch_whitespace ... ok
test protocol::tests::test_fetch ... ok
test protocol::tests::test_invalid ... ok
test protocol::tests::test_list ... ok
test protocol::tests::test_list_for_push ... ok
test protocol::tests::test_option ... ok
test protocol::tests::test_option_whitespace_preservation ... ok
test protocol::tests::test_push ... ok
test protocol::tests::test_push_delete ... ok
test protocol::tests::test_push_force ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/main.rs (target/debug/deps/radicle_schemars-b09eeea7cf87748b)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_signals-e91beff5378165d8)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_systemd-77e26f6a607513aa)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_term-afa03b1828121040)
running 21 tests
test ansi::tests::colors_disabled ... ok
test cell::test::test_width ... ok
test ansi::tests::wrapping ... ok
test ansi::tests::colors_enabled ... ok
test element::test::test_spaced ... ok
test element::test::test_width ... ok
test element::test::test_truncate ... ok
test table::test::test_table_border ... ok
test table::test::test_table ... ok
test table::test::test_table_truncate ... ok
test table::test::test_table_border_maximized ... ok
test table::test::test_table_unicode ... ok
test table::test::test_table_unicode_truncate ... ok
test table::test::test_truncate ... ok
test table::test::test_table_border_truncated ... ok
test textarea::test::test_wrapping_code_block ... ok
test textarea::test::test_wrapping ... ok
test vstack::test::test_vstack_maximize ... ok
test textarea::test::test_wrapping_fenced_block ... ok
test vstack::test::test_vstack ... ok
test textarea::test::test_wrapping_paragraphs ... ok
test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_windows-942926f7348a8563)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle
running 1 test
test crates/radicle/src/cob/patch/encoding/review.rs - cob::patch::encoding::review::Review (line 23) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cli
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cli_test
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cob
running 1 test
test crates/radicle-cob/src/backend/stable.rs - backend::stable::with_advanced_timestamp (line 56) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.08s; merged doctests compilation took 0.08s
Doc-tests radicle_core
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_crypto
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_dag
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_fetch
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_git_metadata
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_git_ref_format
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_localtime
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_log
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_node
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_oid
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_protocol
running 6 tests
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::push (line 122) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::collect_from (line 30) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::max (line 96) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::truncate (line 50) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::with_capacity (line 66) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::unbound (line 149) ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.39s; merged doctests compilation took 0.37s
Doc-tests radicle_signals
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_systemd
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_term
running 1 test
test crates/radicle-term/src/table.rs - table (line 4) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.18s; merged doctests compilation took 0.17s
Doc-tests radicle_windows
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Exit code: 0
{
"response": "finished",
"result": "success"
}