From 01c1b50541b0dc1d42cbdaa90052f6b94ceba20c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 11 Apr 2026 18:45:54 -0500 Subject: feat: prioritize recent-window backfill before full history --- tests/test_contributions_api.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_contributions_api.py') diff --git a/tests/test_contributions_api.py b/tests/test_contributions_api.py index f2b8564..15af7d8 100644 --- a/tests/test_contributions_api.py +++ b/tests/test_contributions_api.py @@ -48,6 +48,8 @@ def test_contributions_api_returns_zero_filled_range(client: TestClient, db_sess assert response.status_code == 200 assert response.json()["is_indexed"] is True assert response.json()["indexing_state"] == "indexed" + assert response.json()["is_recent_window_backfilled"] is False + assert response.json()["recent_backfill_state"] == "pending" assert response.json()["days"] == [ {"date": "2026-03-28", "count": 0, "score": 0.0}, {"date": "2026-03-29", "count": 0, "score": 0.0}, @@ -63,6 +65,9 @@ def test_public_read_registers_actor_for_lazy_indexing(client: TestClient, db_se assert response.status_code == 200 assert response.json()["is_indexed"] is False assert response.json()["indexing_state"] == "pending" + assert response.json()["is_recent_window_backfilled"] is False + assert response.json()["recent_backfill_state"] == "pending" + assert response.json()["recent_backfill_completed_at"] is None assert response.json()["is_backfilled"] is False assert response.json()["backfill_state"] == "pending" assert response.json()["backfill_completed_at"] is None @@ -110,6 +115,8 @@ def test_contribution_stats_api(client: TestClient, db_session) -> None: assert response.json()["current_streak"] == 2 assert response.json()["is_indexed"] is True assert response.json()["indexing_state"] == "indexed" + assert response.json()["is_recent_window_backfilled"] is False + assert response.json()["recent_backfill_state"] == "pending" assert response.json()["is_backfilled"] is False -- cgit v1.2.3