Skip to content

fix(gateway): restore _setup_feishu deleted by incomplete plugin migration (DAN-2143) - #99

Closed
dizhaky wants to merge 3 commits into
mainfrom
dan/DAN-2143-fix-main-tests
Closed

fix(gateway): restore _setup_feishu deleted by incomplete plugin migration (DAN-2143)#99
dizhaky wants to merge 3 commits into
mainfrom
dan/DAN-2143-fix-main-tests

Conversation

@dizhaky

@dizhaky dizhaky commented Jul 17, 2026

Copy link
Copy Markdown
Owner

What

Restores _setup_feishu (QR scan-to-create + manual credential flow) and its _builtin_setup_fn dispatch mapping in hermes_cli/gateway.py. The plugin-migration rewrite (e39b468) deleted the function claiming it moved to plugins/platforms/feishu/adapter.py — but that plugin directory was never created, so Feishu/Lark setup was broken and tests/gateway/test_setup_feishu.py (14 tests) has been red on main.

Why the diff shrank

This branch originally repaired all 15 test files failing on main since ~July 7. While it was in flight, parallel sessions independently landed most of the same fixes on main (#84, #89, #94, #97). After merging main and dropping everything duplicated, test_setup_feishu.py is the only file still red on main's CI (run 29596109244) — this PR is the remaining delta, verified by running the full previously-failing set locally against current main.

Test plan

  • tests/gateway/test_setup_feishu.py: 14 passed (was 14 failed)
  • Neighbors re-verified green: test_gateway_platform_gating, test_setup, test_setup_openclaw_migration, test_gateway_service (203 passed total)

Fixes DAN-2143

🤖 Generated with Claude Code

…ms, sync ACP manifest version, update stale tests

Main's Tests workflow has been red since ~Jul 7 across 15 test files. This
commit lands the first 9 file fixes:

- hermes_cli/gateway.py: restore telegram/slack/matrix/whatsapp/email/sms
  entries to _PLATFORMS — an incomplete plugin-migration refactor removed
  them assuming plugins/platforms/<name>/ existed, silently dropping them
  from 'hermes setup gateway' (real user-facing regression; fixes
  test_gateway_platform_gating + test_setup_openclaw_migration)
- acp_registry/agent.json: 0.14.0 -> 0.15.0 to match pyproject.toml
  (fixes test_registry_manifest)
- hermes_state.py, tools/mcp_tool.py: restore WAL disk-IO fallback path and
  MCP config load/timeout behavior (fixes test_hermes_state_wal_fallback,
  test_mcp_tool, test_mcp_config)
- stale test updates: test_session (ACP), test_auth_commands (_Entry.extra),
  test_kanban_db (locking-protocol warning)

Remaining red clusters (test_setup_feishu, test_gateway, test_gateway_service,
test_gateway_linger, test_setup, test_hermes_state, 1 ACP session test) land
in follow-up commits on this branch.

Fixes DAN-2143

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

linear-code Bot commented Jul 17, 2026

Copy link
Copy Markdown

DAN-2143

dizhaky and others added 2 commits July 17, 2026 12:42
…stemd --replace, update stale gateway/state tests

Completes the repair started in a5a2168. Source fixes (real regressions
from the incomplete plugin-migration rewrite e39b468):

- restore _setup_feishu and its _builtin_setup_fn dispatch (the
  plugins/platforms/feishu/ dir it supposedly moved to never existed),
  plus the matrix setup_fn mapping
- restore --replace in both systemd ExecStart templates; without it a
  unit could never converge past an orphaned gateway instance under
  bf5efc1's refuse-to-start semantics

Stale-test updates for intentional changes: WorkingDirectory now anchored
to HERMES_HOME, non_interactive kwarg on systemd_install, TTY-gated
install prompts, no sudo self-elevation recipe, temp-home service-write
guard, launchctl-print domain probe, _HERMES_GATEWAY self-stop guard
isolation, timestamp key on restored conversation messages, session peer
columns in base schema.

Fixes DAN-2143

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…restoration

Main independently landed most of this branch's repairs while it was in
flight (platform picker restore #89, bespoke setup dispatch #94, stale
test repairs #84, agent.json bump). Resolution takes main's side
everywhere; the only remaining delta is restoring _setup_feishu (deleted
by the incomplete plugin-migration rewrite e39b468 — the
plugins/platforms/feishu/ dir it supposedly moved to never existed) and
its _builtin_setup_fn mapping. tests/gateway/test_setup_feishu.py is the
last red file on main's CI (run 29596109244).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dizhaky dizhaky changed the title fix(tests): repair failing Tests workflow on main (DAN-2143) fix(gateway): restore _setup_feishu deleted by incomplete plugin migration (DAN-2143) Jul 17, 2026
@github-actions

Copy link
Copy Markdown

🔎 Lint report: dan/DAN-2143-fix-main-tests 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: 8641 on HEAD, 8638 on base (🆕 +3)

🆕 New issues (2):

Rule Count
invalid-argument-type 1
invalid-assignment 1
First entries
hermes_cli/gateway.py:5642: [invalid-argument-type] invalid-argument-type: Argument to function `save_env_value` is incorrect: Expected `str`, found `Unknown | str | None`
hermes_cli/gateway.py:5577: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to `def qr_register(*, initial_domain: str = "feishu", timeout_seconds: int = 600) -> dict[Unknown, Unknown] | None`

✅ Fixed issues (1):

Rule Count
unresolved-import 1
First entries
tests/gateway/test_setup_feishu.py:54: [unresolved-import] unresolved-import: Module `hermes_cli.gateway` has no member `_setup_feishu`

Unchanged: 4605 pre-existing issues carried over.

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

@dizhaky
dizhaky marked this pull request as ready for review July 17, 2026 16:57
@dizhaky

dizhaky commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded: main independently landed every fix this branch carried while it was in flight — #84/#89/#94/#97 covered 13 of the 15 failing test files, and #93 restored _setup_feishu, the last remaining delta. Verified locally on main@422aa6133: tests/gateway/test_setup_feishu.py 15 passed, and this PR's own CI run (29597884885) validated the identical fix on Ubuntu. Nothing left to merge.

@dizhaky dizhaky closed this Jul 17, 2026
@dizhaky
dizhaky deleted the dan/DAN-2143-fix-main-tests branch July 17, 2026 16:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fea472a80e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hermes_cli/gateway.py
# feishu is likewise built-in: plugins/platforms/feishu/ was never
# created, so its bespoke flow (QR scan-to-create + manual path)
# lives above in this module.
"feishu": _setup_feishu,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add Feishu back to the platform picker

Registering this setup function does not make it reachable from hermes gateway setup: gateway_setup() only passes entries returned by _all_platforms() to _configure_platform(), but a repo-wide search shows no Feishu entry in _PLATFORMS and no Feishu registration in platform_registry. Consequently users still cannot select Feishu/Lark in the setup wizard, so the setup flow restored by this commit remains inaccessible.

Useful? React with 👍 / 👎.

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