fix(profiles): correct misleading per-profile gateway port docstrings
The s6 profile-gateway docstrings claimed the bind port comes from a
`[gateway] port` key in config.yaml ("the single source of truth"). No such
key exists or is read anywhere — the API server port is resolved by
gateway/config.py from `API_SERVER_PORT` (or `platforms.api_server.extra.port`)
and defaults to 8642. The wrong reference actively misled a Docker user into
setting a non-functional `gateway.port`.
Point both docstrings (`S6ServiceManager._render_run_script`,
`_maybe_register_gateway_service`) at the real knob, and note the practical
consequence: since each supervised profile gateway loads its own HERMES_HOME,
two profiles left at the default both try to bind 8642 — each needs a distinct
`API_SERVER_PORT` in its own `.env`.
This commit is contained in:
@@ -585,15 +585,20 @@ class S6ServiceManager:
|
||||
would instead look up ``$HERMES_HOME/profiles/default/`` — a
|
||||
completely different (and almost always nonexistent) profile.
|
||||
|
||||
Port selection: the gateway picks its bind port from the
|
||||
profile's ``config.yaml`` (``[gateway] port = ...``) — that
|
||||
is the single source of truth. Previously this method took a
|
||||
``port`` parameter that was passed in but never substituted
|
||||
into the rendered script (it was carried in for "API parity"
|
||||
with a deterministic SHA-256 allocator in
|
||||
``hermes_cli.profiles._allocate_gateway_port``). PR #30136
|
||||
review item I5 retired both the allocator and the parameter
|
||||
because they were dead code through the entire stack.
|
||||
Port selection: the gateway binds the port resolved by
|
||||
``gateway/config.py`` from the profile's own environment —
|
||||
``API_SERVER_PORT`` (or ``platforms.api_server.extra.port`` in
|
||||
that profile's ``config.yaml``), defaulting to 8642. There is
|
||||
no ``[gateway] port`` key and no Python-side allocator: because
|
||||
each supervised profile gateway loads its own ``HERMES_HOME``,
|
||||
two profiles that both leave the port unset will both try to
|
||||
bind 8642 — give each profile a distinct ``API_SERVER_PORT`` in
|
||||
its ``.env``. Previously this method took a ``port`` parameter
|
||||
that was passed in but never substituted into the rendered
|
||||
script (carried for "API parity" with a deterministic SHA-256
|
||||
allocator in ``hermes_cli.profiles._allocate_gateway_port``).
|
||||
PR #30136 review item I5 retired both the allocator and the
|
||||
parameter because they were dead code through the entire stack.
|
||||
"""
|
||||
import shlex
|
||||
lines = [
|
||||
|
||||
Reference in New Issue
Block a user