Skip to content

feat: add Discord Kanban approval gates - #68789

Open
dwiabriyanto wants to merge 3 commits into
NousResearch:mainfrom
dwiabriyanto:feat/discord-kanban-approval-gates
Open

feat: add Discord Kanban approval gates#68789
dwiabriyanto wants to merge 3 commits into
NousResearch:mainfrom
dwiabriyanto:feat/discord-kanban-approval-gates

Conversation

@dwiabriyanto

Copy link
Copy Markdown

Summary

  • Copy Kanban notification subscriptions from parent tasks to children across decompose/create/link paths.
  • Fix named-profile PMO notifier adapter resolution for standalone and multiplexed Discord gateways.
  • Send Discord rich approval cards for Kanban blocked kind=needs_input events.
  • Wire approval buttons: Approve comments + unblocks; Reject comments + keeps task blocked.

Validation

  • python -m py_compile gateway/authz_mixin.py gateway/kanban_watchers.py hermes_cli/kanban_db.py hermes_cli/kanban_decompose.py plugins/platforms/discord/adapter.py tests/hermes_cli/test_kanban_notify.py tests/gateway/test_discord_kanban_approval.py tests/hermes_cli/test_kanban_decompose_subscribe.py
  • pytest -q tests/hermes_cli/test_kanban_notify.py::test_notifier_sends_rich_approval_for_needs_input_block tests/gateway/test_discord_kanban_approval.py tests/hermes_cli/test_kanban_decompose_subscribe.py
  • Live Discord approval gate tests: Approve path completed task t_25851dd6; Reject path kept task t_d3e3ebd1 blocked after recording HUMAN_DECISION: REJECTED.

Copy Kanban notify subscriptions across parent-child task links, fix named-profile notifier adapter resolution, and send rich Discord approval cards for needs_input blocks. Approve comments and unblocks; reject comments and keeps the task blocked.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cron Cron scheduler and job management comp/plugins Plugin system and bundled plugins platform/discord Discord bot adapter labels Jul 21, 2026
Hermes Agent added 2 commits July 22, 2026 00:26
- add richer approval-card context for why/risk/decision effects
- create remediation child task when a human rejects an approval gate
- support approve/reject with optional comment modal and persist reasons
- extend targeted approval-gate tests

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the Discord approval-gate implementation. The rich-card portion is still needed: current main sends blocked events as plain text in gateway/kanban_watchers.py:429-433. The subscription inheritance and named-profile routing portions have since landed independently on main (hermes_cli/kanban_db.py:3191,3436,6074; gateway/authz_mixin.py:63; commits 7b662c8d72, 033be58333, dda6f0f63e), so they should not be reapplied during salvage.

Problems

  • plugins/platforms/discord/adapter.py:8261 only recognizes usage/argument errors from run_slash. But hermes_cli/kanban.py:3230-3237 catches operational exceptions and returns error: ... text. Those failures are currently treated as success after adapter.py:8203-8216 marks the view resolved and disables every control, leaving no in-card retry path.

Suggested changes

  • Treat operational error output as failure, and only seal the view after all required Kanban mutations succeed. Add a regression test where run_slash returns an error: ... result.

Automated hermes-sweeper review.

)
for command in commands:
result = await asyncio.to_thread(run_slash, command)
if result and ("usage error" in result.lower() or "invalid choice" in result.lower()):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

run_slash() returns error: <exception> for operational failures (hermes_cli/kanban.py:3230-3237), which does not match either check here. The card has already been marked resolved and disabled, so a failed comment/unblock/create is logged as success and cannot be retried from Discord. Treat operational-error output as failure and keep or restore a retryable UI state.

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

Labels

comp/cron Cron scheduler and job management comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins 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-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants