Repository navigation
Conversation
A root build step in Dockerfile.tools ran Hermes on /sandbox/.hermes without HERMES_CONTAINER=1. Hermes' ensure_hermes_home() then chmodded /sandbox/.hermes and cron/ to 0700, so cron/ became 0700 gateway:sandbox and the Hermes gateway, which runs as user sandbox, could not use cron. Set HERMES_CONTAINER=1 on that step, as the base image's cron probes do. Record every directory under /sandbox/.hermes before the first Hermes process and fail the build if any owner, group, or mode differs after the last one, and check the base values for /sandbox/.hermes (3770) and cron/ (2770). check-image.sh now compares those directories between the base and tools images in hermes mode. Fixes #90 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Hsu <derekhsu@hotmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the Hermes tools image,
/sandbox/.hermes/cronwas0700 gateway:sandbox, so the Hermes gateway, which runs as usersandbox, could not use cron. A root build step inDockerfile.toolsran Hermes on/sandbox/.hermeswithoutHERMES_CONTAINER=1, and Hermes'ensure_hermes_home()then changed/sandbox/.hermesandcron/to0700. That step now setsHERMES_CONTAINER=1, and the build andcheck-image.shfail when the tools layer changes a directory under/sandbox/.hermes.Related Issue
Closes #90
Changes
agents/hermes-01x/Dockerfile.tools:HERMES_CONTAINER=1on the rootget_browser_backend()check that reads/sandbox/.hermes, as the base image's cron probes do./sandbox/.hermesbefore the first Hermes process. After the last one, compare them withdiff -u. Any difference fails the build./sandbox/.hermesissandbox:sandbox 3770andcron/isgateway:sandbox 2770. These are the baseDockerfilevalues from itschmodandcheck_metadatasteps.tools/openclaw-tools-image/fixtures/check-image.sh: inhermesmode, compare the directories under/sandbox/.hermesbetween the base and tools images. A changed owner, group, or mode, or an added directory, fails the check.test/hermes-01x-image.test.ts:HERMES_HOME=/sandbox/.hermesline setsHERMES_CONTAINER=1, and the directory andcron/checks run after the last Hermes process.check-image.shbehavior tests with a fakedocker: the check passes when directories match, fails whencron/is0700, and fails when the tools image adds a directory.ci/source-shape-test-budget.json: register the two static tests assecuritysource-shape exceptions.docs/modification/2026-11-17-hermes-tools-image.md: describe the newcheck-image.shcomparison, the cause, and the build checks.Cause evidence: no container runtime was available, so I ran the same
python -cline fromDockerfile.toolsagainst Hermes 0.21.3 source on a temporaryHERMES_HOME. WithoutHERMES_CONTAINER, bothHERMES_HOMEandcron/became0700. WithHERMES_CONTAINER=1, both modes stayed the same.build-hermes-mcp-digest.pydoes not import Hermes and does not setHERMES_HOME, so it is unchanged.Not verified:
Dockerfile.toolschecks, thefind -printfoutput format, and thecheck-image.shcomparison against real base and tools images are first exercised byImages / Hermes Tools Verifyon this PR.cron/mode in the published base image. The issue shows the base directory asdrwxrwx---without the setgid bit, and the baseDockerfilechecks2770. If the published value differs, the new check fails the build.HERMES_CONTAINER=1, runningload_configas root can leave a root-ownedbackups/config/config.yaml.good.*file under/sandbox/.hermes. The new comparison covers directories, not files, so it does not catch this file.Type of Change
Quality Gates
Documentation Writer Review
docs-updateddocs/modification/2026-11-17-hermes-tools-image.md. The review passed with nits, and all nits are fixed in this commit.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run --project integration test/hermes-01x-image.test.tspassed 56/56; withtest/hermes-tools-image-release.test.ts,test/check-image-layer-count.test.ts, andtest/hermes-final-image-layout.test.ts, 103/103 passed.npm run source-shape:check,shellcheck, andhadolintpassed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Derek Hsu derekhsu@hotmail.com