fix(cron): profile cron delivery uses profile-specific adapters - #13
Merged
Merged
Conversation
In multiplex mode, the cron ticker received only runner.adapters (the default profile's adapter map). Profile cron jobs — BoltNews, BetNews, BoltFactors, Screener, YT, Infra — all delivered through the root bot to the root channel, polluting the working DM. Fix: pass _profile_adapters from GatewayRunner to the cron scheduler. In _start_multiplex, select each profile's own adapter dict when ticking its cron store. Profiles without a Telegram adapter (delegation-only: code-review, design-expert, etc.) fall back to root adapters, preserving existing behavior. Changes: - gateway/run.py: pass profile_adapters=runner._profile_adapters - cron/scheduler_provider.py: thread profile_adapters through start() and _start_multiplex(), select per-profile adapters in the tick loop
This was referenced Aug 20, 2026
girnarholdings
added a commit
that referenced
this pull request
Aug 20, 2026
* test(cron): pin profile-adapter routing seams (regression guard for 2026-08-19) The upstream catchup rebase (merge PR #14, 2026-08-19) silently dropped the fork's profile-adapter routing fix (PR #13) — profile cron jobs delivered through the root bot to the root DM for a day and every per-profile channel went silent. No test pinned the three seams, so the drop was invisible to CI. Add test_multiplex_ticker_passes_profile_specific_adapters: - asserts start() and _start_multiplex() carry profile_adapters - asserts _start_multiplex selects per-profile adapter dicts - asserts the root fallback for adapter-less profiles - behaviorally verifies each profile tick receives ITS OWN adapters Verified: fails on fa95c40 (pre-fix), passes on 57bfb25 (fixed). * ci: re-trigger checks --------- Co-authored-by: nima <nima@girnarholdings.com>
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.
Problem
In multiplex mode, all profile cron job deliveries route through the root profile's Telegram bot instead of each profile's own bot.
Fix (3 seams, 19 lines)
Tests