From 404fe33a8871e53092ed96be41fc92bf08d68f60 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Sun, 22 Mar 2026 15:44:02 +0100 Subject: [PATCH] radicle/sigrefs: Remove `MissingIdentity` error Feature levels now treat this situation. --- crates/radicle/src/storage/refs/sigrefs/read.rs | 10 ---------- .../src/storage/refs/sigrefs/read/error.rs | 9 --------- .../refs/sigrefs/read/test/commit_reader.rs | 17 ----------------- 3 files changed, 36 deletions(-) diff --git a/crates/radicle/src/storage/refs/sigrefs/read.rs b/crates/radicle/src/storage/refs/sigrefs/read.rs index 26aa31b1..ea223e6c 100644 --- a/crates/radicle/src/storage/refs/sigrefs/read.rs +++ b/crates/radicle/src/storage/refs/sigrefs/read.rs @@ -374,16 +374,6 @@ impl Commit { FeatureLevel::Root } } else { - let err = error::Verify::MissingIdentity(error::MissingIdentity { - sigrefs_commit: self.oid, - expected, - }); - - log::debug!("Reading sigrefs will error in the future: {err}"); - - // TODO: Make this return the error - // and enable test `test::commit_reader::missing_identity`. - FeatureLevel::None }; diff --git a/crates/radicle/src/storage/refs/sigrefs/read/error.rs b/crates/radicle/src/storage/refs/sigrefs/read/error.rs index c28eca9f..b3491fba 100644 --- a/crates/radicle/src/storage/refs/sigrefs/read/error.rs +++ b/crates/radicle/src/storage/refs/sigrefs/read/error.rs @@ -121,8 +121,6 @@ pub enum Verify { expected: RepoId, found: RepoId, }, - #[error(transparent)] - MissingIdentity(MissingIdentity), #[error( "expected no parent reference in refs commit '{sigrefs_commit}', but found target '{actual}'" )] @@ -138,10 +136,3 @@ pub enum Verify { #[error("expected identity root in refs commit '{sigrefs_commit}' but found none")] IdentityRootDowngrade { sigrefs_commit: Oid }, } - -#[derive(Debug, Error, Clone, PartialEq, Eq)] -#[error("expected repository identity {expected}, but found none under commit '{sigrefs_commit}'")] -pub struct MissingIdentity { - pub(super) sigrefs_commit: Oid, - pub(super) expected: RepoId, -} diff --git a/crates/radicle/src/storage/refs/sigrefs/read/test/commit_reader.rs b/crates/radicle/src/storage/refs/sigrefs/read/test/commit_reader.rs index 5fac6fba..674bdda6 100644 --- a/crates/radicle/src/storage/refs/sigrefs/read/test/commit_reader.rs +++ b/crates/radicle/src/storage/refs/sigrefs/read/test/commit_reader.rs @@ -72,23 +72,6 @@ fn missing_commit() { )); } -#[test] -#[ignore = "strict verification of `refs/rad/root` reverted due to compatibility issues"] -fn missing_identity() { - let head = mock::oid(1); - let refs = [(mock::refs_heads_main(), mock::oid(10))]; - let repo = MockRepository::new() - .with_commit(head, mock::commit_data([])) - .with_refs(head, refs) - .with_signature(head, 1); - - let err = read_at(head, repo).unwrap_err(); - assert!(matches!( - err, - error::Read::Verify(error::Verify::MissingIdentity { .. }) - )); -} - #[test] fn read_ok() { let head = mock::oid(1);