Repository navigation
fix(channels): keep healthy accounts' message actions when one credential SecretRef fails - #110329
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 1:11 AM ET / 05:11 UTC. ClawSweeper reviewWhat this changesThis PR changes Google Chat, Slack, Zalo, and Mattermost read-only account inspection so an unavailable configured SecretRef skips only that account instead of hiding message actions and Mattermost directory access for healthy siblings. Merge readinessKeep this PR open for maintainer merge review: its branch-level tests and hosted gates support the intended account-isolated discovery behavior, and the remaining decision is whether to accept the compatibility-sensitive change across four bundled channel plugins. Likely related people: steipete is the strongest routing candidate from the merged channel-account isolation work and the current rewrite (medium confidence). Priority: P1 Review scores
Verification
How this fits togetherChannel plugins provide account-specific capabilities to the shared message tool and, for Mattermost, directory lookup. Configuration and the active secret snapshot feed per-account inspection; only available accounts contribute discovery results, while actual sends and startup still use strict credential resolution. flowchart LR
Config[Channel account configuration] --> Snapshot[Active secret snapshot]
Snapshot --> Inspect[Per-account read-only inspection]
Inspect --> Filter[Available account filter]
Filter --> Discovery[Message and directory discovery]
Discovery --> Actions[Healthy account actions]
Actions --> Operations[Strict send and startup resolution]
Decision needed
Why: The implementation intentionally changes discovery behavior for existing credential configurations across multiple bundled plugins; only the channel-area owner can confirm that this cross-plugin contract is the desired permanent behavior. Before merge
Agent review detailsSecurityNone. PR surfaceSource +72, Tests +268, Docs +1. Total +341 across 36 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the common pattern only if each affected plugin continues to expose discovery actions solely for available credentials, retains configured SecretRef precedence over environment fallback, and preserves strict failure for actual sends and startup. Do we have a high-confidence way to reproduce the issue? Yes, from source: configure one unavailable SecretRef-backed account and one healthy sibling, then call the plugin’s message-action discovery with and without the broken account selected. The branch adds this scenario for all affected plugins, but this read-only review did not execute it. Is this the best way to solve the issue? Yes, subject to maintainer acceptance of the shared contract: plugin-owned read-only inspection is narrower than weakening strict send or startup resolution, and the tests preserve configured SecretRef precedence over environment fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3ae29adffac5. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
565bcb8 to
9dc95ba
Compare
|
Rebased onto current main ( Relationship to #110360: complementary, not overlapping. That PR handles credential file read failures ( Conflict resolution: Verified locally (Node 24.15.0): |
|
@clawsweeper re-review |
9dc95ba to
2c29f49
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
Co-authored-by: wangmiao0668000666 <[email protected]>
2c29f49 to
0c7d19e
Compare
|
Maintainer decision: accept the permanent per-account inspection contract across Google Chat, Slack, Zalo, and Mattermost. Read-only discovery should omit configured-unavailable accounts independently, while direct operations remain strict and configured SecretRefs remain authoritative over lower-precedence credentials. The remaining review moves are satisfied: exact-head CI run 30330583236 passed on attempt 2 with every selected job green. I also checked mainline drift from |
|
Merged via squash.
|
…tial SecretRef fails (openclaw#110329) * fix(channels): isolate unavailable account discovery Co-authored-by: wangmiao0668000666 <[email protected]> * refactor(channels): remove stale discovery exports * test(pr): provide ripgrep fixture command --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
When one channel account has a configured SecretRef that is unavailable in the current runtime snapshot, strict account resolution can throw while the shared
messagetool is discovering channel actions. Core catches that plugin-level exception and drops the whole channel's action surface, including healthy sibling accounts.This affects Google Chat, Slack, Zalo, and Mattermost multi-account configurations. It also affected Mattermost directory fan-in, where one unavailable account could abort discovery for healthy clients.
Why This Change Was Made
Read-only discovery now uses plugin-owned account inspection instead of weakening operational resolvers:
inspectSlackAccountboundary;The maintainer rewrite rebases the contributor's intent onto current account-inspection and Plugin SDK contracts. It removes obsolete discovery exports instead of allowlisting dead compatibility surface.
The branch also repairs an unrelated current-main CI break that blocked this landing: the PR review fixture now supplies the required
rgcommand surface when sourcingreview.shin minimal compact-shard images. Production preflight remains unchanged.User Impact
A cold or stale channel account no longer hides the
messageactions of healthy sibling accounts. Selecting the unavailable account still exposes no actions, and attempting a direct operation through unresolved credentials still fails closed.Evidence
9de212c3e3dd74b89965d734a01abd86e414ca73.tbx_01kykgayra49tpy7sraqv8kvsa: 206 focused tests passed across Google Chat, Slack, Zalo, Mattermost, and the PR review fixture.deadcode:dependenciesand the completecheck:changedextension/docs gate: production and test tsgo, lint, formatting, Plugin SDK/API and architecture guards, and import-cycle checks.tbx_01kykhk858mtyy8xzp7105b8m7, passedtest/scripts/pr-review-artifact-validation.test.ts29/29 in the compact-CI-compatible fixture shape.openclaw/ci-gatepassed with every selected job green. The sole first-attempt failure was an unrelated 10-minute agentic shard timeout; that shard passed on currentmainand on the isolated retry without code changes.Documentation
docs/gateway/secrets.mdnow states the per-account read-only discovery contract. Existing channel credential docs already describeconfigured_unavailablestatus and authoritative SecretRef precedence.AI-assisted maintainer rewrite. The contributor's original diagnosis and test direction are preserved with co-authorship; the maintainer reviewed current callers, sibling inspection implementations, the shared SecretInput contract, docs, tests, current-main CI, and runtime behavior.