Skip to content

fix(nextcloud-talk): parse structured mention payloads - #79397

Closed
iclem wants to merge 9 commits into
openclaw:mainfrom
iclem:nextcloud-talk
Closed

iclem wants to merge 9 commits into
openclaw:mainfrom
iclem:nextcloud-talk

Conversation

@iclem

@iclem iclem commented May 8, 2026 •

Copy link
Copy Markdown

Summary

  • Problem 1 — mention parsing: Nextcloud Talk webhooks deliver messages as structured JSON ({"message":"hi {mention-user1} !","parameters":{"mention-user1":{"type":"user","id":"agent",...}}}) per the documented bot API spec — not plain text. The inbound handler was passing object.content raw to mention regex matching and command gating, so patterns never fired against the JSON envelope.
  • Problem 2 — delivery-policy drift: Nextcloud Talk should use the same shared source-reply delivery policy as other channels. An earlier revision of this branch forced sourceReplyDeliveryMode: "automatic", which would have bypassed messages.groupChat.visibleReplies = "message_tool" on current main. The latest head intentionally removes that override and adds focused coverage so this PR preserves shared policy instead of forking it.
  • Why it matters: Agents in group rooms with requireMention: true silently drop every direct @-mention delivered via the structured webhook payload. This PR also needs to stay merge-safe with current main's visible-reply policy.
  • What changed:
    • Added parseStructuredNextcloudTalkBody to extract the human-readable message field and decode parameters into typed mention entries.
    • Added resolveExplicitNextcloudTalkMention to check whether any type: "user" entry matches the configured account id or API user.
    • Structured bodies with only mention placeholders and no actionable text are dropped silently.
    • The effective plain-text body is used for command gating and agent dispatch (fixing body: rawBody -> body: effectiveBody in the agent envelope).
    • Added focused behavior coverage proving the inbound path leaves sourceReplyDeliveryMode unset, so shared policy remains in control: message_tool_only when configured, with the existing fallback to automatic when message-tool delivery is unavailable.
  • What did NOT change: Auth flow, allowlists, group/DM policy, pairing, session routing, or the shared source-reply delivery policy. Plain-text bodies continue to work unchanged.

Change Type (select all)

  • Bug fix

Scope (select all touched areas)

  • Integrations

Linked Issue/PR

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: structured Nextcloud Talk mention payloads now reach mention gating and command parsing correctly; visible reply delivery continues to follow the shared source-reply policy.
  • Real environment tested: Nextcloud 32 / Talk 21, Linux, Node 24, OpenClaw v2026.5.6
  • Exact steps or command run after this patch: configured a group room with requireMention: true, sent a message @-mentioning the bot, observed the reply in Nextcloud Talk; separately ran focused unit coverage for the shared visible-reply policy and fallback.
  • Evidence after fix: gateway runtime logs confirm inbound structured body parsed correctly (room token iodwj5dz):
    May 08 16:29:46 aeris node[1239189]: rawBody="{\"message\":\"{mention-user1} test message\",...}" effectiveBody="test message" structured=true
    
  • Observed result after fix: the agent correctly detects @-mentions in structured JSON payloads. The assembled inbound request no longer hard-codes sourceReplyDeliveryMode, so configured message_tool visible replies remain in effect and the shared resolver still falls back to automatic when the message tool is unavailable.
  • What was not tested: Talk versions prior to 21; alternative structured payload shapes if any exist

Root Cause

  • Root cause 1: The Nextcloud Talk bot webhook spec documents object.content as a JSON-encoded string with message and parameters keys. The handler was written assuming plain text and matched mention regexes directly against the raw JSON string.
  • Root cause 2 / merge risk: This plugin had no focused coverage around the shared source-reply delivery seam, so a channel-local automatic override could slip into the PR and bypass current main's message-tool visible-reply policy.
  • Missing detection / guardrail: No test covered the structured-body path or the Nextcloud Talk -> shared delivery-policy handoff.

