rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood7e3433a9de4338c3556e81d5c66b518747548f4c
{
"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": "Updated",
"patch": {
"id": "9e45558dda40cf7e46739fef11b366d2060ecb1d",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"title": "cli/id: Use clap",
"state": {
"status": "open",
"conflicts": []
},
"before": "384c506489dd6a4cbf8c80b0370b2b2a8de7835b",
"after": "7e3433a9de4338c3556e81d5c66b518747548f4c",
"commits": [
"7e3433a9de4338c3556e81d5c66b518747548f4c",
"b5850079dbf3a749a0db2254cb1090a0bf6d1274"
],
"target": "b7a7f55e78f190218370de7538340bfe358d7430",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "9e45558dda40cf7e46739fef11b366d2060ecb1d",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "This implementation works around the fact that `clap` does currently\nnot support value parsers for a series of values, so representing\n`--payload` as a `Vec<Payload>` does not work.\n\nInstead, we parse eveything into a `Vec<String>` and do the validation\non the application side.\n\nUsing value parsers for a series of values will probably be supported in\n`clap` v5, though.",
"base": "3e98589a767d9a17a3da90e52ae4abb198fa9ada",
"oid": "1fcee08a8fd3b3c863bddb8c98cdf1bcbb2cf2cc",
"timestamp": 1760432036
},
{
"id": "5743b4009825c6beafb70cb6fd9ddee79843057c",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "- Rebase",
"base": "efe10f95be9fde1cda84f0631ec8f6546ac7228d",
"oid": "f27f69e9a00f4dc33f9c74327d2d3dfe62a14322",
"timestamp": 1760432200
},
{
"id": "4afef0bc538bbf407e8e8863535bcbaf1bc10807",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "REVIEW",
"base": "efe10f95be9fde1cda84f0631ec8f6546ac7228d",
"oid": "53244fd61500879b0f81d7a3496f494e595fbd81",
"timestamp": 1760440294
},
{
"id": "8391c927f0376b3043c677d3e78ddd28fb6cc405",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "Changes:\n\n- Return `impl Iterator` from payload parsing function\n- Assert value number in payload parsing function\n- Add unit tests",
"base": "dfd35480be82828713ccc3c9206b1273ddac35d0",
"oid": "d3f8eced41cd81b833a8a101f8004113002aba58",
"timestamp": 1760443529
},
{
"id": "c2b443e152167326672d9952f01c26ff08a70896",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "REVIEW",
"base": "dfd35480be82828713ccc3c9206b1273ddac35d0",
"oid": "1ea1182827099e205c9e060135ce4770584e7628",
"timestamp": 1760444570
},
{
"id": "2f9c64211a2179b13b253e0e93ef749c2b388abb",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "- Squash review commits",
"base": "dfd35480be82828713ccc3c9206b1273ddac35d0",
"oid": "8a3a222b18f315fe7a9fad7cfd7fc11e9ca00886",
"timestamp": 1760458749
},
{
"id": "8904aec75c2095b785209754949ad4a6cdeed146",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "- Rebase",
"base": "384c506489dd6a4cbf8c80b0370b2b2a8de7835b",
"oid": "6030280853c4c6ddbab12a17de75a7c18538f6c6",
"timestamp": 1760458770
},
{
"id": "9549a776bd4e3f7a744b3020774cb5eb564a5c61",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "Review",
"base": "384c506489dd6a4cbf8c80b0370b2b2a8de7835b",
"oid": "45820843c6d147802b49a780dda800dcafb52a69",
"timestamp": 1760469079
},
{
"id": "a67b55d8e6df58ae2d0d745316e9a2ce8090d4b1",
"author": {
"id": "did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"alias": "erikli"
},
"description": "Changes:\n\n- Use `REVISION_ID` and fix a missing new line",
"base": "384c506489dd6a4cbf8c80b0370b2b2a8de7835b",
"oid": "7e3433a9de4338c3556e81d5c66b518747548f4c",
"timestamp": 1760602570
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "a64c6dcd-aec1-4238-80bd-5667acc80150"
},
"info_url": "https://cci.rad.levitte.org//a64c6dcd-aec1-4238-80bd-5667acc80150.html"
}
Started at: 2025-10-16 10:16:12.742728+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/a64c6dcd-aec1-4238-80bd-5667acc80150/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 19 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 9e45558dda40cf7e46739fef11b366d2060ecb1d
✓ Switched to branch patch/9e45558 at revision a67b55d
✓ Branch patch/9e45558 setup to track rad/patches/9e45558dda40cf7e46739fef11b366d2060ecb1d
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 7e3433a9de4338c3556e81d5c66b518747548f4c
HEAD is now at 7e3433a9 cli/id: Use clap
Exit code: 0
$ git show 7e3433a9de4338c3556e81d5c66b518747548f4c
commit 7e3433a9de4338c3556e81d5c66b518747548f4c
Author: Erik Kundt <erik@zirkular.io>
Date: Tue Oct 14 10:49:01 2025 +0200
cli/id: Use clap
This implementation works around the fact that `clap` does currently
not support value parsers for a series of values, so representing
`--payload` as a `Vec<Payload>` does not work.
Instead, we parse eveything into a `Vec<String>` and do the validation
on the application side.
Using value parsers for a series of values will probably be supported in
`clap` v5, though.
diff --git a/crates/radicle-cli/src/commands/help.rs b/crates/radicle-cli/src/commands/help.rs
index e7d51164..6d43f83c 100644
--- a/crates/radicle-cli/src/commands/help.rs
+++ b/crates/radicle-cli/src/commands/help.rs
@@ -60,7 +60,10 @@ const COMMANDS: &[CommandItem] = &[
about: crate::commands::fork::ABOUT,
},
CommandItem::Lexopt(crate::commands::help::HELP),
- CommandItem::Lexopt(crate::commands::id::HELP),
+ CommandItem::Clap {
+ name: "id",
+ about: crate::commands::id::ABOUT,
+ },
CommandItem::Clap {
name: "init",
about: crate::commands::init::ABOUT,
diff --git a/crates/radicle-cli/src/commands/id.rs b/crates/radicle-cli/src/commands/id.rs
index 93f3cf12..e8d0b105 100644
--- a/crates/radicle-cli/src/commands/id.rs
+++ b/crates/radicle-cli/src/commands/id.rs
@@ -1,285 +1,36 @@
+mod args;
+
use std::collections::BTreeSet;
-use std::{ffi::OsString, io};
use anyhow::{anyhow, Context};
+use itertools::Itertools as _;
+
use radicle::cob::identity::{self, IdentityMut, Revision, RevisionId};
use radicle::cob::Title;
use radicle::identity::doc::update;
-use radicle::identity::doc::update::EditVisibility;
use radicle::identity::{doc, Doc, Identity, RawDoc};
use radicle::node::device::Device;
use radicle::node::NodeId;
-use radicle::prelude::{Did, RepoId};
use radicle::storage::{ReadStorage as _, WriteRepository};
use radicle::{cob, crypto, Profile};
use radicle_surf::diff::Diff;
use radicle_term::Element;
-use serde_json as json;
use crate::git::unified_diff::Encode as _;
use crate::git::Rev;
use crate::terminal as term;
-use crate::terminal::args::{Args, Error, Help};
+use crate::terminal::args::Error;
use crate::terminal::patch::Message;
-use crate::terminal::Interactive;
-
-pub const HELP: Help = Help {
- name: "id",
- description: "Manage repository identities",
- version: env!("RADICLE_VERSION"),
- usage: r#"
-Usage
-
- rad id list [<option>...]
- rad id update [--title <string>] [--description <string>]
- [--delegate <did>] [--rescind <did>]
- [--threshold <num>] [--visibility <private | public>]
- [--allow <did>] [--disallow <did>]
- [--no-confirm] [--payload <id> <key> <val>...] [--edit] [<option>...]
- rad id edit <revision-id> [--title <string>] [--description <string>] [<option>...]
- rad id show <revision-id> [<option>...]
- rad id <accept | reject | redact> <revision-id> [<option>...]
-
- The *rad id* command is used to manage and propose changes to the
- identity of a Radicle repository.
-
- See the rad-id(1) man page for more information.
-
-Options
-
- --repo <rid> Repository (defaults to the current repository)
- --quiet, -q Don't print anything
- --help Print help
-"#,
-};
-
-#[derive(Clone, Debug, Default)]
-pub enum Operation {
- Update {
- title: Option<Title>,
- description: Option<String>,
- delegate: Vec<Did>,
- rescind: Vec<Did>,
- threshold: Option<usize>,
- visibility: Option<EditVisibility>,
- allow: BTreeSet<Did>,
- disallow: BTreeSet<Did>,
- payload: Vec<(doc::PayloadId, String, json::Value)>,
- edit: bool,
- },
- AcceptRevision {
- revision: Rev,
- },
- RejectRevision {
- revision: Rev,
- },
- EditRevision {
- revision: Rev,
- title: Option<Title>,
- description: Option<String>,
- },
- RedactRevision {
- revision: Rev,
- },
- ShowRevision {
- revision: Rev,
- },
- #[default]
- ListRevisions,
-}
-#[derive(Default, PartialEq, Eq)]
-pub enum OperationName {
- Accept,
- Reject,
- Edit,
- Update,
- Show,
- Redact,
- #[default]
- List,
-}
+pub use args::Args;
+use args::Command;
+pub(crate) use args::ABOUT;
-pub struct Options {
- pub op: Operation,
- pub rid: Option<RepoId>,
- pub interactive: Interactive,
- pub quiet: bool,
-}
-
-impl Args for Options {
- fn from_args(args: Vec<OsString>) -> anyhow::Result<(Self, Vec<OsString>)> {
- use lexopt::prelude::*;
-
- let mut parser = lexopt::Parser::from_args(args);
- let mut op: Option<OperationName> = None;
- let mut revision: Option<Rev> = None;
- let mut rid: Option<RepoId> = None;
- let mut title: Option<Title> = None;
- let mut description: Option<String> = None;
- let mut delegate: Vec<Did> = Vec::new();
- let mut rescind: Vec<Did> = Vec::new();
- let mut visibility: Option<EditVisibility> = None;
- let mut allow: BTreeSet<Did> = BTreeSet::new();
- let mut disallow: BTreeSet<Did> = BTreeSet::new();
- let mut threshold: Option<usize> = None;
- let mut interactive = Interactive::new(io::stdout());
- let mut payload = Vec::new();
- let mut edit = false;
- let mut quiet = false;
-
- while let Some(arg) = parser.next()? {
- match arg {
- Long("help") => {
- return Err(Error::HelpManual { name: "rad-id" }.into());
- }
- Short('h') => {
- return Err(Error::Help.into());
- }
- Long("title")
- if op == Some(OperationName::Edit) || op == Some(OperationName::Update) =>
- {
- let val = parser.value()?;
- title = Some(term::args::string(&val).try_into()?);
- }
- Long("description")
- if op == Some(OperationName::Edit) || op == Some(OperationName::Update) =>
- {
- description = Some(parser.value()?.to_string_lossy().into());
- }
- Long("quiet") | Short('q') => {
- quiet = true;
- }
- Long("no-confirm") => {
- interactive = Interactive::No;
- }
- Value(val) if op.is_none() => match val.to_string_lossy().as_ref() {
- "e" | "edit" => op = Some(OperationName::Edit),
- "u" | "update" => op = Some(OperationName::Update),
- "l" | "list" => op = Some(OperationName::List),
- "s" | "show" => op = Some(OperationName::Show),
- "a" | "accept" => op = Some(OperationName::Accept),
- "r" | "reject" => op = Some(OperationName::Reject),
- "d" | "redact" => op = Some(OperationName::Redact),
-
- unknown => anyhow::bail!("unknown operation '{}'", unknown),
- },
- Long("repo") => {
- let val = parser.value()?;
- let val = term::args::rid(&val)?;
-
- rid = Some(val);
- }
- Long("delegate") => {
- let did = term::args::did(&parser.value()?)?;
- delegate.push(did);
- }
- Long("rescind") => {
- let did = term::args::did(&parser.value()?)?;
- rescind.push(did);
- }
- Long("allow") => {
- let value = parser.value()?;
- let did = term::args::did(&value)?;
- allow.insert(did);
- }
- Long("disallow") => {
- let value = parser.value()?;
- let did = term::args::did(&value)?;
- disallow.insert(did);
- }
- Long("visibility") => {
- let value = parser.value()?;
- let value = term::args::parse_value("visibility", value)?;
-
- visibility = Some(value);
- }
- Long("threshold") => {
- threshold = Some(parser.value()?.to_string_lossy().parse()?);
- }
- Long("payload") => {
- let mut values = parser.values()?;
- let id = values
- .next()
- .ok_or(anyhow!("expected payload id, eg. `xyz.radicle.project`"))?;
- let id: doc::PayloadId = term::args::parse_value("payload", id)?;
-
- let key = values
- .next()
- .ok_or(anyhow!("expected payload key, eg. 'defaultBranch'"))?;
- let key = term::args::string(&key);
-
- let val = values
- .next()
- .ok_or(anyhow!("expected payload value, eg. '\"heartwood\"'"))?;
- let val = val.to_string_lossy().to_string();
- let val = json::from_str(val.as_str())
- .map_err(|e| anyhow!("invalid JSON value `{val}`: {e}"))?;
-
- payload.push((id, key, val));
- }
- Long("edit") => {
- edit = true;
- }
- Value(val) => {
- let val = term::args::rev(&val)?;
- revision = Some(val);
- }
- _ => {
- return Err(anyhow!(arg.unexpected()));
- }
- }
- }
-
- let op = match op.unwrap_or_default() {
- OperationName::Accept => Operation::AcceptRevision {
- revision: revision.ok_or_else(|| anyhow!("a revision must be provided"))?,
- },
- OperationName::Reject => Operation::RejectRevision {
- revision: revision.ok_or_else(|| anyhow!("a revision must be provided"))?,
- },
- OperationName::Edit => Operation::EditRevision {
- title,
- description,
- revision: revision.ok_or_else(|| anyhow!("a revision must be provided"))?,
- },
- OperationName::Show => Operation::ShowRevision {
- revision: revision.ok_or_else(|| anyhow!("a revision must be provided"))?,
- },
- OperationName::List => Operation::ListRevisions,
- OperationName::Redact => Operation::RedactRevision {
- revision: revision.ok_or_else(|| anyhow!("a revision must be provided"))?,
- },
- OperationName::Update => Operation::Update {
- title,
- description,
- delegate,
- rescind,
- threshold,
- visibility,
- allow,
- disallow,
- payload,
- edit,
- },
- };
- Ok((
- Options {
- rid,
- op,
- interactive,
- quiet,
- },
- vec![],
- ))
- }
-}
-
-pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
+pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
let profile = ctx.profile()?;
let storage = &profile.storage;
- let rid = if let Some(rid) = options.rid {
+ let rid = if let Some(rid) = args.repo {
rid
} else {
let (_, rid) = radicle::rad::cwd()?;
@@ -291,8 +42,11 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let mut identity = Identity::load_mut(&repo)?;
let current = identity.current().clone();
- match options.op {
- Operation::AcceptRevision { revision } => {
+ let interactive = args.interactive();
+ let command = args.command.unwrap_or(Command::List);
+
+ match command {
+ Command::Accept { revision } => {
let revision = get(revision, &identity, &repo)?.clone();
let id = revision.id;
let signer = term::signer(&profile)?;
@@ -301,10 +55,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
anyhow::bail!("cannot vote on revision that is {}", revision.state);
}
- if options
- .interactive
- .confirm(format!("Accept revision {}?", term::format::tertiary(id)))
- {
+ if interactive.confirm(format!("Accept revision {}?", term::format::tertiary(id))) {
identity.accept(&revision.id, &signer)?;
if let Some(revision) = identity.revision(&id) {
@@ -314,14 +65,14 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
}
// TODO: Different output if canonical changed?
- if !options.quiet {
+ if !args.quiet {
term::success!("Revision {id} accepted");
print_meta(revision, ¤t, &profile)?;
}
}
}
}
- Operation::RejectRevision { revision } => {
+ Command::Reject { revision } => {
let revision = get(revision, &identity, &repo)?.clone();
let signer = term::signer(&profile)?;
@@ -329,19 +80,19 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
anyhow::bail!("cannot vote on revision that is {}", revision.state);
}
- if options.interactive.confirm(format!(
+ if interactive.confirm(format!(
"Reject revision {}?",
term::format::tertiary(revision.id)
)) {
identity.reject(revision.id, &signer)?;
- if !options.quiet {
+ if !args.quiet {
term::success!("Revision {} rejected", revision.id);
print_meta(&revision, ¤t, &profile)?;
}
}
}
- Operation::EditRevision {
+ Command::Edit {
revision,
title,
description,
@@ -357,11 +108,11 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
};
identity.edit(revision.id, title, description, &signer)?;
- if !options.quiet {
+ if !args.quiet {
term::success!("Revision {} edited", revision.id);
}
}
- Operation::Update {
+ Command::Update {
title,
description,
delegate: delegates,
@@ -375,6 +126,9 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
} => {
let proposal = {
let mut proposal = current.doc.clone().edit();
+ let allow = allow.into_iter().collect::<BTreeSet<_>>();
+ let disallow = disallow.into_iter().collect::<BTreeSet<_>>();
+
proposal.threshold = threshold.unwrap_or(proposal.threshold);
let proposal = match visibility {
@@ -407,7 +161,13 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
}
};
- update::payload(proposal, payload)?
+ // TODO(erikli): whenever `clap` starts supporting custom value parsers
+ // for a series of values, we can parse into `Payload` implicitly.
+ let payloads = args::PayloadUpsert::parse_many(&payload)
+ .map_ok(|p| (p.id, p.key, p.value))
+ .collect::<Result<Vec<_>, _>>()?;
+
+ update::payload(proposal, payloads)?
};
// If `--edit` is specified, the document can also be edited via a text edit.
@@ -431,7 +191,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let proposal = update::verify(proposal)?;
if proposal == current.doc {
- if !options.quiet {
+ if !args.quiet {
term::print(term::format::italic(
"Nothing to do. The document is up to date. See `rad inspect --identity`.",
));
@@ -445,7 +205,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
// Update the canonical head to point to the latest accepted revision.
repo.set_identity_head_to(revision.id)?;
}
- if options.quiet {
+ if args.quiet {
term::print(revision.id);
} else {
term::success!(
@@ -455,7 +215,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
print(&revision, ¤t, &repo, &profile)?;
}
}
- Operation::ListRevisions => {
+ Command::List => {
let mut revisions =
term::Table::<7, term::Label>::new(term::table::TableOptions::bordered());
@@ -489,25 +249,25 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
}
revisions.print();
}
- Operation::RedactRevision { revision } => {
+ Command::Redact { revision } => {
let revision = get(revision, &identity, &repo)?.clone();
let signer = term::signer(&profile)?;
if revision.is_accepted() {
anyhow::bail!("cannot redact accepted revision");
}
- if options.interactive.confirm(format!(
+ if interactive.confirm(format!(
"Redact revision {}?",
term::format::tertiary(revision.id)
)) {
identity.redact(revision.id, &signer)?;
- if !options.quiet {
+ if !args.quiet {
term::success!("Revision {} redacted", revision.id);
}
}
}
- Operation::ShowRevision { revision } => {
+ Command::Show { revision } => {
let revision = get(revision, &identity, &repo)?;
let previous = revision.parent.unwrap_or(revision.id);
let previous = identity
diff --git a/crates/radicle-cli/src/commands/id/args.rs b/crates/radicle-cli/src/commands/id/args.rs
new file mode 100644
index 00000000..8719b874
--- /dev/null
+++ b/crates/radicle-cli/src/commands/id/args.rs
@@ -0,0 +1,336 @@
+use std::io;
+use std::str::FromStr;
+
+use clap::{Parser, Subcommand};
+
+use serde_json as json;
+
+use thiserror::Error;
+
+use radicle::cob::{Title, TypeNameParse};
+use radicle::identity::doc::update::EditVisibility;
+use radicle::identity::doc::PayloadId;
+use radicle::prelude::{Did, RepoId};
+
+use crate::git::Rev;
+
+use crate::terminal::Interactive;
+
+pub(crate) const ABOUT: &str = "Manage repository identities";
+
+const LONG_ABOUT: &str = r#"
+The `id` command is used to manage and propose changes to the
+identity of a Radicle repository.
+
+See the rad-id(1) man page for more information.
+"#;
+
+#[derive(Debug, Error)]
+pub enum PayloadUpsertParseError {
+ #[error("could not parse payload id: {0}")]
+ IdParse(#[from] TypeNameParse),
+ #[error("could not parse json value: {0}")]
+ Value(#[from] json::Error),
+}
+
+#[derive(Clone, Debug)]
+pub struct PayloadUpsert {
+ pub(super) id: PayloadId,
+ pub(super) key: String,
+ pub(super) value: json::Value,
+}
+
+impl PayloadUpsert {
+ /// Parses a slice of all payload upserts as aggregated by `clap`
+ /// (see [`Command::Update::payload`]).
+ /// E.g. `["com.example.one", "name", "1", "com.example.two", "name2", "2"]`
+ /// will result in iterator over two [`PayloadUpsert`]s.
+ ///
+ /// # Panics
+ ///
+ /// If the length of `values` is not divisible by 3.
+ /// (To catch errors in the definition of the parser derived from
+ /// [`Command::Update`] or `clap` itself, and unexpected changes to
+ /// `clap`s behaviour in the future.)
+ pub(super) fn parse_many(
+ values: &[String],
+ ) -> impl Iterator<Item = Result<Self, PayloadUpsertParseError>> + use<'_> {
+ // `clap` ensures we have 3 values per option occurrence,
+ // so we can chunk the aggregated slice exactly.
+ let chunks = values.chunks_exact(3);
+
+ assert!(chunks.remainder().is_empty());
+
+ chunks.map(|chunk| {
+ // Slice accesses will not panic, guaranteed by `chunks_exact(3)`.
+ Ok(PayloadUpsert {
+ id: PayloadId::from_str(&chunk[0])?,
+ key: chunk[1].to_owned(),
+ value: json::from_str(&chunk[2].to_owned())?,
+ })
+ })
+ }
+}
+
+#[derive(Clone, Debug)]
+struct EditVisibilityParser;
+
+impl clap::builder::TypedValueParser for EditVisibilityParser {
+ type Value = EditVisibility;
+
+ fn parse_ref(
+ &self,
+ cmd: &clap::Command,
+ arg: Option<&clap::Arg>,
+ value: &std::ffi::OsStr,
+ ) -> Result<Self::Value, clap::Error> {
+ <EditVisibility as std::str::FromStr>::from_str.parse_ref(cmd, arg, value)
+ }
+
+ fn possible_values(
+ &self,
+ ) -> Option<Box<dyn Iterator<Item = clap::builder::PossibleValue> + '_>> {
+ use clap::builder::PossibleValue;
+ Some(Box::new(
+ [PossibleValue::new("private"), PossibleValue::new("public")].into_iter(),
+ ))
+ }
+}
+
+#[derive(Debug, Parser)]
+#[command(about = ABOUT, long_about = LONG_ABOUT, disable_version_flag = true)]
+pub struct Args {
+ #[command(subcommand)]
+ pub(super) command: Option<Command>,
+
+ /// Specify the repository to operate on. Defaults to the current repository
+ ///
+ /// [example values: rad:z3Tr6bC7ctEg2EHmLvknUr29mEDLH, z3Tr6bC7ctEg2EHmLvknUr29mEDLH]
+ #[arg(long)]
+ #[arg(value_name = "RID", global = true)]
+ pub(super) repo: Option<RepoId>,
+
+ /// Do not ask for confirmation
+ #[arg(long)]
+ #[arg(global = true)]
+ no_confirm: bool,
+
+ /// Suppress output
+ #[arg(long, short)]
+ #[arg(global = true)]
+ pub(super) quiet: bool,
+}
+
+impl Args {
+ pub(super) fn interactive(&self) -> Interactive {
+ if self.no_confirm {
+ Interactive::No
+ } else {
+ Interactive::new(io::stdout())
+ }
+ }
+}
+
+#[derive(Subcommand, Debug)]
+pub(super) enum Command {
+ /// Accept a proposed revision to the identity document
+ #[clap(alias("a"))]
+ Accept {
+ /// Proposed revision to accept
+ #[arg(value_name = "REVISION_ID")]
+ revision: Rev,
+ },
+
+ /// Reject a proposed revision to the identity document
+ #[clap(alias("r"))]
+ Reject {
+ /// Proposed revision to reject
+ #[arg(value_name = "REVISION_ID")]
+ revision: Rev,
+ },
+
+ /// Edit an existing revision to the identity document
+ #[clap(alias("e"))]
+ Edit {
+ /// Proposed revision to edit
+ #[arg(value_name = "REVISION_ID")]
+ revision: Rev,
+
+ /// Title of the edit
+ #[arg(long)]
+ title: Option<Title>,
+
+ /// Description of the edit
+ #[arg(long)]
+ description: Option<String>,
+ },
+
+ /// Propose a new revision to the identity document
+ #[clap(alias("u"))]
+ Update {
+ /// Set the title for the new proposal
+ #[arg(long)]
+ title: Option<Title>,
+
+ /// Set the description for the new proposal
+ #[arg(long)]
+ description: Option<String>,
+
+ /// Update the identity by adding a new delegate, identified by their DID
+ #[arg(long, short)]
+ #[arg(value_name = "DID")]
+ #[arg(action = clap::ArgAction::Append)]
+ delegate: Vec<Did>,
+
+ /// Update the identity by removing a delegate, identified by their DID
+ #[arg(long, short)]
+ #[arg(value_name = "DID")]
+ #[arg(action = clap::ArgAction::Append)]
+ rescind: Vec<Did>,
+
+ /// Update the identity by setting the number of delegates required to accept a revision
+ #[arg(long)]
+ threshold: Option<usize>,
+
+ /// Update the identity by setting the repository's visibility to private or public
+ #[arg(long)]
+ #[arg(value_parser = EditVisibilityParser)]
+ visibility: Option<EditVisibility>,
+
+ /// Update the identity by giving a specific DID access to a private repository
+ #[arg(long)]
+ #[arg(value_name = "DID")]
+ #[arg(action = clap::ArgAction::Append)]
+ allow: Vec<Did>,
+
+ /// Update the identity by removing a specific DID's access from a private repository
+ #[arg(long)]
+ #[arg(value_name = "DID")]
+ #[arg(action = clap::ArgAction::Append)]
+ disallow: Vec<Did>,
+
+ /// Update the identity by setting metadata in one of the identity payloads
+ ///
+ /// [example values: xyz.radicle.project name '"radicle-example"']
+ // TODO(erikili:) Value parsers do not operate on series of values, yet. This will
+ // change with clap v5, so we can hopefully use `Vec<Payload>`.
+ // - https://github.com/clap-rs/clap/discussions/5930#discussioncomment-12315889
+ // - https://docs.rs/clap/latest/clap/_derive/index.html#arg-types
+ #[arg(long)]
+ #[arg(value_names = ["TYPE", "KEY", "VALUE"], num_args = 3)]
+ payload: Vec<String>,
+
+ /// Opens your $EDITOR to edit the JSON contents directly
+ #[arg(long)]
+ edit: bool,
+ },
+
+ /// Lists all proposed revisions to the identity document
+ #[clap(alias("l"))]
+ List,
+
+ /// Show a specific identity proposal
+ #[clap(alias("s"))]
+ Show {
+ /// Proposed revision to show
+ #[arg(value_name = "REVISION_ID")]
+ revision: Rev,
+ },
+
+ /// Redact a revision
+ #[clap(alias("d"))]
+ Redact {
+ /// Proposed revision to redact
+ #[arg(value_name = "REVISION_ID")]
+ revision: Rev,
+ },
+}
+
+#[cfg(test)]
+mod test {
+ use super::{Args, PayloadUpsert};
+ use clap::error::ErrorKind;
+ use clap::Parser;
+
+ #[test]
+ fn should_parse_single_payload() {
+ let args = Args::try_parse_from(["id", "update", "--payload", "key", "name", "value"]);
+ assert!(args.is_ok())
+ }
+
+ #[test]
+ fn should_not_parse_single_payload() {
+ let err = Args::try_parse_from(["id", "update", "--payload", "key", "name"]).unwrap_err();
+ assert_eq!(err.kind(), ErrorKind::WrongNumberOfValues);
+ }
+
+ #[test]
+ fn should_parse_multiple_payloads() {
+ let args = Args::try_parse_from([
+ "id",
+ "update",
+ "--payload",
+ "key_1",
+ "name_1",
+ "value_1",
+ "--payload",
+ "key_2",
+ "name_2",
+ "value_2",
+ ]);
+ assert!(args.is_ok())
+ }
+
+ #[test]
+ fn should_not_parse_single_payloads() {
+ let err = Args::try_parse_from([
+ "id",
+ "update",
+ "--payload",
+ "key_1",
+ "name_1",
+ "value_1",
+ "--payload",
+ "key_2",
+ "name_2",
+ ])
+ .unwrap_err();
+ assert_eq!(err.kind(), ErrorKind::WrongNumberOfValues);
+ }
+
+ #[test]
+ fn should_not_clobber_payload_args() {
+ let err = Args::try_parse_from([
+ "id",
+ "update",
+ "--payload",
+ "key_1",
+ "name_1",
+ "--payload", // ensure `--payload is not treated as an argument`
+ "key_2",
+ "name_2",
+ "value_2",
+ ])
+ .unwrap_err();
+ assert_eq!(err.kind(), ErrorKind::WrongNumberOfValues);
+ }
+
+ #[test]
+ fn should_parse_into_payload() {
+ let payload: Result<Vec<_>, _> = PayloadUpsert::parse_many(&[
+ "xyz.radicle.project".to_string(),
+ "name".to_string(),
+ "{}".to_string(),
+ ])
+ .collect();
+ assert!(payload.is_ok())
+ }
+
+ #[test]
+ #[should_panic(expected = "assertion failed: chunks.remainder().is_empty()")]
+ fn should_not_parse_into_payload() {
+ let _: Result<Vec<_>, _> =
+ PayloadUpsert::parse_many(&["xyz.radicle.project".to_string(), "name".to_string()])
+ .collect();
+ }
+}
diff --git a/crates/radicle-cli/src/main.rs b/crates/radicle-cli/src/main.rs
index 480623eb..ee8b4a5d 100644
--- a/crates/radicle-cli/src/main.rs
+++ b/crates/radicle-cli/src/main.rs
@@ -51,6 +51,7 @@ enum Commands {
Clone(clone::Args),
Debug(debug::Args),
Fork(fork::Args),
+ Id(id::Args),
Init(init::Args),
Issue(issue::Args),
Ls(ls::Args),
@@ -231,7 +232,9 @@ pub(crate) fn run_other(exe: &str, args: &[OsString]) -> Result<(), Option<anyho
term::run_command_args::<help::Options, _>(help::HELP, help::run, args.to_vec());
}
"id" => {
- term::run_command_args::<id::Options, _>(id::HELP, id::run, args.to_vec());
+ if let Some(Commands::Id(args)) = CliArgs::parse().command {
+ term::run_command_fn(id::run, args);
+ }
}
"inbox" => {
term::run_command_args::<inbox::Options, _>(inbox::HELP, inbox::run, args.to_vec())
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 cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name a64c6dcd-aec1-4238-80bd-5667acc80150 -v /opt/radcis/ci.rad.levitte.org/cci/state/a64c6dcd-aec1-4238-80bd-5667acc80150/s:/a64c6dcd-aec1-4238-80bd-5667acc80150/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/a64c6dcd-aec1-4238-80bd-5667acc80150/w:/a64c6dcd-aec1-4238-80bd-5667acc80150/w -w /a64c6dcd-aec1-4238-80bd-5667acc80150/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /a64c6dcd-aec1-4238-80bd-5667acc80150/s/script.sh
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ cargo --version
info: syncing channel updates for '1.88-x86_64-unknown-linux-gnu'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
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.88.0 (873a06493 2025-05-10)
+ rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded amplify v4.6.0
Downloaded aes v0.8.4
Downloaded amplify_syn v2.0.1
Downloaded anstyle v1.0.11
Downloaded amplify_derive v4.0.0
Downloaded aead v0.5.2
Downloaded aho-corasick v1.1.3
Downloaded aes-gcm v0.10.3
Downloaded adler2 v2.0.0
Downloaded anstyle-parse v0.2.3
Downloaded addr2line v0.24.2
Downloaded anstream v0.6.13
Downloaded ahash v0.8.11
Downloaded amplify_num v0.5.2
Downloaded bcrypt-pbkdf v0.10.0
Downloaded dunce v1.0.5
Downloaded escargot v0.5.10
Downloaded cpufeatures v0.2.12
Downloaded bytecount v0.6.8
Downloaded ascii v1.1.0
Downloaded cipher v0.4.4
Downloaded bytesize v2.0.1
Downloaded blowfish v0.9.1
Downloaded crossterm v0.29.0
Downloaded equivalent v1.0.1
Downloaded derive_more v2.0.1
Downloaded fastrand v2.1.0
Downloaded faster-hex v0.9.0
Downloaded fast-glob v0.3.3
Downloaded parking_lot_core v0.9.9
Downloaded poly1305 v0.8.0
Downloaded primeorder v0.13.6
Downloaded pkcs8 v0.10.2
Downloaded pretty_assertions v1.4.0
Downloaded ppv-lite86 v0.2.17
Downloaded rand_chacha v0.3.1
Downloaded radicle-std-ext v0.1.1
Downloaded serde-untagged v0.1.7
Downloaded signal-hook-registry v1.4.5
Downloaded sha2 v0.10.8
Downloaded serde_spanned v1.0.0
Downloaded snapbox-macros v0.3.8
Downloaded signature v1.6.4
Downloaded fxhash v0.2.1
Downloaded prodash v29.0.2
Downloaded similar v2.5.0
Downloaded serde v1.0.219
Downloaded regex v1.11.1
Downloaded git-ref-format-macro v0.5.0
Downloaded gix-command v0.4.1
Downloaded gix-commitgraph v0.25.1
Downloaded gix-fs v0.12.1
Downloaded object v0.36.7
Downloaded gix-protocol v0.47.0
Downloaded icu_collections v1.5.0
Downloaded hmac v0.12.1
Downloaded gix-validate v0.9.4
Downloaded gix-transport v0.44.0
Downloaded gix-sec v0.10.12
Downloaded gix-pack v0.56.0
Downloaded sha3 v0.10.8
Downloaded schemars v1.0.4
Downloaded rand v0.8.5
Downloaded icu_properties v1.5.1
Downloaded icu_normalizer v1.5.0
Downloaded icu_normalizer_data v1.5.1
Downloaded inquire v0.7.5
Downloaded lexopt v0.3.0
Downloaded maybe-async v0.2.10
Downloaded ssh-cipher v0.2.0
Downloaded sqlite3-sys v0.15.2
Downloaded sqlite v0.32.0
Downloaded ssh-encoding v0.2.0
Downloaded sval_nested v2.14.1
Downloaded synstructure v0.13.1
Downloaded memchr v2.7.2
Downloaded log v0.4.27
Downloaded syn v2.0.89
Downloaded matchers v0.1.0
Downloaded typenum v1.17.0
Downloaded utf8parse v0.2.1
Downloaded uuid v1.16.0
Downloaded gix-shallow v0.1.0
Downloaded gix-credentials v0.26.0
Downloaded gix-trace v0.1.12
Downloaded subtle v2.5.0
Downloaded walkdir v2.5.0
Downloaded write16 v1.0.0
Downloaded git-ref-format v0.5.0
Downloaded generic-array v0.14.7
Downloaded unicode-segmentation v1.11.0
Downloaded itoa v1.0.11
Downloaded gix-actor v0.33.2
Downloaded tracing-log v0.2.0
Downloaded structured-logger v1.0.4
Downloaded strsim v0.11.1
Downloaded noise-framework v0.4.0
Downloaded multibase v0.9.1
Downloaded yoke-derive v0.7.5
Downloaded yoke v0.7.5
Downloaded test-log v0.2.18
Downloaded idna_adapter v1.2.0
Downloaded zerofrom v0.1.6
Downloaded icu_locid_transform v1.5.0
Downloaded uuid-simd v0.8.0
Downloaded toml_writer v1.0.2
Downloaded sval_ref v2.14.1
Downloaded sval_fmt v2.14.1
Downloaded sval_dynamic v2.14.1
Downloaded icu_locid_transform_data v1.5.1
Downloaded icu_provider_macros v1.5.0
Downloaded gix-hash v0.15.1
Downloaded socks5-client v0.4.1
Downloaded localtime v1.3.1
Downloaded indexmap v2.2.6
Downloaded gix-hashtable v0.6.0
Downloaded tree-sitter-language v0.1.2
Downloaded iana-time-zone v0.1.60
Downloaded human-panic v2.0.3
Downloaded value-bag-serde1 v1.11.1
Downloaded keccak v0.1.5
Downloaded spin v0.9.8
Downloaded fluent-uri v0.3.2
Downloaded sqlite3-src v0.5.1
Downloaded home v0.5.9
Downloaded gix-object v0.46.1
Downloaded tracing-core v0.1.34
Downloaded flate2 v1.1.1
Downloaded tree-sitter-go v0.23.4
Downloaded jsonschema v0.30.0
Downloaded idna v1.0.3
Downloaded git2 v0.19.0
Downloaded tree-sitter-python v0.23.4
Downloaded tree-sitter-bash v0.23.3
Downloaded icu_properties_data v1.5.1
Downloaded syn v1.0.109
Downloaded zerocopy v0.7.35
Downloaded tree-sitter-rust v0.23.2
Downloaded gimli v0.31.1
Downloaded tree-sitter-typescript v0.23.2
Downloaded tokio v1.47.1
Downloaded fraction v0.15.3
Downloaded tree-sitter-md v0.3.2
Downloaded libm v0.2.8
Downloaded zerovec v0.10.4
Downloaded systemd-journal-logger v2.2.2
Downloaded jobserver v0.1.31
Downloaded litrs v0.4.1
Downloaded miniz_oxide v0.8.8
Downloaded tracing v0.1.41
Downloaded tree-sitter-ruby v0.23.1
Downloaded mio v1.0.4
Downloaded mio v0.8.11
Downloaded itertools v0.14.0
Downloaded jiff v0.2.1
Downloaded gix-negotiate v0.17.0
Downloaded form_urlencoded v1.2.1
Downloaded yansi v0.5.1
Downloaded xattr v1.3.1
Downloaded writeable v0.5.5
Downloaded tree-sitter-html v0.23.2
Downloaded tree-sitter-highlight v0.24.4
Downloaded litemap v0.7.5
Downloaded vcpkg v0.2.15
Downloaded memmap2 v0.9.4
Downloaded gix-lock v15.0.1
Downloaded icu_provider v1.5.0
Downloaded zerovec-derive v0.10.3
Downloaded gix-diff v0.49.0
Downloaded tree-sitter-json v0.24.8
Downloaded sval_serde v2.14.1
Downloaded nonempty v0.9.0
Downloaded tracing-subscriber v0.3.19
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded tree-sitter v0.24.4
Downloaded gix-date v0.9.4
Downloaded value-bag v1.11.1
Downloaded toml_datetime v0.7.0
Downloaded icu_locid v1.5.0
Downloaded tar v0.4.40
Downloaded toml v0.9.5
Downloaded indicatif v0.18.0
Downloaded sval_json v2.14.1
Downloaded sval_buffer v2.14.1
Downloaded zeroize v1.7.0
Downloaded ssh-key v0.6.6
Downloaded zerofrom-derive v0.1.6
Downloaded test-log-macros v0.2.18
Downloaded newline-converter v0.3.0
Downloaded hashbrown v0.14.3
Downloaded unicode-width v0.2.1
Downloaded version_check v0.9.4
Downloaded unicode-normalization v0.1.23
Downloaded winnow v0.6.26
Downloaded tempfile v3.10.1
Downloaded value-bag-sval2 v1.11.1
Downloaded tree-sitter-c v0.23.2
Downloaded vsimd v0.8.0
Downloaded git-ref-format-core v0.5.0
Downloaded getrandom v0.3.3
Downloaded gix-tempfile v15.0.0
Downloaded getrandom v0.2.15
Downloaded linux-raw-sys v0.4.13
Downloaded tree-sitter-css v0.23.1
Downloaded sval v2.14.1
Downloaded streaming-iterator v0.1.9
Downloaded stable_deref_trait v1.2.0
Downloaded heck v0.5.0
Downloaded gix-url v0.28.2
Downloaded gix-revision v0.31.1
Downloaded group v0.13.0
Downloaded gix-refspec v0.27.0
Downloaded url v2.5.4
Downloaded spki v0.7.3
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded gix-utils v0.1.14
Downloaded gix-traverse v0.43.1
Downloaded gix-ref v0.49.1
Downloaded gix-prompt v0.9.1
Downloaded gix-odb v0.66.0
Downloaded gix-quote v0.4.15
Downloaded gix-path v0.10.15
Downloaded gix-packetline v0.18.4
Downloaded gix-chunk v0.4.11
Downloaded gix-revwalk v0.17.0
Downloaded gix-config-value v0.14.12
Downloaded unit-prefix v0.5.1
Downloaded unicode-width v0.1.11
Downloaded unicode-ident v1.0.12
Downloaded unicode-display-width v0.3.0
Downloaded utf8_iter v1.0.4
Downloaded utf16_iter v1.0.5
Downloaded universal-hash v0.5.1
Downloaded typeid v1.0.3
Downloaded tinyvec_macros v0.1.1
Downloaded tinyvec v1.6.0
Downloaded tinystr v0.7.6
Downloaded timeago v0.4.2
Downloaded thread_local v1.1.9
Downloaded thiserror-impl v2.0.12
Downloaded thiserror-impl v1.0.69
Downloaded thiserror v2.0.12
Downloaded thiserror v1.0.69
Downloaded libc v0.2.174
Downloaded lock_api v0.4.11
Downloaded lazy_static v1.5.0
Downloaded inout v0.1.3
Downloaded radicle-surf v0.25.0
Downloaded linux-raw-sys v0.9.4
Downloaded gix-features v0.39.1
Downloaded regex-automata v0.4.9
Downloaded socket2 v0.5.7
Downloaded ryu v1.0.17
Downloaded rustix v1.0.7
Downloaded num-traits v0.2.19
Downloaded siphasher v1.0.1
Downloaded siphasher v0.3.11
Downloaded signals_receipts v0.2.0
Downloaded signal-hook v0.3.18
Downloaded sharded-slab v0.1.7
Downloaded serde_fmt v1.0.3
Downloaded serde_derive v1.0.219
Downloaded sem_safe v0.2.0
Downloaded sec1 v0.7.3
Downloaded rustix v0.38.34
Downloaded rustc-demangle v0.1.26
Downloaded regex-syntax v0.8.5
Downloaded referencing v0.30.0
Downloaded ref-cast-impl v1.0.24
Downloaded quote v1.0.36
Downloaded ghash v0.5.1
Downloaded rfc6979 v0.4.0
Downloaded regex-syntax v0.6.29
Downloaded qcheck v1.0.0
Downloaded p384 v0.13.0
Downloaded serde_json v1.0.140
Downloaded num-rational v0.4.2
Downloaded smallvec v1.13.2
Downloaded signature v2.2.0
Downloaded shlex v1.3.0
Downloaded serde_derive_internals v0.29.1
Downloaded scopeguard v1.2.0
Downloaded regex-automata v0.1.10
Downloaded signal-hook-mio v0.2.4
Downloaded shell-words v1.1.0
Downloaded snapbox v0.4.17
Downloaded rsa v0.9.6
Downloaded schemars_derive v1.0.4
Downloaded salsa20 v0.10.2
Downloaded proc-macro2 v1.0.92
Downloaded sha1_smol v1.0.0
Downloaded same-file v1.0.6
Downloaded rand_core v0.6.4
Downloaded scrypt v0.11.0
Downloaded ref-cast v1.0.24
Downloaded proc-macro-error-attr2 v2.0.0
Downloaded radicle-git-ext v0.10.0
Downloaded num-bigint v0.4.6
Downloaded qcheck-macros v1.0.0
Downloaded proc-macro-error2 v2.0.1
Downloaded pem-rfc7468 v0.7.0
Downloaded once_cell v1.21.3
Downloaded num v0.4.3
Downloaded nu-ansi-term v0.46.0
Downloaded portable-atomic v1.11.0
Downloaded pin-project-lite v0.2.16
Downloaded phf_shared v0.11.3
Downloaded p256 v0.13.2
Downloaded num-iter v0.1.45
Downloaded num-integer v0.1.46
Downloaded num-bigint-dig v0.8.4
Downloaded pbkdf2 v0.12.2
Downloaded overload v0.1.1
Downloaded num-complex v0.4.6
Downloaded num-cmp v0.1.0
Downloaded pkcs1 v0.7.5
Downloaded parking_lot v0.12.3
Downloaded os_info v3.12.0
Downloaded elliptic-curve v0.13.8
Downloaded cbc v0.1.2
Downloaded polyval v0.6.2
Downloaded phf v0.11.3
Downloaded percent-encoding v2.3.1
Downloaded paste v1.0.15
Downloaded p521 v0.13.3
Downloaded opaque-debug v0.3.1
Downloaded filetime v0.2.23
Downloaded pkg-config v0.3.30
Downloaded outref v0.5.2
Downloaded emojis v0.6.4
Downloaded email_address v0.2.9
Downloaded ctr v0.9.2
Downloaded crossbeam-channel v0.5.15
Downloaded normalize-line-endings v0.3.0
Downloaded ff v0.13.0
Downloaded erased-serde v0.4.6
Downloaded ed25519 v1.5.3
Downloaded cyphernet v0.5.2
Downloaded fancy-regex v0.14.0
Downloaded libz-sys v1.1.16
Downloaded errno v0.3.13
Downloaded derive_more-impl v2.0.1
Downloaded data-encoding-macro-internal v0.1.12
Downloaded cypheraddr v0.4.0
Downloaded clap v4.5.44
Downloaded chacha20poly1305 v0.10.1
Downloaded env_logger v0.11.8
Downloaded env_filter v0.1.3
Downloaded either v1.11.0
Downloaded dyn-clone v1.0.17
Downloaded displaydoc v0.2.5
Downloaded digest v0.10.7
Downloaded data-encoding-macro v0.1.14
Downloaded cyphergraphy v0.3.0
Downloaded crossbeam-utils v0.8.19
Downloaded convert_case v0.7.1
Downloaded const-oid v0.9.6
Downloaded console v0.16.0
Downloaded clap_lex v0.7.5
Downloaded clap_derive v4.5.41
Downloaded bstr v1.9.1
Downloaded bloomy v1.2.0
Downloaded bitflags v1.3.2
Downloaded ec25519 v0.1.0
Downloaded cc v1.2.2
Downloaded der v0.7.9
Downloaded data-encoding v2.5.0
Downloaded crypto-bigint v0.5.5
Downloaded crossterm v0.25.0
Downloaded bytes v1.10.1
Downloaded byteorder v1.5.0
Downloaded borrow-or-share v0.2.2
Downloaded block-padding v0.3.3
Downloaded bitflags v2.9.1
Downloaded bit-set v0.8.0
Downloaded base64ct v1.6.0
Downloaded base64 v0.21.7
Downloaded base16ct v0.2.0
Downloaded backtrace v0.3.75
Downloaded autocfg v1.2.0
Downloaded ecdsa v0.16.9
Downloaded document-features v0.2.11
Downloaded diff v0.1.13
Downloaded crypto-common v0.1.6
Downloaded crc32fast v1.4.0
Downloaded colored v2.1.0
Downloaded colorchoice v1.0.0
Downloaded clap_builder v4.5.44
Downloaded cfg-if v1.0.0
Downloaded chrono v0.4.38
Downloaded base64 v0.22.1
Downloaded base32 v0.4.0
Downloaded arc-swap v1.7.1
Downloaded anstyle-query v1.0.2
Downloaded chacha20 v0.9.1
Downloaded block-buffer v0.10.4
Downloaded bit-vec v0.8.0
Downloaded base-x v0.2.11
Downloaded anyhow v1.0.82
Downloaded ct-codecs v1.1.1
Compiling libc v0.2.174
Compiling proc-macro2 v1.0.92
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Compiling serde v1.0.219
Compiling shlex v1.3.0
Checking memchr v2.7.2
Compiling typeid v1.0.3
Compiling autocfg v1.2.0
Compiling quote v1.0.36
Compiling jobserver v0.1.31
Compiling syn v2.0.89
Compiling version_check v0.9.4
Checking smallvec v1.13.2
Compiling cc v1.2.2
Checking getrandom v0.2.15
Checking aho-corasick v1.1.3
Checking regex-syntax v0.8.5
Compiling typenum v1.17.0
Compiling generic-array v0.14.7
Checking regex-automata v0.4.9
Checking rand_core v0.6.4
Compiling thiserror v2.0.12
Checking crypto-common v0.1.6
Checking fastrand v2.1.0
Checking bitflags v2.9.1
Compiling lock_api v0.4.11
Compiling parking_lot_core v0.9.9
Compiling synstructure v0.13.1
Checking scopeguard v1.2.0
Checking parking_lot v0.12.3
Checking once_cell v1.21.3
Checking stable_deref_trait v1.2.0
Checking tinyvec_macros v0.1.1
Checking subtle v2.5.0
Checking tinyvec v1.6.0
Checking bstr v1.9.1
Checking zeroize v1.7.0
Checking itoa v1.0.11
Checking hashbrown v0.14.3
Compiling thiserror v1.0.69
Checking unicode-normalization v0.1.23
Compiling pkg-config v0.3.30
Compiling serde_derive v1.0.219
Compiling thiserror-impl v2.0.12
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.7.5
Compiling zerovec-derive v0.10.3
Compiling displaydoc v0.2.5
Checking zerofrom v0.1.6
Checking yoke v0.7.5
Checking litemap v0.7.5
Checking cpufeatures v0.2.12
Checking writeable v0.5.5
Compiling icu_locid_transform_data v1.5.1
Compiling crc32fast v1.4.0
Compiling icu_provider_macros v1.5.0
Compiling thiserror-impl v1.0.69
Checking zerovec v0.10.4
Compiling icu_properties_data v1.5.1
Checking tinystr v0.7.6
Checking icu_locid v1.5.0
Checking block-padding v0.3.3
Compiling icu_normalizer_data v1.5.1
Checking icu_provider v1.5.0
Checking inout v0.1.3
Checking icu_collections v1.5.0
Checking icu_locid_transform v1.5.0
Checking block-buffer v0.10.4
Compiling syn v1.0.109
Checking digest v0.10.7
Checking cipher v0.4.4
Checking icu_properties v1.5.1
Checking utf16_iter v1.0.5
Checking adler2 v2.0.0
Checking write16 v1.0.0
Checking utf8_iter v1.0.4
Checking miniz_oxide v0.8.8
Checking erased-serde v0.4.6
Checking serde_fmt v1.0.3
Checking faster-hex v0.9.0
Checking value-bag-serde1 v1.11.1
Checking gix-hash v0.15.1
Checking value-bag v1.11.1
Checking icu_normalizer v1.5.0
Checking log v0.4.27
Compiling rustix v0.38.34
Checking percent-encoding v2.3.1
Checking idna_adapter v1.2.0
Checking linux-raw-sys v0.4.13
Checking idna v1.0.3
Checking gix-trace v0.1.12
Checking form_urlencoded v1.2.1
Checking sha2 v0.10.8
Compiling vcpkg v0.2.15
Checking url v2.5.4
Checking universal-hash v0.5.1
Compiling libz-sys v1.1.16
Checking opaque-debug v0.3.1
Checking gix-utils v0.1.14
Compiling amplify_syn v2.0.1
Compiling libgit2-sys v0.17.0+1.8.1
Compiling num-traits v0.2.19
Checking tempfile v3.10.1
Checking byteorder v1.5.0
Checking signature v1.6.4
Checking same-file v1.0.6
Compiling serde_json v1.0.140
Checking equivalent v1.0.1
Checking walkdir v2.5.0
Checking indexmap v2.2.6
Checking ed25519 v1.5.3
Compiling amplify_derive v4.0.0
Checking flate2 v1.1.1
Checking prodash v29.0.2
Checking aead v0.5.2
Compiling ref-cast v1.0.24
Checking amplify_num v0.5.2
Checking sha1_smol v1.0.0
Checking ct-codecs v1.1.1
Checking ascii v1.1.0
Checking ryu v1.0.17
Checking ec25519 v0.1.0
Checking amplify v4.6.0
Checking gix-features v0.39.1
Checking poly1305 v0.8.0
Checking git-ref-format-core v0.5.0
Checking chacha20 v0.9.1
Compiling ref-cast-impl v1.0.24
Checking cyphergraphy v0.3.0
Checking polyval v0.6.2
Checking hmac v0.12.1
Compiling sqlite3-src v0.5.1
Checking dyn-clone v1.0.17
Checking keccak v0.1.5
Checking home v0.5.9
Checking base64ct v1.6.0
Checking gix-path v0.10.15
Checking pem-rfc7468 v0.7.0
Checking sha3 v0.10.8
Checking pbkdf2 v0.12.2
Checking ghash v0.5.1
Checking ctr v0.9.2
Checking aes v0.8.4
Checking rand v0.8.5
Checking base32 v0.4.0
Compiling data-encoding v2.5.0
Compiling crossbeam-utils v0.8.19
Checking qcheck v1.0.0
Compiling data-encoding-macro-internal v0.1.12
Checking cypheraddr v0.4.0
Checking aes-gcm v0.10.3
Checking ssh-encoding v0.2.0
Checking chacha20poly1305 v0.10.1
Checking blowfish v0.9.1
Checking cbc v0.1.2
Compiling serde_derive_internals v0.29.1
Checking data-encoding-macro v0.1.14
Checking ssh-cipher v0.2.0
Checking bcrypt-pbkdf v0.10.0
Checking noise-framework v0.4.0
Checking socks5-client v0.4.1
Compiling schemars_derive v1.0.4
Checking signature v2.2.0
Checking base-x v0.2.11
Checking multibase v0.9.1
Checking ssh-key v0.6.6
Checking crossbeam-channel v0.5.15
Checking cyphernet v0.5.2
Checking radicle-ssh v0.10.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-ssh)
Checking lazy_static v1.5.0
Checking nonempty v0.9.0
Checking jiff v0.2.1
Checking schemars v1.0.4
Checking siphasher v1.0.1
Checking radicle-git-metadata v0.1.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-git-metadata)
Checking radicle-dag v0.10.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-dag)
Checking winnow v0.6.26
Checking gix-date v0.9.4
Checking anstyle-query v1.0.2
Checking radicle-git-ref-format v0.1.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-git-ref-format)
Checking gix-actor v0.33.2
Checking gix-hashtable v0.6.0
Checking gix-validate v0.9.4
Checking utf8parse v0.2.1
Checking iana-time-zone v0.1.60
Checking base64 v0.21.7
Checking chrono v0.4.38
Checking anstyle-parse v0.2.3
Checking gix-object v0.46.1
Checking colored v2.1.0
Checking serde-untagged v0.1.7
Checking localtime v1.3.1
Checking bytesize v2.0.1
Checking memmap2 v0.9.4
Checking tree-sitter-language v0.1.2
Checking colorchoice v1.0.0
Checking anstyle v1.0.11
Checking fast-glob v0.3.3
Checking dunce v1.0.5
Checking anstream v0.6.13
Checking gix-chunk v0.4.11
Compiling rustix v1.0.7
Checking gix-commitgraph v0.25.1
Checking gix-revwalk v0.17.0
Checking gix-fs v0.12.1
Checking linux-raw-sys v0.9.4
Checking gix-tempfile v15.0.0
Checking mio v1.0.4
Checking sem_safe v0.2.0
Checking errno v0.3.13
Checking shell-words v1.1.0
Checking either v1.11.0
Checking gix-command v0.4.1
Checking signals_receipts v0.2.0
Compiling signal-hook v0.3.18
Compiling object v0.36.7
Checking gix-lock v15.0.1
Checking gix-url v0.28.2
Checking gix-config-value v0.14.12
Checking gix-quote v0.4.15
Checking gix-sec v0.10.12
Checking signal-hook-registry v1.4.5
Checking gimli v0.31.1
Compiling getrandom v0.3.3
Checking gix-prompt v0.9.1
Checking addr2line v0.24.2
Checking radicle-signals v0.11.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-signals)
Checking gix-traverse v0.43.1
Checking gix-revision v0.31.1
Checking gix-diff v0.49.0
Checking gix-packetline v0.18.4
Checking mio v0.8.11
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Compiling tree-sitter v0.24.4
Checking radicle-crypto v0.14.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-crypto)
Compiling unicode-segmentation v1.11.0
Checking rustc-demangle v0.1.26
Compiling anyhow v1.0.82
Checking backtrace v0.3.75
Compiling convert_case v0.7.1
Checking signal-hook-mio v0.2.4
Checking gix-transport v0.44.0
Checking gix-pack v0.56.0
Checking gix-refspec v0.27.0
Checking gix-credentials v0.26.0
Checking gix-ref v0.49.1
Checking gix-shallow v0.1.0
Checking gix-negotiate v0.17.0
Compiling maybe-async v0.2.10
Checking regex v1.11.1
Compiling proc-macro-error-attr2 v2.0.0
Compiling portable-atomic v1.11.0
Checking arc-swap v1.7.1
Checking gix-protocol v0.47.0
Checking gix-odb v0.66.0
Compiling proc-macro-error2 v2.0.1
Checking uuid v1.16.0
Compiling xattr v1.3.1
Compiling derive_more-impl v2.0.1
Compiling filetime v0.2.23
Compiling litrs v0.4.1
Checking lexopt v0.3.0
Checking unicode-width v0.2.1
Checking bitflags v1.3.2
Checking bytes v1.10.1
Checking crossterm v0.25.0
Checking derive_more v2.0.1
Compiling document-features v0.2.11
Checking console v0.16.0
Compiling tar v0.4.40
Compiling git-ref-format-macro v0.5.0
Checking newline-converter v0.3.0
Checking snapbox-macros v0.3.8
Checking fxhash v0.2.1
Checking salsa20 v0.10.2
Checking similar v2.5.0
Checking normalize-line-endings v0.3.0
Checking siphasher v0.3.11
Checking streaming-iterator v0.1.9
Checking unit-prefix v0.5.1
Checking unicode-width v0.1.11
Checking snapbox v0.4.17
Checking inquire v0.7.5
Checking indicatif v0.18.0
Checking bloomy v1.2.0
Checking scrypt v0.11.0
Compiling radicle-surf v0.25.0
Checking git-ref-format v0.5.0
Checking crossterm v0.29.0
Checking unicode-display-width v0.3.0
Checking systemd-journal-logger v2.2.2
Checking toml_datetime v0.7.0
Checking serde_spanned v1.0.0
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-python v0.23.4
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-go v0.23.4
Checking clap_lex v0.7.5
Checking strsim v0.11.1
Checking pin-project-lite v0.2.16
Checking toml_writer v1.0.2
Checking radicle-std-ext v0.1.1
Compiling heck v0.5.0
Checking clap_builder v4.5.44
Checking toml v0.9.5
Compiling clap_derive v4.5.41
Checking tokio v1.47.1
Checking os_info v3.12.0
Compiling radicle-cli v0.17.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-cli)
Checking yansi v0.5.1
Compiling radicle-node v0.16.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-node)
Checking diff v0.1.13
Checking pretty_assertions v1.4.0
Checking human-panic v2.0.3
Checking structured-logger v1.0.4
Checking clap v4.5.44
Checking radicle-systemd v0.11.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-systemd)
Checking tree-sitter-highlight v0.24.4
Checking itertools v0.14.0
Checking num-integer v0.1.46
Compiling qcheck-macros v1.0.0
Checking socket2 v0.5.7
Checking timeago v0.4.2
Compiling escargot v0.5.10
Checking num-bigint v0.4.6
Compiling ahash v0.8.11
Checking num-iter v0.1.45
Checking num-rational v0.4.2
Checking num-complex v0.4.6
Checking env_filter v0.1.3
Checking zerocopy v0.7.35
Checking bit-vec v0.8.0
Checking borrow-or-share v0.2.2
Checking bit-set v0.8.0
Checking fluent-uri v0.3.2
Checking num v0.4.3
Checking env_logger v0.11.8
Checking phf_shared v0.11.3
Compiling test-log-macros v0.2.18
Checking outref v0.5.2
Checking vsimd v0.8.0
Compiling radicle-remote-helper v0.14.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-remote-helper)
Compiling paste v1.0.15
Checking uuid-simd v0.8.0
Checking test-log v0.2.18
Checking referencing v0.30.0
Checking phf v0.11.3
Checking fraction v0.15.3
Checking fancy-regex v0.14.0
Checking email_address v0.2.9
Checking num-cmp v0.1.0
Checking base64 v0.22.1
Checking bytecount v0.6.8
Checking emojis v0.6.4
Checking jsonschema v0.30.0
Checking git2 v0.19.0
Checking radicle-oid v0.1.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-oid)
Checking radicle-git-ext v0.10.0
Checking radicle-term v0.16.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-term)
Checking radicle-cob v0.17.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-cob)
Checking radicle v0.20.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle)
Checking radicle-fetch v0.16.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-fetch)
Checking radicle-cli-test v0.13.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-cli-test)
Checking radicle-schemars v0.6.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-schemars)
Checking radicle-protocol v0.4.0 (/a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle-protocol)
error[E0271]: type mismatch resolving `<Vec<(PayloadId, String, Value)> as IntoIterator>::Item == PayloadUpsert`
--> crates/radicle-cli/src/commands/id.rs:170:43
|
170 | update::payload(proposal, payloads)?
| --------------- ^^^^^^^^ expected `PayloadUpsert`, found `(PayloadId, String, Value)`
| |
| required by a bound introduced by this call
|
= note: expected struct `radicle::identity::doc::update::PayloadUpsert`
found tuple `(radicle::identity::doc::PayloadId, std::string::String, serde_json::Value)`
note: required by a bound in `radicle::identity::doc::update::payload`
--> /a64c6dcd-aec1-4238-80bd-5667acc80150/w/crates/radicle/src/identity/doc/update.rs:172:32
|
170 | pub fn payload(
| ------- required by a bound in this function
171 | mut raw: RawDoc,
172 | upserts: impl IntoIterator<Item = PayloadUpsert>,
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `payload`
For more information about this error, try `rustc --explain E0271`.
error: could not compile `radicle-cli` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Exit code: 101
{
"response": "finished",
"result": "failure"
}