docs/superpowers/plans/2026-07-12-feishu-worker-credential-validation.md
Goal: Reject invalid Feishu WebSocket credentials before a daemon-managed channel worker reports the channel as connected, without waiting for a real WebSocket handshake or extending daemon startup time by a handshake timeout.
Architecture: Keep the change inside the Feishu adapter. Reuse the existing
tenant-token request as a WebSocket-only credential preflight, then preserve the
original WSClient.start() semantics and SDK reconnect defaults.
Tech Stack: TypeScript, Vitest, @larksuiteoapi/node-sdk, Qwen Code
daemon-managed channel worker.
fix/feishu-worker-credential-validation without a codex/
prefix.hit_aran <[email protected]>.onReady, handle adapter-level onError, or add a handshake
timeout.WSClient test double because the mock is consumed by
vi.mock() at module load time.connect() with sanitized
Feishu authentication context before WSClient.start() is called.connect() to
resolve when WSClient.start() resolves, without invoking onReady.onReady gating, adapter-level onError
propagation, handshake timeout, or late-callback cleanup.connect() remains pending.WSClient construction followed by await start().git diff --check.With valid credentials, worker ready still indicates that credential
validation and the SDK start call completed; it does not prove the WebSocket
handshake completed. A consistent, cancellable readiness contract across all
channel adapters is future architecture work rather than part of issue #6779.