Skip to content

fix: scope kanban auto-subscriptions to active profile - #57995

Closed
tymrtn wants to merge 1 commit into
NousResearch:mainfrom
tymrtn:fix/kanban-profile-subscribe-57993
Closed

fix: scope kanban auto-subscriptions to active profile#57995
tymrtn wants to merge 1 commit into
NousResearch:mainfrom
tymrtn:fix/kanban-profile-subscribe-57993

Conversation

@tymrtn

@tymrtn tymrtn commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stamp Kanban auto-subscribe rows with the active profile when session/env profile markers are absent
  • preserve existing HERMES_SESSION_PROFILE / HERMES_PROFILE behavior when present
  • add regression coverage for gateway sessions that have a shared Telegram chat ID but no exported profile marker

Fixes #57993.

Why

In multi-bot installs, telegram:<chat_id> is not a complete delivery identity. If a Kanban notification subscription is written with notifier_profile=None, another profile's Telegram gateway that shares the same human chat can claim and deliver the task's terminal event.

The notifier already respects notifier_profile; this patch makes the auto-subscribe path reliably populate it from get_active_profile_name() as a fallback.

Tests

  • scripts/run_tests.sh tests/tools/test_kanban_tools.py tests/gateway/test_kanban_notifier.py — 105 passed
  • python -m pytest tests/tools/test_kanban_tools.py -q — 98 passed (Codex review lane)
  • python -m pytest tests/hermes_cli/test_kanban_notify.py tests/gateway/test_kanban_notifier.py -q — 19 passed (Codex review lane)
  • git diff --check

Review

Codex reviewed the uncommitted diff and reported no blocking correctness issues.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 4, 2026
@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@teknium1 teknium1 added the area/profiles Multi-profile isolation, HERMES_HOME scoping label Jul 19, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #72241 — your commit was cherry-picked onto current main with your authorship preserved. The get_active_profile_name() fallback stamp closes the NULL-owner leak (#57993). Thanks!

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

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have 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-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kanban auto-subscribe can leak notifications across profiles

3 participants