Deterministic HTTP retry decisions with Retry-After and bounded time budgets
git clone https://github.com/sundaysebasidian-byte/moon-http-retry.git
cd moon-http-retry
moon check --target all
moon test --target wasm-gc
moon test --target js
moon run cmd/main --target wasm-gcrate-limited GET: wait 5000 ms
deduplicated POST: wait 200 ms
deadline exhausted: stoplet decision = @retry.decide_response(
@retry.defaults(),
http_method="GET", status=429, retry_index=0, elapsed_ms=100L,
body_replayable=true, retry_after_values=["5"], now_seconds=0L,
sample_ppm=0,
)
// Wait(5000L): zero jitter cannot shorten the server minimum.node --test scripts/http-simulation-server.test.mjs
node scripts/simulate-http.mjsfn idempotent_method(http_method : String) -> Boolfn jitter_delay(ceiling_ms : Int64, sample_ppm : Int) -> Int64?fn parse_http_date(value : String) -> Int64?fn retry_after_delay(value : String, now_seconds : Int64) -> Int64?fn retryable_status(status : Int) -> BoolInstall
Download zipDeterministic HTTP retry decisions with Retry-After and bounded time budgets