From 0f48cd00b2e319f4f56093e0b29bc1b092818ae3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Jul 2026 04:35:21 +0000 Subject: [PATCH] v0.20.2: pin SCREENING_SHARD_GROUPS in shard tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 2026-07-23 scheduled run failed before the agent started: the workflow's pre-run test suite executes under the CI env where SCREENING_SHARD_GROUPS=2 (v0.20.1), and two older shard tests assumed the 4-group split without pinning the variable — green locally (default 4), red in CI, no daily produced. Both tests now pin the group count explicitly; the discussion-first ordering test asserts it in both group modes. Test-only change. Suite verified under both envs (259 pass each). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JXjb8D4NrsgUXAvQodQSum --- scripts/agent_radar.py | 2 +- tests/test_cloud_agent_runner.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/agent_radar.py b/scripts/agent_radar.py index c42d6c6..c121346 100644 --- a/scripts/agent_radar.py +++ b/scripts/agent_radar.py @@ -58,7 +58,7 @@ INIT_PROTECTED_DIRS = ("prompts", "automation", "docs") -__version__ = "0.20.1" +__version__ = "0.20.2" CORE_FILES = [ "README.md", diff --git a/tests/test_cloud_agent_runner.py b/tests/test_cloud_agent_runner.py index fca8924..510422e 100644 --- a/tests/test_cloud_agent_runner.py +++ b/tests/test_cloud_agent_runner.py @@ -2625,7 +2625,9 @@ def test_screening_shard_split_by_lane(self) -> None: {"source": "openai-blog", "title": "release", "url": "https://openai.com/x"}, {"source": "npm", "title": "package", "url": "https://www.npmjs.com/package/x"}, ] - shards = dict(cloud_agent_runner.screening_shard_items(items)) + # Pin the group count: CI sets SCREENING_SHARD_GROUPS=2 globally. + with mock.patch.dict(os.environ, {"SCREENING_SHARD_GROUPS": "4"}, clear=False): + shards = dict(cloud_agent_runner.screening_shard_items(items)) self.assertEqual(len(shards["discussion"]), 2) self.assertEqual(len(shards["official-vendor"]), 1) self.assertEqual(len(shards["github-oss"]), 1) @@ -3119,8 +3121,14 @@ def test_discussion_shard_runs_first(self) -> None: {"source": "github", "title": "repo", "url": "https://github.com/a/b"}, {"source": "bluesky", "title": "post", "url": "https://bsky.app/p/1"}, ] - shards = cloud_agent_runner.screening_shard_items(items) + # Discussion leads in both group modes so merge dedup keeps community + # framing; pin each mode explicitly (CI sets SCREENING_SHARD_GROUPS=2). + with mock.patch.dict(os.environ, {"SCREENING_SHARD_GROUPS": "4"}, clear=False): + shards = cloud_agent_runner.screening_shard_items(items) self.assertEqual(shards[0][0], "discussion") + with mock.patch.dict(os.environ, {"SCREENING_SHARD_GROUPS": "2"}, clear=False): + merged = cloud_agent_runner.screening_shard_items(items) + self.assertTrue(merged[0][0].startswith("discussion")) def test_diversify_reserves_three_discussion_user_slots(self) -> None: candidates = []