From da08382e85501bc2a2e9d5c339ae845db1d56b7f Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Wed, 12 Aug 2026 21:02:43 +0200 Subject: [PATCH] fix: P-057 Folgefix + P-058 DM-Ausschluss-Korrektur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 1 (P-057 Folgefix): Nachklärung bei stay_once nur wenn feedback_type != 'neutral'. Bei neutral wird nicht gelernt, also braucht es keine Strategie-Nachklärung. Bug 2 (P-058 DM-Ausschluss): Entferne is_dm-Filter für Button 4. Der P-040 origin==target Check (oben) fängt den echten Problemfall ab. Bei DM→Channel ist Button 4 sinnvoll: 'Das Thema gehört hierher in den DM, nicht in den Zielraum.' --- STATUS.md | 78 ++++++++++++++++++++++++++ plugin/adapter.py | 4 +- plugin/archivar/adapter_integration.py | 18 ++---- 3 files changed, 87 insertions(+), 13 deletions(-) create mode 100644 STATUS.md diff --git a/STATUS.md b/STATUS.md new file mode 100644 index 0000000..f03b112 --- /dev/null +++ b/STATUS.md @@ -0,0 +1,78 @@ +# Projekt-STATUS — Hermes Rocket.Chat Plugin + +> **Stand:** 11. August 2026 — ✅ AKTUELL +> **Aktiver Branch:** `main` +> **Letzter Commit:** `5fc3dbd` — fix: entferne doppelte clear_clarify_modal()-Blöcke (11.08. 19:27) +> **Gitea-Remote:** ✅ SSH synchron — `Andreas/Hermes_rocket.chat_Plugin` (git@192.168.180.47:222) +> **Uncommitted:** ✅ 0 +> **Deployment-Pfad:** `~/.hermes/plugins/platforms/rocketchat/` +> **Dev-Repo-Pfad:** `~/projekte/Hermes_rocket.chat_Plugin/plugin/` + +--- + +## Deployment-Status (.101) + +| Datei | Deployed MD5 | Git MD5 | Status | +|---|---|---|---| +| `adapter.py` | `49b3895...` | `49b3895...` | ✅ identisch | +| `__init__.py` | ✅ | ✅ | ✅ identisch | +| `rc_tools.py` | ✅ | ✅ | ✅ identisch | +| `conftest.py` | ✅ | ✅ | ✅ identisch | + +> Alle 4 Plugin-Dateien auf .101 entsprechen dem aktuellen Git-Stand (`5fc3dbd`). + +--- + +## Aktuelle Commits (Chronologisch, neueste zuerst) + +| Commit | Beschreibung | Datum | +|---|---|---| +| `5fc3dbd` | fix: entferne doppelte clear_clarify_modal()-Blöcke | 11.08. | +| `a743914` | feat: P-049 Clarify-Modal busy↔offline 1,5s + P-047 Mobile-Buttons | 11.08. | +| `28714b1` | feat: Clarify-Status-Text 'wartet auf Antwort' (Presence-Engine) | 10.08. | +| `9f80da6` | P-045: CLARIFY — 2 Root-Cause-Fixes | 10.08. | +| `232fde3` | P-044: CLARIFY-Auflösung — 3 Bugfixes (session=?, pending_questions) | 10.08. | +| `f0a7e83` | hotfix: CLARIFY-Button ::-Format — resolve_gateway_clarify() | 10.08. | +| `cc687c7` | send_clarify(): chunk buttons max 3 per row | 10.08. | +| `bd579bd` | fix: Clarify-UX — Emoji-Zahlen + Plain-Digit Text-Intercept | 10.08. | +| `fa9091e` | P-041a: GC-Reset Bug fix — Stufe 1 (Plugin-seitig) | 10.08. | +| `9dbdfd7` | P-041b E6: CancelledError-Fix — Sweep-Threshold 2.0s → 5.0s | 09.08. | + +--- + +## Behobene Pitfalls (dieser Sprint) + +| P-ID | Problem | Status | +|---|---|---| +| P-041a | GC-Reset trifft aktive Lang-Turns | ✅ Stufe 1 deployt | +| P-043 | Gateway-Blocker via `_HERMES_GATEWAY=0` | ✅ gelöst | +| P-045 | Clarify-Button-Klick nicht weitergeleitet | ✅ gefixt | +| P-046 | Clarify session=? Mapping | ✅ gefixt | +| P-047 | Mobile: Buttons nicht klickbar | ✅ Workaround (msg_in_chat_window=False) | +| P-048 | Clarify visual Chunking nicht sichtbar | ✅ GELÖST — Screenshot beweist 3-Spalten-Grid | +| P-049 | Clarify-Modal: Status-Änderung als Phase | ✅ implementiert | +| P-050 | 1,5s-Puls triggert RC Sub-Limiter | ✅ Adaptives Backoff — Status quo, wird getestet | + +--- + +## Offene Punkte + +1. **P-048** — Visuelle Verifikation Chunking in produktiver UI (5 Buttons in einer Reihe statt 2×3) +2. **P-050** — Rate-Limiting-Telemetrie vor Release prüfen +3. **P-041a Stufe 2** — Core-API `on_session_progress` Hook (langfristig) +4. **Clarify-Test Round 3** — noch nicht durchgeführt +5. **install.sh-Migration** — Rainers X1-X7 Plan, Andreas' 3 Entscheidungen offen +6. **.45 Plugin** — ältere Version (kein manual_task-Counter), Update ausstehend + +--- + +## Wichtige Pfade + +| Was | Pfad | +|---|---| +| **Dev-Repo** | `/home/bernd/projekte/Hermes_rocket.chat_Plugin/` | +| **Plugin im Repo** | `/home/bernd/projekte/Hermes_rocket.chat_Plugin/plugin/` | +| **Deployed** | `~/.hermes/plugins/platforms/rocketchat/` | +| **Gitea** | `git@192.168.180.47:Andreas/Hermes_rocket.chat_Plugin.git` (Port 222) | +| **Feature-Map** | `/data/Wissensdatenbank/0299 Projektdokumentationen/Feature-Maps/` | +| **Pitfalls** | `/data/Wissensdatenbank/0299 Projektdokumentationen/Pitfalls & Lessons Learned.md` | \ No newline at end of file diff --git a/plugin/adapter.py b/plugin/adapter.py index 8afc66e..ec0e2ff 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -2686,7 +2686,9 @@ class RocketChatAdapter(BasePlatformAdapter): # Clarify-Dispatch-Schleife (zwei Wahrheitsquellen). skip_direct_dispatch = False # V8.2.1 A2: Nachklärung bei stay_once — Strategie-Buttons senden - if _MULTIROOM() and self.archivar is not None: + # P-057 Folgefix: Bei feedback_type='neutral' wird nicht + # gelernt → Nachklärung ist sinnlos. Überspringen. + if _MULTIROOM() and self.archivar is not None and feedback_type != "neutral": if self.archivar._should_trigger_nachklaerung("stay_once"): # Keywords des Zielraums als lesbaren Text einbauen target_room_id = move_req.get("target_room", "") diff --git a/plugin/archivar/adapter_integration.py b/plugin/archivar/adapter_integration.py index 5791c06..2d814da 100644 --- a/plugin/archivar/adapter_integration.py +++ b/plugin/archivar/adapter_integration.py @@ -657,18 +657,12 @@ class ArchivarMessageHandler: message_text = template["text"].format(target_name=target_name) buttons = list(template["actions"]) # Kopie, damit wir filtern können - # P-058: Button 4 (reject) in DMs ausblenden. - # In DMs ist origin==target möglich (P-040) — der User kann - # nicht sinnvoll "Falsch geroutet" klicken, weil der - # Ursprungsraum = DM und der Zielraum = Fachraum ist. - # Der reject-Button würde den DM als "richtigen" Raum lernen, - # was semantisch falsch ist. - if is_dm: - buttons = [b for b in buttons if b.get("type") != "reject"] - logger.info( - "P-058: DM-Ausschluss — Button 4 (reject) aus " - "Move-Request in DM %s entfernt", room_id[:8], - ) + # P-058: Button 4 (reject) nur bei origin==target entfernen. + # Wenn origin==target (P-040), wird oben bereits False + # returned — keine Buttons. In allen anderen Fällen + # (DM→Channel, Channel→Channel) ist Button 4 sinnvoll: + # 'Das Thema gehört hierher, nicht in den Zielraum.' + # Kein is_dm-Filter mehr — der war zu aggressiv. # REST-Pfad Vorrang (Button-Garantie) if self._button_send_callback: