radicle/sigrefs: Remove `MissingIdentity` error

Feature levels now treat this situation.
This commit is contained in:
Lorenz Leutgeb 2026-03-22 15:44:02 +01:00 committed by Fintan Halpenny
parent 7f19044a72
commit 404fe33a88
3 changed files with 0 additions and 36 deletions

View File

@ -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
};

View File

@ -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,
}

View File

@ -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);