Skip to content

fix(discordbot): ignore replies addressed to other users - #28

Merged
michaelmwu merged 1 commit into
harden-discord-actor-accessfrom
fix/discord-human-mention-routing
Sep 1, 2026
Merged

michaelmwu merged 1 commit into
harden-discord-actor-accessfrom
fix/discord-human-mention-routing

Conversation

@michaelmwu

@michaelmwu michaelmwu commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

  • veto unmentioned authorized-thread continuations that canonically mention another Discord member before they can append to or steer the Centaur session
  • preserve direct Centaur trigger precedence when another member is also named, while leaving actor, role, thread, TTL, and active-execution protections unchanged
  • route from raw Gateway <@id> / <@!id> syntax instead of adapter-rendered text and cover the policy at unit, admission, and real Chat SDK ingress levels

Stack

Validation

  • corepack pnpm --filter discordbot run check:types
  • corepack pnpm --filter discordbot test (161 passed)
  • git diff --check

Note

Low Risk
Narrow ingress filter on unmentioned continuations; direct bot mentions unchanged. Low risk to auth or session integrity.

Overview
Authorized-thread follow-ups no longer append to or steer the Centaur session when the message is an unmentioned reply that canonically mentions another Discord user (<@id> / <@!id>). Ingress denies those with directed_to_other_discord_member after the existing actor, TTL, and policy checks.

Adds discordMentionRoutingDecision to classify addressees from raw Gateway content; direct Centaur mentions still win when both the bot and another member appear in the same message. discordGatewayEventFromMessage now uses raw.content (not adapter message.text) so routing uses immutable user IDs.

README and unit, admission, and Chat SDK emulate tests cover the behavior.

Reviewed by Cursor Bugbot for commit 4a41292. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: c57da257-c130-4c96-b632-88ee5ac72cba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T06:21:35.850180Z 4a41292 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a9d51327-3d5a-4fa9-a80c-5dff4bd1f4ff)

@michaelmwu
michaelmwu merged commit a3fc20a into harden-discord-actor-access Sep 1, 2026
26 checks passed
@michaelmwu
michaelmwu deleted the fix/discord-human-mention-routing branch September 1, 2026 14:22
michaelmwu added a commit that referenced this pull request Sep 8, 2026
* feat: harden Discord actor-scoped workflows

* fix: make notification claims replay safe

* Enforce Discord actor capability scopes

* Allow narrowed GitHub credential routes

* fix: close Discord workflow authorization gaps

* fix: serialize actor policy and retry ingress claims

* fix: close Discord continuation boundaries

* fix: preserve reviewed bot identities through dispatch

* fix: persist reviewed Discord action boundaries

* fix(discordbot): ignore replies addressed to other users (#28)

* fix: bind Discord bot identities to policies

* fix: enforce Discord GitHub App repository scope

* fix: enforce Discord GitHub credential boundaries

* fix: preserve Discord actor credential policy

* fix: reject noncanonical Discord GitHub secrets

* fix: validate Discord GitHub rule replacements

* fix: reject CIDR rules in Discord policy roles

* fix: enforce Discord GitHub policy for all credentials

* Keep Discord delivery claims provisional until dispatch

* Recover failed Discord claim finalization

* Finalize Discord admission after durable handoff

* Filter hoisted credentials through Discord policy

* Bind Discord capabilities to reviewed roles

* Keep Discord policy and execution claims durable

* Enforce reviewed Discord capabilities on every update

* Allow metadata updates for unassigned Discord actors

* Normalize GitHub hosts at the policy boundary

* Stabilize provisional Discord admission test

* Reconcile Discord actors after role changes

* Keep Discord actor policy revocation atomic

* Lock Discord policy through actor assignment

* Reserve workflow approval idempotency keys

* Apply Rust workflow formatting

* Bump Centaur chart after parallel merges

* Block GitHub broker token reuse in Discord roles

* Clarify OAuth credential test fixtures

* Avoid persisting credential objects in policy tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant