Skip to content

Fix gateway channel auto-skill bundles - #43954

Open
muhamadgalihsaputra wants to merge 1 commit into
NousResearch:mainfrom
muhamadgalihsaputra:fix/discord-channel-skills-bundles
Open

Fix gateway channel auto-skill bundles#43954
muhamadgalihsaputra wants to merge 1 commit into
NousResearch:mainfrom
muhamadgalihsaputra:fix/discord-channel-skills-bundles

Conversation

@muhamadgalihsaputra

@muhamadgalihsaputra muhamadgalihsaputra commented Jun 11, 2026

Copy link
Copy Markdown

Summary

  • bridge legacy channel_skills platform config into Discord/Slack adapter extras
  • teach channel skill resolution to accept both list-form channel_skill_bindings and dict-form channel_skills, including parent-channel/forum-thread fallback
  • allow gateway channel auto-load entries to resolve skill bundles as well as individual skills
  • propagate Discord slash-command channel auto-skills, matching normal message/thread dispatch

Why

Channel-bound skills could silently fail when configs used the older dict-shaped channel_skills form, because only channel_skill_bindings reached the platform extras/resolver. Separately, channel bindings that pointed at bundle slash names were treated as ordinary skill names and skipped. That made fresh gateway sessions miss their intended grounding instructions.

Tests

  • python -m py_compile gateway/config.py gateway/platforms/base.py gateway/run.py plugins/platforms/discord/adapter.py tests/gateway/test_discord_channel_skills.py tests/gateway/test_gateway_channel_auto_bundles.py tests/gateway/test_discord_channel_config.py
  • uv run --with pytest --with pytest-asyncio pytest tests/gateway/test_discord_channel_skills.py tests/gateway/test_slack_channel_skills.py tests/gateway/test_gateway_channel_auto_bundles.py tests/gateway/test_discord_channel_config.py tests/gateway/test_discord_channel_prompts.py tests/gateway/test_fresh_reset_skill_injection.py -q -o 'addopts=' (41 passed)

@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery platform/discord Discord bot adapter P3 Low — cosmetic, nice to have labels Jun 15, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for addressing a real current-main gap: gateway/config.py:1231-1232 bridges only channel_skill_bindings, gateway/platforms/base.py:2229-2257 resolves only that shape, and gateway/run.py:11039-11059 cannot expand a bundle alias.

Problems

  • The proposed auto-bundle call in gateway/run.py::_inject_auto_skills_for_new_session omits platform. That bypasses per-platform disabled-skill filtering: agent/skill_bundles.py:269-290 documents that gateway callers must pass it, and the existing direct bundle dispatch does so at gateway/run.py:10090-10099. A channel-bound bundle could load a skill disabled for Discord or Slack.

Suggested changes

  • Thread the event/source platform into the helper and pass it to build_bundle_invocation_message.
  • Cover a bundle member disabled through skills.platform_disabled.discord or Slack.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026

@GottZ GottZ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This was generated by AI during triage.

Summary

Three PRs address the channel auto-skill path: #13962 and #16283 add Slack parity for list-form channel_skill_bindings, while #43954 targets remaining current-main failures involving legacy dict-form channel_skills, bundle aliases, and Discord slash-command propagation.

Related pull requests

  • #13962 [closed] related — (+224/-17) — superseded: Adds Slack channel_skill_bindings support by sharing resolution with Discord, bridging Slack config, attaching auto_skill to Slack events, and adding tests/docs. It remains relevant as the original implementation, but its commit was cherry-picked into merged #16283 with corrected authorship.
  • #16283 [merged] related — (+225/-17) — merged reference implementation: Implements the same Slack channel_skill_bindings parity as #13962 on then-current main, including the shared resolver, config bridge, event wiring, tests, and documentation. It fixes Slack's inability to use the existing list-form bindings but does not cover the legacy channel_skills shape or bundle expansion addressed by #43954.
  • #43954 related — (+321/-98) — keep open pending fix: Extends the merged implementation to bridge and resolve legacy dict-form channel_skills, expand channel-bound bundle aliases, and propagate bindings to Discord slash-command events. The keep_open review on #43954 identifies a blocking diff-level defect: build_bundle_invocation_message is called without platform, bypassing per-platform disabled-skill filtering; the platform must be threaded through and covered by a Discord or Slack disabled-skill regression test before merge.

Duplicates

#13962 and #16283 are substantively the same Slack channel_skill_bindings implementation; #16283 is the merged, current-main port of #13962. #43954 is not a duplicate because it addresses additional legacy-config, bundle-expansion, and slash-command gaps.

Suggested consolidation

Keep #43954 open as the consolidation target, address the contributor review by passing the event/source platform to build_bundle_invocation_message and adding a platform-disabled bundle-member test, then merge #43954 after verification. #13962 is already closed as superseded by merged #16283; no further duplicate closure is needed.

Cross-PR triage: Reviewed 3 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 47 kB of PR diffs, 6 kB of issue/PR text, 2 kB of discussion (2 comments), 1 verify verdict. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

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

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/discord Discord bot adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants