Skip to content

Commit 39ef52c

Browse files
stubbiclaude
andauthored
fix(agent-image): ship pyproject.toml + uv.lock at /opt/venv-template/ (#68) (#85)
## Problem Every `HermesInstance` fails to reach `Ready` because the operator's `init-uv` init container is incompatible with the published `ghcr.io/paperclipinc/hermes-agent` image (issue #68, confirmed by multiple users). `internal/resources/runtime_init.go` renders: ``` set -eu; cd /home/hermes/.hermes; \ cp /opt/venv-template/pyproject.toml /opt/venv-template/uv.lock .; \ uv sync --frozen ``` …but `images/hermes-agent/Dockerfile` builds the venv at `/opt/venv` and copies **nothing** to `/opt/venv-template/`. So `init-uv` exits 1: ``` cp: cannot stat '/opt/venv-template/pyproject.toml': No such file or directory ``` …the `hermes` container never starts, the StatefulSet never reaches `readyReplicas == replicas`, and the instance never becomes `Ready=True`. ## Fix Add one `COPY` to the runtime stage shipping the lockfile + project metadata at `/opt/venv-template/`, exactly where the operator's contract expects them. The files already exist at `/build/` in the builder stage. ## Scope Minimal, surgical fix — Dockerfile only. No change to the build/sign/SBOM/multi-arch pipeline. ## Follow-up Once a fixed agent image is republished, un-skip the `#68`-gated specs in `test/conformance/idempotency_test.go` (`idempotencyImageContractSkip`). Fixes #68 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b287bad commit 39ef52c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

images/hermes-agent/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ RUN groupadd --system --gid 1000 hermes \
8787

8888
# Copy the resolved venv from the builder stage.
8989
COPY --from=builder --chown=hermes:hermes /opt/venv /opt/venv
90+
91+
# Ship the lockfile + project metadata at /opt/venv-template/ as well. The
92+
# operator's `init-uv` init container (internal/resources/runtime_init.go) does
93+
# cd /home/hermes/.hermes; cp /opt/venv-template/pyproject.toml /opt/venv-template/uv.lock .; uv sync --frozen
94+
# to materialise the env into the per-instance PVC. Without these files the init
95+
# container exits 1 ("cp: cannot stat '/opt/venv-template/pyproject.toml'") and
96+
# no HermesInstance ever reaches Ready. See #68.
97+
COPY --from=builder --chown=hermes:hermes /build/pyproject.toml /build/uv.lock /opt/venv-template/
98+
9099
ENV PATH="/opt/venv/bin:${PATH}" \
91100
PYTHONUNBUFFERED=1 \
92101
PYTHONDONTWRITEBYTECODE=1 \

0 commit comments

Comments
 (0)