From 1dc4155d9a7872c7f84f3efd147cbaeadc7ac027 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 8 Jul 2026 17:51:19 +0000 Subject: [PATCH] fix(hermes-zulip-plugin): default to master branch, add gateway restart - Switched default branch from feat/zulip-streaming to master - Added Step 5: gateway restart with smoke check after plugin install - Plugin changes require restart to take effect for a valid test - Outstanding feature branch merges should be addressed post-install --- hermes-zulip-plugin.prose.md | 58 +++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/hermes-zulip-plugin.prose.md b/hermes-zulip-plugin.prose.md index 856a78a..bebe68b 100644 --- a/hermes-zulip-plugin.prose.md +++ b/hermes-zulip-plugin.prose.md @@ -3,9 +3,10 @@ kind: function name: hermes-zulip-plugin description: > Installs or updates the Zulip platform plugin for any Hermes agent from the - canonical zulip-platform-plugins repo. Ensures the agent runs the latest - adapter with all Zulip chat fixes (_strip_html, streaming, event recovery). - Runs a post-install verification and sends a relay success signal. + canonical zulip-platform-plugins repo (master branch). Ensures the agent runs + the latest adapter with all Zulip chat fixes (_strip_html, streaming, event + recovery). Verifies the installation, restarts the gateway, and sends a relay + success signal. agent: abiba version: 1.0.0 status: active @@ -18,17 +19,17 @@ Single-shot function that pulls the latest zulip-platform plugin from the canonical git repo, installs it to the correct Hermes bundled plugin path, verifies the installation, and signals completion. -Distinct from `hermes-zulip-restore`: this contract only touches the plugin -layer. It does NOT verify env credentials, restart the gateway, or validate -the live Zulip connection. Use `hermes-zulip-restore` for full connectivity -recovery. +Distinct from `hermes-zulip-restore`: this contract is focused on the plugin +layer and a targeted gateway restart. It does NOT verify env credentials or +run a live Zulip connection test. Use `hermes-zulip-restore` for full +connectivity recovery including end-to-end DM validation. ## Parameters | Param | Type | Required | Default | Description | |-------|------|----------|---------|-------------| | `target` | string | yes | — | Agent name: `mumuni`, `tanko`, or `koby` | -| `branch` | string | no | `feat/zulip-streaming` | Git branch to pull (overridable for pinning) | +| `branch` | string | no | `master` | Git branch to pull (overridable for pinning) | ## Maintains @@ -61,7 +62,7 @@ recovery. | Field | Value | Trust | |-------|-------|-------| | Git repo | `https://git.sysloggh.net/SyslogSolution/zulip-platform-plugins.git` | ✅ Verified | -| Default branch | `feat/zulip-streaming` | ✅ Verified | +| Default branch | `master` (contains all merged fixes including `feat/zulip-streaming`) | ✅ Verified | | Bundled adapter path | `/hermes-agent/plugins/platforms/zulip/` | ✅ Verified | | Adapter files | `__init__.py`, `adapter.py`, `plugin.yaml` | ✅ Verified | | Strip-html commit | `55ca15d` (minimum) | ✅ Verified | @@ -148,7 +149,34 @@ grep -q "_strip_html" {{hermes_home}}/hermes-agent/plugins/platforms/zulip/adapt grep "^version:" {{hermes_home}}/hermes-agent/plugins/platforms/zulip/plugin.yaml || true ``` -### Step 5: Send Relay Success Signal +### Step 5: Restart Gateway + +Plugin changes require a gateway restart to take effect: + +```bash +cd {{hermes_home}}/hermes-agent +# Use venv if available +python3 -m hermes_cli.main gateway restart 2>&1 || \ + venv/bin/python -m hermes_cli.main gateway restart 2>&1 +``` + +Wait for restart to complete (up to 45s), then confirm: + +```bash +grep "Gateway running" {{hermes_home}}/logs/gateway.log | tail -1 +``` + +Expected: `Gateway running with N platform(s)` where N > 1 (includes zulip). + +Quick smoke check — confirm zulip platform loaded: + +```bash +grep -E "zulip.*loaded|zulip.*registered" {{hermes_home}}/logs/gateway.log | tail -3 +``` + +If gateway fails to restart, check logs for the crash cause before proceeding. + +### Step 6: Send Relay Success Signal On the Abiba host (local), dispatch a relay message to the target agent: @@ -164,7 +192,7 @@ ra-h-os-createRelayNode: description: "hermes-zulip-plugin completed for {{target}} — plugin layer healthy" ``` -### Step 6: Report +### Step 7: Report Compile results into a single status block: @@ -175,6 +203,7 @@ Compile results into a single status block: | Commit SHA | `{{INSTALLED_SHA}}` | | Files installed | `__init__.py`, `adapter.py`, `plugin.yaml` | | `_strip_html` | `{{present|missing}}` | +| Gateway restarted | `{{yes|no}}` | | Signal sent | `{{yes|no}}` | ## Known Failure Modes @@ -192,7 +221,7 @@ Compile results into a single status block: | Concern | hermes-zulip-restore | hermes-zulip-plugin | |---------|---------------------|---------------------| | Env credential check | ✅ Full ZULIP_* verification | ❌ Out of scope | -| Gateway restart | ✅ Restarts the gateway process | ❌ Out of scope | +| Gateway restart | ✅ Full restart + state validation | ✅ Targeted restart + smoke check | | Live connection test | ✅ Validates `zulip.state = connected` | ❌ Out of scope | | Plugin deploy | ✅ Includes deploy as one step | ✅ Primary purpose | | Version tracking | ❌ Implicit | ✅ Explicit SHA capture | @@ -203,5 +232,6 @@ with `hermes-zulip-restore` (skip its Step 2 to avoid redundant deploy). --- -**Last updated**: 2026-07-08 — Created to separate plugin lifecycle from -restore workflow. +**Last updated**: 2026-07-08 — Switched default branch to `master`; added +gateway restart step. If outstanding unmerged feature branches exist, address +them in a follow-up merge after this contract completes.