Skip to content

ci-flake: pin the recap reference instant in open_loops_recap_integration - #23652

Merged
Git-on-my-level merged 1 commit into
mainfrom
agent/m1-studio-zcode-glm-5-3/9729d6b44817
Oct 26, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
agent/m1-studio-zcode-glm-5-3/9729d6b44817

Conversation

@Git-on-my-level

Copy link
Copy Markdown
Member

test_open_loops_recap_integration went main-red on fca00e4 (#23639) with webhook_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_env fixture computes today = 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 stubbed get_daily_summary_by_date for the previous day, for which the fixture returns a pre-generated {'status': 'generated'} summary; generation is skipped as a duplicate (suppressed_existing), pending_webhook stays unset, day_summary_webhook is never called, and the five webhook_calls assertions 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 through user_data[3] — the at slot _send_summary_notification already reads — with the fixture deriving its today from 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 .github workflow 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).
  • CI-mirrored invocation (test.sh flags: -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.
  • Re-verified after rebasing onto current 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).

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T01:28:26.662421Z fb4219e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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
Git-on-my-level merged commit cca3e42 into main Oct 26, 2026
58 checks passed
@Git-on-my-level
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.
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