Repository navigation
Conversation
…et-list test get_fleet_executions defaults to hours=24, and the fixture inserted a row with a fixed started_at of 2026-09-01T10:00Z — green until the calendar caught up, then red on every branch from 2026-09-02T10:00Z onward (the agent-summary arm has no window and kept passing, which is why only one of the pair fired). Timestamps now derive from NOW minus minutes, in utc_now_iso()'s exact format. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NLfHNPtB5UCMk4LonZiJux
obasilakis
left a comment
There was a problem hiding this comment.
/validate-pr: REQUEST CHANGES — superseded, suggest closing
The identical fix is already on dev as 803bb152 (PR #2497, merged 2026-09-02T14:02Z, 1h39m after this PR opened). origin/dev:tests/unit/test_2467_turn_integrity.py:515 derives started = datetime.now(timezone.utc) - timedelta(minutes=5) in the same utc_now_iso() format; this PR's _recent_iso() at tests/unit/test_2467_turn_integrity.py:456-461 is semantically identical (10/9 minutes ago). Two people fixed one bug in parallel and #2497 won the race — git merge-tree confirms a hard conflict with dev on that file, so merging this buys nothing and costs a conflict resolution.
The loose thread that does need action: #2497 landed with Refs #2467, not a closing keyword for #2486 — and this PR is the only one linking #2486 (gh pr list --search "2486 in:body"). So #2486 is fixed on dev but still OPEN and status-in-progress. Closing this PR unmerged strands it; it needs a manual close plus label bump.
Notes
- The fix itself is sound — no reason to prefer either version on merit.
datetime.now(timezone.utc)is explicit UTC with no DST or local-TZ dependency; the format is byte-identical toutc_now_iso()'s'%Y-%m-%dT%H:%M:%S.%fZ', so the lexicographic ISO-Z compare (Invariant #16) holds; 10 minutes ago is always insideiso_cutoff(24); andcompleted_at(9 min) stays afterstarted_at(10 min). It is not weakened: it still assertslen(rows) == 1plus the exactturn_integritypayload, and it keeps the defaulthours=24window exercised rather than bypassing it. - Both this PR and #2497 chose #2486's second option, while the issue body explicitly says "Prefer the first" (
hours=0). That's the PR authors overruling the ticket, not a reviewer call — and it's defensible, since option 1 would stop exercising the windowed path entirely. Worth marking on #2486 as consciously overridden rather than silently dropped. - Sibling scan found no systemic pattern. ~24 test files inspected across every
iso_cutoff()-backed reader (fleet executions/stats/timeline, agent and schedule analytics, reports, reminders, subscription usage, VoIP caps, canary). Zero other tests combine a hardcoded absolute timestamp with a rolling-window reader — everything else seeds viadatetime.now() - timedelta(...), monkeypatchesiso_cutoffto the same literal, or hardcodes only in non-windowed columns. So the per-instance fix was correctly sized; an AST or lint guard for a single occurrence would be over-engineering. - For anyone reading the checks:
pytest (base, seed *) passdoes not contradict the time-bomb claim —.github/workflows/backend-unit-test.yml:117runs the base side with|| trueby design, and the gating check isregression diff, which passed.
Findings produced by /validate-pr (Claude Code).
|
Resolve by running |
|
Resolve by merging |
|
Closing as superseded, per the The identical fix landed on No reflection on the fix, which is sound; two people diagnosed one bug in parallel and #2497 won the race. Merging this would buy nothing and cost a conflict resolution on that file. The loose thread the review flagged is now closed too: #2497 landed with |
Summary
tests/unit/test_2467_turn_integrity.py::TestListReadersCarryTheColumn::test_fleet_list_returns_turn_integrityinserts a row with a hardcodedstarted_at = 2026-09-01T10:00Z, whileget_fleet_executionsfilters on its defaulthours=24window. The test was green until the calendar caught up and began failing on every branch at 2026-09-02T10:00 UTC (dev CI at 09:15Z today passed; any run after 10:00Z reds). Verified failing on cleanorigin/devlocally.The sibling
test_agent_summary_list_returns_turn_integritykept passing becauseget_agent_executions_summaryapplies no window — which is why only one arm of the pair fired.Fix
Timestamps derive from
now(timezone.utc) - timedelta(minutes=…)inutc_now_iso()'s exact format, so the row always sits inside a rolling 24h window. Full file: 33 passed.Closes #2486 (filed in parallel with the same diagnosis — hardcoded started_at vs the hours=24 default window).
This unblocks
backend-unit-testfor every open PR (CI runs on the PR merge ref, so landing this on dev heals them without rebases).🤖 Generated with Claude Code
https://claude.ai/code/session_01NLfHNPtB5UCMk4LonZiJux