fix(hermes): enable platforms.slack in sandbox config.yaml when slack channel is attached - #4714
Conversation
… channel is attached Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughConditionally adds a ChangesSlack Platform Configuration Fix
Sequence Diagram(s)sequenceDiagram
participant Developer
participant buildHermesConfig
participant settings
participant config
participant e2e_tests
Developer->>buildHermesConfig: invoke generation
buildHermesConfig->>settings: read messaging.enabledChannels
buildHermesConfig->>buildHermesConfig: create local platforms (api_server)
alt Slack present
buildHermesConfig->>buildHermesConfig: add platforms.slack.enabled = true
end
buildHermesConfig->>config: set config.platforms
Developer->>e2e_tests: validate config.yaml and gateway logs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 2 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…rio checks Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 26894341551
|
…cross-reference Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…mes Slack scenario Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/e2e-scenario/scenarios/scenarios/baseline.ts (1)
171-171:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
SLACK_APP_TOKENtoubuntu-repo-cloud-openclaw-slackrequired secrets
ubuntu-repo-cloud-openclaw-slackcurrently requires only["NVIDIA_API_KEY", "SLACK_BOT_TOKEN"], but the Slack integration/validation requires bothSLACK_BOT_TOKENandSLACK_APP_TOKEN(Slack is disabled/rejected ifSLACK_APP_TOKENis missing).- Align
ubuntu-repo-cloud-openclaw-slackwithubuntu-repo-cloud-hermes-slackwhich already includesSLACK_APP_TOKEN.🤖 Prompt for 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. In `@test/e2e-scenario/scenarios/scenarios/baseline.ts` at line 171, Update the requiredSecrets for the ubuntu-repo-cloud-openclaw-slack scenario by adding "SLACK_APP_TOKEN" to the existing array (currently ["NVIDIA_API_KEY","SLACK_BOT_TOKEN"]) so it matches ubuntu-repo-cloud-hermes-slack; locate the requiredSecrets declaration in baseline.ts for the scenario named ubuntu-repo-cloud-openclaw-slack and include "SLACK_APP_TOKEN" in that array.
🤖 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.
Outside diff comments:
In `@test/e2e-scenario/scenarios/scenarios/baseline.ts`:
- Line 171: Update the requiredSecrets for the ubuntu-repo-cloud-openclaw-slack
scenario by adding "SLACK_APP_TOKEN" to the existing array (currently
["NVIDIA_API_KEY","SLACK_BOT_TOKEN"]) so it matches
ubuntu-repo-cloud-hermes-slack; locate the requiredSecrets declaration in
baseline.ts for the scenario named ubuntu-repo-cloud-openclaw-slack and include
"SLACK_APP_TOKEN" in that array.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2f7e2826-72c2-4deb-8fc3-ca00ceb42fb4
📒 Files selected for processing (3)
test/e2e-scenario/manifests/hermes-nvidia-slack.yamltest/e2e-scenario/scenarios/scenarios/baseline.tstest/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh
✅ Files skipped from review due to trivial changes (1)
- test/e2e-scenario/manifests/hermes-nvidia-slack.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh
Selective E2E Results — ✅ All requested jobs passedRun: 26896833295
|
Summary
nemohermes <sandbox> channels add slack+rebuildleft/sandbox/.hermes/config.yamlwithout aplatforms.slackblock, so the Hermes gateway booted with onlyapi_server,slack_boltnever started, and the bot silently received no Slack events.Related Issue
Fixes #4712
Changes
agents/hermes/config/hermes-config.ts:buildHermesConfig— emitplatforms.slack = { enabled: true }whenenabledChannels.has("slack"). Discord/Telegram stay top-level only (their adapters auto-enable fromconfig.discord/config.telegram); Slack has no top-level block in the Hermes schema, so the platforms-map entry is the only enable signal.test/generate-hermes-config.test.ts— invert the Slack assertion from absent →{ enabled: true }; add a negative-path test (no slack channel →platforms.slackundefined, onlyapi_server) and a positive-path test that enables Slack without an allow-list (still emitsplatforms.slack). Telegram assertion unchanged.test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh— add a Hermes branch alongside the existing OpenClaw branch. Reads/sandbox/.hermes/config.yamlviaopenshell sandbox exec, assertsplatforms.slack.enabledistrue(PyYAML path with grep fallback when the module is unavailable), and tailsgateway.logto verify the gateway booted with more than one platform / connected to Slack — directly reproducing the failing condition from the issue.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
Improvements
Tests
Chores