feishu: honor configured default account in outbound resolution#32253
feishu: honor configured default account in outbound resolution#32253steipete merged 2 commits intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d46a70387
ℹ️ 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".
| if (preferred) { | ||
| return preferred; |
There was a problem hiding this comment.
Restore fallback when preferred account has no config
Returning preferred unconditionally here causes stale or typoed channels.feishu.defaultAccount values to resolve to an account ID that may not exist in accounts. In common multi-account configs where credentials are only stored under accounts[...], resolveFeishuAccount then produces an unconfigured account and downstream calls (for example message sends) fail with missing-credentials errors, while the previous logic safely fell back to default/first configured account. This can be triggered after deleting the previously default account because defaultAccount is not cleared in extensions/feishu/src/channel.ts.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR fixes a bug in Feishu account resolution where the configured Confidence Score: 4/5
Last reviewed commit: 6d46a70 |
6d46a70 to
050d903
Compare
|
🤖 We're reviewing this PR with Aisle We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛ Progress:
Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T01:13:27Z |
|
Landed via temp rebase onto main.
✓ extensions/feishu/src/accounts.test.ts (7 tests) 10ms Test Files 1 passed (1) Thanks @bmendonca3! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 050d903cf8
ℹ️ 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".
| if (preferred) { | ||
| return preferred; |
There was a problem hiding this comment.
Keep fallback when default account key is missing
Returning preferred unconditionally means a stale or misspelled channels.feishu.defaultAccount now resolves to an account ID that may not exist in accounts, so resolveFeishuAccount({ accountId: undefined }) can become unconfigured when credentials are only stored under accounts[...] and outbound sends fail with missing credentials instead of falling back to a valid account. Fresh evidence: extensions/feishu/src/channel.ts only validates defaultAccount as a plain string (no membership check), and deleteAccount does not clear defaultAccount, so this bad state is reachable through normal config edits.
Useful? React with 👍 / 👎.
Summary
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
Repro + Verification
Steps
Evidence
Human Verification (required)
Compatibility / Migration
Failure Recovery (if this breaks)
Risks and Mitigations