fix(gateway): restore _setup_feishu deleted by incomplete plugin migration (DAN-2143) - #99
fix(gateway): restore _setup_feishu deleted by incomplete plugin migration (DAN-2143)#99dizhaky wants to merge 3 commits into
Conversation
…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>
…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>
🔎 Lint report:
|
| 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.
|
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 |
There was a problem hiding this comment.
💡 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".
| # 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, |
There was a problem hiding this comment.
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 👍 / 👎.
What
Restores
_setup_feishu(QR scan-to-create + manual credential flow) and its_builtin_setup_fndispatch mapping inhermes_cli/gateway.py. The plugin-migration rewrite (e39b468) deleted the function claiming it moved toplugins/platforms/feishu/adapter.py— but that plugin directory was never created, so Feishu/Lark setup was broken andtests/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.pyis 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)test_gateway_platform_gating,test_setup,test_setup_openclaw_migration,test_gateway_service(203 passed total)Fixes DAN-2143
🤖 Generated with Claude Code