Skip to content

E2E expense specs fail at farm month boundaries #1009

Description

@mforce

Problem

E2E smoke specs that read /expenses fail during the first days of each month. They fail on every PR that runs e2e-smoke.yml, whatever the PR changes.

Cause

  • /expenses shows only the current farm month by default (web/src/routes/ExpensesPage.tsx:81, monthStart).
  • The simulation seeder dates its expenses relative to today. For example, "Sim Feeder Replacement Part" is dated today − 2 (src/Cluckwork.Infrastructure/Persistence/SimulationDataSeeder.cs:1807).
  • The sim farm uses America/Chicago (tools/simulation/bootstrap.sh:251). When the farm month changes, those rows fall into the previous month and disappear from the default view.

Evidence (PR #1001, 2026-10-01)

  • Run 36816746657 on 5d468df finished at 04:53 UTC, which was Sept 30 in Chicago. It passed.
  • Run 36817507326 on 91801a6b ran after 05:00 UTC, which was Oct 1 in Chicago. It failed, and a rerun of the failed jobs failed on the same specs. The only change between the two runs was a Vitest bump, which does not affect the built SPA.

Specs that failed in both attempts:

  • specs/dialog-actions.spec.ts:6: Expenses correction keeps Save reachable, at 1280 and @phone. It timed out waiting for the "Sim Feeder Replacement Part" row.
  • specs/phone.spec.ts:898: /expenses shows ten complete rows above the bottom navigation, @phone.
  • specs/optical-size.spec.ts:94: real body text stays at the text cut on a phone, @phone. Its link to the month boundary is not yet traced.

Fix options

  1. Make the specs set the date range explicitly instead of relying on the current-month default.
  2. Make the seeder keep enough expenses, including the named rows the specs use, inside the current farm month. Clamping dates to the first day of the month could do this.

Option 1 keeps the specs independent of the clock. Option 2 also fixes manual verification against the sim stack early in a month.

Acceptance

  • The listed specs pass when the farm's "today" is the 1st of a month.
  • Reproduce with a fixed clock, not by waiting for a month boundary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendReact/Vite web clientbugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions