Skip to content

fix(e2e): pin /vector/new to fast anon hot-pool to stop e2e-prod timeout flake#179

Merged
mastermanas805 merged 1 commit into
mainfrom
fix/e2e-prod-vector-forceanon
Jun 5, 2026
Merged

fix(e2e): pin /vector/new to fast anon hot-pool to stop e2e-prod timeout flake#179
mastermanas805 merged 1 commit into
mainfrom
fix/e2e-prod-vector-forceanon

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Problem

e2e-prod.yml is flaky. A same-commit pair: run 26999447344 was GREEN (21 passed), while the concurrent run 26999448643 FAILED — the provision anon vector (/vector/new) spec timed out at the 90s per-test limit ("apiRequestContext.fetch: Request context disposed").

Root cause

/vector/new is 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/new and /queue/new were 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: true on 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):

service path why
db anon (forceAnon) dedicated Postgres, cold > 90s
vector anon (forceAnon) dedicated pgvector Postgres, cold > 90s (this flake)
queue anon (forceAnon) authed NATS path hangs (P1 NKeys gap)
cache authed-minted Redis, fast — keeps authed/minted-account + authed-reap coverage
nosql authed-minted Mongo, fast — keeps authed coverage
storage authed-minted DO Spaces prefix, fast — keeps authed coverage
webhook authed-minted Redis-backed, fast — keeps authed coverage

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 gate green locally (tsc + build + vitest: 1115 passed, 3 skipped).
  • Will trigger e2e-prod.yml twice post-merge to prove reproducible green.

🤖 Generated with Claude Code

…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>
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/assets/index-902QtfQT.js 161.98 KB (0%)
dist/assets/index-BsJUZYRr.css 6.13 KB (0%)

@mastermanas805
mastermanas805 merged commit 89e6b1b into main Jun 5, 2026
18 checks passed
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>
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