phase2e: Modelltausch schreibt die llama-swap-Config einmal statt bis zu siebenmal
- llamaswap.sammeln(): Aenderungen lesen dieselbe Config aus dem Speicher, geschrieben wird einmal am Ende, bei einem Fehler gar nicht - Radar-Tausch und Hirn-Umstellung nutzen es; Hermes wird erst nach dem Schreiben umgestellt - Test-Attrappe fuer update_brain_model: der Radar-Test faesst auf der Box nie die echte Hermes-Config an - Doku: Ziel-Modell, strukturierter Verlauf, Sammel-Schreiben Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
589c14d5e9
commit
a47489fa85
@@ -374,7 +374,10 @@ def _uebernahme_vorbereiten(zustand, monkeypatch, rolle: str, alt: dict) -> tupl
|
||||
monkeypatch.setattr(radar.llamaswap, "add_role", lambda mid, r: aufrufe.append(("dazu", mid, r)) or True)
|
||||
monkeypatch.setattr(radar, "_steward_neu_starten", lambda: aufrufe.append(("steward",)) or None)
|
||||
monkeypatch.setattr(radar.llamaswap, "set_ttl", lambda mid, ttl: aufrufe.append(("ttl", mid, ttl)) or True)
|
||||
monkeypatch.setattr(agent, "set_agent_brain", lambda mid: aufrufe.append(("hirn", mid)) or {"ok": True})
|
||||
monkeypatch.setattr(agent, "set_agent_brain",
|
||||
lambda mid, hermes_umstellen=True: aufrufe.append(("hirn", mid, hermes_umstellen)) or {"ok": True})
|
||||
# Nie die echte Hermes-Config: Auf der Box läuft dieser Test im Deploy-Prüftor.
|
||||
monkeypatch.setattr(agent, "update_brain_model", lambda alias: aufrufe.append(("hermes-config", alias)) or True)
|
||||
monkeypatch.setattr(radar, "STEWARD_WARMSET", zustand / "warmset.conf")
|
||||
return aufrufe, cfg
|
||||
|
||||
@@ -386,8 +389,10 @@ def test_uebernehmen_hirn_nutzt_den_hirn_wechsel_und_nimmt_fast_mit(zustand, mon
|
||||
encoding="utf-8")
|
||||
antwort = radar.uebernehmen("o")
|
||||
assert antwort["ok"] and antwort["modell_id"] == "o"
|
||||
assert [a[0] for a in aufrufe] == ["eintragen", "schreiben", "hirn", "dazu", "steward"]
|
||||
assert aufrufe[0][2:] == ("hermes", False) and aufrufe[3] == ("dazu", "o", "fast")
|
||||
# Hermes wird erst umgestellt, wenn die llama-swap-Config einmal geschrieben ist (24.09.2026).
|
||||
assert [a[0] for a in aufrufe] == ["eintragen", "schreiben", "hirn", "dazu", "hermes-config", "steward"]
|
||||
assert aufrufe[0][2:] == ("hermes", False) and aufrufe[2] == ("hirn", "o", False)
|
||||
assert aufrufe[3] == ("dazu", "o", "fast") and aufrufe[4] == ("hermes-config", "hermes")
|
||||
befehl = str(cfg["models"]["o"]["cmd"])
|
||||
assert "--parallel 2" in befehl and "-ctk q8_0" in befehl and "--mmproj" not in befehl
|
||||
# Wie im Betrieb seit 24.09.: Bilder sieht der neue Bild-Zwilling (Projektor, ohne Draft), der alte fliegt raus.
|
||||
|
||||
Reference in New Issue
Block a user