Repository navigation
test(2467): derive the fleet-list fixture timestamp from now, not a literal date - #2497
Merged
Merged
Conversation
…iteral date `get_fleet_executions` defaults to `hours=24`. The `TestListReadersCarryTheColumn` fixture inserted `started_at = "2026-09-01T10:00:00Z"`, so `test_fleet_list_returns_turn_integrity` passed every run until 2026-09-02 10:00 UTC and then failed every `dev` push after it — run 33634096378, `assert 0 == 1`, with no code change anywhere. First seen on the #2471 merge; reproduced identically on the pre-merge commit dd91056, so it is the fixture's clock, not a regression. Both timestamps now come from `datetime.now(timezone.utc)`, in the `utc_now_iso()` shape the readers parse. The sibling `get_agent_executions_summary` test never windowed, which is why only one of the two went red. Refs #2467 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012d5K93m76zw4Rn193FXvsJ
vybe
approved these changes
Sep 2, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Verified: the single test fails deterministically on dev and on dd91056 today, passes with the relative timestamp (33/33 in the file, run twice). Test-only diff. Approving; merging once backend-unit-test is green, not just the required contexts.
2 tasks
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.
Refs #2467 (follow-up to #2473 — a test time bomb, not a product change).
What broke
dev'sbackend-unit-testpush run went red on the #2471 merge (run 33634096378): one failure in 13,527,#2471 touches nothing under
src/or this test. The cause is the fixture: it insertsstarted_at = "2026-09-01T10:00:00Z"as a literal, andget_fleet_executionsdefaults tohours=24(db/schedules/stats.py:338). So the row fell out of the window at 2026-09-02 10:00 UTC — the previous push (dd91056, 09:15 UTC) was green, and the same test fails on that commit today. The siblingget_agent_executions_summaryreader has no window, which is why only one of the pair went red.Fix
Both timestamps are derived from
datetime.now(timezone.utc)in theutc_now_iso()shape the readers parse. A comment on the fixture names the trap so the next reader doesn't re-plant it.Verification
tests/unit/test_2467_turn_integrity.py: 33 passed (run twice) on this branch; the single test fails deterministically ondevand on dd91056 without the change.grepfor otherget_fleet_executionstests carrying a"2026-literal: this was the only one.🤖 Generated with Claude Code
https://claude.ai/code/session_012d5K93m76zw4Rn193FXvsJ