Commit Graph

5 Commits

Author SHA1 Message Date
Hitonabi 47f7a85510 Ruff-Cleanup: ganzes MC2-Repo lint-grün + projekt-passende ruff.toml
Die Ampel-Nachruestung deckte 317/337 vorbestehende ruff-Verstoesse im ganzen Repo
auf. Aufgeraeumt:
- ruff.toml: intentionale Muster als Projekt-Politik ausgenommen (BLE001 blind-except,
  S110/S112 try-except-pass/continue, PLW1510 subprocess-best-effort, B008 FastAPI-
  Depends/File-Idiom, EXE001 Shebang, + wenige Stil-Regeln). __init__.py-Re-Exports
  geschuetzt (F401).
- ruff --fix: 128 mechanische (Import-Sortierung, PEP585/604-Annotationen, tote Imports,
  ueberfluessige noqa) auto-behoben.
- 12 echte Reste von Hand: PERF402/102, PLC3002 (Lambda->walrus), ISC004 (String-Concat
  geklammert), F841/RUF059 (ungenutzte Vars), PIE810 (startswith-Tuple), UP031 (f-string),
  UP035 (veraltete typing-Imports).
Ergebnis: 'ruff check .' = 0, 'compileall' grün. Kein Verhaltenswechsel (nur Stil/Modernisierung).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 20:53:36 +02:00
Hitonabi 4dc5ca7343 Auftragsbuch/Chronik/Wissen/Zeitmaschine: Backend + Annahme-Runner (Ein-Klick-Gate)
Der letzte Meter des propose-only-Kreislaufs: Vorschlags-Branches (Werkstatt/
Orchestrator) und Traum-Skill-Kandidaten werden als API sichtbar; Annehmen laeuft
als detached systemd-Unit (Merge im Worktree -> Push main -> Deploy -> Health ->
Auto-Revert bei Rot). Dazu: Chronik-Endpoint (Announce-Store als Timeline),
Wissens-Vault-Reader (read-only, Traversal-Guard), Zeitmaschine (Snapshots +
detached Restore) und Morgenlage-Spiegel im Chef-Gutachter-Feed (priority=silent).
python-multipart explizit in requirements (voice braucht es, war implizit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 18:42:03 +02:00
Hitonabi 8554e7b29c Feat: Voll-Zustands-Backup + getesteter Restore + taeglicher Timer
Behebt 3 von 4 Backup-Luecken (Schicht 1, lokal):
- backup.sh sichert jetzt den ECHTEN Zustand als ein Tarball mc2-state-<ts>.tar.gz:
  mem0 (Chroma+history.db), ~/.hermes (config.yaml, .env, plugins/), llama-swap config.
  Vorher wurde nur die alte/leere mc2-memory.db gesichert. chmod 600 (enthaelt .env).
- restore.sh: --list / --dry-run / [--yes] <datei|latest>; macht VOR dem Zurueckspielen
  ein Sicherheits-Backup, stoppt/startet Dienste, Health-Check. Live round-trip verifiziert.
- mc2-backup.timer/.service: taegliches Backup ~03:30 (vorher gab es KEINE Automatik).
- backend/services/backup.py delegiert an backup.sh (eine Quelle der Wahrheit); UI-Button
  + /api/system/backups zeigen die Tarballs.
- docs/BACKUP.md: Backup/Restore-Anleitung.

Offen (Schicht 2): Off-Box-Spiegel (Box ist Bare Metal -> PBS-Client oder rsync in LXC).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 21:25:39 +02:00
Hitonabi c48e583790 Feat: Vulkan/RADV-Engine + vocab-gepruefte Spec-Drafts + Provisioning/Sync
Engine-Cutover ROCm/HIP -> Vulkan/RADV (gfx1151): +12-22% tg auf MoE (llama-bench
verifiziert, fast 53->65 t/s). ROCm-Build bleibt als Rollback unter /opt/llamacpp.

- Backend: vocab-aware Speculative Decoding. services/gguf_meta.py liest den
  Tokenizer-Fingerprint (model/pre/n_vocab) direkt aus dem GGUF-Header (ohne Modell-Load);
  register_model + migrate_config haengen nur VOCAB-KOMPATIBLE Drafts an (inkl. --spec-type,
  das in dieser llama.cpp-Generation noetig ist). Neue Endpoints /api/models/drafts + /{id}/draft.
- Frontend: idiotensichere Spec-Draft-UI (SpecDraftModal) - nur kompatible Drafts waehlbar,
  inkompatible gesperrt mit Begruendung; SPEC/SPEC?-Badge nach echtem Aktiv-Status; Rolle in AddModel.
- maintenance.py: Engine-Update-Quelle -> ggml-org/llama.cpp (Build-Nummer-Vergleich),
  ENGINE_PATH=/opt/llamacpp-vulkan.
- Startup-Warmup der brains (deploy/warmup.sh, self-detaching ExecStartPost) + deploy/provision-engine.sh.
- Cleanup: tote LiteLLM gateway/config.yaml + alle Referenzen (config.py/backup.py/backup.sh) entfernt;
  README + docs/memory aktualisiert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 01:54:29 +02:00
Hitonabi 1f4c987652 feat(2.0): Phase 5 — Betrieb, Observability + Politur
Backup: services/backup.py (Memory-SQLite inkl. WAL/SHM + Configs, retain 7)
+ deploy/backup.sh + POST /api/system/backup + GET /api/system/backups.
Services-Health: GET /api/system/services (aggregierte Reachability +
Observability-Links). Frontend: SystemView mit Dienste-Health + Backup-
Button + Links; Theme-Toggle (Hell/Dunkel, persistent).

Lokal verifiziert: Backup-Snapshot + services-Aggregat (TestClient),
Frontend-Build + Browser (Light-Mode bestaetigt via computed styles).
Damit Phasen 0-5 lokal fertig. Docs aktualisiert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 08:29:27 +02:00