Skip to content

test(routing): use the real clock for the routed-session backlog check - #26

Merged
philtief merged 1 commit into
mainfrom
fix/routing-test-clock
Oct 1, 2026
Merged

philtief merged 1 commit into
mainfrom
fix/routing-test-clock

Conversation

@philtief

@philtief philtief commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Problem

test_route_sessions_writes_model_routes_and_builds_backlog started failing on 30 Sep. Routing stamps session_topics.created_at with the real time, but the test built the backlog with a fixed 2026-09-29 12:00 clock. Once the real date passed that, routed sessions looked like they were in the future, and the backlog dropped them.

Change

The test builds the backlog with datetime.now(timezone.utc), the same clock routing uses. Production already uses the real clock on both sides, so there's no code change.

Verification

All 15 routing tests pass, and the full suite passes in the pre-commit hook. Ruff is clean.

This pull request and its description were written by Isaac.

Routing stamps `session_topics.created_at` with the real time, but the
test built the backlog with a fixed 2026-09-29 clock. From 30 Sep the
routed sessions looked like they were in the future and were dropped.
Production uses the real clock on both sides and is unaffected.

Co-authored-by: Isaac <no-reply@databricks.com>
@philtief
philtief merged commit cfec959 into main Oct 1, 2026
3 checks passed
@philtief
philtief deleted the fix/routing-test-clock branch October 1, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant