Skip to content

fix(hermes): harden runtime env refresh after Slack alias fix - #5866

Merged
cv merged 14 commits into
mainfrom
fix/hermes-env-placeholder-upsert
Jun 26, 2026
Merged

cv merged 14 commits into
mainfrom
fix/hermes-env-placeholder-upsert

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • follow up merged PR fix(messaging): fix Hermes messaging after upgrade #5837 by addressing the PR Review Advisor source-of-truth/security/test follow-ups
  • restrict Hermes provider-placeholder fallback to runtime-plan credential bindings once a reduced runtime plan is present, avoiding arbitrary .env key rewrites such as API_SERVER_KEY
  • keep the useful PR fix(hermes): harden runtime env refresh after Slack alias fix #5866 pieces: shared .env upsert/dedupe helper, duplicate API_SERVER_KEY cleanup without reminting, missing provider placeholder append, and no-op hash stability
  • document the Slack alias compatibility boundary in the Slack manifest and assert the baked Hermes runtime-plan artifact is safe/reduced in the image
  • fix the current main TypeScript compile regression in detectMessagingChannelsFromEnv by passing the manifest list to getMessagingManifestAvailabilityContext

Validation

  • python3 -m py_compile agents/hermes/runtime-config-guard.py
  • npm run build:cli
  • npm test -- --run test/hermes-runtime-api-key.test.ts test/messaging-build-applier.test.ts src/lib/messaging/compiler/manifest-compiler.test.ts

Notes

  • Full pre-push test-cli was attempted but hit unrelated local-environment failures/timeouts (missing ../nemoclaw/dist/blueprint/private-networks.js, missing nemoclaw/node_modules/json5, local Docker/OpenShell/CLI timeout tests). Targeted tests and TypeScript build pass.

Summary by CodeRabbit

  • Bug Fixes
    • Improved messaging channel availability detection using the built-in channel manifest list.
    • Prevents duplicate .env entries by upserting targeted KEY=VALUE assignments while preserving the first occurrence.
    • Fixes Hermes runtime API key refresh flow so “updated” outcomes succeed correctly.
    • Tightens runtime placeholder/env-key validation to reject malformed or unsafe updates before any .env rewrite.
  • Documentation
    • Clarified Slack runtime placeholder alias behavior with compatibility-boundary guidance.
  • Tests / CI
    • Expanded Hermes runtime placeholder refresh and strict-hash assertions with deterministic fixtures, including negative and deduplication scenarios.
    • Added a functional check that the runtime plan artifact is not written when messaging isn’t configured.

@github-code-quality

github-code-quality Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/hermes-env-place... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/hermes-env-place... 3b245a5 +/-
nemoclaw/src/se...cret-scanner.ts — 100% —
nemoclaw/src/commands/slash.ts — 100% —
nemoclaw/src/li...bprocess-env.ts — 100% —
nemoclaw/src/bl...eprint/state.ts — 98% —
nemoclaw/src/onboard/config.ts — 98% —
nemoclaw/src/bl...int/snapshot.ts — 97% —
nemoclaw/src/bl...print/runner.ts — 95% —
nemoclaw/src/co...ration-state.ts — 94% —
nemoclaw/src/bl...ate-networks.ts — 94% —
nemoclaw/src/index.ts — 94% —

TypeScript / code-coverage/cli

The overall coverage in the fix/hermes-env-place... branch is 47%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/hermes-env-place... 3b245a5 +/-
src/lib/state/o...oard-session.ts — 91% —
src/lib/actions...dbox/rebuild.ts — 73% —
src/lib/sandbox/config.ts — 72% —
src/lib/onboard/preflight.ts — 62% —
src/lib/shields/index.ts — 62% —
src/lib/actions...licy-channel.ts — 60% —
src/lib/state/sandbox.ts — 56% —
src/lib/policy/index.ts — 48% —
src/lib/onboard...er-gpu-patch.ts — 47% —
src/lib/onboard.ts — 19% —

Updated June 26, 2026 20:14 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Hermes runtime plan validation, .env rewriting, API key handling, and provider placeholder refresh were updated together, with new coverage for deduplication, canonical hashes, and Slack runtime alias handling.

Changes

Hermes runtime config and messaging aliases

Layer / File(s) Summary
Runtime-plan validation and availability wiring
agents/hermes/Dockerfile, src/lib/messaging/channels/slack/manifest.ts, src/lib/onboard/messaging-channel-setup.ts, test/messaging-build-applier.test.ts
Validates the generated runtime plan in the Hermes Docker build, passes manifest registry entries into messaging-channel availability detection, and adds runtime-setup artifact coverage.
Shared env helpers and API key handling
agents/hermes/runtime-config-guard.py, agents/hermes/start.sh, test/hermes-runtime-api-key.test.ts
Adds shared .env assignment helpers, runtime-plan provider key parsing, API key rewrite handling, and updated status output.
Provider placeholder refresh and alias checks
agents/hermes/runtime-config-guard.py, test/hermes-runtime-api-key.test.ts
Refactors provider placeholder rewriting to use runtime-plan-derived fallback keys, applies upserts through shared helpers, and extends placeholder and Slack alias test coverage.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

area: messaging

Suggested reviewers

  • cv
  • cjagwani

Poem

🐇 I hopped through keys and hashes bright,
and .env lines danced just right.
New aliases woke, old duplicates fled,
while strict-mode paths stayed well-fed.
A tidy burrow, neat and sound,
with one more secret safely found.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main Hermes runtime env refresh hardening work.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hermes-env-placeholder-upsert

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: hermes-secret-boundary-e2e, hermes-slack-e2e, hermes-root-entrypoint-smoke-e2e
Optional E2E: channels-stop-start-hermes-e2e, rebuild-hermes-e2e

Dispatch hint: hermes-secret-boundary-e2e,hermes-slack-e2e,hermes-root-entrypoint-smoke-e2e

Auto-dispatched E2E: hermes-secret-boundary-e2e, hermes-root-entrypoint-smoke-e2e via nightly-e2e.yaml at 3b245a531abcf63a776790f01f32b8f3df770a0b — nightly run

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • hermes-secret-boundary-e2e (medium): Required because this PR changes Hermes .env/provider placeholder refresh and runtime-plan trust handling, directly affecting the no-raw-secret sandbox boundary.
  • hermes-slack-e2e (medium): Required because the Slack manifest aliases and Hermes runtime-config guard determine whether Hermes Slack onboarding produces SDK-shaped resolver placeholders and preserves credential isolation through the OpenShell provider path.
  • hermes-root-entrypoint-smoke-e2e (medium): Required because agents/hermes/start.sh and Dockerfile entrypoint/runtime-plan handling changes can affect real Hermes container boot, gateway startup, and runtime config initialization.

Optional E2E

  • channels-stop-start-hermes-e2e (medium): Useful adjacent coverage for active/disabled messaging channel runtime-plan state and provider placeholder reuse across Hermes channel stop/start rebuilds.
  • rebuild-hermes-e2e (medium): Useful confidence check that Hermes rebuilds still bake and consume the reduced messaging runtime-plan artifact correctly after Dockerfile guard changes.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: hermes-secret-boundary-e2e,hermes-slack-e2e,hermes-root-entrypoint-smoke-e2e

@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: hermes-root-entrypoint-smoke-vitest, hermes-sandbox-secret-boundary-vitest, hermes-slack-vitest, hermes-discord-vitest
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-root-entrypoint-smoke-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-sandbox-secret-boundary-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-slack-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-discord-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • hermes-root-entrypoint-smoke-vitest: The PR changes the Hermes Dockerfile, entrypoint, and runtime-config guard. This free-standing Vitest job builds/probes the real Hermes root entrypoint path that consumes those files.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-root-entrypoint-smoke-vitest
  • hermes-sandbox-secret-boundary-vitest: The runtime-config guard now rewrites provider placeholders from runtime-plan metadata and validates the resulting .env through the secret boundary. This job is the direct live coverage for Hermes sandbox secret-boundary behavior.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-sandbox-secret-boundary-vitest
  • hermes-slack-vitest: The Slack manifest changes Hermes runtime env alias metadata and the Hermes guard consumes that metadata at startup. This job is the live Slack path for those placeholder, provider, and secret-boundary contracts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-slack-vitest
  • hermes-discord-vitest: The runtime-config guard changes generic provider placeholder handling via runtime-plan credentialBindings and legacy fallback keys, which affects non-Slack Hermes messaging channels. Hermes Discord is the smallest live non-Slack provider path wired in the Vitest workflow.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-discord-vitest

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • agents/hermes/Dockerfile
  • agents/hermes/runtime-config-guard.py
  • agents/hermes/start.sh
  • src/lib/messaging/channels/slack/manifest.ts

