fix(http): test acquire_scoped_lock's bool, not the always-truthy tuple
CI / Kotlin tests (android host + desktop) (push) Successful in 5m48s
CI / Gateway plugin tests (push) Successful in 7m40s

acquire_scoped_lock returns (acquired, existing_record); the old
'if not acquire_scoped_lock(...)' tested the tuple, which is always
truthy, so the 'port in use by another profile' pre-check never fired
and a conflict surfaced as a generic bind failure. Unpack and test the
first element, matching gateway/platforms/base.py's canonical usage.

Bump VERSION / plugin.yaml to 0.1.3.
This commit is contained in:
ARIA committed 2026-08-31 23:17:30 +02:00
1 parent 5b78e1566f
commit 8657e6afc6
3 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -1 +1 @@
0.1.2 0.1.3
+5 -1
View File
@@ -199,7 +199,11 @@ class HttpServer:
from gateway.status import acquire_scoped_lock from gateway.status import acquire_scoped_lock
lock_key = f"http:{host}:{port}" lock_key = f"http:{host}:{port}"
if not acquire_scoped_lock("iris", lock_key): # acquire_scoped_lock returns (acquired, existing_record); the
# tuple is always truthy, so test the first element (matching
# gateway/platforms/base.py's canonical usage).
acquired, _ = acquire_scoped_lock("iris", lock_key)
if not acquired:
logger.warning( logger.warning(
"iris: HTTP port %s:%s in use by another profile; server disabled", "iris: HTTP port %s:%s in use by another profile; server disabled",
host, host,
+1 -1
View File
@@ -5,7 +5,7 @@ kind: platform
# scripts/check_version_sync.sh on commit). This field is the version the # scripts/check_version_sync.sh on commit). This field is the version the
# gateway advertises in production installs, where only this plugin dir is # gateway advertises in production installs, where only this plugin dir is
# shipped (see version.py). # shipped (see version.py).
version: 0.1.2 version: 0.1.3
description: > description: >
Native Android / Desktop client gateway adapter for Hermes Agent. Native Android / Desktop client gateway adapter for Hermes Agent.
Runs an HTTP server (optional TLS) inside the gateway; the app connects Runs an HTTP server (optional TLS) inside the gateway; the app connects