Repository navigation
Conversation
There was a problem hiding this comment.
💡 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".
|
Codex review: needs real behavior proof before merge. Reviewed August 15, 2026, 2:12 AM ET / 06:12 UTC. ClawSweeper reviewWhat this changesThis PR parses structured Nextcloud Talk webhook bodies so bot mentions can pass group mention gating and agents receive readable message text. Regression provenancePossible 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The stale context-construction path omits current main’s host-bound admission evidence and should not be carried through the required rebase. PR surfaceSource +165, Tests +561. Total +726 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2e806ef0e2c9. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
Codex review — resolved findingsAll three P2 findings from the automated review are now addressed. 1. Rich-object text loss (
|
|
@codex review |
There was a problem hiding this comment.
💡 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".
|
This pull request has been automatically marked as stale due to inactivity. |
…s, auto-deliver group replies
|
This change has not attracted any interest in 4 months, that's a good signal that it doesn't answer anybody's need |
Summary
{"message":"hi {mention-user1} !","parameters":{"mention-user1":{"type":"user","id":"agent",...}}}) per the documented bot API spec — not plain text. The inbound handler was passingobject.contentraw to mention regex matching and command gating, so patterns never fired against the JSON envelope.sourceReplyDeliveryMode: "automatic", which would have bypassedmessages.groupChat.visibleReplies = "message_tool"on currentmain. The latest head intentionally removes that override and adds focused coverage so this PR preserves shared policy instead of forking it.requireMention: truesilently 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.parseStructuredNextcloudTalkBodyto extract the human-readablemessagefield and decodeparametersinto typed mention entries.resolveExplicitNextcloudTalkMentionto check whether anytype: "user"entry matches the configured account id or API user.body: rawBody->body: effectiveBodyin the agent envelope).sourceReplyDeliveryModeunset, so shared policy remains in control:message_tool_onlywhen configured, with the existing fallback toautomaticwhen message-tool delivery is unavailable.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
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.iodwj5dz):sourceReplyDeliveryMode, so configuredmessage_toolvisible replies remain in effect and the shared resolver still falls back toautomaticwhen the message tool is unavailable.Root Cause
object.contentas a JSON-encoded string withmessageandparameterskeys. The handler was written assuming plain text and matched mention regexes directly against the raw JSON string.Regression Test Plan
extensions/nextcloud-talk/src/inbound.mentions.test.ts,extensions/nextcloud-talk/src/inbound.behavior.test.tstype: "user"mention entries triggersresolveExplicitNextcloudTalkMention, command parsing, and agent routing througheffectiveBody; group-room inbound dispatch keepssourceReplyDeliveryModeunset so shared policy resolves tomessage_tool_onlywhen configured and falls back toautomaticwhen the message tool is unavailable.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
Security Impact (required)
Repro + Verification
Environment
Steps
requireMention: truemessages.groupChat.visibleRepliestomessage_tooland verify the shared resolver keepsmessage_tool_onlywhen a message tool is available and falls back toautomaticwhen it is notExpected
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
inbound.mentions.test.tsandinbound.behavior.test.ts, all passingHuman Verification (required)
type != userguard, case-insensitive id matching, email local-part matching, mention-only body drop, shared message-tool fallback.Review Conversations
Compatibility / Migration
Risks and Mitigations
parseStructuredNextcloudTalkBodyfalls back to the raw body string on any parse failure, preserving pre-fix behavior.inbound.behavior.test.tsnow assertsreplyOptionsdoes not setsourceReplyDeliveryModeand exercises the shared resolver fallback.