refactor(core): remove prototype contact paths for experimental saved devices

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-11 06:05:31 +02:00
parent 0a6ecb5c3b
commit a2385912c2
63 changed files with 514 additions and 7806 deletions

View File

@@ -60,6 +60,7 @@ impl DeviceRelationshipService {
let _guard = peer_lock.lock().await;
let Some(row) = self.find_row(&peer_endpoint_id).await? else {
self.eligibility.remove_for_peer(&peer_endpoint_id).await?;
return Ok(ForgetOutcome {
had_relationship: false,
generation: None,

View File

@@ -39,7 +39,7 @@ mod lifecycle;
#[cfg(test)]
pub(crate) use lifecycle::GenerationTombstone;
use crate::contacts::ContactStore;
use crate::blocked_devices::BlockStore;
use crypto::{
encode_relationship_grant_secret, prove_relationship_grant, secret_from_material,
verify_relationship_grant,
@@ -171,13 +171,13 @@ impl DeviceRelationshipService {
Ok(())
}
pub(super) fn contacts(&self) -> ContactStore {
ContactStore::new(self.pool.clone())
pub(super) fn blocked_devices(&self) -> BlockStore {
BlockStore::new(self.pool.clone())
}
pub(super) async fn is_blocked(&self, endpoint_id: &str) -> bool {
// Fail closed: a store error must not admit blocked traffic.
self.contacts()
self.blocked_devices()
.is_blocked(endpoint_id)
.await
.unwrap_or(true)