test(server): stop asserting UTC rendering with a substring that matches the date - #385
Merged
Merged
Conversation
…hes the date test_preview_stats_render_timestamps_in_utc_on_a_non_utc_host asserted "-04" not in the rendered bound to catch the host's -04:00 offset. The substring also matches the day in 2026-09-04 and the month in any April date, so the test failed on the 4th of every month and through all of April regardless of the code under test. It is failing on main today. The bounds are now compared to the row timestamps and to the wall clock instead. That drops the date collision and covers more: a render that shifted the clock into the host zone while still stamping +00:00 passed both the old substring check and a rows-to-stats comparison on its own, because rows and stats go through the same projection and shift together. Reported independently by @akshatpatel64 (#383) and @victorwon2001 (#384).
This was referenced Sep 4, 2026
5 tasks
VARUN3WARE
added a commit
to VARUN3WARE/hflow
that referenced
this pull request
Sep 4, 2026
…dar day Same fix as Hebbian-Robotics#385: asserting "-04" not in an ISO timestamp fails on the 4th of any month (e.g. 2026-09-04). Check real UTC offset and stats bounds instead so CI can pass while that PR is still open.
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_preview_stats_render_timestamps_in_utc_on_a_non_utc_hostasserted"-04" not in bound_valueto catch the host's-04:00offset leaking into the stats panel. That substring also matches the day in2026-09-04and the month in any April date, so the test fails on the 4th of every month and through all of April no matter what the code under test does. Main is red today for that reason:Reported independently by @akshatpatel64 on #383 and @victorwon2001 on #384, both of whom had to explain it away in their own validation runs.
Why this shape
The bounds are compared to the row timestamps and to the wall clock instead of sniffed for a substring. That removes the date collision and covers strictly more, which two mutations show:
The second one is new. The old substring check passed it, and so does a rows-to-stats comparison on its own, because rows and stats both go through
select_headand shift together. The fixture stampsrecorded_atas it appends, so anchoring the max bound neardatetime.now(UTC)is what makes a whole-hour zone shift visible;America/New_Yorkis 4 hours away and the window is 1 hour.Validation
uv run ruff check,uv run ruff format --check,uv run ty checkclean;uv run pytest -q1453 passed, 6 skipped.Checklist
uv run ruff check --fix,uv run ruff format, anduv run ty check.