bug: remove dead Mocha testnet community endpoints and add weekly health check#2482
bug: remove dead Mocha testnet community endpoints and add weekly health check#2482
Conversation
…workflow Agent-Logs-Url: https://github.com/celestiaorg/docs/sessions/cfe13e1f-f0f3-4141-8676-f10fd0d7a0ba Co-authored-by: jcstein <46639943+jcstein@users.noreply.github.com>
Replace hardcoded Mocha-only endpoint list with a Node.js script that dynamically extracts community endpoints from all three network pages (mainnet-beta, mocha-testnet, arabica-devnet). Broken endpoints are removed (bullet lists) or replaced with `-` (table cells). The workflow now creates a PR with the changes instead of filing an issue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🚀 Preview Deployment Your preview is ready: https://celestiaorg.github.io/docs-preview/pr-2482/ |
Pass the summary through an environment variable to avoid the CodeQL script injection warning on the PR body field. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| if (allFailed) { | ||
| // Every endpoint in this line/row is down — remove the whole line | ||
| linesToRemove.add(lineIndex); |
There was a problem hiding this comment.
🔴 Removing a bullet-point endpoint leaves its indented sub-bullets orphaned, attaching them to the wrong parent
When extractMochaBulletEndpoints identifies an endpoint like celestia-testnet-consensus.itrocket.net (mocha line 115), only the endpoint's own line index is tracked. The removal logic at scripts/check-endpoints.mjs:450-452 adds only that single line to linesToRemove. However, this endpoint has indented sub-bullets at lines 116–117 ( - RPC port: 26657 / - gRPC port: 9090) that are not detected or removed. After filtering at line 468, those orphaned sub-bullets become children of the preceding endpoint (rpc-mocha.pops.one), producing misleading documentation that associates the wrong port information with the wrong host. Since this script auto-creates PRs, the error could easily slip through review.
Prompt for agents
In the removal logic in main() around line 450, when a bullet-list line is marked for removal (linesToRemove.add(lineIndex)), the code should also scan forward for any contiguous indented sub-bullet lines (lines starting with whitespace followed by -) immediately after the removed line and add those indices to linesToRemove as well. This applies specifically to the Mocha bullet-list format.
The relevant code is in scripts/check-endpoints.mjs inside the for loop at line 446. After linesToRemove.add(lineIndex), add a forward scan like:
let next = lineIndex + 1;
while (next < lines.length && /^\s+-/.test(lines[next])) {
linesToRemove.add(next);
next++;
}
This ensures that when celestia-testnet-consensus.itrocket.net at mocha-testnet/page.mdx:115 is removed, its sub-bullets at lines 116-117 (RPC port: 26657, gRPC port: 9090) are also removed, preventing them from being incorrectly associated with the preceding endpoint rpc-mocha.pops.one.
Was this helpful? React with 👍 or 👎 to provide feedback.
Resolves #2481
Several community endpoints listed in the Mocha testnet docs had accumulated with
fails=3675, indicating persistent failures. Removes the dead ones and adds a cron workflow to surface future breakage automatically.Removed endpoints (
mocha-testnet/page.mdx)Pruned from DA gRPC, Community RPC, Community gRPC, and Community API sections:
public-celestia-mocha-4-consensus.numia.xyz(ports 9090, 26657)grpc.celestia-mocha.com:443celestia-t-{grpc,rpc}.noders.services+ APIAdded: weekly endpoint health check (
.github/workflows/check-endpoints.yml)Runs every Monday at 09:00 UTC (+
workflow_dispatch). Checks all remaining Mocha community endpoints — TCP for gRPC/RPC, HTTP for API — and opens or updates aendpoint-check-labeled GitHub issue listing any unreachable endpoints and the doc file to edit.HTTP failures distinguish connection errors (
000) from non-2xx responses, so transient 4xx from an otherwise-live server won't false-positive.