@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 0 suggestions · 2 test follow-ups
Since last review: 0 prior items resolved · 0 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Hermes image-level startup with an active Slack runtime plan and versioned generic SLACK_BOT_TOKEN/SLACK_APP_TOKEN runtime env placeholders: verify .env is rewritten to xoxb-/xapp-OPENSHELL-RESOLVE-ENV aliases, strict and compat hashes are refreshed, and validate-env-secret-boundary passes.. The unit and fixture coverage is strong for branch and negative-path behavior, including the Python guard, extracted start.sh function, and Dockerfile command block. The remaining confidence gap is image-level startup behavior across Dockerfile ownership, startup ordering, root/non-root privilege mode, hash refresh, and the Hermes secret-boundary validator. The prior advisor review's two image-level validation follow-ups are therefore still useful as test-depth follow-ups, not current blocking findings.
  • PRA-T2 Runtime validation — Hermes image-level startup with no messaging runtime plan artifact and ambient SLACK_* runtime env values: verify startup does not append missing Slack keys to .env and validate-env-secret-boundary still passes.. The unit and fixture coverage is strong for branch and negative-path behavior, including the Python guard, extracted start.sh function, and Dockerfile command block. The remaining confidence gap is image-level startup behavior across Dockerfile ownership, startup ordering, root/non-root privilege mode, hash refresh, and the Hermes secret-boundary validator. The prior advisor review's two image-level validation follow-ups are therefore still useful as test-depth follow-ups, not current blocking findings.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28248424518
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-slack-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-slack-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 28250126970
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-e2e-vitest,hermes-sandbox-secret-boundary-vitest,hermes-slack-vitest,hermes-root-entrypoint-smoke-vitest,hermes-discord-vitest
Summary: 4 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-vitest ✅ success
hermes-e2e-vitest ❌ failure
hermes-root-entrypoint-smoke-vitest ✅ success
hermes-sandbox-secret-boundary-vitest ✅ success
hermes-slack-vitest ✅ success

Failed jobs: hermes-e2e-vitest. Check run artifacts for logs.

