hermes-agent/docker
Teknium 61ee2dbfdb
fix(s6): make profile gateway log parent writable (#46291)
* fix(gateway): chown logs/gateways parent so late-added profiles can log

The per-profile log service script created $HERMES_HOME/logs/gateways/
via 'mkdir -p' but only chowned the leaf logs/gateways/<profile>. When
the first log service boots in root context, the gateways/ parent stays
root:root; every profile registered later runs its log service as the
dropped hermes user, 'mkdir -p' fails with EACCES, and s6-log enters a
sub-second fatal crash-loop flooding the container log. The stage2
recursive heal does not catch it either: it is gated on needs_chown,
which is false when the top-level $HERMES_HOME is already hermes-owned.

Two complementary fixes:

- service_manager._render_log_run: chown the gateways/ parent
  (non-recursively) before the leaf chown. Runs on every root-context
  boot, so it also heals volumes already poisoned by older images.
- docker/stage2-hook.sh: seed logs/gateways in the as_hermes mkdir -p
  block; cont-init runs before any service starts, so the parent
  already exists hermes-owned when the first log/run does 'mkdir -p'.

The needs_chown repair loop needs no twin entry: it already chowns
logs/ recursively, which covers logs/gateways.

Fixes #45258

* chore(release): map salvaged contributor

---------

Co-authored-by: tangtaizhong666 <tangtaizhong792@gmail.com>
2026-06-15 13:47:05 +10:00
..
cont-init.d Remove prviliges drop when you never ran as root (#34837) 2026-06-01 13:54:18 +10:00
s6-rc.d Remove prviliges drop when you never ran as root (#34837) 2026-06-01 13:54:18 +10:00
entrypoint.sh docs(docker): deprecation warning in entrypoint.sh shim 2026-05-24 18:05:33 -07:00
hermes-exec-shim.sh fix(docker): drop docker exec to hermes uid before invoking the CLI 2026-05-28 13:30:36 +10:00
main-wrapper.sh fix(docker): reject unsupported --user <arbitrary-uid> start with clear guidance (#38579) 2026-06-04 10:51:51 +10:00
SOUL.md feat(docker): add Docker container for the agent (salvage #1841) (#3668) 2026-03-28 22:21:48 -07:00
stage2-hook.sh fix(s6): make profile gateway log parent writable (#46291) 2026-06-15 13:47:05 +10:00