fix: discover bei Maya zählt den Modellordner über dem Pack (auf srv04 gemessen: 0,9 statt 71 GB)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 09:25:03 +01:00
parent ece2c657ae
commit 3c4bb805d3
2 changed files with 29 additions and 3 deletions

View File

@ -264,3 +264,22 @@ async fn discover_findet_die_konfiguration() {
assert_eq!(found[0].quantization.as_deref(), Some("IQ1_S"));
assert_eq!(found[0].path, f.maya_config);
}
#[tokio::test]
async fn discover_zaehlt_den_modellordner_ueber_dem_pack() {
let f = fixture("ok", 5);
let modell = f.dir.join("modell");
std::fs::create_dir_all(modell.join("pack")).unwrap();
std::fs::write(modell.join("pack/dense.bin"), vec![0u8; 100]).unwrap();
std::fs::write(modell.join("experten-00001-of-00002.gguf"), vec![0u8; 1000]).unwrap();
std::fs::write(
f.dir.join("maya-test.json"),
format!(
r#"{{"exe":"/x","args":["--glm-pack","{}"],"model_name":"fake-maya"}}"#,
modell.join("pack").display()
),
)
.unwrap();
let found = MayaEngine::new(f.config.clone()).discover().await.unwrap();
assert_eq!(found[0].size_bytes, 1100);
}