From 4043d92698d4d0cea70023f05d552be6987bceb9 Mon Sep 17 00:00:00 2001 From: dawn Date: Mon, 31 Aug 2026 15:12:33 +0900 Subject: [PATCH] bobbin/xrpc: proxy repo blame The knot answers sh.tangled.repo.blame and gitmirror answers sh.tangled.git.temp2.getBlame, so both nsids need a route through here. Signed-off-by: dawn --- bobbin/crates/xrpc/src/lib.rs | 2 ++ bobbin/crates/xrpc/tests/mirror_proxy.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/bobbin/crates/xrpc/src/lib.rs b/bobbin/crates/xrpc/src/lib.rs index 50b585c9f..a1082e671 100644 --- a/bobbin/crates/xrpc/src/lib.rs +++ b/bobbin/crates/xrpc/src/lib.rs @@ -618,6 +618,7 @@ impl OnFailure for LatencyFreeTrace { const REPO_PROXIED_NSIDS: &[&str] = &[ "sh.tangled.repo.archive", + "sh.tangled.repo.blame", "sh.tangled.repo.blob", "sh.tangled.repo.branch", "sh.tangled.repo.branches", @@ -641,6 +642,7 @@ const KNOT_PROXIED_NSIDS: &[&str] = &[ const MIRROR_V2_PROXIED_NSIDS: &[&str] = &[ "sh.tangled.git.temp2.listCommits", + "sh.tangled.git.temp2.getBlame", "sh.tangled.git.temp2.getDiff", "sh.tangled.git.temp2.getInterdiff", "sh.tangled.git.temp2.mergeCheck", diff --git a/bobbin/crates/xrpc/tests/mirror_proxy.rs b/bobbin/crates/xrpc/tests/mirror_proxy.rs index fd21ea614..a9d74d485 100644 --- a/bobbin/crates/xrpc/tests/mirror_proxy.rs +++ b/bobbin/crates/xrpc/tests/mirror_proxy.rs @@ -243,6 +243,7 @@ async fn every_shape_compatible_request_reads_the_mirror() { async fn every_request_the_mirror_answers_in_another_shape_reads_the_knot() { #[rustfmt::skip] let refused = [ + ("sh.tangled.repo.blame", "ref=main&path=x", "outside the routing table"), ("sh.tangled.repo.blob", "ref=main&path=x", "the mirror serves content types the knot answers with 403"), ("sh.tangled.repo.blob", "ref=main&path=x&raw=true", "raw doesn't exempt the blob"), ("sh.tangled.repo.archive", "ref=main", "a resume would splice knot bytes onto a mirror tarball"), -- 2.51.2