Skip to content

fix(discord): recognize own managed-role mentions through checked intake - #30

Merged
DoodleBears merged 2 commits into
mainfrom
codex/1615-discord-managed-role
Nov 2, 2026
Merged

DoodleBears merged 2 commits into
mainfrom
codex/1615-discord-managed-role

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Issue #1615 | Agent claim

Why the change

Make a native mention of the authenticated Discord Bot's own managed role reach the same checked Consumer as a direct Bot-user mention, instead of silently dropping it.

Special things to note

  • Merge risk: two-way door — revert the Provider source/build commit; medium blast radius — checked Discord addressing can start model work, so review exact native role ownership, ordinary collection separation and receiver-lifetime refusal. No schema or standalone Session change.
  • The existing checked guild/member lookup must prove managed: true, exact tags.bot_id, current membership and the original mentioned role ID. Unrelated roles and everyone/here stay non-addressing. This does not grant Message Content permission or establish native Gateway delivery.
  • Task codex/local/01a13902-0d72-7872-ac0f-440e152155d5. Native/installed-product QA passed on the idle registered QA1 through Core #1927. Keep draft pending review presentation and feedback. Build/package verification, all 96 affected Discord regressions and 286 shared/other-platform regressions pass; no full Windows suite success or publication is claimed.

Change outline

 Gateway MESSAGE_CREATE
   human/account/receiver guards
-  user mentions only → mention path or independently opted-in ordinary context
+  user mention → existing checked source path
+  role candidate → checked original guild + current Bot member
+    own managed native role → mention path
+    other role → independently opted-in ordinary context or no delivery
   normalize original text / user mentions / source reply route
   checked Consumer → owning Host (no standalone Session/thread)

Regression first failed 0 !== 1 on the actual Runtime/Consumer path. Coverage now includes an own managed-role request with ordinary opt-in off, exact native ownership, misleading names/member roles, forged message metadata, ownership changes, original-thread attribution and disposal during the role lookup. Source-bound reply checks and receipts are reused.

The Human requested built-in-browser testing; T3 recovered with the signed-in account. Actual installed-product qualification used 1.3.0-test.1615.1 / Provider .22 at this exact source head and official DeepSeek Flash. Bot-user and own-managed-role B markers each received one rendered, source-bound native reply. The role Source had zero user mentions. An unrelated zero-permission role held by the Bot, everyone and here produced no new Source, Admission, Outbox or model usage. Native readback checked exact addressing, author, destination and reply references. The temporary role was removed and the task-owned receiver stopped, restoring QA1 to idle; no pre-existing receiver or App permission was changed.

See the Core qualification record. Current screenshots/recording are machine-local; a matched base/candidate visual pair and GitHub-rendered review images remain owed because the base receiver was not run during this candidate-only window. Reproduce in exclusive QA windows against each artifact. The earlier browser-access failure no longer blocks native testing.

Issue: BotHarness/DeepSeekBot#1615

Agent-Task: codex/local/01a13902-0d72-7872-ac0f-440e152155d5
@DoodleBears

Copy link
Copy Markdown
Collaborator Author

Agent work progress — native installed-product acceptance passed

Task: codex/local/01a13902-0d72-7872-ac0f-440e152155d5 (not a DSH Session). Date: 2026-10-16 JST. State: active; review presentation and feedback still pending.

The Human confirmed registered Discord QA1 was idle and requested testing through the built-in browser. The actual six-tarball 1.3.0-test.1615.1 candidate, Provider .22 at 1fc80010ab7cfd10ecc4f63c1d46c098e829c6a6, ran in an isolated Host with official DeepSeek Flash.

  • Native Bot-user B marker: one rendered USER_OK and one source-referencing accepted Outbox.
  • Native own-managed-role B marker: one rendered ROLE_OK and one source-referencing accepted Outbox; zero user mentions in the native message and canonical Source.
  • Unrelated unmanaged role held by the Bot, with zero permissions: no new Source, Admission, Outbox or model usage.
  • Native @everyone and @here: same negative result. Provider reception and native readback confirmed all three messages were actually received.
  • Temporary role deleted and original native role/member state verified. Exact task-owned receiver stopped before its cutoff; QA1 returned to idle. No pre-existing receiver or App permission was changed.

Full verification record, Core draft #1927, maintained Provider draft #30.

Provider affected tests 96/96, shared/other-platform tests 286/286, integrated Core/packaging tests 80/80 and integration CI passed. The latest documentation-only commit has a separate CI run. Private native facts/screenshots/recording remain machine-local; a matched base/candidate visual pair and GitHub-rendered review images are still owed. A local HTML explainer is bound to Core head 20f533999d05ca2efd17d0fe707a9de27b386ac4 and Provider head 1fc80010ab7cfd10ecc4f63c1d46c098e829c6a6; it is not reviewer-hosted or runtime evidence. Neither PR has been merged, globally published or deployed.

Keep Bot-authored messages limited to explicit mentions, now including the own managed role.
@DoodleBears
DoodleBears marked this pull request as ready for review November 2, 2026 12:20
@DoodleBears
DoodleBears merged commit 81dedec into main Nov 2, 2026
2 checks passed
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