Let the cards E2E server raise the development login limit
Some checks failed
Validate and deploy Sokko G / validate (push) Successful in 22m38s
Validate and deploy Sokko G / deploy (push) Failing after 43s

Development logins were capped at a hard-coded 10 per minute per address.
The cards E2E suite logs in 21 times, and with the test added in 067a4a8
the expedition test's login became the eleventh within one minute: it got
"Trop de tentatives", never reached the admin guild tab and timed out in
CI. The limit is now the devAuthRateLimit option, still 10 by default, and
the E2E server raises it as it already did for apiRateLimit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-21 10:13:17 +01:00
parent 067a4a8fd6
commit 2831f01195
4 changed files with 20 additions and 3 deletions

View file

@ -60,12 +60,13 @@ function now() {
const { startServer } = await import("../server.mjs");
const draws = [0.999, 0, 0.999, 0.999, 0.999, 0];
let drawIndex = 0;
// Tous les parcours et leurs deux comptes partagent la même adresse IP : la limite par minute les ferait échouer au hasard.
// Tous les parcours et leurs deux comptes partagent la même adresse IP : les limites par minute, connexion de développement
// comprise, les feraient échouer au hasard.
// Alertes Discord sans bot : chaque message est écrit dans ce fichier, une ligne JSON par alerte.
const alertsFile = join(tmpdir(), "sokkog-cards-e2e-alerts.jsonl");
writeFileSync(alertsFile, "");
const sendAlert = async (discordId, content) => appendFileSync(alertsFile, `${JSON.stringify({ discordId, content })}\n`);
const server = startServer({ cardsApiOptions: { allowProductionDevAuth: true, apiRateLimit: 100_000, now, sendAlert, random: (max) => Math.min(max - 1, Math.floor(draws[drawIndex++ % draws.length] * max)) } });
const server = startServer({ cardsApiOptions: { allowProductionDevAuth: true, apiRateLimit: 100_000, devAuthRateLimit: 100_000, now, sendAlert, random: (max) => Math.min(max - 1, Math.floor(draws[drawIndex++ % draws.length] * max)) } });
let stopping = false;
function stop() {