Webhook retries have no jitter, so failures synchronise
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 80/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- nodejs, typescript
- Ambito
- backend
Direzione di ricerca
Inizia da src/alerts/delivery.ts, dove retryDelayMs calcola il backoff deterministico di 1 s/2 s/4 s e il ciclo dei tentativi lo richiama. Aggiungi il jitter completo dietro una sorgente di casualità iniettabile, mantenendo il limite massimo di tentativi esistente e la regola per cui le risposte 4xx non vengono ritentate. Esegui un singolo file vitest con npx vitest run src/tests/<file>.test.ts, usando la sorgente di casualità fissa per mostrare che due errori simultanei vengono ritentati in momenti diversi. È completato quando i ritardi hanno il jitter, il test passa in modo deterministico e il comportamento per i 4xx e per il limite di tentativi è invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Background
src/alerts/delivery.ts backs off deterministically:
function retryDelayMs(attempt: number): number {
return Math.pow(2, attempt - 1) * 1000
}
Every delivery that fails at the same moment retries at exactly the same moment
— 1s, then 2s, then 4s. A price movement is precisely the event that triggers
many alerts at once, so when a subscriber's endpoint has a wobble, Lens responds
by hitting it with a synchronised burst, three times, which is a good way to
turn a wobble into an outage.
What to build
- Add jitter. Full jitter — a random value between zero and the computed delay —
is the standard choice and is one line. - Keep the existing retry count and the existing rule that 4xx is not retried,
which is correct. - Make the test deterministic by injecting the randomness rather than asserting
on a range.
Acceptance criteria
- Retry delays are jittered
- Two deliveries failing simultaneously retry at different times, asserted by a test
- 4xx responses are still not retried
- The attempt cap is unchanged
- The randomness source is injectable so the test is not flaky
Drips Wave · Complexity: Easy · 100 points
Repo: Divinity-Labs/Lens. Node + TypeScript, Fastify, Prisma on Postgres,
Redis for queues, Prometheus via prom-client.
Run the tests: npm test. The tests are vitest, not jest. Running jest
against this repo reports "66 suites, 0 tests" and means nothing. A single file
is npx vitest run src/__tests__/yourfile.test.ts.
Load test (prices) is already failing on main and has been for some
time. It is not your PR that broke it. Every other check should be green.
This service prices real assets on Stellar mainnet. A number that is wrong
is worse than a number that is missing, because a caller cannot tell the
difference. Prefer failing loudly over returning a plausible value.
Never elide an address, a contract id or a key in code, a comment or a test
fixture. A previous batch wrote a shortened contract id in an issue text and
five contributors invented plausible-looking ids to fill the gap. Write the
whole thing or do not write it at all.
The house pattern for an outbound deadline already exists — see
src/alerts/delivery.ts, which passes signal: AbortSignal.timeout(10_000) to
fetch. Where an issue below asks for a timeout, copy that, do not invent a
second convention.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 71
- Merge medio
- 1g 15h
- PR unite (30g)
- 28
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Divinity-Labs/Lens
-
Startup does not verify the database schema matches the codeForse già presa @titankrypt-gif l’ha presa oggi. Apertaarea:database difficulty:advanced help wanted points:200 Stellar Wave
Divinity-Labs/Lens#352 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Ingester loops have no upper bound on a single cycleForse già presa @felixumeh l’ha presa oggi. Apertaarea:ingest difficulty:intermediate help wanted points:150 Stellar Wave
Divinity-Labs/Lens#351 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
There is no runbook for the serviceForse già presa @felixumeh l’ha presa oggi. Apertaarea:docs difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#350 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
The MCP server's upstream call has no deadline and no error handlingForse già presa @Wittig18 l’ha presa oggi. Apertaarea:mcp difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#349 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Horizon rate limiting is not handledForse già presa @abdulrahmanj383-creator l’ha presa oggi. Apertaarea:ingest difficulty:intermediate help wanted points:150 Stellar Wave
Divinity-Labs/Lens#348 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Divinity-Labs/Lens
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
agilepathway/label-checker#739 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
CopilotKit/OpenBot#800 ·
I maintainer di solito rispondono entro 1 giorno
-
Endpoint links in the tag operations list are below the 24px target sizeForse già presa @AdzerKI l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
ehmpathy/rhachet-roles-bhuild#471 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno