huskies: merge 637_story_peer_mesh_discovery_via_crdt_node_presence_list

This commit is contained in:
dave
2026-04-26 01:53:23 +00:00
parent b84ce1f6bb
commit dc7ae3a23c
6 changed files with 540 additions and 3 deletions
+14
View File
@@ -70,6 +70,12 @@ pub struct ProjectConfig {
/// server starts. Only meaningful when `crdt_require_token` is `true`.
#[serde(default)]
pub crdt_tokens: Vec<String>,
/// Maximum number of supplementary mesh peer connections an agent opens.
/// The mesh discovery loop reads the CRDT `nodes` list and connects to up
/// to this many alive peers in addition to the primary rendezvous connection.
/// Default: 3. Set to 0 to disable mesh discovery entirely.
#[serde(default = "default_max_mesh_peers")]
pub max_mesh_peers: usize,
}
/// Configuration for the filesystem watcher's sweep behaviour.
@@ -117,6 +123,10 @@ fn default_rate_limit_notifications() -> bool {
true
}
fn default_max_mesh_peers() -> usize {
3
}
#[derive(Debug, Clone, Deserialize)]
#[allow(dead_code)]
pub struct ComponentConfig {
@@ -247,6 +257,7 @@ impl Default for ProjectConfig {
trusted_keys: Vec::new(),
crdt_require_token: false,
crdt_tokens: Vec::new(),
max_mesh_peers: default_max_mesh_peers(),
}
}
}
@@ -327,6 +338,7 @@ impl ProjectConfig {
trusted_keys: Vec::new(),
crdt_require_token: false,
crdt_tokens: Vec::new(),
max_mesh_peers: default_max_mesh_peers(),
};
validate_agents(&config.agent)?;
return Ok(config);
@@ -358,6 +370,7 @@ impl ProjectConfig {
trusted_keys: Vec::new(),
crdt_require_token: false,
crdt_tokens: Vec::new(),
max_mesh_peers: default_max_mesh_peers(),
};
validate_agents(&config.agent)?;
Ok(config)
@@ -377,6 +390,7 @@ impl ProjectConfig {
trusted_keys: Vec::new(),
crdt_require_token: false,
crdt_tokens: Vec::new(),
max_mesh_peers: default_max_mesh_peers(),
})
}
}