refactor(vault): remove irpc actor dispatch — direct method calls on VaultServiceHandle (task: vault/irpc-removal)

ADR-025 / drift item #4: remove the irpc-based actor dispatch from the vault
crate. VaultServiceHandle (Arc<std::sync::RwLock<>>) is now the sole synchronous
API. Removed: VaultProtocol enum, VaultServiceActor, VaultService wrapper,
Client<VaultProtocol> usage, irpc/irpc-derive/tokio deps, postcard dev-dep,
Serialize/Deserialize on VaultServiceError. lib.rs re-exports match the vault
README Public API. The vault is now local-only by construction with zero async
runtime dependency.

Refs: docs/architecture/crates/vault/README.md drift #4
Implements: ADR-025

# Conflicts:
#	Cargo.lock
This commit is contained in:
2026-06-23 13:22:13 +00:00
6 changed files with 171 additions and 1150 deletions

View File

@@ -309,8 +309,10 @@ mod tests {
#[test]
fn test_cache_expired_entry_evicted_on_access() {
let mut config = CacheConfig::default();
config.ttl = Duration::from_millis(1);
let config = CacheConfig {
ttl: Duration::from_millis(1),
..Default::default()
};
let mut cache = KeyCache::new(config);
cache.insert("m/74'/0'/0'/0'", make_cached_key(KeyType::Ed25519));
@@ -323,8 +325,10 @@ mod tests {
#[test]
fn test_cache_lru_eviction() {
let mut config = CacheConfig::default();
config.max_entries = 3;
let config = CacheConfig {
max_entries: 3,
..Default::default()
};
let mut cache = KeyCache::new(config);
@@ -345,8 +349,10 @@ mod tests {
#[test]
fn test_cache_lru_access_reorders() {
let mut config = CacheConfig::default();
config.max_entries = 3;
let config = CacheConfig {
max_entries: 3,
..Default::default()
};
let mut cache = KeyCache::new(config);
@@ -381,8 +387,10 @@ mod tests {
#[test]
fn test_evict_expired_removes_only_expired() {
let mut config = CacheConfig::default();
config.ttl = Duration::from_millis(10);
let config = CacheConfig {
ttl: Duration::from_millis(10),
..Default::default()
};
let mut cache = KeyCache::new(config);
cache.insert("path1", make_cached_key(KeyType::Ed25519));