Repository navigation
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 26, 2026, 6:41 AM ET / 10:41 UTC. ClawSweeper reviewWhat this changesThe PR rejects Nextcloud Talk reaction requests for disabled or incompletely configured resolved accounts before they reach the provider, and adds tests for both rejection paths. Merge readinessKeep this PR open. PR close coverage proof kept this PR open against #112607: PR B is an adjacent Signal implementation, not a carry-forward of PR A's concrete Nextcloud Talk account-validation behavior. PR A's durable report explicitly identifies the adapters as independent. Priority: P2 Review scores
Verification
How this fits togetherNextcloud Talk is a bundled channel plugin whose message-action adapter receives agent reaction requests and sends them to the Talk provider. The adapter resolves an account, validates whether it may act, then delegates eligible reactions to the sender that performs the authenticated API request. flowchart LR
A[Agent reaction request] --> B[Nextcloud Talk action adapter]
B --> C[Resolve requested account]
C --> D{Enabled and configured?}
D -- No --> E[Reject before provider call]
D -- Yes --> F[Validate room target]
F --> G[Reaction sender]
G --> H[Nextcloud Talk API]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +35. Total +47 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep this PR open until a linked canonical PR proves it covers this PR's unique work, or a maintainer confirms closure. Do we have a high-confidence way to reproduce the issue? Yes, source and the supplied live harness identify a high-confidence path: dispatch Is this the best way to solve the issue? Yes. Reusing the plugin’s existing account predicate at the direct-dispatch boundary is narrower and more maintainable than adding a second configuration model or weakening the sender’s credential-validation responsibility. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53e3f296b1cc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
…counts The react message-action handler dispatched straight to the sender without checking the resolved account, so a disabled Nextcloud Talk account (`enabled:false`) that still had a baseUrl/botSecret in config could keep emitting reactions. `describeMessageTool` already hides the tool for unconfigured accounts, but an explicit accountId can reach `handleAction` directly. Enforce the same enabled+configured gate at dispatch, mirroring the Signal reaction fix (openclaw#112607). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
5e78912 to
a410c91
Compare
|
Merged via squash.
|
* origin/main: (224 commits) fix(memory): preserve Windows session ownership (openclaw#115851) fix(compaction): drop context-engine fallback on codex ownership skip (openclaw#114155) (openclaw#115666) fix(msteams): ignore blank certificate settings (openclaw#109112) fix(usage): guard malformed DeepSeek payloads (openclaw#110785) docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) ... # Conflicts: # src/agents/apply-patch.ts # src/agents/sandbox/fs-bridge-mutation-helper.ts
* origin/main: docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) fix(setup): make Gemini recovery actionable (openclaw#115835) fix(terminal-core): prevent String.replace $ pattern injection in display-string (openclaw#111398) refactor(channels): share ingress retention defaults (openclaw#115824) fix(nostr): profile imports vary on timestamp ties (openclaw#111798)
…counts (openclaw#112675) The react message-action handler dispatched straight to the sender without checking the resolved account, so a disabled Nextcloud Talk account (`enabled:false`) that still had a baseUrl/botSecret in config could keep emitting reactions. `describeMessageTool` already hides the tool for unconfigured accounts, but an explicit accountId can reach `handleAction` directly. Enforce the same enabled+configured gate at dispatch, mirroring the Signal reaction fix (openclaw#112607). Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
* origin/main: docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) fix(setup): make Gemini recovery actionable (openclaw#115835) fix(terminal-core): prevent String.replace $ pattern injection in display-string (openclaw#111398) refactor(channels): share ingress retention defaults (openclaw#115824) fix(nostr): profile imports vary on timestamp ties (openclaw#111798)
What Problem This Solves
The Nextcloud Talk
reactmessage action dispatched straight to the sender withoutre-checking the resolved account. A user who disabled their Nextcloud Talk account
(
channels.nextcloud-talk.enabled: false) but left thebaseUrl/botSecretin configcould therefore still have the
reactaction emit reactions through that disabledaccount — outbound traffic from a channel the user explicitly turned off.
describeMessageToolalready hides thereacttool when no account is enabled andconfigured, but that only affects tool listing.
handleActionreceives its ownaccountIdand applied no equivalent account check, so a disabled-but-credentialed account was not
stopped before dispatch. The credential resolver (
resolveCredentialsinsend.ts)validates only
baseUrl/secretpresence, notenabled.Why This Change Was Made
The contract this restores is Nextcloud Talk's own: tool listing and direct dispatch
should agree about which accounts may act. This change resolves the account at the top of
the
reactbranch and reuses the plugin's existingisAccountConfiguredpredicate(
enabled && secret && baseUrl) — the exact predicatedescribeMessageToolalready usesto decide whether to offer the tool. No second configuration model is introduced, and
resolveCredentialsstays the credential-validation owner for the send path.The same class of gap was fixed for Signal in #112607 (merged), which is precedent for
the shape rather than a replacement for this plugin-local fix.
User Impact
A disabled Nextcloud Talk account with leftover credentials no longer emits reactions.
Reacting through a disabled or unconfigured account now throws
Nextcloud Talk account "<id>" is disabled or not configured.instead of reaching the API.Enabled, configured accounts are unaffected.
Real behavior proof
Behavior addressed: a Nextcloud Talk account with
enabled: falseand leftovercredentials still posts reactions to the provider when
reactis dispatched with anexplicit account.
Real environment tested: real Nextcloud 34.0.2.1 with the real Talk (spreed) app
24.0.3, a real Talk bot registered on the server (
occ talk:bot:install --feature response --feature reaction) and attached to a real conversation (occ talk:bot:setup),real chat messages posted through the server's OCS chat API, Node v24.18.0. The harness
imports the production adapter and calls
nextcloudTalkMessageActions.handleActiondirectly undertsx— no vitest, novi.mock, no injected sender — so account resolution, signing, the SSRF-guarded fetch,and the HTTP POST to
/ocs/v2.php/apps/spreed/api/v1/bot/{token}/reaction/{messageId}all run as shipped. After each scenario the harness reads the reaction map back from the
server (
GET /ocs/v2.php/apps/spreed/api/v1/reaction/{token}/{messageId}), so the resultlines below are what Nextcloud itself recorded:
{"👍":["bots:… (Bot)"]}means thereaction really landed and the server attributed it to the bot.
Exact steps or command run after this patch: drop the throwaway proof harness
nc-live-proof.mtsat the repo root and run the command below. The harness is not part ofthis PR's diff; its full source is inlined underneath so the run is reproducible.
nc-live-proof.mts (proof harness, not part of the diff)
Before evidence (
extensions/nextcloud-talk/src/message-actions.tsrestored toupstream/main
cd5a5ecb4c, nothing else changed):Evidence after fix (head
a410c911e5):Observed result after fix: S1 flips — before the fix a channel the user had turned off
still posted a reaction that the real server accepted and attributed to the bot; after the
fix the dispatch throws and the server records no reaction for that message. S2 is
identical in both runs, so an enabled, configured account still reaches the provider and
the reaction still lands. S3 changes only which error is raised (credential error inside
the send path → explicit account gate); both refuse, and the new one names the real cause.
What was not tested: multi-account routing — the capture uses the single
defaultaccount, though the gate runs on whatever
resolveNextcloudTalkAccountreturns, which isthe same resolver
describeMessageTooluses. Reaction removal (params.remove === true)is rejected by a pre-existing guard and is untouched here.
Proof limitations or environment constraints: the test Nextcloud runs on loopback, so the
harness's own config object sets
network.dangerouslyAllowPrivateNetwork. That is aharness-side value only — this PR adds no config surface and changes no default, and the
flag reaches only the SSRF policy, never the account gate under test. Bot secret, admin
credentials, and the room token are redacted from the command above and appear nowhere in
the captured output.
Evidence
Supplemental to the runtime capture above:
extensions/nextcloud-talk/src/message-actions.test.ts:rejects a disabled account before reaching the sender— disabled account(
enabled:false, credentials present) →handleActionthrows andsendReactionNextcloudTalkis not called.rejects an unconfigured account before reaching the sender— requiredconfiguration missing → throws, sender not called.
vitest run extensions/nextcloud-talk/src/message-actions.test.ts→ 21 passed at heada410c911e5; the two new tests fail with the same file restored tocd5a5ecb4c(the disabled account resolves and
sendReactionNextcloudTalkis called).Rebased onto current main (
cd5a5ecb4c) so the exact-head validation above is againsttoday's
main.Related: #112607