feat(F98): compute_cascade Decision-Matrix — 7 Fixes (P-173, P-177–P-182)
Branch main @ 39999b3 (vor Commit geprüft).
Zentrale Cascade-Architektur nach Rainers Konzept §3.3 statt 7 Inline-Fixes:
- compute_cascade() berechnet PROVIDER × MULTIROOM → OLLAMA_INSTALL_REQUIRED,
MODEL_PULL_REQUIRED (Array), FAISS_REQUIRED. Single Source of Truth.
P-177 (BLOCKER): Modus-Wahl-Dialog (Geführt/Standard) vor Secret-Check;
alle Secret-Refs auf ${VAR:-} gehärtet (set -u-sicher).
P-178: setup_requirements.txt um required_if-Spalte erweitert
(always|multiroom|local_inf); faiss/numpy → multiroom.
P-179 (BLOCKER): Phase 7 im Wizard auf No-Op; neue install_python_deps()
nutzt $VENV_PY -m pip (nach install_hermes_agent) mit Cascade-Filter.
P-180: Ollama-Install + systemd drop-in conditional auf OLLAMA_INSTALL_REQUIRED.
P-181: Modell-Pull iteriert über MODEL_PULL_REQUIRED statt hardcoded Liste.
P-182: loginctl enable-linger mit timeout 10s + Root-Skip.
P-173: check_components Stufe 7 diagnostiziert root-owned venv.
Repair-Pfad: detect_provider + compute_cascade vor check_components;
Stufen 2/3/4 conditional (faiss nur Multiroom, Ollama nur lokal).
Tests: tests/test_f98_cascade.py (18 Tests, alle Matrix-Zellen + Invarianten).
test_f98_wizard.py + test_install_update_only.py angepasst (Schema 5 Felder,
Regex-Toleranz für compute_cascade-Block).
Ergebnis: 91 passed, 2 failed (beide pre-existing: find_site_packages/P-044,
nicht F98-Scope). Dry-Run-Szenarien 1-4 verifiziert gegen Cascade-Matrix.
This commit is contained in:
@@ -206,14 +206,17 @@ class TestSetupRequirements:
|
||||
assert SETUP_REQ.exists(), "setup_requirements.txt fehlt"
|
||||
|
||||
def test_setup_requirements_format(self):
|
||||
"""Format: modulname|pip_name|min_version|severity."""
|
||||
"""Format: modulname|pip_name|min_version|severity|required_if (F98 P-178)."""
|
||||
for line in SETUP_REQ.read_text().splitlines():
|
||||
line = line.strip()
|
||||
if not line or line.startswith("#"):
|
||||
continue
|
||||
parts = line.split("|")
|
||||
assert len(parts) == 4, f"Zeile hat nicht 4 Felder: {line}"
|
||||
assert len(parts) == 5, f"Zeile hat nicht 5 Felder: {line}"
|
||||
assert parts[3] in ("HARD", "SOFT"), f"severity ungültig: {line}"
|
||||
assert parts[4] in ("always", "multiroom", "local_inf"), (
|
||||
f"required_if ungültig: {line}"
|
||||
)
|
||||
|
||||
def test_wizard_reads_setup_requirements(self):
|
||||
content = _read_install_sh()
|
||||
|
||||
Reference in New Issue
Block a user