Commit Graph

3101 Commits

Author SHA1 Message Date
Lorenz Leutgeb 7ed9d50ab6
crypto: Update ssh-agent-lib from 0.5.2 to 0.6
This should fix issues handling SSH certificates.

See
<https://radicle.zulipchat.com/#narrow/channel/369873-Support/topic/1.2E9.2E0.3A.20rad.20auth.20fails.20with.20SSH.20certificate.20in.20agent/with/596358640>.
2026-05-21 13:10:35 +02:00
Lorenz Leutgeb 09b1f1f77c
node: Fix handling absence of systemd credential
In case `radicle_systemd::credential::path` returns `Ok(None)`, a
misleading warning is logged.

Handle this case separately and do not emit a warning.
2026-05-20 09:36:22 +02:00
Fintan Halpenny 9381232604 .radicle/ambient: Add pre-plan action for rustup
To ensure the correct toolchain is used when building and testing the
project, a pre-plan action is added for `rustup`.
It uses the same `channel` as defined in the `rust-toolchain.toml`.
A note is left about this duplication, and the possibility of it being
supported in the future.

Note that this includes a workaround:
```
sed -i /components/d rust-toolchain.toml
```
which ensures that `components` are removed, since Ambient does not
support `components` at this time.
2026-05-19 10:46:50 +01:00
Fintan Halpenny 1f40b32b6a protocol: provide more information for invalid timestamps
The invalid timestamp error will only tell the timestamp of the
offending node's message.

Currently, there are issues where that error is occurring but the
timestamp seems legitimate. This patch adds the running node's
timestamp to help debug the issue.
2026-05-18 18:06:26 +02:00
Fintan Halpenny ac5fc67428 fetch: Update gix packages
Several vulnerabilities were found in the gix packages[^1][^2][^3].

Update the packages to their latest versions which include the fixes.

The only required change is in `ls_refs`.
`RefPrefixes` was introduced and this fixes the issue with `ref-prefix`.
This should now improve the ls-refs stage and only return references
that the client is asking for, as opposed to all references.

[^1]: https://github.com/radicle-dev/heartwood/security/dependabot/38
[^2]: https://github.com/radicle-dev/heartwood/security/dependabot/39
[^3]: https://github.com/radicle-dev/heartwood/security/dependabot/36
2026-05-18 14:57:33 +02:00
stefan 1000402536 node: upgrade cyphernet to fix a panic in socks5-client when using artix
cyphernet 0.5.4 upgrades socks5-client to 0.4.3, which fixes a panic
that occurred when using tor's new artix implementation via socks5.

The upstream fix (authored by me):
https://github.com/cyphernet-labs/cyphernet.rs/pull/18

Diff:
https://github.com/cyphernet-labs/cyphernet.rs/compare/v0.5.3...v0.5.4
2026-05-15 09:06:46 +01:00
Lorenz Leutgeb 9158df5067 flake: Add NixOS tests to checks 2026-05-13 17:23:54 +01:00
Lorenz Leutgeb 767b80e7fe flake: Sort Inputs Lexicographically 2026-05-13 17:23:54 +01:00
Lorenz Leutgeb c5043617b9 flake: Fix nixpkgs inputs 2026-05-13 17:23:49 +01:00
Adrian Duke caee776c38 log: New crate for logger implementations
Move logging-related module `radicle::logging` into its own crate.

While at it, remove the "logger" feature flag from `radicle`.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.dev>
2026-05-11 16:44:37 +01:00
Fintan Halpenny f22811e015 simulation/README: Note for running on NixOS 2026-05-11 12:53:47 +01:00
Adrian Duke 277f2615c9 simulation: Ensure OVMF is available 2026-05-11 12:53:47 +01:00
Fintan Halpenny 9dda890fb5 flake.nix: Add simulation requirements to devShell
Adds the required tools listed in `simulation/README.md` to `flake.nix`.
2026-05-11 12:53:47 +01:00
Adrian Duke ac6759b74b simulation: Switch externalAddress config parsing to jq 2026-05-11 12:53:47 +01:00
Adrian Duke d648892009 simulation: Extract external address configuration bash commands
Names the set of commands that extract the external address and set in
the configuration of the `start` script for `seed` and `bootstrap` nodes.
2026-05-11 12:53:47 +01:00
Adrian Duke f41bea1d69 simulation: Vendor Timoni dependencies as part of start-network 2026-05-11 12:53:47 +01:00
Adrian Duke ae4a70e3b6 simulation: Update README 2026-05-11 12:53:47 +01:00
Adrian Duke d197ab6139 simulation: Add justfile and network.cue topology definition
Introduce the `network.cue` topology definition for creating a set of
Radicle nodes and deploying them with the `justfile`.

A set of predefined bootstrap keys are provided with helpers to generate
connection strings inside Node config. Node config can be overwritten
directly inside the CUE config.

Nodes versions are taken from quay.io.
Talos is the cluster manager.
K8s hosts the pods.
Timoni aplpys the CUE configs to the K8s cluster.
2026-05-11 12:53:17 +01:00
Adrian Duke 8622a466c5 simulation: Ignore cue.mod/pkg and cue.mod/gen for Timoni 2026-05-11 12:53:17 +01:00
Adrian Duke 620a1ec697 simulation: Introduce particle CUE module for radicle-node
Adds a `radicle-node` particle CUE module to simulation. Partial for
brevity in review as the `cue.mod` files found in the NEXT commit are
less relevant and autogenerated by Timoni + CUE.

Creates a set of roles: `peer`, `seed`, `bootstrap` that can be arranged
into toplogies for deployment in a k8s system. Images are provided by
Radicle Garden via quay.io.
2026-05-11 12:53:17 +01:00
Fintan Halpenny be5a1742fb flake.lock: Update nixpkgs-stable
Run `nix flake update nixpkgs-stable` to get the latest versions of tooling.
2026-05-11 12:53:17 +01:00
Fintan Halpenny 0d7bc8d1db build: Update apline version to 3.22
There is no Rust 1.95.0 docker image under alpine 3.20.
The latest version is 3.22, so the Dockerfile is updated to use this
version.
2026-05-11 12:36:48 +01:00
Lorenz Leutgeb 420af3b710 workspace/rust: 1.90 → 1.95
The update to `flake.lock` is a simple

    nix flake update rust-overlay

to be able to reach 1.95.
2026-05-11 12:09:04 +01:00
Lorenz Leutgeb 9ea040ccd0 rust/msrv: 1.85.0 → 1.88.0
`cargo check` fails because `human-panic` and `sysinfo` require at least
1.88.0.

    +++ command cargo check --release --locked --all-targets
    error: rustc 1.85.0 is not supported by the following packages:
      human-panic@2.0.6 requires rustc 1.88
      sysinfo@0.37.2 requires rustc 1.88

Bump MSRV to fix this.

1.88.0 introduced [let chains], which in turn has `clippy` warn about
nested if statements. All of these sites are fixed in this change.

1.87.0 introduced [`is_multiple_of`], which is a more readable version
of `x % y == 0`.

[let chains]: https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#let-chains
[`is_multiple_of`]: https://doc.rust-lang.org/std/primitive.usize.html#method.is_multiple_of
2026-05-11 11:23:18 +01:00
Lorenz Leutgeb 0a0e70b1d1
node/systemd: Fix reading credentials
In `cb57e6560fe7767e79b87473a11261fbb82ce84c` the loading of systemd
credentials was refactored. The idea was to only change the accepted IDs
slightly after switching from radicle.xyz to radicle.dev. Unfortunately,
this was done in a sloppy way. The two cases for passphrase and secret
actually differ in ways that was overlooked.

Rectify these mistakes and restore the old behavior:
 1. The logic to read the passphrase from the file that contains the
    credential is moved out of `load_credential` since it only applies
    to the passphrase, not the secret.
 2. The warnings printed are now generic, and will not mention the
    passphrase in case reading the path for the secret fails.
2026-05-07 22:53:57 +02:00
Daniel Norman 6b460c4429 logger: Respect config file log level
- Fixes a bug where the log level set in the config file was
  ignored: `Logger` and `StderrLogger` captured the level in a
  `self.level` field at construction time and checked it in
  `Log::enabled`. After config was loaded, the global
  `log::set_max_level` was updated but `self.level` was not,
  so verbose messages were dropped by the per-instance filter
  even when the global filter allowed them.
- Make `log::set_max_level` the single source of truth: remove
  the `level` field and have `Log::enabled` defer to
  `log::max_level()` so the two filters can no longer drift.
- Update call sites to construct loggers without a level.
- Disable the structured logger's internal filter (set to "trace") so
  that it also falls back to `log::set_max_level`.
2026-05-07 16:23:28 +01:00
Lorenz Leutgeb 9177146794 radicle/web: Fix schema of `Config::description`
The JSON Schema for the field `radicle::web::Config::description` is specified
to be a URI, which is wrong.

Remove the additional attribute.
2026-05-07 15:23:31 +01:00
Lorenz Leutgeb ee9a9de36d radicle/web: Relax deserialization of `Config`
Allow omission of `pinned` and its members.
2026-05-07 15:23:31 +01:00
Fintan Halpenny 53db994146 schemars: Release 0.8.0 2026-05-06 21:15:54 +01:00
Fintan Halpenny ad068309c9 fetch: Release 0.20.0 2026-05-06 21:15:54 +01:00
Fintan Halpenny ab3621d5d4 remote-helper: Release 0.17.0 2026-05-06 21:15:54 +01:00
Fintan Halpenny f5c39dd603 cob: Release 0.20.0 2026-05-06 21:15:54 +01:00
Fintan Halpenny baf533b37b cli: Release 0.21.0 2026-05-06 21:15:54 +01:00
Fintan Halpenny 342b4d963a node: Release 0.20.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 622f3827b5 protocol: Release 0.8.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 2707f6b4b1 radicle: Release 0.24.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 3486c028ea term: Release 0.18.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 5991bdfa9a systemd: Release 0.13.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 2871417808 oid: Release 0.2.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 4ca2098cb7 core: Release 0.3.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 64a419d79c crypto: Release 0.17.0 2026-05-06 21:00:14 +01:00
Lorenz Leutgeb 3f81e83d36 radicle/crefs: Support Symbolic References
Canonical references can not be used to model symbolic references.

Relax this restriction by adding another member to the payload, named
"symbolic". Its key-value/name-target pairs then translate directly to
canonical symbolic references.

Care is taken to not allow circular references, and that there always
is a rule that could generate the target of a symbolic reference
(or a chain of symbolic references). Still, a symbolic reference may
dangle (for example when its target reference cannot be computed
because of divergence), but at least it can be prevented that a
symref *always* dangles, because there is no rule that would produce
its target.

Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2026-05-06 20:51:04 +02:00
Adrian Duke 080790d84e radicle/git/canonical: Add explicit test case for fast_glob pattern match syntax 2026-05-05 14:41:52 +01:00
Adrian Duke 80d30d3b59 e2e: Fix false-positive in canonical ref update test
Previously `test_fetch_emits_canonical_ref_update` was passing by
catching a leftover `CanonicalRefUpdated` event from the initial
repository fetch. Furthermore, the new commit was written to the
un-namespaced root. It can be proven to be the case by commenting out
the `alice.commit_to(...)` line and watching the test still pass.

Fix the test by committing to the namespaced default branch which will
trigger the `CanonicalRefUpdated` that is expected by Bob. Drains events
so we don't catch the wrong event, and explicitly announces.
2026-05-05 14:41:52 +01:00
Adrian Duke ed340f5724 e2e: Add partial glob match cref test 2026-05-05 14:41:52 +01:00
Fintan Halpenny e87af868db node/test: `NodeHandle::commit_to` should namespace
The `commit_to` method should namespace the reference, so that node is
only ever committing the namespace of that particular node.

This prevents the node from committing to another node's namespace or
the canonical namespace.
2026-05-05 14:41:52 +01:00
Adrian Duke 8724ebe780 radicle/git/canonical: Introduce property tests for glob matching behaviour 2026-05-05 14:41:52 +01:00
Adrian Duke fb40bdc0ac radicle/git/canonical: Fix glob rewrite rule for trailing asterisk
Previously a rule like `refs/heads/releases-*` would be rewritten
incorrectly to `refs/heads/releases-**/*` matching the 'trailing
asterisk' rule.

Simplify the rewrite rule so that a trailing `*` becomes a prefix
matching rule. Add tests.
2026-05-05 14:08:33 +01:00
Fintan Halpenny 455138f4a7 radicle/canonical/rules: Reorganise test suite
Reorganises the rules test suite into a `test` module and a `helper`
sub-module.

The former holds the original tests, removing the `test_` prefix.
The latter holds helper functions for test setup.
2026-05-05 09:53:58 +01:00
Daniel Norman 998f527bd4 node/db: delete unparseable ipv6 rows
- Drop `type='ipv6'` rows whose bracket-stripped inner part contains
  no `:`, since every valid IPv6 textual form has at least one
- Cover the offender (`[]:8776`), bracketed garbage (`[abc]:8776`),
  the unspecified (`::`), loopback, and full forms in tests
- Keep `dns` and `ipv4` rows untouched

Migration 8 retyped any `[..]:N` dns row to ipv6 by bracket pattern
alone, without checking the inner part is parseable
2026-05-01 17:42:44 +02:00