Repository navigation
ci-flake: pin the recap reference instant in open_loops_recap_integration - #23652
Merged
Merged
Conversation
…ence instant The fixture computed 'today' from the real UTC clock while the worker's _display_date_for_now applies a noon split (before 12:00 local the recap summarizes yesterday). For half of every UTC day the stubbed get_daily_summary_by_date then returned a pre-generated summary for the worker's actual day, generation was skipped as a duplicate, the webhook never fired and five webhook_calls assertions failed — main-red on fca00e4 at 2026-10-26T00:09Z and every 00:00-12:00 UTC run since. Pin the reference instant (_AT, 18:00 UTC) that _send_summary_notification reads from user_data[3], and derive the fixture's day from the same pin, so the test reads no wall clock at all. Test-only change.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Git-on-my-level
deleted the
agent/m1-studio-zcode-glm-5-3/9729d6b44817
branch
October 26, 2026 01:36
Git-on-my-level
added a commit
that referenced
this pull request
Oct 26, 2026
Carry #23652's baseline recap test correction as directed by lead ruling280f41.
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.
test_open_loops_recap_integrationwent main-red on fca00e4 (#23639) withwebhook_calls == []and has failed every Backend Unit Tests run whose shard executed inside the 00:00–12:00 UTC window since, while the identical test file passes outside that window. This is a wall-clock-dependent test, not a product regression: the recap's noon-split day selection is by design.Occurrences (same signature,
AssertionError: assert [] == ['u1'])Complementary evidence — same test file, same assertions, all 15 passing at 23:43 UTC (outside the window): PR run 40245371308, shard 5.
Root cause
The
recap_envfixture computestoday = datetime.now(timezone.utc), but the worker derives its day via_display_date_for_now(tz, at), which applies a noon split: before 12:00 in the user's zone the recap summarizes yesterday. During 00:00–12:00 UTC the worker therefore asks the stubbedget_daily_summary_by_datefor the previous day, for which the fixture returns a pre-generated{'status': 'generated'}summary; generation is skipped as a duplicate (suppressed_existing),pending_webhookstays unset,day_summary_webhookis never called, and the fivewebhook_callsassertions fail. Reproduced locally in the failing window before the change; passing after it, same window.Fix
Pin the recap's reference instant (
_AT, 18:00 UTC on a fixed date) and pass it throughuser_data[3]— theatslot_send_summary_notificationalready reads — with the fixture deriving itstodayfrom the same pin. The test no longer reads the wall clock anywhere in the date path, so it cannot disagree with the worker at any hour or across a midnight/noon boundary. Test-only change; no production code touched.David authorized CI flake fixes and dependency caching on 2026-10-22. No
.githubworkflow edits and no new workflows were needed for this flake.Verification
nice -n 19 backend/.venv/bin/python -m pytest backend/tests/unit/test_open_loops_recap_integration.py -q: 15 passed, executed inside the 00:00–12:00 UTC window that fails on main (A/B: the same command failed 5 tests before the change, same window).test.shflags:-p no:langsmith_plugin -v -m "not integration and not slow", thread pins): 15 passed.scripts/select_backend_unit_tests.py --changed-files backend/tests/unit/test_open_loops_recap_integration.py: selects exactly this file — the PR's CI coverage.origin/main(a0ffe88): 15 passed.Failure-Class: none
A wall-clock-dependent new test, not a recurring production failure class; the deterministic-test repair is the whole remedy.
Product invariants: none (backend test only).