Deploys Tanko's Hermes Zulip adapter on CT 112 with full test coverage. Fixes adapter.py for Python 3.13 compatibility and adds event processing logging to journald. Refactors deploy.sh from per-agent maps to a platform-based architecture for maintainability across all 6 agents (Hermes, Agent Zero, Pi).
The Gitea Actions workflow (run #4) hasn't started. No CI results available. Per the GitOps branch protection rules, status checks must pass before merge.
Do not merge until CI completes and all jobs are green.
## 🔴 Blocking: CI stuck at "Waiting to run"
The Gitea Actions workflow (run #4) hasn't started. No CI results available. Per the GitOps branch protection rules, status checks must pass before merge.
**Do not merge until CI completes and all jobs are green.**
The existing logger.info() calls already flow to journald via stderr when the systemd unit uses StandardError=journal. Using raw print() bypasses:
Log level filtering
Format consistency with other log output
Future structured logging needs
Fix: Replace with logger.info(f"[ZULIP_EVENT] Processing: {event.get('type', 'unknown')}").
## 🟡 High: `print()` for journald is an anti-pattern
In `adapter.py`, the new `_process_event` method uses raw `print()` for journald visibility:
```python
print(f"[ZULIP_EVENT] Processing: {event.get('type', 'unknown')}")
```
The existing `logger.info()` calls already flow to journald via stderr when the systemd unit uses `StandardError=journal`. Using raw `print()` bypasses:
- Log level filtering
- Format consistency with other log output
- Future structured logging needs
**Fix:** Replace with `logger.info(f"[ZULIP_EVENT] Processing: {event.get('type', 'unknown')}")`.
## 🟡 High: `asyncio.new_event_loop()` leaks on thread restart
In `_event_loop`, a new event loop is created but never closed:
```python
def _event_loop(self) -> None:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
self._client.call_on_each_message(...)
except Exception as e:
logger.error(f"Event loop crashed: {e}")
self.connected = False
```
If the thread restarts (e.g., reconnection), the old loop is leaked. This accumulates over time.
**Fix:** Wrap in `try/finally`:
```python
def _event_loop(self) -> None:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
self._client.call_on_each_message(
lambda event: self._process_event(event),
)
except Exception as e:
logger.error(f"Event loop crashed: {e}")
self.connected = False
finally:
loop.close()
```
The PR changes Client(server_url=...) → Client(site=...) for "Python 3.13 compatibility." However, the Python Zulip API's Client constructor parameter name varies by version:
Some versions use site
Others use server_url
Action needed: Verify the installed zulip package version on CT 112 supports the site parameter. If it doesn't, the connection will fail silently (kwargs are accepted by the base class without TypeError).
## 🟡 Medium: Verify `Client(site=...)` parameter name
The PR changes `Client(server_url=...)` → `Client(site=...)` for "Python 3.13 compatibility." However, the Python Zulip API's `Client` constructor parameter name varies by version:
- Some versions use `site`
- Others use `server_url`
**Action needed:** Verify the installed `zulip` package version on CT 112 supports the `site` parameter. If it doesn't, the connection will fail silently (kwargs are accepted by the base class without TypeError).
🟡 Medium: deploy.sh refactor only tested on Hermes platform
The PR refactors deploy.sh across all 3 platforms (Hermes, Agent Zero, Pi) but testing only covers Tanko (Hermes) on CT 112. The Agent Zero (pip install -r requirements.txt) and Pi (/reload instead of systemctl) code paths are untested.
Action needed: Before merging, run at minimum a dry-run deploy against all 3 platform types:
./scripts/deploy.sh --ct=kagentz main --dry-run
./scripts/deploy.sh --ct=abiba main --dry-run
## 🟡 Medium: deploy.sh refactor only tested on Hermes platform
The PR refactors `deploy.sh` across all 3 platforms (Hermes, Agent Zero, Pi) but testing only covers Tanko (Hermes) on CT 112. The Agent Zero (`pip install -r requirements.txt`) and Pi (`/reload` instead of `systemctl`) code paths are untested.
**Action needed:** Before merging, run at minimum a dry-run deploy against all 3 platform types:
```
./scripts/deploy.sh --ct=kagentz main --dry-run
./scripts/deploy.sh --ct=abiba main --dry-run
```
This assumes Agent Zero has the same requirements.txt location and content as Hermes. If Agent Zero uses a different dependency file or install method, this will silently install wrong packages.
Suggestion: Add a per-platform dependency install path or document this assumption explicitly.
## 🟢 Low: Agent Zero pip install assumption
The deploy.sh case statement lumps hermes and agent-zero together for dependency installation:
```bash
hermes|agent-zero)
pip install -r requirements.txt --quiet
;;
```
This assumes Agent Zero has the same `requirements.txt` location and content as Hermes. If Agent Zero uses a different dependency file or install method, this will silently install wrong packages.
**Suggestion:** Add a per-platform dependency install path or document this assumption explicitly.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Deploys Tanko's Hermes Zulip adapter on CT 112 with full test coverage. Fixes adapter.py for Python 3.13 compatibility and adds event processing logging to journald. Refactors deploy.sh from per-agent maps to a platform-based architecture for maintainability across all 6 agents (Hermes, Agent Zero, Pi).
Closes #4
Type
Platform(s) Affected
Pre-Merge Checklist
Testing
All three core tests performed on Tanko CT 112 (amdpve):
[ZULIP_EVENT] Processing: streamlogged in journaldCommits Included
941b69e🔴 Blocking: CI stuck at "Waiting to run"
The Gitea Actions workflow (run #4) hasn't started. No CI results available. Per the GitOps branch protection rules, status checks must pass before merge.
Do not merge until CI completes and all jobs are green.
🟡 High:
print()for journald is an anti-patternIn
adapter.py, the new_process_eventmethod uses rawprint()for journald visibility:The existing
logger.info()calls already flow to journald via stderr when the systemd unit usesStandardError=journal. Using rawprint()bypasses:Fix: Replace with
logger.info(f"[ZULIP_EVENT] Processing: {event.get('type', 'unknown')}").🟡 High:
asyncio.new_event_loop()leaks on thread restartIn
_event_loop, a new event loop is created but never closed:If the thread restarts (e.g., reconnection), the old loop is leaked. This accumulates over time.
Fix: Wrap in
try/finally:🟡 Medium: Verify
Client(site=...)parameter nameThe PR changes
Client(server_url=...)→Client(site=...)for "Python 3.13 compatibility." However, the Python Zulip API'sClientconstructor parameter name varies by version:siteserver_urlAction needed: Verify the installed
zulippackage version on CT 112 supports thesiteparameter. If it doesn't, the connection will fail silently (kwargs are accepted by the base class without TypeError).🟡 Medium: deploy.sh refactor only tested on Hermes platform
The PR refactors
deploy.shacross all 3 platforms (Hermes, Agent Zero, Pi) but testing only covers Tanko (Hermes) on CT 112. The Agent Zero (pip install -r requirements.txt) and Pi (/reloadinstead ofsystemctl) code paths are untested.Action needed: Before merging, run at minimum a dry-run deploy against all 3 platform types:
🟢 Low: Agent Zero pip install assumption
The deploy.sh case statement lumps hermes and agent-zero together for dependency installation:
This assumes Agent Zero has the same
requirements.txtlocation and content as Hermes. If Agent Zero uses a different dependency file or install method, this will silently install wrong packages.Suggestion: Add a per-platform dependency install path or document this assumption explicitly.
Pull request closed