Commit Graph
3284 Commits
Author SHA1 Message Date
Fintan Halpenny 8677fd9ef0 treewide: Update gix-packetline to 0.21.5
[Advisory Report].

[Advisory Report]: https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2vh6-hw4j-32ww
2026-09-02 08:17:16 +01:00
Lorenz Leutgeb c14346d93a radicle/canonical: Remove MatchedRule
This `struct` is unused.
2026-09-01 19:41:02 +02:00
Daniel NormanandLorenz Leutgeb 4867917f37 radicle/canonical: Remove RawRules::matches
Testing revealed that the implementation violated RIP-0006, which
requires the most specific rule matching the target of `HEAD`
to use an `allow` of `delegates` and the document threshold.
`validate_head_rule` took the first match from `RawRules`, which orders
patterns lexicographically, so a glob could be validated in place of the
rule that actually governs the branch.
The issue here is that the correct order for matching patterns is only
guaranteed on `Rules`, but not on `RawRules`.

To prevent such errors in the future, remove `RawRules::matches`. This
requires some refactoring, and makes synthesis of the default branch
rule slightly less efficient in the worst case, but we are willing to
take that hit for a cleaner implementation.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.dev>
2026-09-01 19:41:02 +02:00
Lorenz Leutgeb fd4e4903d7 radicle, cli: Move Git versions
Move `struct Version` from `radicle` to `radicle-cli`, where it is used.
2026-08-30 23:53:25 +02:00
Lorenz Leutgeb 05a192daff fetch: Do not pretend to be Git
There is no good reason to fake being Git.
2026-08-30 23:53:25 +02:00
Lorenz Leutgeb 2747c52beb remote-helper: Compute HEAD for user namespaces
If a user pushes to the reference of the same name as the default branch
according to the identity document, expose this as `HEAD`, too.
2026-08-30 17:37:09 +02:00
Lorenz Leutgeb fba60164f0 radicle/identity/doc: LazyLock for PayloadId
The functions `PayloadId::{project,canonical_refs}` have two
weaknesses:
 1. They always execute the checks in `from_str` for the same
    `str` over and over again.
 2. They do not return a reference, thus, callers that only
    need a reference make a copy that they then discard.

For improved performance, switch to `LazyLocks`. Keep the less efficient
functions, but deprecate them.
2026-08-30 17:37:09 +02:00
Lorenz Leutgeb 138404df6f radicle: Rely less on ….project payload
Many codepaths error if the `xyz.radicle.project` payload is not present
in the identity document. Change these to fall back gracefully.

Loading of payloads is unified in `GetPayload`.

An important detail is that `PayloadError::NotFound` is removed, and
`Option` is used instead.
2026-08-30 17:37:09 +02:00
Lorenz Leutgeb de43682f16 rust: 1.97.1 → 1.98.0
The changes to `**/args.rs` are due to better linting: Clippy found that
we may use `as_chunks`. Note that this function was stabilized in 1.88.0.
2026-08-30 14:28:36 +02:00
Lorenz Leutgeb 7f5de25223 Release 1.10.2
Update `CHANGELOG.md` for the release of version 1.10.2.
releases/1.10.2
2026-08-26 21:18:50 +02:00
Lorenz Leutgeb 3054779bfa windows: Set process creation flags
When executing programs on Windows, we suppress creating a new window,
and, if the process should continue to run in the background, we
explicitly create a new process group and detach.
2026-08-25 22:58:56 +02:00
Lorenz Leutgeb 9c06c4086a cli/patch: Spawn git for diffs directly
Spawning `rad diff` works, but prints a deprecation notice, because
`rad diff` itself is deprecated. `rad patch diff` however is not
deprecated and should just take a shortcut.
2026-08-25 20:39:29 +02:00
Lorenz Leutgeb 3da781f9e1 remote-helper: Accept option "pushcert if-asked"
This fixes issue 135835b572.
2026-08-23 23:09:38 +02:00
Lorenz Leutgeb 17ff650ec1 cli/node: Label Process ID
Resolve issue bb28940307 by clarifying
that the number printed is a process identifier.
2026-08-23 22:48:34 +02:00
Lorenz Leutgeb 96d74ea9ba radicle/cob/identity: Tighten initial revision
Make `Identity::new` private, to have more control over the initial
revision of the COB. Also assert that the author of the revision is the
solve delegate of the initial revision, i.e., the "founder".
2026-08-23 20:51:13 +02:00
Lorenz Leutgeb 675b82f344 radicle: Remove ReadRepository::identity_root_of
This function is unused.
2026-08-23 20:51:13 +02:00
Lorenz Leutgeb 388d985578 radicle/storage: Secure canonical_identity_head
Do not iterate over all user namespaces to find the ID of the identity
COB, but load from the founder's namespace specifically.

If the namespace of the founder is gone, attempt to recover by
walking back from `rad/id`.
2026-08-23 20:51:13 +02:00
Lorenz Leutgeb 26708e81a8 node/test: Demonstrate injection of Identity COB
This test shows how Bob is able to change visibility of Alice's repository from
private to public, even though Bob is not a delegate.
2026-08-23 20:49:09 +02:00
Lorenz Leutgeb 392542e923 build/build: Fix filename of Git archive
`build/upload` expects a filename that uses the *version*, i.e., a
semver triple, not the *revision*, i.e. a Git commit object identifier.
2026-08-23 19:33:37 +02:00
Lorenz Leutgeb d66f7e598b cli, crypto: Comment keys in SSH Agent
To avoid confusion how the key ended up in SSH Agent, add a comment that
adds some explanation.

See also
<https://radicle.zulipchat.com/#narrow/channel/392584-Feedback/topic/ssh-key.20with.20comment.20in.20agent/with/618208959>.
2026-08-23 19:28:32 +02:00
Lorenz Leutgeb 31f3d08d63 radicle/cob/thread: Use timeline: IndexSet
Plenty conservative `debug_assert!`s, cause panics as soon as two
actions that should be added to the timeline appear within the same
operation. But there is no code in place to prevent this.

It also does not seem to be problematic to visit the same operation
multiple times (once per contained action).

A set that retains iteration order does the job.

Analysis of this bug was done over Zulip, see
<https://radicle.zulipchat.com/#narrow/channel/369873-Support/topic/radicle-node.201.2E10.20segfaults/with/616991470>.

`Update::Reviewed::review` is boxed due to:

    error: large size difference between variants
       --> crates/radicle-cli/src/terminal/patch/timeline.rs:158:1
        |
    158 | /  enum Update<'a> {
    159 | |      /// A revision of the patch was reviewed.
    160 | |      Reviewed { review: Review },
        | |      --------------------------- the largest variant contains at least 352 bytes
    161 | |      /// A revision of the patch was merged.
    162 | |/     Merged {
    163 | ||         author: Author<'a>,
    164 | ||         /// If the merge is none, this means that it was a fast-forward merge.
    165 | ||         merge: Option<Merge>,
    166 | ||     },
        | ||_____- the second-largest variant contains at least 120 bytes
    167 | |  }
        | |__^ the entire enum is at least 352 bytes
2026-08-23 19:15:09 +02:00
Lorenz Leutgeb d7edbfb217 radicle/cob/thread: Make timeline private
There is no reason to have `pub(crate)` here.
2026-08-23 19:15:09 +02:00
Lorenz Leutgeb 5ddd5c64ea radicle/cob/thread: Make comments private
There is no strong reason to have `pub(crate)` here.
2026-08-23 19:15:09 +02:00
Lars Wirzenius a62b808773 ambient: Drop building of *.deb package in CI
The `*.deb` packaging has moved t radicle-apt-repo,
so there is no point in trying to build it in heartwood CI.
2026-08-23 18:27:01 +02:00
Lars Wirzenius d840fe006f ambient: Match rust-toolchain.toml
Update the rustup action in the pre-plan in `.radicle/ambient.yaml`
to use the same toolchain and components as `rust-toolchain.toml`
specifies. This allows `cargo` commands to work.
2026-08-23 18:26:30 +02:00
Lorenz Leutgeb 16de8f1950 README: Add references to downstream packages 2026-08-14 15:31:36 +02:00
Lorenz Leutgeb d7d9df27a5 debian: Remove
According to Lars Wirzenius, this is not required anymore, as it was
made redundant by `rad:z2nDKoCF4hg6xVrv7v93LmWHDJKUr`.

See also
<https://radicle.zulipchat.com/#narrow/channel/369277-heartwood/topic/Removal.20of.20.60debian.60.20directory/with/616115121>
2026-08-14 15:21:12 +02:00
David Sommerseth 2a9b5e72e9 cargo/spin: 0.9.8 → 0.9.9
Version 0.9.8 of `spin` was yanked. See also
<https://rustsec.org/advisories/RUSTSEC-2023-0031.html>.
and <https://github.com/zesterer/spin-rs/issues/148>.
2026-08-14 15:07:05 +02:00
Lorenz Leutgeb 71f39fb195 Release 1.10.1 releases/1.10.1 2026-08-12 16:55:28 +02:00
Lars WirzeniusandShawn Webb 52ac5d3b3e cli/debug: Add hardenedBsd detection
This is conditional on the target operating system being FreeBSDs.
HardenedBSD is FreeBSD but with changes. We determine which one it is,
by running 'sysctl --values hardening.version'.

Co-authored-by: Shawn Webb <shawn.webb@hardenedbsd.org>
2026-08-12 16:42:48 +02:00
Lars Wirzenius 9f05038234 cli/debug: Output /etc/os-release if available 2026-08-12 16:42:18 +02:00
Lorenz Leutgeb d18293c6ad cli/test: Do not accidentally test rad debug
The tests `rad-warn-ipv6.md` and `rad-warn-old-nodes.md` are meant to
primarily test the output of warnings. They test the output twice, via
`rad debug` and via `rad node status`.

Testing the output via one command should be sufficient.
2026-08-12 16:14:34 +02:00
Lorenz Leutgeb 4e3c274468 crypto, node: Randomly generate ephemeral keys 2026-08-12 15:28:40 +02:00
Lorenz LeutgebandKonstantinos Maninakis 4fff390c32 crypto: Use VerifyingKey::verify_strict
Refer to
<https://docs.rs/ed25519-dalek/2.2.0/ed25519_dalek/struct.VerifyingKey.html#method.verify_strict>.

Co-authored-by: Konstantinos Maninakis <maninak@protonmail.com>
2026-08-12 15:28:40 +02:00
Daniel NormanandLorenz Leutgeb d4acccf614 protocol/service: Check visibility on Subscribe
When `Service::handle_message` handles `Message::Subscribe`, constraints
regarding visibility of repositories are not considered, this leads to
leaking RIDs of private repositories.

Add a corresponding check.

Add a test to verify that reference announcements relayed via subscribe
correctly apply visibility filtering, there by ensuring references of
private repositories are only propagated to nodes on the allow list.

The test regarding deduplication needs a fix: Ensure that all mock
repositories are public and in storage so that they do not
get filtered out in case of unknown visiblity.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.dev>
2026-08-12 15:28:40 +02:00
Lorenz Leutgeb 6ba619f9a6 build/config: Link -dead_strip_dylibs on macOS 2026-08-06 17:31:04 +02:00
Lorenz Leutgeb 4641c342c6 Release 1.10.0 releases/1.10.0 2026-08-05 15:32:21 +02:00
Adrian Duke 1a5dfc2616 surf: Fix flakey test with sorted vector 2026-08-05 13:22:09 +02:00
Fintan Halpenny 4f7bde023c surf: Ignore Rust and JSON examples
The examples do not import everything necessary to compile, so the doctests will
fail using `no_run`.

Instead, use `ignore` instead so that it does not attempt to compile the examples.
2026-08-05 13:18:19 +02:00
Lorenz Leutgeb a2eb756887 cli/id: Introduce rad id cache
Similar to `rad [issue|patch] cache`, this will re-compute cached state
about the identity document. The identity COB does not cache to SQLite,
but there is `refs/rad/id`, which can become stale.
2026-08-04 19:42:13 +02:00
Adrian Duke ca1b4fa7bc cli/id: Add verbose output to show and list 2026-08-04 19:34:56 +02:00
Adrian Duke c830053e32 cli/id: Incorporate reason for rejection 2026-08-04 19:34:34 +02:00
Lorenz Leutgeb 71a91042d9 cargo/workspace: Bump crate versions
In topological order:

 - radicle-git-metadata     0.2.0 →  0.2.1
 - radicle-git-ref-format   0.1.0 →  0.2.0
 - radicle-oid              0.2.1 →  0.2.2
 - radicle-crypto          0.18.0 → 0.19.0
 - radicle-surf            0.28.0 → 0.29.0
 - radicle-cob             0.21.0 → 0.21.1
 - radicle-core             0.4.0 →  0.4.1
 - radicle                 0.25.0 → 0.25.1
 - radicle-signals         0.12.0 → 0.12.1
 - radicle-fetch           0.21.0 → 0.21.1
 - radicle-term            0.19.0 → 0.19.1
 - radicle-protocol         0.9.0 →  0.9.1
 - radicle-cli-test        0.14.0 → 0.14.1
 - radicle-node            0.21.0 → 0.21.1
 - radicle-cli             0.22.0 → 0.23.0
 - radicle-schemars         0.9.0 →  0.9.1
 - radicle-remote-helper   0.18.0 → 0.18.1
2026-07-24 21:37:41 +02:00
Lorenz Leutgeb ac607c8cad git-ref-format: Integrate with workspace
Instead of depending on `git-ref-format-core`, the
`radicle-git-ref-format` crate succeeds it.
2026-07-24 16:31:30 +02:00
Lorenz Leutgeb 8731d01bca git-ref-format: Copy over from radicle-git
This is the result of

    cp -r \
      ../radicle-git/radicle-git-ext/git-ref-format/core/src/{{cbor,check,deriv,lit,name,refspec,serde}.rs,{name,refspec}} \
      crates/radicle-git-ref-format/src/

with the radicle-git workspace at commit
8c5df5ecbd3f2507d323608b52e1fbf7b177d864.
2026-07-24 16:27:02 +02:00
Lorenz Leutgeb 36fc031da2 surf: Switch to crate in workspace
Now that `radicle-surf` lives in this workspace, use it.
2026-07-24 16:27:02 +02:00
Lorenz Leutgeb f8b5bde40a surf: Refactor
Refactor the `radicle-surf` crate to use OIDs from `radicle-oid` instead
of `radicle-git-ext`, and `radicle-git-ref-format` instead of re-exports
from `radicle-git-ext`. Also remove the dependency `radicle-std-ext`.

This requires changing `use`s, and an ad-hoc reimplementation of
`ResultExt::or_matches`.

The remaining changes (excl. tests) are automatic via `rustfmt` and
`cargo clippy`.

For testing, implement reconstruction of

    https://github.com/radicle-dev/git-platinum

in particular of the commits
 - a0dd9122d33dff2a35f564d564db127152c88e02
 - 27acd68c7504755aa11023300890bb85bbd69d45
 - e972683fe8136bf8a5cb2378cf50303554008049
and some tags.

`…/src/test/roundtrip.rs` was copied from the `test-helpers` crate in
the radicle-git workspace.

`…/src/test/{repository.rs,gen*}` was copied from the `radicle-git-ext`
crate in the radicle-git workspace.
2026-07-24 16:27:02 +02:00
Lorenz Leutgeb e880810e48 surf: Move test files into place
In the radicle-git workspace, crates brought their own testing crates
along with them, usually in a subdirectory named "t". In the heartwood
workspace we use tests within the same crate.

This commit only moves files, so that it is easier to follow changes to
them in the upcoming commit.
2026-07-24 16:09:56 +02:00
Lorenz Leutgeb 0ef1f0714d surf: Copy over from radicle-git
This is the result of a simple

    cp -r ../radicle-git/radicle-surf/ crates
    rm -r crates/radicle-surf/{data,scripts,build.rs}

with the radicle-git workspace at commit
8c5df5ecbd3f2507d323608b52e1fbf7b177d864.
2026-07-24 16:09:55 +02:00
Lorenz Leutgeb 64a028353b scripts/just/check-ellipses: Replace less
Replacing all "..." with "…" is too aggressive.
2026-07-23 22:16:01 +02:00