Repository navigation
fix(channels): keep healthy accounts running when credential files fail - #110360
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef990e215f
ℹ️ 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".
|
|
||
| ### Fixes | ||
|
|
||
| - **Legacy channel credential files:** isolate unavailable explicit credential files to the affected Google Chat, IRC, LINE, Nextcloud Talk, or Telegram account, keep healthy sibling accounts running, and report redacted degradation without falling through to lower-precedence credentials. |
There was a problem hiding this comment.
Remove the manual changelog entry
For this normal fix commit, adding an Unreleased entry conflicts with the repo changelog contract: AGENTS.md:311 says CHANGELOG.md is release-only and release generation owns it, while AGENTS.md:313 says release generation derives entries from merged PRs and direct main commits. Leaving this line in can make the generated release notes duplicate or diverge from the release tooling; keep this release-note context in the commit/PR body instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64a9d52b02
ℹ️ 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".
| apiCredentialResolution.status === "configured_unavailable" | ||
| ? apiCredentialResolution.diagnostic |
There was a problem hiding this comment.
Don't put optional API credentials in account degradation
For a Nextcloud Talk account with a valid botSecret but a missing or unreadable apiPasswordFile, adding the API password diagnostic here makes the account look degraded to Gateway startup; src/gateway/server-channels.ts:581-591 treats any credentialDiagnostics as an account-level SecretSurfaceUnavailableError before calling startAccount. The API credentials are optional for the webhook bot path: extensions/nextcloud-talk/src/room-info.ts:69-75 just skips room lookup without them, extensions/nextcloud-talk/src/bot-preflight.ts:95-106 skips the status probe, and docs/channels/nextcloud-talk.md:88-90 documents them as enabling lookups/probes rather than starting the bot. Keep this diagnostic out of account-level degradation, or scope it to the optional room-info/status surface, so a bad optional API password file does not keep an otherwise healthy bot cold.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 12:48 AM ET / 04:48 UTC. Summary PR surface: Source +486, Tests +450, Generated 0. Total +936 across 42 files. Reproducibility: yes. from source and focused regression coverage: configure two supported channel accounts, make one explicit credential file unavailable, and start Gateway; the changed test models the broken-account/healthy-sibling outcome. This review did not receive an after-fix live runtime transcript. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Retain the shared redacted configured-unavailable contract, add a redacted live Gateway/terminal capture demonstrating broken-account isolation and healthy-sibling startup, then make the explicit-file precedence decision visible in maintainer review. Do we have a high-confidence way to reproduce the issue? Yes, from source and focused regression coverage: configure two supported channel accounts, make one explicit credential file unavailable, and start Gateway; the changed test models the broken-account/healthy-sibling outcome. This review did not receive an after-fix live runtime transcript. Is this the best way to solve the issue? Yes, the shared typed and redacted unavailable-file state is a more maintainable solution than per-channel throws or fallback behavior, provided maintainers accept the stated explicit-file precedence and live startup proof confirms it. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 4e0cc187a21c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +486, Tests +450, Generated 0. Total +936 across 42 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles) |
4859c7f to
5cbc771
Compare
|
Merged via squash.
|
…il (openclaw#110360) * fix(channels): isolate unavailable credential files * fix(channels): complete credential file type contract * fix(channels): preserve credential path handling * test(channels): cover credential file edge cases * fix(channels): ignore blank credential file paths * test(secrets): keep empty credential files unavailable * test(googlechat): keep temp cleanup plugin-local * fix(channels): keep credential diagnostic internal * chore: defer release note to release automation
…il (openclaw#110360) * fix(channels): isolate unavailable credential files * fix(channels): complete credential file type contract * fix(channels): preserve credential path handling * test(channels): cover credential file edge cases * fix(channels): ignore blank credential file paths * test(secrets): keep empty credential files unavailable * test(googlechat): keep temp cleanup plugin-local * fix(channels): keep credential diagnostic internal * chore: defer release note to release automation
Closes #110320
What Problem This Solves
Fixes an issue where operators using explicit credential files for legacy channel accounts could get inconsistent startup behavior when a file was missing or unreadable. Affected accounts could fail before account-scoped degradation, while healthy sibling accounts could be disrupted.
Why This Change Was Made
All affected resolvers now preserve explicit-file failures as one shared configured-unavailable result with a redacted canonical config path. Account snapshots carry that state into Gateway startup, which isolates the degraded owner and starts healthy siblings. Existing env/file inputs remain supported, and an unavailable explicit file never falls through to a lower-precedence value.
User Impact
Telegram, LINE, IRC, Nextcloud Talk, and Google Chat accounts with unavailable explicit credential files are reported as degraded without exposing the filesystem path. Other configured accounts continue starting normally.
Evidence
main,pnpm check:changedpassed on exact head5cbc771c7819with Blacksmith Testboxtbx_01kxssnsct811gsv6n08rrkkar(run); generated SDK contract, typecheck lanes, formatting, boundaries, guards, and lint all passed.openclaw/agent-skillsscanner fix at exact head5cbc771c7819and returned no accepted actionable finding.5cbc771c7819, including build, type, lint, all compact test shards, security/critical-quality lanes, and the requiredopenclaw/ci-gate(run).