Regression Test Plan

  • Coverage level that should have caught this:
    • Unit test
  • Target tests or files: extensions/nextcloud-talk/src/inbound.mentions.test.ts, extensions/nextcloud-talk/src/inbound.behavior.test.ts
  • Scenario the tests should lock in: structured JSON body with type: "user" mention entries triggers resolveExplicitNextcloudTalkMention, command parsing, and agent routing through effectiveBody; group-room inbound dispatch keeps sourceReplyDeliveryMode unset so shared policy resolves to message_tool_only when configured and falls back to automatic when the message tool is unavailable.
  • Why this is the smallest reliable guardrail: the parsing and dispatch-assembly logic is pure and fully exercisable without a live Nextcloud instance.

User-visible / Behavior Changes

Agents in Nextcloud Talk group rooms now correctly detect explicit @-mentions delivered via the structured JSON format. Visible reply delivery is unchanged at the product-policy level: the plugin preserves the shared source-reply policy from main, including configured message-tool replies and the existing automatic fallback when no message tool can run.

Diagram

Before:
object.content (JSON string) -> rawBody -> matchesMentionPatterns(rawBody) -> no match -> drop

After:
object.content (JSON string) -> parseStructuredNextcloudTalkBody -> effectiveBody (plain text) + mentionEntries
  -> resolveExplicitNextcloudTalkMention(mentionEntries) OR matchesMentionPatterns(effectiveBody)
  -> match -> dispatch (no channel-local sourceReplyDeliveryMode override)
  -> shared source-reply delivery policy
  -> message tool if configured and available, otherwise shared automatic fallback

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Linux (Debian)
  • Runtime/container: Node 24
  • Integration/channel: Nextcloud Talk (Nextcloud 32, Talk 21)

Steps

  1. Configure a Nextcloud Talk group room with requireMention: true
  2. Send a message @-mentioning the agent
  3. If validating shared visible-reply policy, set messages.groupChat.visibleReplies to message_tool and verify the shared resolver keeps message_tool_only when a message tool is available and falls back to automatic when it is not

Expected

Agent receives and processes the @-mentioned message, and visible reply delivery follows the shared source-reply policy.

Actual (before fix)

Message dropped — mention regex matched against the raw JSON envelope, never found a match.

Evidence

  • Focused unit coverage added in inbound.mentions.test.ts and inbound.behavior.test.ts, all passing
  • Live verification on Nextcloud 32 / Talk 21 — bot replied in the group room after the parsing fix while keeping shared delivery policy intact

Human Verification (required)

  • Verified scenarios: a live @-mention in a Nextcloud Talk group room correctly triggers an agent response; focused unit coverage proves shared visible-reply policy is preserved.
  • Edge cases checked: plain-text body pass-through, malformed JSON fallback, type != user guard, case-insensitive id matching, email local-part matching, mention-only body drop, shared message-tool fallback.
  • What you did not verify: Talk versions prior to 21.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes — plain-text bodies continue to work unchanged; JSON bodies are parsed transparently; visible reply delivery stays on the shared policy already used on main.
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Nextcloud Talk changes the structured payload format in a future release.
    • Mitigation: parseStructuredNextcloudTalkBody falls back to the raw body string on any parse failure, preserving pre-fix behavior.
  • Risk: a future channel-local change could bypass the shared visible-reply policy again.
    • Mitigation: inbound.behavior.test.ts now asserts replyOptions does not set sourceReplyDeliveryMode and exercises the shared resolver fallback.

@openclaw-barnacle openclaw-barnacle Bot added channel: nextcloud-talk Channel integration: nextcloud-talk size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50ca24c614

ℹ️ 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".

@clawsweeper

clawsweeper Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 15, 2026, 2:12 AM ET / 06:12 UTC.

ClawSweeper review

What this changes

This PR parses structured Nextcloud Talk webhook bodies so bot mentions can pass group mention gating and agents receive readable message text.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 11 items remain

Keep open: current main still drops structured Nextcloud Talk mentions, so this PR addresses a real P1 bug, but its conflicted branch loses rich-object metadata and predates the current ingress-admission boundary.

Priority: P1
Reviewed head: 284264c097643239ff578cbf99b4e868bf6687be

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The underlying bug is real, but the submitted head has two P1 boundary defects and lacks final-head real behavior proof.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The May log is useful historical signal but predates the final head and does not demonstrate its rich-object preservation or installed-URL-derived actor identity; add redacted final-head live Talk evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The May log is useful historical signal but predates the final head and does not demonstrate its rich-object preservation or installed-URL-derived actor identity; add redacted final-head live Talk evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Current bug remains on main: The webhook spool copies Talk object content into the inbound text, and the handler uses that raw string for control-command gating, mention matching, the envelope, and the agent context; no structured-body parser exists on current main.
PR has a targeted parser: The PR head parses the message/parameters envelope, strips only the identified bot placeholder, and uses effective text for mention and agent handling.
Rich-object information is still discarded: The PR sends effective display text as rawBody, while the parser retains only name/id/mentionId fields; file/link/call metadata from the original structured webhook no longer reaches the built inbound context.
Findings 2 actionable findings [P1] Preserve rich-object metadata in the inbound context
[P1] Retain final ingress admission binding when rebasing
Security Needs attention Retain host-bound admission evidence: The PR head constructs an inbound context through the older public builder without current main’s final ingress binding, weakening the admission boundary that the current host builder preserves.

How this fits together

The Nextcloud Talk plugin receives signed webhooks, gates room messages by authorization and bot mention, then hands an inbound context to the shared agent and reply pipeline. Structured message content must be normalized without losing the authoritative payload or admission facts.

flowchart LR
  A[Talk webhook] --> B[Durable webhook ingress]
  B --> C[Nextcloud Talk inbound handler]
  C --> D[Mention and access decision]
  D --> E[Agent context]
  E --> F[Shared reply delivery]
  C --> G[Structured payload parser]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The May log is useful historical signal but predates the final head and does not demonstrate its rich-object preservation or installed-URL-derived actor identity; add redacted final-head live Talk evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve rich-object metadata in the inbound context (P1) - rawBody is changed to the display-only effectiveBody, so structured file, link, and call metadata is discarded before agent dispatch. Keep the authoritative structured payload in RawBody (or map its typed fields) while using normalized text for the prompt and command gate.
  • Retain final ingress admission binding when rebasing (P1) - This older inbound flow builds context without current main’s final route/session/message binding or host context builder. Because the PR is conflicted, rebase it onto the current admission path and cover an authorization change between the initial and final resolution; otherwise conflict resolution can regress the ingress boundary.
  • Resolve security concern: Retain host-bound admission evidence - The PR head constructs an inbound context through the older public builder without current main’s final ingress binding, weakening the admission boundary that the current host builder preserves.
  • Resolve merge risk (P1) - The conflicted branch must be rebased onto the current durable-ingress flow; resolving toward its older context construction would drop final admission evidence.
  • Resolve merge risk (P1) - The cited live log predates the final July head and does not prove the installed-URL actor-id rule or rich-object preservation on the code proposed for merge.
  • Resolve merge risk (P1) - Production code grows by 165 net lines for a bug fix; that is only justified if the external structured-payload and actor-identity contract is directly verified.
  • Complete next step (P2) - The branch needs a human-reviewed rebase and contributor-supplied final-head external proof; repair automation cannot establish that real Nextcloud setup evidence.
  • Improve patch quality - Rebase onto current main while preserving final ingress admission and host-context construction.
  • Improve patch quality - Keep original structured rich-object data available to downstream context while normalizing prompt and command text.
  • Improve patch quality - Post redacted final-head Talk evidence covering a bot mention and a rich object; update the PR body to trigger re-review.

Findings

  • [P1] Preserve rich-object metadata in the inbound context — extensions/nextcloud-talk/src/inbound.ts:380-384
  • [P1] Retain final ingress admission binding when rebasing — extensions/nextcloud-talk/src/inbound.ts:365-388
  • [medium] Retain host-bound admission evidence — extensions/nextcloud-talk/src/inbound.ts:365
Agent review details

Security

Needs attention: The stale context-construction path omits current main’s host-bound admission evidence and should not be carried through the required rebase.

PR surface

Source +165, Tests +561. Total +726 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 181 16 +165
Tests 2 567 6 +561
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 748 22 +726

Review metrics

Metric Value Why it matters
Production versus test LOC production +181/-16 (net +165); tests +567/-6 (net +561) The substantial new parser and webhook-identity surface needs contract and current-boundary proof before this bug fix can merge.

Stored data model

Persistent data-model change detected: serialized state: extensions/nextcloud-talk/src/inbound.mentions.test.ts, serialized state: extensions/nextcloud-talk/src/structured-body.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #66700
Summary: This PR is the remaining candidate repair for the structured mention-gating bug reported by the linked issue; current main does not yet contain the fix.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Rebase at the current ingress owner (recommended)
    Rebuild the parser on current main, retain RawBody metadata and the final context-bound admission path, then add focused boundary coverage.
  2. Pause the stale branch
    Close or replace the branch if final-head Talk proof and the installed-URL actor-id contract cannot be supplied after rebasing.

Technical review

Best possible solution:

Rebase the parser into current main’s inbound owner, retain the original structured webhook as RawBody while using normalized text for commands and agent prompts, preserve the final host-bound admission flow, then add final-head live Talk proof.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a structured object.content reaches rawBody and current main matches it directly against mention regexes, so placeholder-only mentions cannot satisfy the documented mention gate.

Is this the best way to solve the issue?

No: parsing at the plugin boundary is the right direction, but this branch is not the best mergeable repair until it preserves raw metadata and current main’s final ingress-admission binding.

Full review comments:

  • [P1] Preserve rich-object metadata in the inbound context — extensions/nextcloud-talk/src/inbound.ts:380-384
    rawBody is changed to the display-only effectiveBody, so structured file, link, and call metadata is discarded before agent dispatch. Keep the authoritative structured payload in RawBody (or map its typed fields) while using normalized text for the prompt and command gate.
    Confidence: 0.94
  • [P1] Retain final ingress admission binding when rebasing — extensions/nextcloud-talk/src/inbound.ts:365-388
    This older inbound flow builds context without current main’s final route/session/message binding or host context builder. Because the PR is conflicted, rebase it onto the current admission path and cover an authorization change between the initial and final resolution; otherwise conflict resolution can regress the ingress boundary.
    Confidence: 0.91

Overall correctness: patch is incorrect
Overall confidence: 0.92

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2e806ef0e2c9.

Labels

Label changes:

  • add merge-risk: 🚨 security-boundary: Its pre-refactor context path omits current main’s final admission-evidence binding.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P1: Mention-gated group rooms can silently drop direct bot mentions on the documented default path.
  • merge-risk: 🚨 message-delivery: The PR changes the path that decides whether an inbound room message reaches agent dispatch.
  • merge-risk: 🚨 security-boundary: Its pre-refactor context path omits current main’s final admission-evidence binding.
  • merge-risk: 🚨 compatibility: The new bot-actor identity depends on exact existing webhook-public-URL interpretation.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The May log is useful historical signal but predates the final head and does not demonstrate its rich-object preservation or installed-URL-derived actor identity; add redacted final-head live Talk evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Retain host-bound admission evidence — extensions/nextcloud-talk/src/inbound.ts:365
    The PR head constructs an inbound context through the older public builder without current main’s final ingress binding, weakening the admission boundary that the current host builder preserves.
    Confidence: 0.9

What I checked:

  • Current bug remains on main: The webhook spool copies Talk object content into the inbound text, and the handler uses that raw string for control-command gating, mention matching, the envelope, and the agent context; no structured-body parser exists on current main. (extensions/nextcloud-talk/src/inbound.ts:306, 2e806ef0e2c9)
  • PR has a targeted parser: The PR head parses the message/parameters envelope, strips only the identified bot placeholder, and uses effective text for mention and agent handling. (extensions/nextcloud-talk/src/structured-body.ts:22, 284264c09764)
  • Rich-object information is still discarded: The PR sends effective display text as rawBody, while the parser retains only name/id/mentionId fields; file/link/call metadata from the original structured webhook no longer reaches the built inbound context. (extensions/nextcloud-talk/src/inbound.ts:383, 284264c09764)
  • Current admission owner boundary: Current main binds the final route/session/message facts into ingress resolution and passes that resolved admission to the host context builder; the PR-head flow instead uses the older public builder without the final context binding. (extensions/nextcloud-talk/src/inbound.ts:317, 2e806ef0e2c9)
  • Current-area provenance: Blame attributes the present raw-body and admission flow to the recent shared inbound refactor snapshot; its commit is on current main. (extensions/nextcloud-talk/src/inbound.ts:306, 295f2c0212fd)
  • Release and branch status: The PR head is not contained by a local release tag or current main; the latest release predates the final head, so the requested behavior is neither merged nor shipped. (284264c09764)

Likely related people:

  • steipete: Current Nextcloud Talk inbound handling and its shared admission flow blame to the recent mainline refactor snapshot. (role: recent inbound architecture contributor; confidence: high; commits: 295f2c0212fd, 0e792b6de30; files: extensions/nextcloud-talk/src/inbound.ts)
  • vincentkoc: Auth and callback policy work in the same Nextcloud Talk inbound path dates to this contributor's commit. (role: earlier inbound-policy contributor; confidence: high; commits: a47722de7e3c; files: extensions/nextcloud-talk/src/inbound.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-07-03T21:12:25.721Z sha 68f49722633f3303d532739740678bc6bb08a72f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T16:29:32.512Z sha baa1629 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T18:30:25.773Z sha 284264c :: needs maintainer review before merge. :: none
  • reviewed 2026-07-31T21:50:58.028Z sha 284264c :: found issues before merge. :: [P1] Preserve non-mention rich-object data for agent dispatch
  • reviewed 2026-08-05T21:38:09.626Z sha 284264c :: needs real behavior proof before merge. :: [P1] Preserve rich-object data in agent dispatch
  • reviewed 2026-08-11T14:16:57.116Z sha 284264c :: needs real behavior proof before merge. :: [P1] Preserve rich-object metadata for agent dispatch

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@iclem
iclem force-pushed the nextcloud-talk branch from 50ca24c to 652cd3d Compare May 8, 2026 17:06
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@iclem
iclem force-pushed the nextcloud-talk branch from cb6cbd4 to bc29350 Compare May 9, 2026 07:29
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@iclem

iclem commented May 9, 2026

Copy link
Copy Markdown
Author

Codex review — resolved findings

All three P2 findings from the automated review are now addressed.

1. Rich-object text loss (parseStructuredNextcloudTalkBody)

Finding: All parameter placeholders were stripped to "" — including non-user rich objects (calls, files, links) — silently discarding content the user saw in the chat.

Fix: User-type entries are replaced with "" (mention stripped); non-user entries are replaced with entry.name (their display text). Content is preserved when a name is present.

2. account.name as mention identity (resolveExplicitNextcloudTalkMention)

Finding: The bot's UI display label (account.name) was in expectedIds, so any user whose display name matched the bot label could satisfy requireMention in an allowlisted room.

Fix: account.name removed from expectedIds. Only stable structured identifiers remain: accountId, apiUser, and the email local part of apiUser.

3. entry.name as mention candidate (resolveExplicitNextcloudTalkMention)

Finding: The display text from the structured mention payload (entry.name) was in the candidates array, so a user whose display name equalled the bot's accountId could trigger a mention match.

Fix: entry.name removed from candidates. Only entry.id and entry.mentionId are used — the structured identifiers from the Talk webhook, not display text.


All three fixes are covered by tests (inbound.mentions.test.ts, 21 passing). Branch has been rebased onto current upstream main.

@iclem
iclem force-pushed the nextcloud-talk branch from bc29350 to 9c3290b Compare May 9, 2026 09:40
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@iclem

iclem commented May 9, 2026

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c3290b39d

ℹ️ 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".

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@iclem
iclem force-pushed the nextcloud-talk branch from 7e3855a to e742024 Compare May 9, 2026 10:14
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 31, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 31, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 31, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jun 1, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 1, 2026
@iclem
iclem force-pushed the nextcloud-talk branch from 7cc288e to cb9d6d5 Compare June 1, 2026 08:29
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@iclem

iclem commented Aug 24, 2026

Copy link
Copy Markdown
Author

This change has not attracted any interest in 4 months, that's a good signal that it doesn't answer anybody's need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: nextcloud-talk Channel integration: nextcloud-talk merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant