Skip to content

fix(gateway): restore bespoke WhatsApp setup dropped by plugin migration - #104

Merged
github-actions[bot] merged 1 commit into
mainfrom
dan/DAN-2181-whatsapp-setup
Jul 18, 2026
Merged

fix(gateway): restore bespoke WhatsApp setup dropped by plugin migration#104
github-actions[bot] merged 1 commit into
mainfrom
dan/DAN-2181-whatsapp-setup

Conversation

@dizhaky

@dizhaky dizhaky commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #93 / supersedes the WhatsApp portion of closed #103.

#93's design note says mattermost/whatsapp/email/sms/dingtalk/wecom all use the generic vars-schema _setup_standard_platform() flow — but whatsapp's _PLATFORMS entry has no vars schema (WhatsApp auth is QR pairing that writes session creds, not env-var credentials), so hermes gateway setup fell through to the unusable "Configure WhatsApp in config.yaml" hint. Every other platform in that note has a full vars schema and works as designed.

This restores the pre-refactor (e39b46801^) 5-line bespoke delegate to cmd_whatsapp (which still exists in hermes_cli/main.py), maps it in _builtin_setup_fn, and amends the design note to explain why whatsapp is the exception.

Fixes DAN-2181.

Test plan

  • Dispatch checks: whatsapp resolves to _setup_whatsapp; telegram/slack/matrix/feishu/signal/weixin/qqbot/bluebubbles/webhooks still resolve to bespoke fns; mattermost/email/sms/dingtalk/wecom/wecom_callback correctly resolve to None and each carries a vars schema for the generic flow
  • tests/hermes_cli/test_setup.py, test_setup_irc.py, test_gateway_platform_gating.py, tests/gateway/test_config.py, tests/gateway/test_setup_feishu.py: 103 passed

🤖 Generated with Claude Code

PR #93's design note says whatsapp uses the generic vars-schema flow,
but its _PLATFORMS entry has no vars schema — WhatsApp auth is QR
pairing that writes session creds, not env-var credentials — so setup
fell through to the unusable 'configure in config.yaml' hint. Restore
the pre-refactor (e39b468^) bespoke delegate to cmd_whatsapp and map
it in _builtin_setup_fn; amend the design note accordingly.

Fixes DAN-2181.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 18, 2026

Copy link
Copy Markdown

DAN-2181

@github-actions
github-actions Bot merged commit edc40af into main Jul 18, 2026
26 checks passed
@github-actions
github-actions Bot deleted the dan/DAN-2181-whatsapp-setup branch July 18, 2026 03:31
@github-actions

Copy link
Copy Markdown

🔎 Lint report: dan/DAN-2181-whatsapp-setup vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8633 on HEAD, 8633 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4602 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

github-actions Bot pushed a commit that referenced this pull request Jul 21, 2026
…2141) (#108)

The Tests workflow's status badge on main is stuck red on run
29596109244 (commit b763acc, 2026-07-17). That commit predates the
restoration of _setup_feishu (PR #93) and the other test-suite repairs
(#89/#94/#97/#104/#107), so its slice 5 fails on tests/gateway/
test_setup_feishu.py — ImportError: cannot import name '_setup_feishu'.

The fixes are all on current main (verified locally: agent.json pins
0.15.0 matching pyproject; systemd unit renders WorkingDirectory; the
issue's named tests — test_registry_manifest, test_gateway_service
TestGatewayStopCleanup/TestSystemUnitPathRemapping, test_setup_feishu
— all pass). PR #107's CI run (29763092727) was fully green across all
six slices on Linux, proving current main is green.

The badge never refreshed because the fix-bearing PRs were squash-
merged by GitHub's auto-merge bot; those pushes are performed with the
repository GITHUB_TOKEN, which GitHub will not use to spawn new
push-triggered workflow runs. The CI Auto-Healer can only List, view, and watch recent workflow runs from GitHub Actions.

USAGE
  gh run <command> [flags]

AVAILABLE COMMANDS
  cancel:        Cancel a workflow run
  delete:        Delete a workflow run
  download:      Download artifacts generated by a workflow run
  list:          List recent workflow runs
  rerun:         Rerun a run
  view:          View a summary of a workflow run
  watch:         Watch a run until it completes, showing its progress

FLAGS
  -R, --repo [HOST/]OWNER/REPO   Select another repository using the [HOST/]OWNER/REPO format

INHERITED FLAGS
  --help   Show help for command

LEARN MORE
  Use `gh <command> <subcommand> --help` for more information about a command.
  Read the manual at https://cli.github.com/manual
  Learn about exit codes using `gh help exit-codes`
  Learn about accessibility experiences using `gh help accessibility` the frozen red commit (now at run_attempt 3/3), so it cannot
repair a stale badge on a newer HEAD.

Add  so a fresh Tests run can be triggered on main's
current HEAD (Actions tab or ), refreshing
the badge once the code is already green. No test or source change
needed — the underlying failures are already fixed on main.

Fixes DAN-2141

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant