Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle/sigrefs: Remove `MissingIdentity` error
Lorenz Leutgeb committed 1 month ago
commit 404fe33a8871e53092ed96be41fc92bf08d68f60
parent 7f19044
3 files changed +0 -36
modified 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
        };

modified 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,
-
}
modified crates/radicle/src/storage/refs/sigrefs/read/test/commit_reader.rs
@@ -73,23 +73,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);
    let refs = [