Skip to content

fix(scripts): treat HTTP 429 rate limits as inconclusive in live check - #2918

Open
7ui77 wants to merge 4 commits into
lnreader:masterfrom
7ui77:fix/live-check-http-429
Open

7ui77 wants to merge 4 commits into
lnreader:masterfrom
7ui77:fix/live-check-http-429

Conversation

@7ui77

@7ui77 7ui77 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Checklist

  • Update version code if an existing plugin was modified (N/A — tooling/docs only)
  • Test changes in Plugin Playground or the app (verified with un-mocked local HTTP server tests via node --test scripts/live-check-plugin.test.js, ESLint, and Prettier)
  • Reference related issues in the PR body (e.g. Closes #xyz)
  • Commit messages follow type(scope): description (e.g. feat(<generator>): add new source)

Summary

scripts/
├── live-check-plugin.js       # observe HTTP 429 per step/request key via AsyncLocalStorage + handle 429 in probe/error checks
└── live-check-plugin.test.js  # 14 un-mocked regression tests against local 127.0.0.1 HTTP servers
docs/
└── testing.md                 # document HTTP 429 rate limiting under INCONCLUSIVE
checkPlugin
  probeSiteReachability -> 429 => INCONCLUSIVE ("HTTP 429 (rate limited)")
  withRateLimitObserver
    runChecks (stepContext.run per step)
      key = (method, url, body) | unique Symbol for opaque non-GET/HEAD body
      fetch response === 429 -> step.rateLimitedRequests.add(key)
      fetch response !== 429 -> step.rateLimitedRequests.delete(key)
      thrown error status === 429 -> INCONCLUSIVE ("HTTP 429 (rate limited)")
  reclassifyRateLimitedSteps
    step.status === 'FAIL' && step.rateLimitedRequests.size > 0
      -> step.status = 'INCONCLUSIVE'

Instead of matching "429" substrings in localized plugin error messages or auto-retrying requests inside the harness, the checker passively tracks per-step fetch responses keyed by (method, url, body) using AsyncLocalStorage, clears a request key if a retry of that same request succeeds, and reclassifies FAIL steps that still ended with an unrecovered 429.

Evidence

Previously, CI live-check runs failed when GitHub Actions runner IPs hit upstream HTTP 429 rate limits across unrelated plugins:

  • plugins/spanish/novelasmtl.ts: popularNovels failed with Novelas MTL: HTTP 429.

  • plugins/spanish/noveltranslations18.ts: parseNovel failed with No se pudo acceder a la novela (429).

  • plugins/indonesian/zerokaito.ts: popularNovels failed with Kaito Novel: HTTP 429 ...

  • plugins/arabic/eightysixar.ts: parseChapter failed with EightysixAR: HTTP 429.

  • Before:

    • Initial 429 check suite (node --test scripts/live-check-plugin.test.js): 4 pass, 6 fail (exit code 1) on unmodified master.
    • Shared POST endpoint regression check (different bodies to POST /admin-ajax.php, e.g., action=chapters → 429, action=meta → 200): 13 pass, 1 fail (exit code 1) when keyed by URL alone because the second POST cleared the 429.
  • After (node --test scripts/live-check-plugin.test.js): 14 pass, 0 fail in ~3.04s ({ concurrency: 4 }, exit code 0) — covers thrown plain/localized 429 errors across popularNovels, searchNovels, parseNovel, and parseChapter, swallowed 429 in fetchText and fetchFile, root HEAD probe 429, structured { status: 429 } errors, retry recovery (GET and shared POST same-body), shared POST with distinct bodies preserving 429, recovered-then-broken selectors staying FAIL, late 429s from earlier steps not masking later failures, and non-429 errors containing "429" in text staying FAIL.

  • ./node_modules/.bin/eslint scripts/live-check-plugin.js scripts/live-check-plugin.test.js --max-warnings 0: passed (0 errors, 0 warnings).

  • ./node_modules/.bin/prettier --check scripts/live-check-plugin.js scripts/live-check-plugin.test.js docs/testing.md: passed.

Merge Danger

Door: two-way (self-contained in scripts/ and docs/testing.md; no CI workflows or plugin sources modified).

Blast Radius: low (only reclassifies FAIL steps to INCONCLUSIVE when HTTP 429 was actually observed on fetch/error status/HEAD probe; passing steps and genuine failures remain unchanged).

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change affects results from the plugin live-check workflow.

The PR appears safe to merge with a non-blocking improvement to how changed-URL retries are tracked.

Findings

  1. P2 Changed URLs hide recovered failures ▶

Summary

The live checker now treats observed HTTP 429 responses as inconclusive instead of plugin failures.

  • Rate-limited plugin checks now report an inconclusive result.

One non-blocking edge case remains for retries that change URLs. Local test execution was blocked by the checkout’s missing esbuild dependency.

Reviews (1) · Last reviewed commit: "fix(scripts): treat HTTP 429 rate limits..." · Reviewed by Greptile

Comment thread scripts/live-check-plugin.js Resolved
@7ui77
7ui77 force-pushed the fix/live-check-http-429 branch from 6095b9a to 7b6dc4d Compare November 19, 2026 16:00

This branch has not been deployed

No deployments
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