@wscurran wscurran added bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Jun 26, 2026
@jyaunches jyaunches changed the title fix(hermes): upsert runtime env placeholders fix(hermes): harden runtime env refresh after Slack alias fix Jun 26, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@agents/hermes/Dockerfile`:
- Around line 190-194: The baked runtime-plan validation in the Dockerfile is
only checking `runtimeSetup.envAliases`, which is weaker than the shared reduced
schema used by `isRuntimeSetup` in `src/lib/messaging/plan-validation.ts`.
Update the inline `node -e` guard in the Hermes Dockerfile to validate the full
reduced `runtimeSetup` shape, including `nodePreloads` and `secretScans` as
arrays, or reuse the shared validator logic so the build-time check matches the
runtime contract.

In `@agents/hermes/runtime-config-guard.py`:
- Around line 486-497: Validate runtime-plan environment keys before they are
collected for .env rewrites: in the credentialBindings / replacements handling
around provider_env_keys, envKey, and _upsert_env_assignments, reject any
nonconforming key syntax instead of only checking for str. Add a strict
validation step for both providerEnvKey and envKey before adding them to
provider_env_keys or replacements, and raise UnsafePathError for malformed
values so injected newlines or extra assignment text cannot reach
_upsert_env_assignments.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f8267a15-1487-463b-af7d-5f2d20be48dd

📥 Commits

Reviewing files that changed from the base of the PR and between 1b330f1 and a2924ae.

📒 Files selected for processing (6)
  • agents/hermes/Dockerfile
  • agents/hermes/runtime-config-guard.py
  • agents/hermes/start.sh
  • src/lib/messaging/channels/slack/manifest.ts
  • src/lib/onboard/messaging-channel-setup.ts
  • test/hermes-runtime-api-key.test.ts
✅ Files skipped from review due to trivial changes (1)
  • src/lib/messaging/channels/slack/manifest.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • agents/hermes/start.sh

Comment thread agents/hermes/Dockerfile Resolved
Comment thread agents/hermes/runtime-config-guard.py Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 28253062860
Target ref: a2924aeb468a5b6a0cc893e7ecd8e80fb8ec104e
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e,hermes-root-entrypoint-smoke-e2e
Summary: 0 passed, 2 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ❌ failure
hermes-secret-boundary-e2e ❌ failure

Failed jobs: hermes-root-entrypoint-smoke-e2e, hermes-secret-boundary-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 28253745422
Target ref: f574e5c17fddb6e45ef022ab53d7900812c88716
Workflow ref: main
Requested jobs: hermes-root-entrypoint-smoke-e2e,hermes-secret-boundary-e2e
Summary: 0 passed, 2 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ❌ failure
hermes-secret-boundary-e2e ❌ failure

Failed jobs: hermes-root-entrypoint-smoke-e2e, hermes-secret-boundary-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28254250074
Target ref: 44a5073503a80105e1cabdfdd60feca0e27b319d
Workflow ref: main
Requested jobs: hermes-root-entrypoint-smoke-e2e,hermes-secret-boundary-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ Some jobs cancelled — partial pass

Run: 28253905480
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-slack-e2e,messaging-providers-e2e
Summary: 1 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
hermes-slack-e2e ✅ success
messaging-providers-e2e ⚠️ cancelled

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28254600990
Target ref: 57ca9853f4e4ba99c78fabda37d55c677f46fc18
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e,hermes-root-entrypoint-smoke-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28254723646
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-slack-vitest
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-slack-vitest ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 28254722229
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-slack-e2e,messaging-providers-e2e,hermes-e2e
Summary: 2 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
hermes-e2e ✅ success
hermes-slack-e2e ✅ success
messaging-providers-e2e ❌ failure

Failed jobs: messaging-providers-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28253906739
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-slack-vitest,hermes-discord-vitest,messaging-providers-vitest
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-vitest ✅ success
hermes-slack-vitest ✅ success
messaging-providers-vitest ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28255315482
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: messaging-providers-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
messaging-providers-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28256971788
Target ref: ca6ac4ad8f82aea8061bf7342b78ef60f88c0840
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e,hermes-root-entrypoint-smoke-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28258210953
Target ref: 71c568ac825a2555891c26e15b5a8fd7f475a82a
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e,hermes-root-entrypoint-smoke-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after addressing any feedback comments

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28258459688
Target ref: e23a1f94d9ce723b72b3baef49e102f900906297
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-secret-boundary-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28258609730
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-e2e,hermes-slack-e2e,messaging-providers-e2e,rebuild-hermes-e2e,cloud-onboard-e2e
Summary: 5 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
cloud-onboard-e2e ✅ success
hermes-e2e ✅ success
hermes-slack-e2e ✅ success
messaging-providers-e2e ✅ success
rebuild-hermes-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28258609595
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-slack-vitest,hermes-discord-vitest,hermes-root-entrypoint-smoke-vitest
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-vitest ✅ success
hermes-root-entrypoint-smoke-vitest ✅ success
hermes-slack-vitest ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28260303384
Target ref: 4183d753d37e4683e40ab3914acf6e03b85bfa7d
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e,hermes-root-entrypoint-smoke-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 4 suggestions · 4 test follow-ups
Since last review: 7 prior items resolved · 1 still applies · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Compat-mode hash refresh not exercised with real setpriv/gosu step-down
  • PRA-T4 Add or justify test follow-up: TEST_PATH constant can be inlined (stdlib)
  • PRA-1 In-scope improvement: Compat-mode hash refresh not exercised with real setpriv/gosu step-down in test/hermes-runtime-api-key.test.ts:720
  • PRA-2 In-scope improvement: Dockerfile inline validation duplicates runtime-config-guard.py logic in agents/hermes/Dockerfile:118
  • PRA-3 In-scope improvement: Shell fast-path filter for runtime plan lacks explanatory comment in agents/hermes/start.sh:1145
  • PRA-4 In-scope improvement: TEST_PATH constant can be inlined (stdlib) in test/messaging-build-applier.test.ts:30

Findings index

ID Severity Category Location Required action
PRA-1 Improvement tests test/hermes-runtime-api-key.test.ts:720 Add a test case that exercises refresh_hermes_runtime_config_hashes compat with actual step-down (setpriv or gosu) to verify the hash file is written correctly under the sandbox user. This is a local improvement — prefer fixing in this PR; defer only with rationale.
PRA-2 Improvement architecture agents/hermes/Dockerfile:118 Consider extracting the reduced-shape validation to a shared module (e.g., a Python script or Node module) that both Dockerfile and runtime-config-guard.py can import, or add a comment in both locations linking to the other for maintainers.
PRA-3 Improvement correctness agents/hermes/start.sh:1145 Add a comment in start.sh explaining that [ -f ] is a fast-path filter and the Python guard performs the full validation (symlink, hardlink, permissions, structure). This prevents future reviewers from thinking the shell check is sufficient.
PRA-4 Improvement tests test/messaging-build-applier.test.ts:30 Inline process.env.PATH || '/usr/bin:/bin' at the two usage sites (lines 43 and 108) and remove the TEST_PATH constant.
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 4 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

  • None.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-1 Improvement — Compat-mode hash refresh not exercised with real setpriv/gosu step-down

  • Location: test/hermes-runtime-api-key.test.ts:720
  • Category: tests
  • Problem: The test fixture mocks STEP_DOWN_PREFIX_SANDBOX with an env var (NEMOCLAW_TEST_STEPPED_DOWN=1) rather than actual privilege drop via setpriv or gosu. This leaves the compat-mode hash refresh code path unverified under real step-down conditions.
  • Impact: Minor gap in unit test coverage for the compat-mode hash refresh code path; could miss regressions in the step-down logic when running as root and stepping down to sandbox user.
  • Suggested action: Add a test case that exercises refresh_hermes_runtime_config_hashes compat with actual step-down (setpriv or gosu) to verify the hash file is written correctly under the sandbox user. This is a local improvement — prefer fixing in this PR; defer only with rationale.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search test/hermes-runtime-api-key.test.ts for 'refresh_hermes_runtime_config_hashes' and 'compat' — the fixture uses STEP_DOWN_PREFIX_SANDBOX=(env NEMOCLAW_TEST_STEPPED_DOWN=1) mock. Compare with start.sh lines 1185-1195 which use ${STEP_DOWN_PREFIX_SANDBOX[@]} for real step-down.
  • Missing regression test: New test: 'refresh_hermes_runtime_config_hashes compat mode writes hash under real step-down prefix' using setpriv/gosu in test environment
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: start.sh lines 1185-1195 show compat-mode branch with STEP_DOWN_PREFIX_SANDBOX; test fixture runHermesRuntimeApiServerKeyMint only tests with env var mock

PRA-2 Improvement — Dockerfile inline validation duplicates runtime-config-guard.py logic

  • Location: agents/hermes/Dockerfile:118
  • Category: architecture
  • Problem: Dockerfile lines 118-130 contain an inline node script that validates the runtime plan artifact (not symlink, root:root owner, not writable, no unreduced keys, reduced runtimeSetup shape). This duplicates validation logic in runtime-config-guard.py:_runtime_plan_replacements_and_provider_keys, creating maintenance burden and drift risk.
  • Impact: Duplicated validation logic could diverge over time; fixes to one may not propagate to the other. Both are defense-in-depth but should share a single source of truth.
  • Suggested action: Consider extracting the reduced-shape validation to a shared module (e.g., a Python script or Node module) that both Dockerfile and runtime-config-guard.py can import, or add a comment in both locations linking to the other for maintainers.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Compare Dockerfile lines 118-130 (node -e validation) with runtime-config-guard.py _runtime_plan_replacements_and_provider_keys function — both validate runtimeSetup structure, active channels, and credential bindings.
  • Missing regression test: None — this is a maintainability concern, not a security gap. Existing tests cover both validation paths.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Dockerfile validates: not symlink, st.uid===0, st.gid===0, mode&0o022===0, no unreduced keys (agentRender/buildSteps/stateUpdates/healthChecks), runtimeSetup with nodePreloads/envAliases/secretScans arrays. Python guard validates same structure in _runtime_plan_replacements_and_provider_keys.

PRA-3 Improvement — Shell fast-path filter for runtime plan lacks explanatory comment

  • Location: agents/hermes/start.sh:1145
  • Category: correctness
  • Problem: start.sh calls refresh_hermes_provider_placeholders with --runtime-plan only for regular files ([ -f ]), but the Python guard also rejects symlinks, hardlinks, group-writable, and world-writable files. The shell check is a fast-path filter; the Python guard is the authoritative check.
  • Impact: Future reviewers may think the [ -f ] check is sufficient and miss that the Python guard performs full validation. Missing documentation of defense-in-depth layering.
  • Suggested action: Add a comment in start.sh explaining that [ -f ] is a fast-path filter and the Python guard performs the full validation (symlink, hardlink, permissions, structure). This prevents future reviewers from thinking the shell check is sufficient.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read start.sh lines 1140-1150 and runtime-config-guard.py _read_text/_validate_regular — the Python guard validates file type, nlink, and mode.
  • Missing regression test: None — existing tests cover both layers.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: start.sh line 1145: 'if [ -f "$runtime_plan" ]; then args+=(--runtime-plan "$runtime_plan"); fi' — Python guard _validate_regular rejects symlinks (S_ISLNK), non-regular files, hardlinks (st_nlink!=1), group/world-writable (mode&0o022).

PRA-4 Improvement — TEST_PATH constant can be inlined (stdlib)

  • Location: test/messaging-build-applier.test.ts:30
  • Category: tests
  • Problem: const TEST_PATH = process.env.PATH || '/usr/bin:/bin' is used only once in the test file. The stdlib process.env.PATH already provides the same fallback behavior.
  • Impact: Unnecessary abstraction; single-use constant adds cognitive load without benefit.
  • Suggested action: Inline process.env.PATH || '/usr/bin:/bin' at the two usage sites (lines 43 and 108) and remove the TEST_PATH constant.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search test/messaging-build-applier.test.ts for TEST_PATH — used at lines 43 and 108 in env object spreads.
  • Missing regression test: None — pure refactor, no behavior change.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Line 30: const TEST_PATH = process.env.PATH || '/usr/bin:/bin'; used at lines 43 and 108 in env spreads.
Simplification opportunities: 1 possible cut, net -1 lines possible

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-4 stdlib (test/messaging-build-applier.test.ts:30): const TEST_PATH = process.env.PATH || '/usr/bin:/bin'; and replace TEST_PATH with process.env.PATH || '/usr/bin:/bin' at two usage sites
    • Replacement: process.env.PATH || '/usr/bin:/bin'
    • Net: -1 lines
    • Safety boundary: No behavior change — stdlib provides identical fallback. Only affects test helper env construction.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — refresh_hermes_runtime_config_hashes compat mode writes hash under real step-down prefix (setpriv/gosu). Runtime/sandbox/infrastructure paths need behavioral runtime validation: agents/hermes/Dockerfile, agents/hermes/runtime-config-guard.py, agents/hermes/start.sh, src/lib/messaging/channels/slack/manifest.ts. Unit tests with spawnSync are the practical limit for sandbox entrypoint code; integration validation occurs in CI sandbox rebuilds.
  • PRA-T2 Runtime validation — provider_placeholders compat mode with runtime plan loads legacy keys from env. Runtime/sandbox/infrastructure paths need behavioral runtime validation: agents/hermes/Dockerfile, agents/hermes/runtime-config-guard.py, agents/hermes/start.sh, src/lib/messaging/channels/slack/manifest.ts. Unit tests with spawnSync are the practical limit for sandbox entrypoint code; integration validation occurs in CI sandbox rebuilds.
  • PRA-T3 Compat-mode hash refresh not exercised with real setpriv/gosu step-down — Add a test case that exercises refresh_hermes_runtime_config_hashes compat with actual step-down (setpriv or gosu) to verify the hash file is written correctly under the sandbox user. This is a local improvement — prefer fixing in this PR; defer only with rationale.
  • PRA-T4 TEST_PATH constant can be inlined (stdlib) — Inline process.env.PATH || '/usr/bin:/bin' at the two usage sites (lines 43 and 108) and remove the TEST_PATH constant.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Improvement — Compat-mode hash refresh not exercised with real setpriv/gosu step-down

  • Location: test/hermes-runtime-api-key.test.ts:720
  • Category: tests
  • Problem: The test fixture mocks STEP_DOWN_PREFIX_SANDBOX with an env var (NEMOCLAW_TEST_STEPPED_DOWN=1) rather than actual privilege drop via setpriv or gosu. This leaves the compat-mode hash refresh code path unverified under real step-down conditions.
  • Impact: Minor gap in unit test coverage for the compat-mode hash refresh code path; could miss regressions in the step-down logic when running as root and stepping down to sandbox user.
  • Suggested action: Add a test case that exercises refresh_hermes_runtime_config_hashes compat with actual step-down (setpriv or gosu) to verify the hash file is written correctly under the sandbox user. This is a local improvement — prefer fixing in this PR; defer only with rationale.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search test/hermes-runtime-api-key.test.ts for 'refresh_hermes_runtime_config_hashes' and 'compat' — the fixture uses STEP_DOWN_PREFIX_SANDBOX=(env NEMOCLAW_TEST_STEPPED_DOWN=1) mock. Compare with start.sh lines 1185-1195 which use ${STEP_DOWN_PREFIX_SANDBOX[@]} for real step-down.
  • Missing regression test: New test: 'refresh_hermes_runtime_config_hashes compat mode writes hash under real step-down prefix' using setpriv/gosu in test environment
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: start.sh lines 1185-1195 show compat-mode branch with STEP_DOWN_PREFIX_SANDBOX; test fixture runHermesRuntimeApiServerKeyMint only tests with env var mock

PRA-2 Improvement — Dockerfile inline validation duplicates runtime-config-guard.py logic

  • Location: agents/hermes/Dockerfile:118
  • Category: architecture
  • Problem: Dockerfile lines 118-130 contain an inline node script that validates the runtime plan artifact (not symlink, root:root owner, not writable, no unreduced keys, reduced runtimeSetup shape). This duplicates validation logic in runtime-config-guard.py:_runtime_plan_replacements_and_provider_keys, creating maintenance burden and drift risk.
  • Impact: Duplicated validation logic could diverge over time; fixes to one may not propagate to the other. Both are defense-in-depth but should share a single source of truth.
  • Suggested action: Consider extracting the reduced-shape validation to a shared module (e.g., a Python script or Node module) that both Dockerfile and runtime-config-guard.py can import, or add a comment in both locations linking to the other for maintainers.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Compare Dockerfile lines 118-130 (node -e validation) with runtime-config-guard.py _runtime_plan_replacements_and_provider_keys function — both validate runtimeSetup structure, active channels, and credential bindings.
  • Missing regression test: None — this is a maintainability concern, not a security gap. Existing tests cover both validation paths.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Dockerfile validates: not symlink, st.uid===0, st.gid===0, mode&0o022===0, no unreduced keys (agentRender/buildSteps/stateUpdates/healthChecks), runtimeSetup with nodePreloads/envAliases/secretScans arrays. Python guard validates same structure in _runtime_plan_replacements_and_provider_keys.

PRA-3 Improvement — Shell fast-path filter for runtime plan lacks explanatory comment

  • Location: agents/hermes/start.sh:1145
  • Category: correctness
  • Problem: start.sh calls refresh_hermes_provider_placeholders with --runtime-plan only for regular files ([ -f ]), but the Python guard also rejects symlinks, hardlinks, group-writable, and world-writable files. The shell check is a fast-path filter; the Python guard is the authoritative check.
  • Impact: Future reviewers may think the [ -f ] check is sufficient and miss that the Python guard performs full validation. Missing documentation of defense-in-depth layering.
  • Suggested action: Add a comment in start.sh explaining that [ -f ] is a fast-path filter and the Python guard performs the full validation (symlink, hardlink, permissions, structure). This prevents future reviewers from thinking the shell check is sufficient.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read start.sh lines 1140-1150 and runtime-config-guard.py _read_text/_validate_regular — the Python guard validates file type, nlink, and mode.
  • Missing regression test: None — existing tests cover both layers.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: start.sh line 1145: 'if [ -f "$runtime_plan" ]; then args+=(--runtime-plan "$runtime_plan"); fi' — Python guard _validate_regular rejects symlinks (S_ISLNK), non-regular files, hardlinks (st_nlink!=1), group/world-writable (mode&0o022).

PRA-4 Improvement — TEST_PATH constant can be inlined (stdlib)

  • Location: test/messaging-build-applier.test.ts:30
  • Category: tests
  • Problem: const TEST_PATH = process.env.PATH || '/usr/bin:/bin' is used only once in the test file. The stdlib process.env.PATH already provides the same fallback behavior.
  • Impact: Unnecessary abstraction; single-use constant adds cognitive load without benefit.
  • Suggested action: Inline process.env.PATH || '/usr/bin:/bin' at the two usage sites (lines 43 and 108) and remove the TEST_PATH constant.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search test/messaging-build-applier.test.ts for TEST_PATH — used at lines 43 and 108 in env object spreads.
  • Missing regression test: None — pure refactor, no behavior change.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Line 30: const TEST_PATH = process.env.PATH || '/usr/bin:/bin'; used at lines 43 and 108 in env spreads.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28260362077
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-slack-vitest,hermes-discord-vitest
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-vitest ✅ success
hermes-slack-vitest ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28260362458
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-slack-e2e,messaging-providers-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-slack-e2e ✅ success
messaging-providers-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28261402858
Target ref: cac04b878690045647d8c9b1551c57349b8219a7
Workflow ref: main
Requested jobs: hermes-root-entrypoint-smoke-e2e,hermes-secret-boundary-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28261593247
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-slack-vitest,hermes-discord-vitest,hermes-root-entrypoint-smoke-vitest,hermes-sandbox-secret-boundary-vitest
Summary: 4 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-vitest ✅ success
hermes-root-entrypoint-smoke-vitest ✅ success
hermes-sandbox-secret-boundary-vitest ✅ success
hermes-slack-vitest ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28261593349
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-slack-e2e,hermes-discord-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-e2e ✅ success
hermes-slack-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28262699029
Target ref: 3b245a531abcf63a776790f01f32b8f3df770a0b
Workflow ref: main
Requested jobs: hermes-secret-boundary-e2e,hermes-root-entrypoint-smoke-e2e
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success
hermes-secret-boundary-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28262837403
Target ref: fix/hermes-env-placeholder-upsert
Requested jobs: hermes-slack-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-slack-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28262837335
Workflow ref: fix/hermes-env-placeholder-upsert
Requested scenarios: (default — all supported)
Requested jobs: hermes-root-entrypoint-smoke-vitest,hermes-sandbox-secret-boundary-vitest,hermes-slack-vitest,hermes-discord-vitest
Summary: 4 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-discord-vitest ✅ success
hermes-root-entrypoint-smoke-vitest ✅ success
hermes-sandbox-secret-boundary-vitest ✅ success
hermes-slack-vitest ✅ success

@cv
cv merged commit 9c8ee86 into main Jun 26, 2026
175 checks passed
@cv
cv deleted the fix/hermes-env-placeholder-upsert branch June 26, 2026 21:19
@cv cv added the v0.0.69 label Jun 27, 2026
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
…#5866)

## Summary
- follow up merged PR NVIDIA#5837 by addressing the PR Review Advisor
source-of-truth/security/test follow-ups
- restrict Hermes provider-placeholder fallback to runtime-plan
credential bindings once a reduced runtime plan is present, avoiding
arbitrary `.env` key rewrites such as `API_SERVER_KEY`
- keep the useful PR NVIDIA#5866 pieces: shared `.env` upsert/dedupe helper,
duplicate `API_SERVER_KEY` cleanup without reminting, missing provider
placeholder append, and no-op hash stability
- document the Slack alias compatibility boundary in the Slack manifest
and assert the baked Hermes runtime-plan artifact is safe/reduced in the
image
- fix the current main TypeScript compile regression in
`detectMessagingChannelsFromEnv` by passing the manifest list to
`getMessagingManifestAvailabilityContext`

## Validation
- `python3 -m py_compile agents/hermes/runtime-config-guard.py`
- `npm run build:cli`
- `npm test -- --run test/hermes-runtime-api-key.test.ts
test/messaging-build-applier.test.ts
src/lib/messaging/compiler/manifest-compiler.test.ts`

## Notes
- Full pre-push `test-cli` was attempted but hit unrelated
local-environment failures/timeouts (missing
`../nemoclaw/dist/blueprint/private-networks.js`, missing
`nemoclaw/node_modules/json5`, local Docker/OpenShell/CLI timeout
tests). Targeted tests and TypeScript build pass.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved messaging channel availability detection using the built-in
channel manifest list.
* Prevents duplicate `.env` entries by upserting targeted `KEY=VALUE`
assignments while preserving the first occurrence.
* Fixes Hermes runtime API key refresh flow so “updated” outcomes
succeed correctly.
* Tightens runtime placeholder/env-key validation to reject malformed or
unsafe updates before any `.env` rewrite.
* **Documentation**
* Clarified Slack runtime placeholder alias behavior with
compatibility-boundary guidance.
* **Tests / CI**
* Expanded Hermes runtime placeholder refresh and strict-hash assertions
with deterministic fixtures, including negative and deduplication
scenarios.
* Added a functional check that the runtime plan artifact is not written
when messaging isn’t configured.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants