fix(cron): align matrix home env var with /sethome conventio - #18154
fix(cron): align matrix home env var with /sethome conventio#18154selika wants to merge 1 commit into
Conversation
The cron delivery scheduler reads `MATRIX_HOME_ROOM` for the matrix home
channel, but the `/sethome` command handler in `gateway/run.py` writes
`{platform.upper()}_HOME_CHANNEL` — i.e. `MATRIX_HOME_CHANNEL`. All
other 14 platforms in `_HOME_TARGET_ENV_VARS` use the unified
`_HOME_CHANNEL` suffix; only Matrix is the outlier on `_HOME_ROOM`.
Effect: a Matrix cron job with `deliver: "origin"` and `origin: null`
falls through to the home-channel fallback which checks
`MATRIX_HOME_ROOM` — but that env var is never set by `/sethome`, so
the fallback returns nothing and delivery is silently dropped.
This patch:
1. Renames the matrix entry in `_HOME_TARGET_ENV_VARS` to
`MATRIX_HOME_CHANNEL`, matching what `/sethome` writes and aligning
with the other platforms.
2. Adds `MATRIX_HOME_CHANNEL → MATRIX_HOME_ROOM` to
`_LEGACY_HOME_TARGET_ENV_VARS` so any existing deployments that
manually set `MATRIX_HOME_ROOM` continue to work via the legacy
fallback path.
|
Thanks for the diagnosis @selika — your bug analysis was correct (Matrix Fixed at the write site via PR #18272 (salvaged from @mikeyobrien's earlier #12698), which also covers email's |
The cron delivery scheduler reads
MATRIX_HOME_ROOMfor the matrix home channel, but the/sethomecommand handler ingateway/run.pywrites{platform.upper()}_HOME_CHANNEL— i.e.MATRIX_HOME_CHANNEL. All other 14 platforms in_HOME_TARGET_ENV_VARSuse the unified_HOME_CHANNELsuffix; only Matrix is the outlier on_HOME_ROOM.Effect: a Matrix cron job with
deliver: "origin"andorigin: nullfalls through to the home-channel fallback which checksMATRIX_HOME_ROOM— but that env var is never set by/sethome, so the fallback returns nothing and delivery is silently dropped.This patch:
_HOME_TARGET_ENV_VARStoMATRIX_HOME_CHANNEL, matching what/sethomewrites and aligning with the other platforms.MATRIX_HOME_CHANNEL → MATRIX_HOME_ROOMto_LEGACY_HOME_TARGET_ENV_VARSso any existing deployments that manually setMATRIX_HOME_ROOMcontinue to work via the legacy fallback path.What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs