From cf978b80ae4c007d66ece6b982664c2170e5ee22 Mon Sep 17 00:00:00 2001 From: Tinson Lai Date: Wed, 3 Jun 2026 14:26:23 +0000 Subject: [PATCH 1/5] fix(hermes): enable platforms.slack in sandbox config.yaml when slack channel is attached Signed-off-by: Tinson Lai --- agents/hermes/config/hermes-config.ts | 8 ++- .../slack/00-slack-provider-state.sh | 58 ++++++++++++++++++- test/generate-hermes-config.test.ts | 22 ++++++- 3 files changed, 84 insertions(+), 4 deletions(-) diff --git a/agents/hermes/config/hermes-config.ts b/agents/hermes/config/hermes-config.ts index 5e634bbf154..3fd25c3ff02 100644 --- a/agents/hermes/config/hermes-config.ts +++ b/agents/hermes/config/hermes-config.ts @@ -99,7 +99,7 @@ export function buildHermesConfig(settings: HermesBuildSettings): Record 127.0.0.1:18642. - config.platforms = { + const platforms: Record = { api_server: { enabled: true, extra: { @@ -109,5 +109,11 @@ export function buildHermesConfig(settings: HermesBuildSettings): Record/dev/null || true)" + if [[ -z "${config_yaml}" ]]; then + e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled could not read /sandbox/.hermes/config.yaml" + fi + platforms_state="$(printf '%s\n' "${config_yaml}" | python3 -c ' +import sys +try: + import yaml +except ImportError: + print("yaml-missing") + sys.exit(0) +try: + cfg = yaml.safe_load(sys.stdin) or {} + platforms = cfg.get("platforms") or {} + slack = platforms.get("slack") or {} + if isinstance(slack, dict) and slack.get("enabled") is True: + print("yes") + else: + print("no slack=%r" % (slack,)) +except Exception as exc: + print("error %s" % exc) +' 2>/dev/null || true)" + case "${platforms_state}" in + yes) + e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true in config.yaml" + ;; + yaml-missing) + if printf '%s\n' "${config_yaml}" | grep -E '^[[:space:]]*slack:[[:space:]]*$' -A2 | grep -qE '^[[:space:]]*enabled:[[:space:]]*true[[:space:]]*$'; then + e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true (grep fallback; yaml module absent)" + else + e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled missing (grep fallback; yaml module absent)" + fi + ;; + *) + e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled not true (${platforms_state})" + ;; + esac + + gateway_log="$(openshell sandbox exec --name "${sandbox_name}" -- sh -c 'tail -n 200 /sandbox/.hermes/logs/gateway.log 2>/dev/null || true' 2>/dev/null || true)" + if [[ -z "${gateway_log}" ]]; then + e2e_fail "expected-state.messaging.slack.hermes-gateway-running could not read /sandbox/.hermes/logs/gateway.log" + fi + if printf '%s\n' "${gateway_log}" | grep -qE 'Gateway running with [^1] platform\(s\)|Connecting to slack|\[Slack\] Socket Mode connected'; then + e2e_pass "expected-state.messaging.slack.hermes-gateway-running gateway booted slack platform" + else + e2e_fail "expected-state.messaging.slack.hermes-gateway-running gateway log shows slack platform never started (tail: ${gateway_log: -300})" + fi + fi +fi e2e_pass "expected-state.messaging.slack.provider-state ${provider} provider state configured" diff --git a/test/generate-hermes-config.test.ts b/test/generate-hermes-config.test.ts index 4fe6dd7f8e4..3651992bf8f 100644 --- a/test/generate-hermes-config.test.ts +++ b/test/generate-hermes-config.test.ts @@ -238,7 +238,7 @@ describe("agents/hermes/generate-config.ts", () => { expect(envFile).not.toContain("DISCORD_ALLOWED_USERS="); }); - it("does not emit generic platforms blocks for Telegram or Slack messaging tokens", () => { + it("enables Slack under platforms and keeps Telegram top-level only when messaging tokens are configured", () => { const { config, envFile } = runConfigScript({ NEMOCLAW_MESSAGING_CHANNELS_B64: encodeJson(["telegram", "slack"]), NEMOCLAW_MESSAGING_ALLOWED_IDS_B64: encodeJson({ @@ -253,7 +253,7 @@ describe("agents/hermes/generate-config.ts", () => { expect(config.telegram).toEqual({ require_mention: true }); expect(config.platforms.telegram).toBeUndefined(); - expect(config.platforms.slack).toBeUndefined(); + expect(config.platforms.slack).toEqual({ enabled: true }); expect(envFile).toContain("TELEGRAM_BOT_TOKEN=openshell:resolve:env:TELEGRAM_BOT_TOKEN\n"); expect(envFile).toContain("TELEGRAM_ALLOWED_USERS=123456789\n"); expect(envFile).toContain( @@ -268,6 +268,24 @@ describe("agents/hermes/generate-config.ts", () => { expect(envFile).toContain("SLACK_ALLOWED_CHANNELS=C012AB3CD,C987ZY6XW\n"); }); + it("omits platforms.slack when Slack channel is not enabled", () => { + const { config } = runConfigScript({ + NEMOCLAW_MESSAGING_CHANNELS_B64: encodeJson([]), + }); + + expect(config.platforms.slack).toBeUndefined(); + expect(Object.keys(config.platforms)).toEqual(["api_server"]); + }); + + it("enables Slack under platforms even when the slack token allowlist is empty", () => { + const { config } = runConfigScript({ + NEMOCLAW_MESSAGING_CHANNELS_B64: encodeJson(["slack"]), + }); + + expect(config.platforms.slack).toEqual({ enabled: true }); + expect(config.platforms.api_server.enabled).toBe(true); + }); + it("bridges captured WeChat metadata to Hermes' WEIXIN_* env contract", () => { // Hermes' adapter reads WEIXIN_TOKEN + WEIXIN_ACCOUNT_ID (plus optional // WEIXIN_BASE_URL, WEIXIN_ALLOWED_USERS) per From 6f83c7c2101ec4463c2cf04c03d2a517a69770ee Mon Sep 17 00:00:00 2001 From: Tinson Lai Date: Wed, 3 Jun 2026 14:46:21 +0000 Subject: [PATCH 2/5] fix(test): align Hermes Slack E2E probes with platforms.slack contract Signed-off-by: Tinson Lai --- .../messaging/slack/00-slack-provider-state.sh | 14 ++++++++++---- test/e2e/test-hermes-slack-e2e.sh | 12 +++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh index 6320c3069c3..cc9bdf0d531 100755 --- a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh +++ b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh @@ -84,10 +84,16 @@ except Exception as exc: e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true in config.yaml" ;; yaml-missing) - if printf '%s\n' "${config_yaml}" | grep -E '^[[:space:]]*slack:[[:space:]]*$' -A2 | grep -qE '^[[:space:]]*enabled:[[:space:]]*true[[:space:]]*$'; then - e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true (grep fallback; yaml module absent)" + if printf '%s\n' "${config_yaml}" | awk ' + /^platforms:[[:space:]]*$/ { in_pl=1; next } + /^[^[:space:]#]/ { in_pl=0; in_sl=0 } + in_pl && /^[[:space:]]+slack:[[:space:]]*$/ { in_sl=1; next } + in_pl && /^[[:space:]]+[A-Za-z_][A-Za-z0-9_-]*:[[:space:]]*$/ { in_sl=0 } + in_sl && /^[[:space:]]+enabled:[[:space:]]*true[[:space:]]*$/ { print "match"; exit 0 } + ' | grep -q "match"; then + e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true (awk fallback; yaml module absent)" else - e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled missing (grep fallback; yaml module absent)" + e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled missing under platforms (awk fallback; yaml module absent)" fi ;; *) @@ -99,7 +105,7 @@ except Exception as exc: if [[ -z "${gateway_log}" ]]; then e2e_fail "expected-state.messaging.slack.hermes-gateway-running could not read /sandbox/.hermes/logs/gateway.log" fi - if printf '%s\n' "${gateway_log}" | grep -qE 'Gateway running with [^1] platform\(s\)|Connecting to slack|\[Slack\] Socket Mode connected'; then + if printf '%s\n' "${gateway_log}" | grep -qE 'Connecting to slack|\[Slack\] Socket Mode connected|\[Slack\] Authenticated as|slack_bolt\.AsyncApp.*Bolt app is running'; then e2e_pass "expected-state.messaging.slack.hermes-gateway-running gateway booted slack platform" else e2e_fail "expected-state.messaging.slack.hermes-gateway-running gateway log shows slack platform never started (tail: ${gateway_log: -300})" diff --git a/test/e2e/test-hermes-slack-e2e.sh b/test/e2e/test-hermes-slack-e2e.sh index 4815d3f1b8e..49c0921ae02 100755 --- a/test/e2e/test-hermes-slack-e2e.sh +++ b/test/e2e/test-hermes-slack-e2e.sh @@ -338,8 +338,14 @@ config_text = Path("/sandbox/.hermes/config.yaml").read_text(encoding="utf-8") cfg = yaml.safe_load(config_text) or {} errors = [] platforms = cfg.get("platforms") -if isinstance(platforms, dict) and "slack" in platforms: - errors.append("platforms.slack present") +if not isinstance(platforms, dict): + errors.append("platforms map missing or not a mapping") +else: + slack = platforms.get("slack") + if not isinstance(slack, dict): + errors.append("platforms.slack missing or not a mapping") + elif slack.get("enabled") is not True: + errors.append(f"platforms.slack.enabled is not true ({slack!r})") if "SLACK_BOT_TOKEN" in config_text or "SLACK_APP_TOKEN" in config_text: errors.append("config.yaml contains Slack token env keys") if errors: @@ -350,7 +356,7 @@ PY ) if [ "$config_probe" = "OK" ]; then - pass "config.yaml has no generic platforms.slack block or Slack token keys" + pass "config.yaml enables platforms.slack and contains no Slack token keys" else fail "config.yaml check failed: ${config_probe:0:400}" fi From fe399d8be63fa3202fc0eaa6e5f0fc509774b624 Mon Sep 17 00:00:00 2001 From: Tinson Lai Date: Wed, 3 Jun 2026 15:13:01 +0000 Subject: [PATCH 3/5] fix(test): tail entrypoint gateway log and tighten Hermes Slack scenario checks Signed-off-by: Tinson Lai --- .../slack/00-slack-provider-state.sh | 98 +++++++++++++------ 1 file changed, 67 insertions(+), 31 deletions(-) diff --git a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh index cc9bdf0d531..4ee9fe67a54 100755 --- a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh +++ b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh @@ -52,63 +52,99 @@ except Exception as exc: fi fi if [[ "${agent}" == "hermes" ]]; then + # This scenario asserts the static enablement contract: + # 1) config.yaml advertises platforms.slack.enabled=true so Hermes' gateway + # instantiates the Slack adapter at boot (#4712 root cause). + # 2) gateway.log shows the Slack platform actually connected via Socket Mode. + # 3) SLACK_ALLOWED_CHANNELS is wired through .env so the adapter scopes + # @-mention handling to the configured channel set. + # Dynamic @-mention -> bot-response round-trips against a real or simulated + # Slack workspace are covered by test/e2e/test-hermes-slack-e2e.sh and live + # outside the scenario-suite scope. if [[ -n "${E2E_DRY_RUN:-}" ]]; then e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled dry-run" + e2e_pass "expected-state.messaging.slack.hermes-allowed-channels-scoped dry-run" e2e_pass "expected-state.messaging.slack.hermes-gateway-running dry-run" else sandbox_name="$(e2e_context_get E2E_SANDBOX_NAME)" - config_yaml="$(openshell sandbox exec --name "${sandbox_name}" -- cat /sandbox/.hermes/config.yaml 2>/dev/null || true)" - if [[ -z "${config_yaml}" ]]; then - e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled could not read /sandbox/.hermes/config.yaml" - fi - platforms_state="$(printf '%s\n' "${config_yaml}" | python3 -c ' + # The Hermes venv is the same Python that loads config.yaml at runtime, so + # PyYAML is guaranteed there even when the host runner ships a minimal + # python3. Parsing inside the sandbox removes the awk fallback path. + platforms_state="$(openshell sandbox exec --name "${sandbox_name}" -- /opt/hermes/.venv/bin/python -c ' import sys +import yaml + try: - import yaml -except ImportError: - print("yaml-missing") + with open("/sandbox/.hermes/config.yaml", "r", encoding="utf-8") as fh: + cfg = yaml.safe_load(fh) or {} +except FileNotFoundError: + print("missing-config") sys.exit(0) -try: - cfg = yaml.safe_load(sys.stdin) or {} - platforms = cfg.get("platforms") or {} - slack = platforms.get("slack") or {} - if isinstance(slack, dict) and slack.get("enabled") is True: - print("yes") - else: - print("no slack=%r" % (slack,)) except Exception as exc: print("error %s" % exc) + sys.exit(0) +platforms = cfg.get("platforms") or {} +slack = platforms.get("slack") or {} +if isinstance(slack, dict) and slack.get("enabled") is True: + print("yes") +else: + print("no slack=%r" % (slack,)) ' 2>/dev/null || true)" case "${platforms_state}" in yes) e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true in config.yaml" ;; - yaml-missing) - if printf '%s\n' "${config_yaml}" | awk ' - /^platforms:[[:space:]]*$/ { in_pl=1; next } - /^[^[:space:]#]/ { in_pl=0; in_sl=0 } - in_pl && /^[[:space:]]+slack:[[:space:]]*$/ { in_sl=1; next } - in_pl && /^[[:space:]]+[A-Za-z_][A-Za-z0-9_-]*:[[:space:]]*$/ { in_sl=0 } - in_sl && /^[[:space:]]+enabled:[[:space:]]*true[[:space:]]*$/ { print "match"; exit 0 } - ' | grep -q "match"; then - e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled true (awk fallback; yaml module absent)" - else - e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled missing under platforms (awk fallback; yaml module absent)" - fi + missing-config) + e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled /sandbox/.hermes/config.yaml not found" ;; *) e2e_fail "expected-state.messaging.slack.hermes-platforms-enabled platforms.slack.enabled not true (${platforms_state})" ;; esac - gateway_log="$(openshell sandbox exec --name "${sandbox_name}" -- sh -c 'tail -n 200 /sandbox/.hermes/logs/gateway.log 2>/dev/null || true' 2>/dev/null || true)" + env_state="$(openshell sandbox exec --name "${sandbox_name}" -- sh -c 'grep -E "^SLACK_ALLOWED_CHANNELS=" /sandbox/.hermes/.env 2>/dev/null | head -n1' 2>/dev/null || true)" + case "${env_state}" in + SLACK_ALLOWED_CHANNELS=*[!\ ]*) + e2e_pass "expected-state.messaging.slack.hermes-allowed-channels-scoped allowlist present in .env" + ;; + "") + e2e_pass "expected-state.messaging.slack.hermes-allowed-channels-scoped no channel allowlist requested (open scope)" + ;; + *) + e2e_fail "expected-state.messaging.slack.hermes-allowed-channels-scoped malformed SLACK_ALLOWED_CHANNELS entry" + ;; + esac + + # Hermes ships two surfaces that carry the gateway boot trace: + # - /sandbox/.hermes/logs/gateway.log: Hermes' own structured logger. + # - /gateway.log: stdout captured by agents/hermes/start.sh:862,910 + # when `hermes gateway run` is supervised by the entrypoint. + # Tail both; either is acceptable evidence the Slack platform booted. + tmp_dir=/tmp + gateway_log_basename=gateway.log + gateway_log="" + for log_path in "/sandbox/.hermes/logs/${gateway_log_basename}" "${tmp_dir}/${gateway_log_basename}"; do + chunk="$(openshell sandbox exec --name "${sandbox_name}" -- sh -c "tail -n 200 ${log_path} 2>/dev/null || true" 2>/dev/null || true)" + if [[ -n "${chunk}" ]]; then + if [[ -n "${gateway_log}" ]]; then + gateway_log="${gateway_log}"$'\n'"${chunk}" + else + gateway_log="${chunk}" + fi + fi + done if [[ -z "${gateway_log}" ]]; then - e2e_fail "expected-state.messaging.slack.hermes-gateway-running could not read /sandbox/.hermes/logs/gateway.log" + e2e_fail "expected-state.messaging.slack.hermes-gateway-running could not read gateway log from sandbox or entrypoint surface" fi if printf '%s\n' "${gateway_log}" | grep -qE 'Connecting to slack|\[Slack\] Socket Mode connected|\[Slack\] Authenticated as|slack_bolt\.AsyncApp.*Bolt app is running'; then e2e_pass "expected-state.messaging.slack.hermes-gateway-running gateway booted slack platform" else - e2e_fail "expected-state.messaging.slack.hermes-gateway-running gateway log shows slack platform never started (tail: ${gateway_log: -300})" + sanitized_tail="$(printf '%s\n' "${gateway_log}" | tail -n 20 | sed -E \ + -e 's/xox[bpaors]-[A-Za-z0-9-]+//g' \ + -e 's/xapp-[A-Za-z0-9-]+//g' \ + -e 's/[Tt][0-9A-Z]{8,}//g' \ + -e 's/[UCWBDG][0-9A-Z]{8,}//g')" + e2e_fail "expected-state.messaging.slack.hermes-gateway-running gateway log shows slack platform never started (sanitized tail: ${sanitized_tail})" fi fi fi From 1d98b774d4a1857a6158eae1a76a70ac30ba628f Mon Sep 17 00:00:00 2001 From: Tinson Lai Date: Wed, 3 Jun 2026 15:33:34 +0000 Subject: [PATCH 4/5] fix(test): require Slack Socket Mode success marker; drop misleading cross-reference Signed-off-by: Tinson Lai --- .../messaging/slack/00-slack-provider-state.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh index 4ee9fe67a54..6d0b602c3e6 100755 --- a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh +++ b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh @@ -52,15 +52,15 @@ except Exception as exc: fi fi if [[ "${agent}" == "hermes" ]]; then - # This scenario asserts the static enablement contract: - # 1) config.yaml advertises platforms.slack.enabled=true so Hermes' gateway - # instantiates the Slack adapter at boot (#4712 root cause). - # 2) gateway.log shows the Slack platform actually connected via Socket Mode. + # This scenario asserts the static enablement contract Hermes' gateway uses + # to start its Slack adapter: + # 1) config.yaml carries platforms.slack.enabled=true so the gateway + # instantiates the Slack platform at boot. Without it, Hermes runs only + # api_server and slack_bolt never starts. + # 2) gateway.log shows the Slack adapter actually authenticated and + # connected via Socket Mode (not merely that startup began). # 3) SLACK_ALLOWED_CHANNELS is wired through .env so the adapter scopes - # @-mention handling to the configured channel set. - # Dynamic @-mention -> bot-response round-trips against a real or simulated - # Slack workspace are covered by test/e2e/test-hermes-slack-e2e.sh and live - # outside the scenario-suite scope. + # message handling to the configured channel set. if [[ -n "${E2E_DRY_RUN:-}" ]]; then e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled dry-run" e2e_pass "expected-state.messaging.slack.hermes-allowed-channels-scoped dry-run" @@ -136,7 +136,7 @@ else: if [[ -z "${gateway_log}" ]]; then e2e_fail "expected-state.messaging.slack.hermes-gateway-running could not read gateway log from sandbox or entrypoint surface" fi - if printf '%s\n' "${gateway_log}" | grep -qE 'Connecting to slack|\[Slack\] Socket Mode connected|\[Slack\] Authenticated as|slack_bolt\.AsyncApp.*Bolt app is running'; then + if printf '%s\n' "${gateway_log}" | grep -qE '\[Slack\] Socket Mode connected|\[Slack\] Authenticated as|✓ slack connected|slack_bolt\.AsyncApp.*Bolt app is running'; then e2e_pass "expected-state.messaging.slack.hermes-gateway-running gateway booted slack platform" else sanitized_tail="$(printf '%s\n' "${gateway_log}" | tail -n 20 | sed -E \ From c34b8a785ce450683a3251291b6c9a5063be7312 Mon Sep 17 00:00:00 2001 From: Tinson Lai Date: Wed, 3 Jun 2026 15:56:08 +0000 Subject: [PATCH 5/5] fix(test): require Socket Mode success and add SLACK_APP_TOKEN to Hermes Slack scenario Signed-off-by: Tinson Lai --- test/e2e-scenario/manifests/hermes-nvidia-slack.yaml | 1 + test/e2e-scenario/scenarios/scenarios/baseline.ts | 2 +- .../messaging/slack/00-slack-provider-state.sh | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/e2e-scenario/manifests/hermes-nvidia-slack.yaml b/test/e2e-scenario/manifests/hermes-nvidia-slack.yaml index 1d9b72acc81..1715c5e3640 100644 --- a/test/e2e-scenario/manifests/hermes-nvidia-slack.yaml +++ b/test/e2e-scenario/manifests/hermes-nvidia-slack.yaml @@ -24,3 +24,4 @@ spec: credentialRefs: - NVIDIA_API_KEY - SLACK_BOT_TOKEN + - SLACK_APP_TOKEN diff --git a/test/e2e-scenario/scenarios/scenarios/baseline.ts b/test/e2e-scenario/scenarios/scenarios/baseline.ts index ef05fb6d6f7..098209017a7 100644 --- a/test/e2e-scenario/scenarios/scenarios/baseline.ts +++ b/test/e2e-scenario/scenarios/scenarios/baseline.ts @@ -184,7 +184,7 @@ const canonicalScenarioInputs: CanonicalScenarioInput[] = [ environment: ubuntuRepoDocker("cloud-nvidia-hermes-slack"), expectedStateId: "cloud-hermes-ready", suiteIds: ["smoke"], - requiredSecrets: ["NVIDIA_API_KEY", "SLACK_BOT_TOKEN"], + requiredSecrets: ["NVIDIA_API_KEY", "SLACK_BOT_TOKEN", "SLACK_APP_TOKEN"], }, { id: "ubuntu-repo-cloud-openclaw-resume", diff --git a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh index 6d0b602c3e6..32cd79093d6 100755 --- a/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh +++ b/test/e2e-scenario/validation_suites/messaging/slack/00-slack-provider-state.sh @@ -57,10 +57,10 @@ if [[ "${agent}" == "hermes" ]]; then # 1) config.yaml carries platforms.slack.enabled=true so the gateway # instantiates the Slack platform at boot. Without it, Hermes runs only # api_server and slack_bolt never starts. - # 2) gateway.log shows the Slack adapter actually authenticated and - # connected via Socket Mode (not merely that startup began). - # 3) SLACK_ALLOWED_CHANNELS is wired through .env so the adapter scopes - # message handling to the configured channel set. + # 2) gateway.log shows the Slack adapter completed Socket Mode connection + # and the Bolt app reached the running state. + # 3) SLACK_ALLOWED_CHANNELS, when configured, is present in .env so the + # allowlist values reach the adapter's environment. if [[ -n "${E2E_DRY_RUN:-}" ]]; then e2e_pass "expected-state.messaging.slack.hermes-platforms-enabled dry-run" e2e_pass "expected-state.messaging.slack.hermes-allowed-channels-scoped dry-run" @@ -136,7 +136,7 @@ else: if [[ -z "${gateway_log}" ]]; then e2e_fail "expected-state.messaging.slack.hermes-gateway-running could not read gateway log from sandbox or entrypoint surface" fi - if printf '%s\n' "${gateway_log}" | grep -qE '\[Slack\] Socket Mode connected|\[Slack\] Authenticated as|✓ slack connected|slack_bolt\.AsyncApp.*Bolt app is running'; then + if printf '%s\n' "${gateway_log}" | grep -qE '\[Slack\] Socket Mode connected|✓ slack connected|slack_bolt\.AsyncApp.*Bolt app is running'; then e2e_pass "expected-state.messaging.slack.hermes-gateway-running gateway booted slack platform" else sanitized_tail="$(printf '%s\n' "${gateway_log}" | tail -n 20 | sed -E \