fix(e2e): sweep stale 2026-06-07 dates + hardcoded solver windows - #230
Merged
Merged
Conversation
Summary: Follow-up from PR #227. That PR bumped `2026-06-07` in four e2e files that watch `/v/open` (which filters out past events), but explicitly left the remaining seven for a separate sweep because their tests also seed a hardcoded solver window (`from=2026-05-19, to=2026-06-30`) that had to move in lockstep with the seed event date. Today (2026-07-13) is already past `2026-06-07`, so a solve-and-publish flow can produce an empty solution and drop /v/schedule assertions. Adds `solver_window_around(seed_iso)` to `tests/e2e/_helpers.py` returning a (from, to) 3-week bracket, then replaces the literal seed date with `next_sunday_iso()` and the literal window with `solver_window_around()` across all seven files. Changed files: - tests/e2e/_helpers.py — new `solver_window_around()` helper (docstring documents the rot pattern it prevents). - tests/e2e/test_smoke_full_loop.py, tests/e2e/test_availability_solver.py, tests/e2e/test_bulk_notify.py, tests/e2e/test_calendar_subscription.py, tests/e2e/test_onboarding_wizard.py — inline seed/window inside the single test function. - tests/e2e/test_notif_assign_unpublish.py, tests/e2e/test_analytics_recurring_swapreview.py — module-level `EV_DATE` / `FROM_DATE` / `TO_DATE` so the shared `_new_event` / `_solve_and_publish` helpers stay parameterless. - tests/unit/test_e2e_helpers.py — new: 3 invariants for the helpers (Sunday-in-future, seed strictly inside window, deterministic). Validation: - `poetry run pytest tests/unit/test_e2e_helpers.py tests/unit/test_e2e_lane.py` → 5 passed - `make test-unit-fast` → 341 passed, 21 skipped - `poetry run pytest tests/api tests/contract tests/web` → 550 passed - `poetry run black --check api tests` → clean - `poetry run ruff check api tests` → clean - `python -m py_compile` on all touched files → clean Follow-ups: - `2026-07-05` in test_analytics_recurring_swapreview.py (recurring-series start date, `#rs_sd`) is not on the same solve-and-publish path and is still ~2 weeks in the future — leaving alone to keep this sweep narrow. Worth bumping alongside a future rot fix.
The prior run's "Lint, type-check, and test" job failed at step 1 (Set up job) with "Failed to resolve action download info. Error: Service Unavailable" — a GitHub Actions runner-provisioning outage, not a real test failure. The e2e job on the same commit passed.
tomqwu
marked this pull request as ready for review
July 13, 2026 13:48
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.
Why
Follow-up from #227. That PR bumped
2026-06-07in the four e2e files that watch/v/open(which filters out past events), but explicitly deferred the remaining seven because their tests also seed a hardcoded solver window (from=2026-05-19, to=2026-06-30) that has to move in lockstep with the seed event date — bumping just one would push the seed outside the window and drop the assignment.Today (2026-07-13) is already ~5 weeks past
2026-06-07. The seven files continue to compile and run, but any downstream assertion that depends on a solve-and-publish producing a real assignment (/v/scheduleseeing "Sunday 10am Service",/v/inboxseeing the auto notification, the ICS feed containing the shift, the onboarding wizard hitting2 of 4 done) is at real risk of quietly going empty as the seed date recedes and the fixed window falls out of relevance.This PR closes the sweep in one commit.
What changed
tests/e2e/_helpers.py— newsolver_window_around(seed_iso)helper that returns a(from_date, to_date)pair three weeks either side of the seed. Same rot-prevention pattern as the existingnext_sunday_iso().page.fill("#ev_date", ...)andpage.fill("#from_date"|"#to_date", ...)inside a single test function):test_smoke_full_loop.pytest_availability_solver.py— same seed date used for/v/availabilitytime-off entries as welltest_bulk_notify.pytest_calendar_subscription.pytest_onboarding_wizard.py_new_event,_solve_and_publish):test_notif_assign_unpublish.pytest_analytics_recurring_swapreview.pyEV_DATE/FROM_DATE/TO_DATEat import time so the helpers stay parameterless.next_sunday_iso()is pure w.r.t.date.today(), so a single test run sees one consistent triple.tests/unit/test_e2e_helpers.py— new: 3 invariants for the two helpers (Sunday-in-future, seed strictly inside window, deterministic given the same seed).Validation
poetry run pytest tests/unit/test_e2e_helpers.py tests/unit/test_e2e_lane.py→ 5 passedmake test-unit-fast→ 341 passed, 21 skippedpoetry run pytest tests/api tests/contract tests/web→ 550 passedpoetry run black --check api tests→ cleanpoetry run ruff check api tests→ cleanE2E lane could not be exercised locally (Playwright browser channel mismatch, same limitation noted in #227); CI is the source of truth for the e2e job. Contract snapshot untouched — no endpoints changed.
Follow-ups
2026-07-05intest_analytics_recurring_swapreview.py(#rs_sd, a recurring-series start date on a different code path) is not on any solve-and-publish flow and is still ~2 weeks in the future. Left alone to keep this sweep narrow; worth bumping alongside the next rot fix.Generated by Claude Code