Skip to content

fix(e2e): reap tolerates 409/503 race; smoke /db uses fast anon path - #178

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

fix(e2e): reap tolerates 409/503 race; smoke /db uses fast anon path#178
mastermanas805 merged 1 commit into
mainfrom
fix/e2e-prod-green-3

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Fix-forward on #177. Run 26998759093 went 3→2 red; this closes the last 2.

  1. Reap races. The deploy-lifecycle inline reap hit 409 deletion_already_pending (the test's own DELETE started the soft-delete/email flow; the reap's second DELETE raced it), and the out-of-process reap:live hit 503 team_lookup_failed (the workflow reaps the minted account — cascading its resources — before the ledger sweep). Both = "already torn down / gone with the account", not a leak. reapEntities now counts both as alreadyGone.
  2. Smoke /db/new hung 90s on the authed (pro) path — authed /db/new provisions a dedicated DB, slower than the 90s timeout (anon uses the fast hot-pool). Authed vector/cache/nosql in live-anon-provision still cover the minted-pro provision path. Smoke now pins forceAnon (fast hot-pool + fingerprint bypass), with best-effort no-bearer reap (anon resources are TTL-reaped; asserts only 401/403).

npm run gate green (1115 passed, 3 skipped).

🤖 Generated with Claude Code

Run 26998759093 (the #177 fix) closed queue + A10; 2 legs still red:

1. Deploy-lifecycle inline reap got 409 deletion_already_pending — the test's
   own DELETE step starts the soft-delete/email flow, then the reap's second
   DELETE races it. And the final out-of-process reap:live got 503
   team_lookup_failed because the workflow reaps the minted ACCOUNT (cascading
   away its resources) BEFORE the ledger sweep runs. Both mean "already being
   torn down / gone with the account", not a leak. Fix: reapEntities now counts
   409 deletion_already_pending and 503 team_lookup_failed as alreadyGone.

2. live-provision-smoke /db/new hung 90s (test timeout) on the AUTHED (pro)
   path — authed /db/new provisions a DEDICATED database, slower than the
   timeout; the anon path uses the fast hot-pool. (Authed vector/cache/nosql in
   live-anon-provision still cover the minted-pro provision path.) Fix: smoke
   pins forceAnon (fast hot-pool, fingerprint bypass), with the same
   best-effort no-bearer reap (anon resources are TTL-reaped; assert only
   401/403 so an unexpected failure still reds).

npm run gate green (1115 passed, 3 skipped).

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 b967ac2 into main Jun 5, 2026
18 of 19 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