From 4ea711c2db554571f5cd2f91ada4055bbca84b21 Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Thu, 17 Sep 2026 14:37:50 +0200 Subject: [PATCH] =?UTF-8?q?chore(F542):=20@implements=20Batch=202a=20?= =?UTF-8?q?=E2=80=94=204=20Multi-Feature-Dateien=20@implements:=20[F-542]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- STATUS.md | 3 ++- plugin/archivar/feedback_detector.py | 4 ++++ plugin/archivar/onboarding.py | 3 +++ plugin/archivar/presence_engine.py | 10 ++++++++++ plugin/archivar/self_check.py | 4 ++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/STATUS.md b/STATUS.md index 58d4a2b..0fa47a9 100644 --- a/STATUS.md +++ b/STATUS.md @@ -1,5 +1,5 @@ # Projekt-STATUS — Hermes Rocket.Chat Plugin -> **Stand:** 17. September 2026 — `b8373d3` F542 Phase 1 Code-Bereinigung (Viola-Audit F541): Entfernt f449_staging/ Staging-Artefakte (-1289 Zeilen), aktualisiert plugin/adapter.py, archivar/adaptive_timeout.py, archivar/onboarding_state.py, rc_tools.py, Tests + Handbuch-Dokus. @implements [F-542]. **Gepusht auf origin/main.** +> **Stand:** 17. September 2026 — `b8373d3` F542 Phase 1 Code-Bereinigung (Viola-Audit F541). **Batch 2a:** `@implements`-Marker in 4 Multi-Feature-Dateien nachgerüstet (F542). @implements [F-542]. **Gepusht auf origin/main.** > **Letzter fachlicher Commit:** `b8373d3` — cleanup(F542): Phase 1 Code-Bereinigung — Viola-Audit F541 @implements: [F-542] > **Gitea-Remote:** ✅ Synchron — `b8373d3` + `25678c6` + `bb91468` + `a1f4ed0` + `f0f3537` + `ebd057e` + `0d9275d` + `6e8854d` + `b61e19d` + `05531f1` gepusht auf origin/main. > **Deployment:** ⚠️ .101 deployed bei `230edb9` (Pre-I2) — Butler-Kurator (`fe9ee21`+`fd983b6`+`7d18c4c`) + Stopword-Blocklist (`6cbea1b`) + F169 Reset-Endpoint (`44b2ada`) + F172 Pacing (`05531f1`) + F423 ::getcontext (`6e8854d`+`ebd057e`) + F93+F100 Adaptive-Timeout-Router (`f0f3537`) + f449_staging (`bb91468`) + F542 Code-Bereinigung (`b8373d3`) noch nicht auf .101 deployt. Deployment via `install.sh --update-only --no-restart` (P-115). Gateway-Restart per Preflight-Briefing (P-111). @@ -27,6 +27,7 @@ | Commit | Beschreibung | Datum | |---|---|---| +| (Batch 2a) | chore(F542): @implements Batch 2a — 4 Multi-Feature-Dateien (@implements-Marker nachgerüstet): feedback_detector.py (F-080/F-081/F-082), onboarding.py (F-012/F-065), presence_engine.py (F-042/F-043/F-044/F-045/F-097), self_check.py (F-092/F-100) | 17.09. | | `b8373d3` | cleanup(F542): Phase 1 Code-Bereinigung — Viola-Audit F541 @implements [F-542] — Entfernt f449_staging/ (-1289 Zeilen: mcp_auth.py, mcp_routes.py, mcp_server.py, migration_f449.sql, test_mcp_server.py), aktualisiert adapter.py, adaptive_timeout.py, onboarding_state.py, rc_tools.py, Tests + Handbuch-Dokus (NUTZER/SYSTEM), 13 Dateien +167/-1289 | 17.09. | | `25678c6` | docs: STATUS.md — bb91468 F449 MCP Server Staging nachgetragen | 17.09. | | `bb91468` | feat(F449): MCP Server Staging — auth, routes, server, migration, tests @implements [F-449] — f449_staging/backend/mcp_auth.py, mcp_routes.py, mcp_server.py, migration_f449.sql, tests/test_mcp_server.py, +1281 Zeilen — Staging-Artefakte für F449 MCP-Server-Erweiterung | 17.09. | diff --git a/plugin/archivar/feedback_detector.py b/plugin/archivar/feedback_detector.py index 3e0eeab..70e709f 100644 --- a/plugin/archivar/feedback_detector.py +++ b/plugin/archivar/feedback_detector.py @@ -52,6 +52,10 @@ class ContradictionResult: class RoutingWiderspruchDetector: """Erkennt textuelle Widersprüche gegen Routing-Entscheidungen via Regex. + # @implements: [F-080] — Auto-Route-Widerspruch-Flow + # @implements: [F-081] — Widerspruch-Clarify nur nach Auto-Route + # @implements: [F-082] — Widerspruch-Clarify Originalnachricht Dispatch + Vier Regex-Gruppen, absteigend nach Spezifität: a) **Hauptmuster** — „Nein, das passt nicht in X" diff --git a/plugin/archivar/onboarding.py b/plugin/archivar/onboarding.py index e9947ca..51d1cc9 100644 --- a/plugin/archivar/onboarding.py +++ b/plugin/archivar/onboarding.py @@ -12,6 +12,9 @@ Sicherheitsanforderungen: - HOME-relativ wird normalisiert """ +# @implements: [F-012] — Auto-Onboarding +# @implements: [F-065] — P-065 Onboarding ACTIVE-Guard aufspalten + from __future__ import annotations import logging diff --git a/plugin/archivar/presence_engine.py b/plugin/archivar/presence_engine.py index ad5597b..b542542 100644 --- a/plugin/archivar/presence_engine.py +++ b/plugin/archivar/presence_engine.py @@ -28,6 +28,8 @@ WICHTIG — Sync-Hooks (P-024): Zero external dependencies — stdlib only. """ +# @implements: [F-042] — Presence-Engine Basis + from __future__ import annotations import enum @@ -157,6 +159,8 @@ def resolve_phase_from_hs(h: bool, s: bool) -> Phase: def resolve_phase(counters: Dict[str, int]) -> Phase: """Bestimme die Phase aus einem Counter-Snapshot (pure Funktion). + # @implements: [F-043] — V9 GELB-Logik + Pulsieren + Invariante I1: deterministisch + pure. P-096: Auf das Zwei-Person-States-Modell abgebildet. Die Counter sind @@ -198,6 +202,8 @@ def resolve_phase(counters: Dict[str, int]) -> Phase: class _Mediator: """V10 Mediator: Reagiert auf Phasen-Übergänge, steuert Puls-Timer. + # @implements: [F-045] — V10 Presence-Engine Mediator Layer + Verantwortlichkeiten: - Empfängt Phase-Transition-Events von Schicht 1 - Hält aktuelle Phase + Puls-Timer @@ -649,6 +655,8 @@ class _Mediator: def set_rest_cooldown(self) -> None: """Setze REST-Cooldown mit exponentiellem Backoff (P-036 Fix 1). + # @implements: [F-044] — V9 429-Circuit-Breaker + Formel: cooldown = min(5 * 2^n + random(0,1), 60) Sequence: 5s -> 10s -> 20s -> 40s -> 60s (cap). @@ -2978,6 +2986,8 @@ class PresenceEngine: def on_kanban_worker_spawned(self, **kwargs) -> None: """Hook: on_kanban_worker_spawned → kanban_worker += 1 (GELB Start). + # @implements: [F-097] — Kanban-Worker-Presence + F97: Kanban-Worker sind separate `hermes -p chat -q` Subprozesse aus dem Dispatcher. Sie feuern NICHT subagent_start/stop (delegate_task), sondern eigene Core-Hooks. Der Worker wird als diff --git a/plugin/archivar/self_check.py b/plugin/archivar/self_check.py index 5dc9283..efff66e 100644 --- a/plugin/archivar/self_check.py +++ b/plugin/archivar/self_check.py @@ -25,6 +25,8 @@ der Check erkennen. Es verwendet nur stdlib (urllib, json, os, pathlib) plus `config` (das selbst nur json/os importiert). """ +# @implements: [F-092] — Archivar Self-Check nach Gateway-Start + from __future__ import annotations import json @@ -230,6 +232,8 @@ def _probe_llm_room_e2e( ) -> Tuple[bool, float, str]: """Stufe 4b (F100): Router-E2E-Probe — POST /api/generate mit Mini-Prompt. + # @implements: [F-100] — Archivar Self-Check Stufe 4b + Runtime-Watchdog + Smoke-Test (K1): prüft, dass Modell + Endpoint überhaupt antworten. Antwort-Validierung: enthält "STAY" (case-insensitive trim) UND Latenz ≤ timeout. Bei jedem Fehler (HTTP, Timeout, Parse): ok=False.