Repository navigation
fix(discord): allow guarded channel permission management - #18
Draft
finn-atlas wants to merge 1 commit into
Draft
finn-atlas wants to merge 1 commit into
finn-atlas wants to merge 1 commit into
Conversation
Port the public message-action wiring from openclaw#124962 onto the deployed fork while preserving the existing Discord authorization gates and adding public-boundary regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: AI-934 — Expose guarded Discord channel permission actions for Cosmo
Source report: Discord thread
What Problem This Solves
Fixes: Cosmo cannot clear a Discord channel permission overwrite when the supported message tool does not expose the guarded permission mutation implemented by the Discord runtime.
User Impact
User impact: Authorized Discord operators can set or remove channel permission overwrites through the message tool without enabling wildcard inbound routing. Existing requester,
ManageRoles, role-hierarchy, action-gate, and account checks remain in force.Why This Change Was Made
The runtime already owns
channelPermissionSetandchannelPermissionRemove, including its authorization checks, but the public action vocabulary, schema, dispatch policy, target mapping, Discord discovery, and adapter dispatcher omit them. This change wires those existing guarded operations through aschannel-permission-setandchannel-permission-remove.This ports the diagnosis and public wiring from openclaw/openclaw#124962 by Jialong(Bruce) Li, rebased onto Cosmo's deployed fork. The regression coverage is expanded at the public boundary.
Evidence
cd436f0c05c36e354104b14d9ac34c79f27581c8: the incident room retains the Sentinel role's explicitViewChanneldeny (1024), while the message action vocabulary has no permission-write action.finnDiscord account intentionally disables its wildcard channel entry. Guild-wide metadata reads and non-allowlisted category reads remain blocked; this PR does not change that configuration.pnpm tsgo:core,pnpm tsgo:extensions, andpnpm tsgo:extensions:testpassed.oxfmt --checkandgit diff --checkpassed.813ba652b5d8b34ce6b46b4d2600a720db20eb2dhas a verified SSH signature from the provisioned FINN Atlas identity.Real behavior proofanddispatchchecks passed. The fork'sauto-response,label, andlabel-issuesworkflows fail before checkout becausejai/OpenClawhas no GitHub App private-key input configured; no product test failed in those jobs.Risk and Rollback
This exposes permission mutations under the existing Discord
channelsaction gate. A trusted Discord requester still needs channel-scopedManageRoles, and role targets remain subject to hierarchy checks. Invalid target types fail before a provider request.Rollback: revert this commit, rebuild the prior deployed revision, restore the previous OpenClaw symlink, and restart only after confirming Cosmo has no active work. If the approved live overwrite change has already been applied, restore Sentinel to
allow=0,deny=1024.