30 Commits
Author SHA1 Message Date
Rūdolfs Ošiņš e37521c739 Move explorer into explorer/
Makes explorer and desktop sibling projects, as proposed in ADR 1.
This commit only moves files; paths in CI, scripts and docs are fixed
in the following commits.
2026-10-22 11:06:33 +02:00
Rūdolfs Ošiņš 4a84871ee7 httpd: Return 400 for malformed archive refs
A ref name git rejects outright, like `foo..bar`, still yielded a 500.
It's a client error, same as a malformed SHA in `/{rid}/{sha}`.
2026-10-22 10:27:53 +02:00
Jörg Thalheim cc67fd894a httpd: Return 404 for unknown archive refs
/raw/<rid>/archive/<ref> passed the git2 error from
resolve_reference_from_short_name straight through, so a typo in the
branch name or a commit SHA in place of a ref yielded a 500. Map
ErrorCode::NotFound to 404 like we already do for the object lookup.

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2026-10-22 09:53:03 +02:00
Jörg Thalheim fe29d7275b httpd: Batch search reindexing, ignore seed events
A peer with a bad connection kept reconnecting and re-announcing all
its seeded repos, ~27k SeedDiscovered/SeedDropped events per hour on
my node. Every event triggered a meili upsert until meilisearch sat
at 100% cpu and its task queue timed out.

Seed events only affect the seedingCount ranking field and the
periodic rescan updates that anyway, so drop them. Collect the
remaining events and reindex each touched repo once every 30s
(RADICLE_SEARCH_BATCH_SECS).
2026-10-19 17:20:44 +02:00
Jörg Thalheim 7d9be54317 httpd: Add tar.zst archive downloads
Support /raw/<rid>/archive/<ref>.tar.zst next to the existing tar,
tar.gz and zip formats. Git has no builtin zstd tar format, so
register one via tar.tar.zst.command. Needs the zstd binary in PATH.
2026-10-19 16:37:59 +02:00
Rūdolfs Ošiņš 357f4311f6 Document where the desktop app lives
So both the docs and agents know `desktop/` is its own project, with
commands run from there.
2026-10-13 17:23:20 +02:00
Rūdolfs Ošiņš 5e70f8f2bf httpd: Use releases/httpd/ for release tags
Since desktop was merged in, its `releases/<version>` tags are in our
history too, and `git describe --match='releases/*'` picked up
`releases/0.16.0` as the httpd version. The changelog also leaves out
`desktop/`, otherwise the next one would list its whole history.
2026-10-13 16:53:36 +02:00
Yorgos SaslisandDaniel Norman b9ba3b7917 Add RADICLE_HTTPD_LOG_FORMAT runtime switch
- Select text (default) or json log format at startup, not at
  compile time
- Emit the access log as structured fields (client, method, uri,
  version, status, latency_ms, bytes) in json
- Log status and size as plain text, since tracing-subscriber
  escapes ANSI codes
- Remove the logfmt feature and tracing-logfmt dependency
- Drop the radicle-term dependency
- Split format setup from lib.rs into logger.rs

Co-Authored-By: Daniel Norman <daniel@norman.life>
2026-09-24 14:55:09 +02:00
Rūdolfs Ošiņš 7acf07393f Release 0.29.0 2026-09-14 09:09:07 +02:00
Rūdolfs Ošiņš 112604b6d3 Fix truncated commit list for merge-commit diffs
The diff endpoint walked back from the head commit and stopped at the
first commit equal to `base`. `surf::History` is an unhidden revwalk in
commit-date order, so a head that merges the target branch in reaches
`base` through one of its parents and truncates the walk there, dropping
every commit the other parent contributes. A patch whose head is such a
merge showed a single commit no matter how many it really carried.
2026-09-11 11:06:23 +02:00
Rūdolfs Ošiņš 60fd9a1288 Release 0.28.0 2026-08-28 18:19:51 +02:00
Rūdolfs Ošiņš 152088105b Fix cargo audit reported warnings 2026-08-28 17:58:57 +02:00
Daniel NormanandRūdolfs Ošiņš b1acb3eb4d Integrate radicle-artifact into explorer
- Add release read API to httpd as cargo feature enabled by default
- Add Releases and Release views to the UI
- Filter out redacted artifacts and mark delegate authors
- Degrade releases UI gracefully with older radicle-httpd versions
- Hide fully redacted releases
- Skip releases in the list endpoint when every artifact was redacted by
  its author or a delegate, so no empty release entries are shown
- Keep them reachable with showRedacted=true and by release id
- Add e2e tests for the release routes

Co-Authored-By: Rūdolfs Ošiņš <rudolfs@osins.org>
2026-08-28 16:33:14 +02:00
Lorenz Leutgeb 678cdee6b1 httpd/git: Pass Git-Protocol header
Reports of incompatibility with clients that require version 2 of the
Git protocol, were reported, see
<https://radicle.zulipchat.com/#narrow/channel/570942-Garden/topic/preserve.20.60Git-Protocol.60.20header/near/616710464>.

Version negotiation depends on the `Git-Protocol` header, which may be
passed via the environment variable `GIT_PROTOCOL` as documented in
`man:git-http-backend(1)` (see sections "Environment" and "Examples").
2026-08-24 10:32:53 +02:00
Rūdolfs Ošiņš 427cece985 Release 0.27.0 2026-07-29 16:39:45 +02:00
Rūdolfs Ošiņš 256b060770 Resolve repo aliases in JSON and raw API 2026-07-29 14:05:06 +02:00
Rūdolfs Ošiņš 8d8339165c Show git-clone alias in clone button 2026-07-29 13:10:05 +02:00
Rūdolfs Ošiņš 2499fe4d72 httpd: Add a diff-stats endpoint
The patch badge only needs insertions/deletions, but the full diff
endpoint builds every hunk and loads every changed blob.

This favours speed over exactness: `git diff --numstat` does not do
the rename/copy detection radicle-surf does, so on patches with copied
or renamed files the badge can diverge slightly from the full diff
view. In return it is roughly 6x faster on small diffs and 15x on
large ones.
2026-07-29 09:36:31 +02:00
Rūdolfs Ošiņš 436085c154 httpd: Add a dedicated commit-count endpoint
The header and history only need a commit count, but /stats/tree walks
the full history and builds a contributor set to produce it.

Add /stats/commits, counting with `git rev-list --count`
(bitmap/commit-graph), falling back to a libgit2 revwalk.
2026-07-29 09:36:31 +02:00
Rūdolfs Ošiņš b913ef6329 httpd: Run heavy repository reads on the blocking pool
libgit2 and COB reads are synchronous and can take seconds; on an
async worker one slow read stalls every request queued behind it.
2026-07-29 09:36:31 +02:00
Rūdolfs Ošiņš 18641de76a httpd: Speed up opening files in large repositories
surf's blob() walks the whole history to find the commit that last
touched a file, taking seconds to minutes on large repositories.

Read the blob directly and resolve its last commit with
`git rev-list -1`, which uses the commit-graph, falling back to surf.
2026-07-29 09:36:31 +02:00
Rūdolfs Ošiņš 265ee59039 httpd: Raise open-file limit at startup
Resolving a repo's signed refs opens a descriptor per packfile, and
radicle storage can hold thousands, so the default limit is exhausted
and reads fail with spurious "missing object" errors.
2026-07-29 09:36:31 +02:00
Rūdolfs Ošiņš cf7763d972 Bump all radicle crates to latest versions 2026-07-28 09:52:54 +02:00
Rūdolfs Ošiņš c1bda5f9e5 Bump Rust toolchain to 1.97.1 2026-07-28 09:22:15 +02:00
Rūdolfs Ošiņš 9b1e1d20e1 Respect RUST_LOG in default httpd logger
Wire up an EnvFilter that reads RUST_LOG, defaulting
to "info", and enable the env-filter feature unconditionally.
2026-07-28 08:42:22 +02:00
Daniel Norman 19ab609aa3 Refine CLAUDE.md 2026-07-27 16:20:13 +02:00
Daniel Norman 524ff5dfa2 Exclude job COBs without runs from job list
- Filter out jobs that have no runs in `jobs_by_commit` so empty
  job COBs are not served to the frontend
- Add a unit test covering the filter via a stubbed `FindJobs`
2026-07-21 16:38:25 +02:00
Rūdolfs Ošiņš cb4ac69c29 Release 0.26.0 2026-07-15 16:27:45 +02:00
Rūdolfs Ošiņš 62b9c21f57 Release radicle-httpd and radicle-search together
radicle-search now ships in the same release as radicle-httpd: one
tag, one changelog, one reproducible build, with per-binary artifacts
in sibling folders on files.radicle.dev.

meilisearch-sdk: use the pure-Rust JWT backend (jwt_rust_crypto) instead
of jwt_aws_lc_rs, dropping aws-lc-sys, which fails to cross-compile to
the Apple targets under cargo-zigbuild.
2026-07-15 15:42:22 +02:00
Georgios Jason Efstathiou b201ddd501 radicle-search: Add search backend and httpd endpoints 2026-07-13 10:53:17 +02:00