fix(e2e): pin /vector/new to fast anon hot-pool to stop e2e-prod timeout flake#179
Merged
Merged
Conversation
…out flake The e2e-prod LIVE suite flaked: the `provision anon vector (/vector/new)` spec timed out at the 90s per-test limit (run 26999448643) while a same-commit run passed (26999447344). Root cause: vector is an AUTHED dedicated pgvector Postgres on the minted-pro path — slow to provision on prod (15s warm, >90s cold) — the same dedicated-DB slowness for which db & queue were already pinned to forceAnon. Vector was the one remaining slow authed dedicated-DB provision. Fix: set forceAnon on the vector flow so it routes through the fast pgvector hot-pool (same treatment as /db/new and /queue/new), which can never exceed the timeout; the anon resource is TTL-reaped. cache/nosql/storage/webhook stay on the authed-minted path so the authed/minted-account + authed-reap legs are still exercised. Documented the per-service path choice in a table comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
size-limit report 📦
|
mastermanas805
added a commit
that referenced
this pull request
Jun 5, 2026
…ut flake (#180) nosql was the LAST dedicated-backing-DB service still on the slow authed (minted-pro) provision path. The authed /nosql/new path provisions a DEDICATED MongoDB per team — cold-provision > 90s on prod — which timed out the LIVE suite at the per-test limit (flaky run 27000380873 failed on /nosql/new; an earlier run failed on /vector/new). Prior PRs pinned db (#178) + queue (#177) + vector (#179) to the fast anon hot-pool; this completes the set. Systemic fix: EVERY service whose authed path provisions a dedicated backing DB (db/vector/nosql) now uses forceAnon (anon hot-pool, TTL-reaped), so none can hit the slow authed-dedicated-provision timeout. The fast, no-dedicated-DB services (cache/storage/webhook) stay on the authed/minted-account + authed-reap path, and the auth specs + claim flow + minted-account lifecycle keep exercising the on-the-fly minted account — "test accounts on the fly" coverage is retained. Adds a per-service path table (dedicated-DB? + fast-authed vs anon-hot-pool + why) to live-anon-provision.spec.ts and syncs the cohort.ts/smoke-spec comments. Secondary guard: bump playwright.live.config.ts per-test timeout 90s → 120s for extra cold-hot-pool/network headroom (the forceAnon pinning is the primary fix). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
e2e-prod.ymlis flaky. A same-commit pair: run 26999447344 was GREEN (21 passed), while the concurrent run 26999448643 FAILED — theprovision anon vector (/vector/new)spec timed out at the 90s per-test limit ("apiRequestContext.fetch: Request context disposed").Root cause
/vector/newis an authed dedicated pgvector Postgres on the minted-pro path. Dedicated provisioning is slow on prod (~15s warm, >90s cold) — the exact dedicated-DB slowness for which/db/newand/queue/newwere already pinned to the fast anon hot-pool (forceAnon). Vector was the one remaining slow authed dedicated-DB provision left on the slow path.Fix
Set
forceAnon: trueon the vector flow → it routes through the fast pgvector hot-pool (same treatment as db/queue), so it can never exceed the timeout. The anon resource is TTL-reaped (no authed DELETE for anon resources).Per-service path table (documented inline in the spec +
cohort.ts):The two genuinely-slow dedicated-DB provisions (db, vector) + the hanging queue path use the fast anon hot-pool; cache/nosql/storage/webhook still exercise the authed/minted-account (and authed-reap) legs. Both paths stay covered, zero flake.
Verification
npm run gategreen locally (tsc + build + vitest: 1115 passed, 3 skipped).e2e-prod.ymltwice post-merge to prove reproducible green.🤖 Generated with Claude Code