Skip to content

Fix flaky food-plan suggestion e2e tests by isolating them in an ephemeral household#613

Merged
inur93 merged 1 commit into
mainfrom
claude/deploy-workflow-e2e-failures-ty1vzr
Jul 6, 2026
Merged

Fix flaky food-plan suggestion e2e tests by isolating them in an ephemeral household#613
inur93 merged 1 commit into
mainfrom
claude/deploy-workflow-e2e-failures-ty1vzr

Conversation

@inur93

@inur93 inur93 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The deploy e2e workflow's suggestion tests asserted a freshly-created
recipe ranks within the top N results of GET /api/food-plan/suggestions,
which scores every recipe in the household. The shared deploy household
had already accumulated 200+ recipes that permanently outscore a brand
new "not planned yet" candidate, so no result count can make the
assertion reliable there — a prior fix (raising MaxCount, cleaning up
other specs' leaks) didn't hold because it couldn't undo data that had
already leaked into the persistent household.

Add useEphemeralHousehold() to food-plans.spec.ts: it creates a
throwaway household via POST /api/households and points the page at it,
so the two suggestion tests run against a household with zero
pre-existing recipes and get deterministic rankings. Deleting the
household in finally also makes its recipes/entries invisible to
every other household's suggestions, so per-recipe/entry cleanup is no
longer needed either.

…meral household

The deploy e2e workflow's suggestion tests asserted a freshly-created
recipe ranks within the top N results of GET /api/food-plan/suggestions,
which scores every recipe in the household. The shared deploy household
had already accumulated 200+ recipes that permanently outscore a brand
new "not planned yet" candidate, so no result count can make the
assertion reliable there — a prior fix (raising MaxCount, cleaning up
other specs' leaks) didn't hold because it couldn't undo data that had
already leaked into the persistent household.

Add useEphemeralHousehold() to food-plans.spec.ts: it creates a
throwaway household via POST /api/households and points the page at it,
so the two suggestion tests run against a household with zero
pre-existing recipes and get deterministic rankings. Deleting the
household in `finally` also makes its recipes/entries invisible to
every other household's suggestions, so per-recipe/entry cleanup is no
longer needed either.
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@inur93 inur93 merged commit 029e4db into main Jul 6, 2026
7 checks passed
@inur93 inur93 deleted the claude/deploy-workflow-e2e-failures-ty1vzr branch July 6, 2026 03:48
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.

2 participants