Skip to content

fix(gateway): correct sys.path insertion in plugins to prevent cron namespace collision (#49410) - #49431

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-49410
Closed

fix(gateway): correct sys.path insertion in plugins to prevent cron namespace collision (#49410)#49431
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-49410

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Fixes #49410. The gateway crashes on startup because plugins/platforms/discord/adapter.py inserts plugins/ into sys.path instead of the project root. This causes Python to import plugins/cron/ instead of the top-level cron/ package when gateway/run.py tries to import cron.scheduler_provider. Fixed by changing parents[2] to parents[3] in both discord and raft adapter plugins.

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins P1 High — major feature broken, no workaround labels Jun 20, 2026
teknium1 added a commit that referenced this pull request Jun 21, 2026
…ters

#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes #49410, #49824.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via #49913 (rebase). Your discord + raft fix was cherry-picked onto current main with your authorship preserved (commit 4c206b9), then widened in a follow-up to cover the slack/whatsapp/telegram adapters that had the same parents[2] -> plugins/ bug. Thanks for the root-cause fix!

@teknium1 teknium1 closed this Jun 21, 2026
kpadilha pushed a commit to kpadilha/hermes-agent that referenced this pull request Jun 24, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
pai-scaffolde pushed a commit to pai-scaffolde/hermes-agent that referenced this pull request Jun 28, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
indigokarasu pushed a commit to indigokarasu/hermes-agent that referenced this pull request Jul 1, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 1572571): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in f185a8b): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 95cca7c): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…ters

NousResearch#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes NousResearch#49410, NousResearch#49824.
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 comp/plugins Plugin system and bundled plugins P1 High — major feature broken, no workaround type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Gateway crashes on startup with ModuleNotFoundError: No module named 'cron.scheduler_provider'

3 participants