hermes-agent/tests/docker
Ben 8b6733ebe2 fix(service_manager): rip out dead port parameter
PR #30136 review caught: `_allocate_gateway_port()` in profiles.py
computed a SHA-256-derived port that was threaded through
`register_profile_gateway(profile, port=N)` →
`_render_run_script(profile, port, extra_env)` → and then **ignored**.
The rendered run script picked the bind port from the profile's
config.yaml (`[gateway] port = …`), never from the allocator. So
the entire allocator + parameter chain was dead code.

Remove:

* `hermes_cli.profiles._allocate_gateway_port` (deterministic
  SHA-256 → [9200, 9800) — never used).
* `port` kwarg from `ServiceManager.register_profile_gateway`
  (Protocol + Mixin + S6 implementation).
* `port` positional arg from `_render_run_script(profile, port,
  extra_env)` — now `_render_run_script(profile, extra_env)`.
* The pass-through call in `profiles._maybe_register_gateway_service`.

config.yaml is now the single source of truth for gateway port
selection — matches reality and reduces the API surface. Three
explanatory comments in service_manager.py / profiles.py document
the retirement so future readers don't reach for the allocator and
find a ghost.

Tests: drop the three `_allocate_gateway_port` tests; update
fakes' signatures throughout test_service_manager.py and
test_profiles_s6_hooks.py to match the new no-port API.
2026-05-23 15:30:15 +10:00
..
__init__.py test(docker): add conftest fixtures for docker harness 2026-05-22 11:46:52 +10:00
conftest.py fix(service_manager): s6 detection works for unprivileged hermes user 2026-05-23 14:56:39 +10:00
test_container_restart.py fix(service_manager): s6 detection works for unprivileged hermes user 2026-05-23 14:56:39 +10:00
test_dashboard.py fix(docker): dashboard slot stays 'down' when HERMES_DASHBOARD unset 2026-05-23 15:24:17 +10:00
test_main_invocation.py test(docker): lock baseline behavior for Phase 0 harness 2026-05-22 11:46:52 +10:00
test_profile_gateway.py fix(service_manager): s6 detection works for unprivileged hermes user 2026-05-23 14:56:39 +10:00
test_s6_profile_gateway_integration.py fix(service_manager): rip out dead port parameter 2026-05-23 15:30:15 +10:00
test_tui_passthrough.py test(docker): lock baseline behavior for Phase 0 harness 2026-05-22 11:46:52 +10:00
test_zombie_reaping.py fix(service_manager): s6 detection works for unprivileged hermes user 2026-05-23 14:56:39 +10:00