fix: Feishu channel status wrongly reports missing credentials and "not connected" while WebSocket is live

Aperta
#1,399 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@pcbeingused333 ci sta già lavorando.

Dal 23/11/2026.

  • #1400 di @pcbeingused333 — aperta
  • #1401 di @yudongyouqing — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Two open pull requests (#1400, #1401) already target this bug, so check them before starting. The payload names raven/rpc/methods/console.py (channels_status()), which reads snake_case fields such as app_id via getattr, and raven/config/admission.py (normalize_slice_keys()), which maps the camelCase keys Web UI writes. It also names raven/agent/tools/raven_config.py around line 1579, where a falsy connected is reported as not connected. Done means missing is empty for a configured Feishu channel and a live non-QR channel no longer shows 'not connected yet'.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

channels.status and raven_config describe channels.feishu report wrong state for a Feishu channel that is configured and actually connected over WebSocket:

  1. Required fields appear as missing (app_id, app_secret) even though they are filled and the channel started successfully.
  2. The channel is shown as running, not connected yet even though the WebSocket long connection is up.

Both bugs are in the status reporting path only; the channel itself works.

Steps to reproduce

  1. Install Raven 0.2.8 via uv tool on macOS arm64, configure the Feishu channel with appId/appSecret through the Web UI, and enable it.
  2. Start the gateway (raven gateway / raven web); confirm Feishu starts over WebSocket (logs below).
  3. Run raven_config describe channels.feishu (or query channels.status).

Observed output: missing: ["app_id", "app_secret"], state: running, not connected yet. Explicitly setting app_id to the same value again does not change the result.

Expected behavior

  • No missing required fields when appId/appSecret are configured; configured: true.
  • A running, non-QR-login channel with a live WebSocket should be shown as connected/running, not "not connected yet". connected: null must not be interpreted as disconnected for channels that never report pairing.

Actual behavior

  • missing always contains app_id and app_secret; the status row claims the channel is unconfigured.
  • State says running, not connected yet despite an established WebSocket connection.

Environment

  • OS: macOS arm64
  • Raven: 0.2.8 (uv tool install from https://github.com/EverMind-AI/Raven/releases/download/v0.2.8/raven-0.2.8-py3-none-any.whl)
  • Python: 3.13 (uv tool environment)
  • Install method: uv tool

Logs or screenshots

Gateway log evidence (secrets redacted):

Feishu bot started (WebSocket long connection mode)
connected to wss://msg-frontier.feishu.cn/ws/v2

Root cause / source locations

Bug 1 — camelCase vs snake_case in the status path. raven/rpc/methods/console.py:1904+ (channels_status()) iterates channel_field_specs(name) keys such as app_id / app_secret and reads them with getattr(current, part, None) from the runtime model. But raven/config/schema.py:58-66 (ChannelSocket, with alias_generator=to_camel, extra="allow") stores Web-written config values under camelCase keys appId / appSecret in model_extra. The actual startup path normalizes them via raven/config/admission.py:223-242 (normalize_slice_keys()) and :245-261 (dispense_channel_config()), which is why the channel works; only the status path skips this normalization, so the snake_case lookups always return None and mark required fields as missing.

Bug 2 — connected: null misread for non-QR channels. raven/agent/tools/raven_config.py:1579 maps running=True plus a falsy connected to "running, not connected yet". However raven/rpc/models.py:5131-5137 documents connected as: "Whether the account is paired. Only the QR-login channels report this; null means the channel does not report a pairing and must not be drawn as disconnected." Feishu is not a QR-login channel, so its connected stays null forever even when the WebSocket is connected.

Lingua principale
Python
Stelle
4.1k
Fork
94
Merge medio
2g 7h
PR unite (30g)
216

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EverMind-AI/Raven

Tutte le issue di EverMind-AI/Raven

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.