Files
civitai__civitai/tests/preview-article.spec.ts
Zachary Lowden 02dd17186f fix(preview): run article spec as mod (article.upsert is rate-limited 1/day) (#2488)
The article spec (#2485) 429'd on real PRs (caught on PR 2487): article.upsert
is rate-limited to a HARD 1/day per user (articleRateLimits), and the ci-smoke
fixtures are shared across all concurrent previews — so after the first preview
of the day creates the one allowed article as `tester`, every later preview 429s
(TOO_MANY_REQUESTS). It passed in #2485 only because that was the day's first
create.

The rateLimit middleware bypasses moderators entirely (`if (ctx.user.isModerator)
return next()`), so run the spec as the `mod` fixture — the only way to author an
article reliably from the shared fixtures. No seed/createdAt change helps: even an
established account is capped at 1/day.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 19:20:37 -05:00

4.1 KiB