From ff9e96e0e238b746d0ac4f898d29181652925e5b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 30 May 2026 11:25:36 -0400 Subject: [PATCH] fix(tests): update scheduler-status shape pins for platform_cooldowns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 61ce1ce added platform_cooldowns to scheduler_status(), and two pinned key-set assertions tied to the old shape failed in CI. Updated: - tests/test_api_sources.py::test_schedule_status_shape — direct /api/sources/schedule-status response. - tests/test_api_system_activity.py::test_summary_returns_rollup_shape — nested under body["scheduler"] in the summary endpoint. [[feedback-plan-grep-pinned-tests]] miss — should have grepped tests/ for `last_tick_at` / `auto_sources` before adding the new key. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test_api_sources.py | 5 ++++- tests/test_api_system_activity.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_api_sources.py b/tests/test_api_sources.py index c48ed65..28d1a11 100644 --- a/tests/test_api_sources.py +++ b/tests/test_api_sources.py @@ -39,7 +39,10 @@ async def test_schedule_status_shape(client): resp = await client.get("/api/sources/schedule-status") assert resp.status_code == 200 body = await resp.get_json() - assert set(body) == {"last_tick_at", "next_due_at", "due_now", "auto_sources"} + assert set(body) == { + "last_tick_at", "next_due_at", "due_now", "auto_sources", + "platform_cooldowns", + } assert isinstance(body["due_now"], int) assert isinstance(body["auto_sources"], int) diff --git a/tests/test_api_system_activity.py b/tests/test_api_system_activity.py index f5832ef..8191a8e 100644 --- a/tests/test_api_system_activity.py +++ b/tests/test_api_system_activity.py @@ -60,7 +60,10 @@ async def test_summary_returns_rollup_shape(client, monkeypatch): assert body["queued_total"] == 3 # only ml has a non-zero depth assert isinstance(body["running"], int) assert isinstance(body["failing"], int) - assert set(body["scheduler"]) == {"last_tick_at", "next_due_at", "due_now", "auto_sources"} + assert set(body["scheduler"]) == { + "last_tick_at", "next_due_at", "due_now", "auto_sources", + "platform_cooldowns", + } @pytest.mark.asyncio