Teknium
396ee69032
fix(gateway): seed plugin extras before is_connected gate ( #31703 )
...
Follow-up to 54e61f933 . The plugin enablement gate calls
``entry.is_connected(probe_cfg)`` BEFORE ``env_enablement_fn`` runs,
and the probe is built as ``existing_cfg or PlatformConfig()`` — empty
extras, ``enabled=False``.
For plugins whose ``is_connected`` reads ``config.extra`` instead
of env vars directly, that probe is a misrepresentation of what the
platform will look like after enablement. Google Chat's
``_is_connected`` short-circuits on ``config.enabled`` and inspects
``config.extra["project_id"]`` / ``config.extra["subscription_name"]``
— both False on the default probe even when the user has set
``GOOGLE_CHAT_PROJECT_ID`` and ``GOOGLE_CHAT_SUBSCRIPTION_NAME``. Result:
Google Chat silently fails the gate on every env-var-only setup.
Build a candidate probe that mirrors what the platform will look like
post-enablement:
- pre-call ``env_enablement_fn`` and layer its result into the probe's
``extra`` (without mutating any existing platform config)
- pass ``enabled=True`` on the probe — we're asking "would this BE
configured if we let it in?" not "is it currently enabled?"
- reuse the same seeded extras when we commit the platform to
``config.platforms`` (avoids calling ``env_enablement_fn`` twice)
Discord/IRC/Teams/LINE/ntfy/Simplex ``_is_connected`` hooks read env
vars directly, so they are unaffected. This change only restores
Google Chat on env-var-only setups while keeping the original #31116
Discord-no-token block intact.
All 6 shipped ``env_enablement_fn`` implementations were audited and
are pure reads (no ``os.environ`` writes), so running them earlier in
the loop has no observable side effects.
Tests: 2 new in tests/gateway/test_platform_registry.py covering
extras-seeded-before-is_connected and don't-leak-extras-on-gate-fail.
693 tests across 11 adjacent suites pass (platform_registry, config,
google_chat, matrix, discord_connect, ntfy_plugin, simplex_plugin,
line_plugin, irc_adapter, teams, gateway_platform_gating).
Refs #31116 .
2026-05-24 15:44:26 -07:00
..
2026-05-20 13:00:57 -07:00
2026-02-26 03:20:08 +03:00
2026-04-30 01:19:34 -07:00
2026-05-21 16:40:04 +05:30
2026-04-30 20:30:31 -07:00
2026-05-07 05:16:38 -07:00
2026-04-30 04:32:33 -07:00
2026-05-24 01:31:45 -07:00
2026-05-08 14:55:40 -07:00
2026-05-19 01:28:32 -07:00
2026-05-17 02:29:41 -07:00
2026-04-10 16:51:44 -07:00
2026-04-21 00:50:58 -07:00
2026-04-20 04:16:13 -07:00
2026-04-12 18:03:16 -07:00
2026-05-19 17:27:24 -07:00
2026-04-07 03:28:44 -07:00
2026-05-24 04:55:18 -07:00
2026-05-19 01:28:32 -07:00
2026-05-23 18:18:41 -07:00
2026-04-14 16:56:49 -07:00
2026-05-17 12:44:48 -07:00
2026-05-18 22:03:12 -07:00
2026-05-24 01:31:45 -07:00
2026-05-24 15:43:48 -07:00
2026-05-18 21:38:05 -07:00
2026-05-24 01:31:45 -07:00
2026-04-30 04:29:15 -07:00
2026-04-19 01:48:42 -07:00
2026-04-26 12:29:02 -07:00
2026-05-03 03:54:03 -07:00
2026-05-24 01:31:45 -07:00
2026-04-23 19:38:33 -05:00
2026-05-18 10:19:40 -07:00
2026-04-24 02:55:43 -07:00
2026-04-24 02:55:43 -07:00
2026-05-17 02:29:41 -07:00
2026-05-24 01:31:45 -07:00
2026-05-18 23:59:57 -07:00
2026-04-22 11:59:39 -07:00
2026-05-01 14:01:26 -07:00
2026-05-09 11:04:46 -07:00
2026-05-23 20:48:56 -07:00
2026-04-24 03:04:42 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-24 06:54:16 -07:00
2026-03-09 02:20:57 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-17 02:29:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-10 22:22:25 -07:00
2026-05-21 16:40:04 +05:30
2026-04-03 13:16:26 -07:00
2026-05-14 14:51:07 -07:00
2026-05-09 13:35:50 -07:00
2026-04-30 23:05:48 -07:00
2026-05-18 02:14:43 -07:00
2026-04-10 21:16:56 -07:00
2026-05-23 02:40:33 -07:00
2026-05-24 06:54:16 -07:00
2026-05-13 17:32:22 -07:00
2026-04-30 20:30:31 -07:00
2026-04-17 19:04:11 -07:00
2026-04-17 19:04:11 -07:00
2026-05-07 05:09:39 -07:00
2026-05-24 04:51:19 -07:00
2026-04-30 20:29:19 -07:00
2026-05-03 17:00:09 -07:00
2026-05-19 17:27:24 -07:00
2026-04-27 07:41:42 -07:00
2026-05-07 06:31:08 -07:00
2026-05-07 17:33:09 -07:00
2026-05-11 07:06:27 -07:00
2026-05-21 16:40:04 +05:30
2026-05-03 08:47:49 -07:00
2026-04-17 01:05:09 -07:00
2026-04-22 16:23:21 -07:00
2026-04-15 17:54:16 -07:00
2026-04-21 01:33:10 -07:00
2026-05-24 01:31:45 -07:00
2026-05-09 02:56:29 -07:00
2026-05-10 14:27:59 -07:00
2026-04-27 19:09:32 -07:00
2026-05-10 06:40:46 -07:00
2026-05-20 13:00:57 -07:00
2026-05-24 15:03:27 -07:00
2026-04-27 21:22:44 -07:00
2026-04-27 21:22:44 -07:00
2026-04-16 20:43:41 -07:00
2026-05-24 15:16:03 -07:00
2026-05-19 01:28:32 -07:00
2026-04-26 18:20:17 -07:00
2026-02-28 03:38:27 -05:00
2026-05-16 12:55:23 -07:00
2026-04-26 18:51:51 -07:00
2026-05-20 13:00:57 -07:00
2026-04-10 03:07:00 -07:00
2026-04-10 02:58:42 -07:00
2026-05-24 06:54:16 -07:00
2026-04-30 20:26:35 -07:00
2026-05-01 13:33:06 -07:00
2026-05-23 16:13:01 -07:00
2026-05-23 01:46:34 -07:00
2026-04-30 05:00:25 -07:00
2026-04-18 19:32:26 -07:00
2026-04-19 03:03:57 -07:00
2026-04-10 03:44:43 -07:00
2026-05-23 01:40:35 -07:00
2026-05-24 04:25:20 -07:00
2026-05-02 02:23:37 -07:00
2026-05-15 14:32:14 -07:00
2026-05-24 15:44:26 -07:00
2026-04-29 21:56:51 -07:00
2026-05-07 05:04:37 -07:00
2026-04-24 03:02:03 -07:00
2026-04-24 14:31:04 -07:00
2026-05-24 04:25:12 -07:00
2026-04-26 11:55:09 -07:00
2026-04-30 20:40:46 -07:00
2026-04-29 21:07:47 -07:00
2026-05-22 14:21:41 -07:00
2026-05-09 14:47:33 -07:00
2026-04-21 13:33:02 -07:00
2026-05-24 01:31:45 -07:00
2026-05-07 05:16:38 -07:00
2026-04-17 21:17:33 -07:00
2026-05-19 17:27:24 -07:00
2026-04-29 04:57:22 -07:00
2026-05-20 13:00:57 -07:00
2026-03-10 23:34:52 -07:00
2026-05-07 05:04:37 -07:00
2026-04-26 05:47:37 -07:00
2026-05-24 04:31:13 -07:00
2026-05-15 14:32:14 -07:00
2026-05-23 02:20:14 -07:00
2026-04-26 07:15:23 -07:00
2026-05-23 02:27:08 -07:00
2026-05-07 05:49:16 -07:00
2026-04-28 06:50:04 -07:00
2026-05-08 18:50:25 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-04-04 19:05:34 -07:00
2026-05-18 22:25:15 -07:00
2026-05-17 02:29:41 -07:00
2026-05-09 14:18:20 +03:00
2026-05-20 13:00:57 -07:00
2026-04-16 02:26:14 -07:00
2026-05-18 10:19:40 -07:00
2026-04-25 18:47:53 -07:00
2026-04-26 18:49:48 -07:00
2026-05-23 02:25:53 -07:00
2026-04-26 19:01:50 -07:00
2026-04-30 20:37:27 -07:00
2026-05-15 01:25:42 -07:00
2026-05-24 01:31:45 -07:00
2026-04-17 15:18:23 -07:00
2026-04-20 03:10:19 -07:00
2026-05-20 13:00:57 -07:00
2026-04-12 13:05:56 -07:00
2026-04-21 00:54:46 -07:00
2026-04-26 12:51:53 -07:00
2026-05-10 09:01:51 -07:00
2026-04-27 06:41:16 -07:00
2026-04-29 04:38:17 -07:00
2026-04-30 04:28:08 -07:00
2026-05-16 11:53:57 -07:00
2026-05-15 01:41:30 -07:00
2026-04-26 12:35:16 -07:00
2026-04-26 18:25:41 -07:00
2026-05-07 06:54:29 -07:00
2026-05-13 18:58:14 -07:00
2026-05-10 12:33:54 -07:00
2026-05-10 12:33:54 -07:00
2026-05-04 05:25:09 -07:00
2026-03-27 11:33:19 -07:00
2026-03-15 23:04:34 -07:00
2026-04-30 20:41:18 -07:00
2026-05-12 16:33:09 -07:00
2026-04-18 04:17:18 -07:00
2026-04-02 20:54:27 -07:00
2026-03-01 05:28:12 -08:00
2026-05-18 21:51:39 -07:00
2026-04-26 17:26:37 -07:00
2026-05-10 15:20:40 -07:00
2026-05-22 14:21:41 -07:00
2026-05-18 22:59:40 -07:00
2026-04-14 17:08:35 -07:00
2026-05-08 11:18:14 -07:00
2026-05-17 12:44:48 -07:00
2026-05-19 01:28:32 -07:00
2026-05-18 21:53:57 -07:00
2026-05-18 22:08:08 -07:00
2026-04-07 14:08:59 -07:00
2026-05-18 22:51:35 -07:00
2026-05-18 21:49:19 -07:00
2026-05-18 22:01:31 -07:00
2026-05-18 22:37:28 -07:00
2026-05-19 01:28:32 -07:00
2026-05-18 22:34:48 -07:00
2026-05-23 16:26:28 -07:00
2026-05-18 22:59:40 -07:00
2026-04-20 00:10:22 -07:00
2026-05-14 07:47:52 -07:00
2026-05-02 01:55:04 -07:00
2026-05-18 22:14:45 -07:00
2026-05-18 22:53:01 -07:00
2026-04-13 10:50:24 -07:00
2026-05-18 21:59:40 -07:00
2026-05-12 17:02:29 -07:00
2026-05-18 21:52:39 -07:00
2026-05-09 11:10:36 -07:00
2026-05-24 15:27:41 -07:00
2026-05-18 22:28:21 -07:00
2026-05-23 02:42:10 -07:00
2026-05-10 22:22:25 -07:00
2026-03-17 02:49:57 -07:00
2026-05-24 15:28:40 -07:00
2026-05-24 15:28:40 -07:00
2026-04-21 06:23:09 -07:00
2026-05-22 14:21:41 -07:00
2026-05-04 03:14:50 -07:00
2026-05-17 02:29:41 -07:00
2026-05-23 01:40:35 -07:00
2026-05-18 22:43:14 -07:00
2026-05-02 02:00:09 -07:00
2026-04-22 16:23:21 -07:00
2026-04-30 20:19:23 -07:00
2026-05-16 23:11:43 -07:00
2026-04-21 01:56:35 -07:00
2026-05-12 13:59:22 -04:00
2026-04-27 12:37:33 -07:00
2026-05-22 14:21:41 -07:00
2026-04-19 22:36:00 -07:00
2026-04-12 18:05:41 -07:00
2026-05-24 04:47:45 -07:00
2026-05-07 07:38:43 -07:00
2026-05-23 02:39:12 -07:00
2026-04-07 17:27:09 -07:00
2026-04-19 22:45:08 -07:00
2026-05-24 01:30:47 -07:00
2026-05-24 01:33:40 -07:00
2026-05-07 06:08:06 -07:00
2026-05-15 14:32:14 -07:00
2026-05-13 23:11:20 -07:00
2026-05-14 09:59:03 -07:00
2026-03-17 10:44:37 -07:00
2026-04-14 01:43:45 -07:00
2026-04-13 16:32:04 -07:00