From dce2ecb8a9428aedf69e959bd15d7a9fa15eae01 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 30 Aug 2026 05:35:35 -0700 Subject: [PATCH] test: cron ContextVar-masking test now uses a chat platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_explicit_blank_masks_leaked_cron_env_for_gateway_classification used platform=api_server as an arbitrary gateway platform; api_server is now intentionally excluded from gateway approval contexts (unattended class). Switch to telegram — the test's subject is the blank-cron-ContextVar masking, not platform policy. --- tests/tools/test_cron_approval_mode.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_cron_approval_mode.py b/tests/tools/test_cron_approval_mode.py index 805bee0c06..8ad17f5bda 100644 --- a/tests/tools/test_cron_approval_mode.py +++ b/tests/tools/test_cron_approval_mode.py @@ -98,7 +98,11 @@ class TestCronContextVarDetection: def test_explicit_blank_masks_leaked_cron_env_for_gateway_classification(self, monkeypatch): monkeypatch.setenv("HERMES_CRON_SESSION", "1") monkeypatch.setenv("HERMES_GATEWAY_SESSION", "1") - tokens = set_session_vars(platform="api_server", cron_session="") + # A chat platform: unattended programmatic platforms (webhook, + # msgraph_webhook, api_server) are intentionally NOT gateway + # approval contexts anymore (#37284/#87509) — this test's subject + # is the blank-cron-ContextVar masking, not platform policy. + tokens = set_session_vars(platform="telegram", cron_session="") try: assert approval_module._is_cron_approval_context() is False assert approval_module._is_gateway_approval_context() is True