style: cargo fmt --all
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 24s
ci / rust (push) Failing after 2m39s
ci / e2e (push) Has been skipped

Apply rustfmt (toolchain 1.96.0) to satisfy the CI Format check.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
osobh
2026-06-27 11:54:28 -07:00
co-authored by Claude Opus 4.8
parent 8b06ca11e8
commit 96d1409a23
4 changed files with 23 additions and 5 deletions
+4 -1
View File
@@ -285,7 +285,10 @@ async fn run() -> Result<(), String> {
// Fleet automation: evaluate metric-threshold rules → drain/undrain/alert. // Fleet automation: evaluate metric-threshold rules → drain/undrain/alert.
cm_api::node_rules::spawn_evaluator(pool.clone(), std::time::Duration::from_secs(20)); cm_api::node_rules::spawn_evaluator(pool.clone(), std::time::Duration::from_secs(20));
// Nightly: check upstream for newer dev-tool releases (claude/kimi/ollama). // Nightly: check upstream for newer dev-tool releases (claude/kimi/ollama).
cm_api::tool_versions::spawn_latest_checker(pool.clone(), std::time::Duration::from_secs(86_400)); cm_api::tool_versions::spawn_latest_checker(
pool.clone(),
std::time::Duration::from_secs(86_400),
);
// Hosted identity (Clerk / OIDC): pin the issuer and load its JWKS. // Hosted identity (Clerk / OIDC): pin the issuer and load its JWKS.
let auth_verifier = match config.auth.mode { let auth_verifier = match config.auth.mode {
+1 -1
View File
@@ -8,11 +8,11 @@ pub mod fleet;
mod mcp_door; mod mcp_door;
pub mod node_rules; pub mod node_rules;
pub mod quota; pub mod quota;
pub mod tool_versions;
mod recursive_exec; mod recursive_exec;
mod routes; mod routes;
mod runtime_provision; mod runtime_provision;
pub mod swarm; pub mod swarm;
pub mod tool_versions;
mod topology_exec; mod topology_exec;
pub mod topology_worker; pub mod topology_worker;
+7 -1
View File
@@ -23,7 +23,13 @@ async fn check(pool: &PgPool, client: &reqwest::Client) {
let _ = node_tools::set_latest(pool, "claude", &v).await; let _ = node_tools::set_latest(pool, "claude", &v).await;
} }
// Kimi CLI — PyPI (it's a uv/python tool). // Kimi CLI — PyPI (it's a uv/python tool).
if let Some(v) = fetch_field(client, "https://pypi.org/pypi/kimi-cli/json", &["info", "version"]).await { if let Some(v) = fetch_field(
client,
"https://pypi.org/pypi/kimi-cli/json",
&["info", "version"],
)
.await
{
let _ = node_tools::set_latest(pool, "kimi-cli", &v).await; let _ = node_tools::set_latest(pool, "kimi-cli", &v).await;
} }
// Ollama — latest GitHub release tag (strip leading "v"). // Ollama — latest GitHub release tag (strip leading "v").
+11 -2
View File
@@ -10,7 +10,11 @@ use sqlx::{PgPool, Row};
use crate::DbError; use crate::DbError;
/// Replace a node's reported tool versions with `tools` (tool, version). /// Replace a node's reported tool versions with `tools` (tool, version).
pub async fn upsert(pool: &PgPool, node_id: NodeId, tools: &[(String, String)]) -> Result<(), DbError> { pub async fn upsert(
pool: &PgPool,
node_id: NodeId,
tools: &[(String, String)],
) -> Result<(), DbError> {
for (tool, version) in tools { for (tool, version) in tools {
sqlx::query( sqlx::query(
"INSERT INTO node_tools (node_id, tool, version, updated_at) "INSERT INTO node_tools (node_id, tool, version, updated_at)
@@ -59,6 +63,11 @@ pub async fn all_latest(pool: &PgPool) -> Result<HashMap<String, String>, DbErro
.await?; .await?;
Ok(rows Ok(rows
.into_iter() .into_iter()
.map(|r| (r.get::<String, _>("tool"), r.get::<String, _>("latest_version"))) .map(|r| {
(
r.get::<String, _>("tool"),
r.get::<String, _>("latest_version"),
)
})
.collect()) .collect())
} }