Skip to content

Commit d4e794e

Browse files
enriquephlclaude
andcommitted
style: cargo fmt --all to satisfy CI fmt check
CI started failing on rustfmt 1.88 because recent edits left a few multi-arg expressions/array literals over rustfmt's width budget. Reformatted in eros-engine-llm/model_config.rs (fixture test arrays), eros-engine-server/main.rs (persona seeder reads), and eros-engine-store/persona.rs (upsert_genome guard) to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cf83b3b commit d4e794e

3 files changed

Lines changed: 22 additions & 15 deletions

File tree

crates/eros-engine-llm/src/model_config.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ description = "reserved — Voyage hard-codes its own model"
243243
assert_eq!(cfg.defaults.fallback_max_tokens, Some(200));
244244

245245
// All four committed task names are present.
246-
for name in ["chat_companion", "insight_extraction", "pde_decision", "embedding"] {
246+
for name in [
247+
"chat_companion",
248+
"insight_extraction",
249+
"pde_decision",
250+
"embedding",
251+
] {
247252
assert!(
248253
cfg.tasks.contains_key(name),
249254
"compat fixture missing task `{name}`"
@@ -253,7 +258,10 @@ description = "reserved — Voyage hard-codes its own model"
253258
// chat_companion — every field round-trips.
254259
let chat = cfg.tasks.get("chat_companion").unwrap();
255260
assert_eq!(chat.model, "x-ai/grok-4-fast");
256-
assert_eq!(chat.fallback.as_deref(), Some("deepseek/deepseek-chat-v3.2"));
261+
assert_eq!(
262+
chat.fallback.as_deref(),
263+
Some("deepseek/deepseek-chat-v3.2")
264+
);
257265
assert_eq!(chat.temperature, Some(0.85));
258266
assert_eq!(chat.max_tokens, Some(600));
259267
assert_eq!(chat.description, "AI companion chat");
@@ -282,7 +290,10 @@ description = "reserved — Voyage hard-codes its own model"
282290
// Resolution behaviour on the live tasks.
283291
let r = cfg.resolve("chat_companion", None);
284292
assert_eq!(r.model, "x-ai/grok-4-fast");
285-
assert_eq!(r.fallback_model.as_deref(), Some("deepseek/deepseek-chat-v3.2"));
293+
assert_eq!(
294+
r.fallback_model.as_deref(),
295+
Some("deepseek/deepseek-chat-v3.2")
296+
);
286297
assert_eq!(r.temperature, 0.85);
287298
assert_eq!(r.max_tokens, 600);
288299

crates/eros-engine-server/src/main.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ async fn run_seed_personas(dir: &str) -> Result<()> {
8282
.context("failed to connect to DATABASE_URL")?;
8383
let repo = eros_engine_store::persona::PersonaRepo { pool: &pool };
8484

85-
let entries = std::fs::read_dir(dir)
86-
.with_context(|| format!("read_dir({dir}) failed"))?;
85+
let entries = std::fs::read_dir(dir).with_context(|| format!("read_dir({dir}) failed"))?;
8786
let mut inserted = 0u32;
8887
let mut skipped = 0u32;
8988
for entry in entries {
@@ -92,10 +91,8 @@ async fn run_seed_personas(dir: &str) -> Result<()> {
9291
if path.extension().and_then(|s| s.to_str()) != Some("toml") {
9392
continue;
9493
}
95-
let text = std::fs::read_to_string(&path)
96-
.with_context(|| format!("read {path:?}"))?;
97-
let f: PersonaFile = toml::from_str(&text)
98-
.with_context(|| format!("parse {path:?}"))?;
94+
let text = std::fs::read_to_string(&path).with_context(|| format!("read {path:?}"))?;
95+
let f: PersonaFile = toml::from_str(&text).with_context(|| format!("parse {path:?}"))?;
9996

10097
let (id, created) = repo
10198
.upsert_genome(

crates/eros-engine-store/src/persona.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,11 @@ impl<'a> PersonaRepo<'a> {
160160
art_metadata: serde_json::Value,
161161
is_active: bool,
162162
) -> Result<(Uuid, bool), sqlx::Error> {
163-
if let Some(id) = sqlx::query_scalar::<_, Uuid>(
164-
"SELECT id FROM engine.persona_genomes WHERE name = $1",
165-
)
166-
.bind(name)
167-
.fetch_optional(self.pool)
168-
.await?
163+
if let Some(id) =
164+
sqlx::query_scalar::<_, Uuid>("SELECT id FROM engine.persona_genomes WHERE name = $1")
165+
.bind(name)
166+
.fetch_optional(self.pool)
167+
.await?
169168
{
170169
sqlx::query(
171170
"UPDATE engine.persona_genomes SET \

0 commit comments

Comments
 (0)