fix: migrate stranded hermes build context into services/ + drop dashboard local key default - #117
Merged
Conversation
…board local key default
Two deferred audit fixes plus a reorg correction:
1. Dashboard gateway-key default (services/v1-parity/dashboard/app.py): drop
the guessable "local" fallback. MODEL_GATEWAY_API_KEY now falls back to
LITELLM_MASTER_KEY then empty (fail-closed) — the key is always injected in
practice, so an unset value must not silently authenticate as "local".
2. The services/ reorg stranded the hermes build context at the top-level
hermes/ and (wrongly) declared the agent `build: {external: true}` — but a
real in-repo Dockerfile exists. git mv'd the whole context (Dockerfile,
entrypoint.sh, ops_client.py, spa-patches.mjs, .dockerignore, plugins/,
seed/) into services/hermes/ alongside its agent.yaml + README, and removed
the external flag + out-of-band comments. Hermes now resolves to its
co-located services/hermes/ context (the default) — no explicit build: key.
openai-agent stays external (genuinely no in-repo dir).
3. test_build_contexts.py: hermes now asserted to resolve to a real
services/hermes/Dockerfile (new test_hermes_resolves_to_its_in_repo_context);
dropped from the external exemption, openai-agent kept. test_hermes_ops_client.py
loads ops_client.py from the new path.
4. Fixed live refs to the old top-level hermes/ build paths (.gitattributes,
docs/hermes-agent.md, docs/runbooks/{bounded-hermes,secrets}.md,
architecture tree, ops-router/__init__.py self-ref, README build recipe).
Render byte-identical (docker-compose.yml sha 6450f3f0, unchanged — build is
metadata-only, never emitted into compose). agent-hermes builds from the new
home. pytest 565 passed / ruff clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes two deferred audit items and corrects a services/ reorg miss.
1. Dashboard gateway-key default (fail-closed)
services/v1-parity/dashboard/app.pyderived the model-gateway key with a guessable"local"fallback:Now:
The key is always injected in practice; if genuinely unset it must be empty (fail-closed), never authenticate as
local. Grep confirmed this was the only such default in the dashboard.2. Migrate the stranded hermes build context (external was wrong)
The
hermesagent was declaredbuild: {external: true}— "built out-of-band, no in-repo Dockerfile". That was false: a real multi-stage Dockerfile + full build context lived at the top-levelhermes/, which the services/ reorg never migrated.git mvthe whole context (Dockerfile, entrypoint.sh, ops_client.py, spa-patches.mjs, .dockerignore,plugins/,seed/) intoservices/hermes/next to its existingagent.yaml+README.md. History preserved (renames R98–R100). Orphaned untracked__pycache__cleaned; emptyhermes/removed.services/hermes/agent.yaml: removed thebuild: {external: true}block + out-of-band comments. Hermes now resolves to its co-locatedservices/hermes/context (the resolver default), so no explicitbuild:is needed.imagestays omitted (→agent-hermesconvention); CMD/entrypoint/user comments kept.external: true— it genuinely has no in-repo dir; that flag is correct.3. Test update
tests/substrate/test_build_contexts.py: newtest_hermes_resolves_to_its_in_repo_contextassertsordo/agent-hermes→services/hermes+ a real Dockerfile; dropped hermes from the external-exemption (openai-agent kept).tests/test_hermes_ops_client.pynow loadsops_client.pyfrom the new path.4. Live refs fixed
.gitattributes(eol rule),docs/hermes-agent.md(build recipe/SHA-pin),docs/runbooks/bounded-hermes.md,docs/runbooks/secrets.md, architecture tree,services/hermes/README.mdbuild recipe, and the ops-router__init__.pyself-reference — all repointed toservices/hermes/.docs/history/**left as historical record.Validation
docker-compose.ymlsha6450f3f0(unchanged) — removing the metadata-onlyexternalflag + moving the context does not touch render (build is never emitted into compose).docker build -f services/hermes/Dockerfile services/hermessucceeded (COPYs resolve post-move); throwaway image removed, liveordo/agent-hermes:latestuntouched.🤖 Generated with Claude Code