Skip to content

🏗️🔧:authenticate the EditorConfig download - #1835

Merged
openinf-commit-queue[bot] merged 1 commit into
livefrom
fix/ec-download-rate-limit
Aug 19, 2026
Merged

🏗️🔧:authenticate the EditorConfig download#1835
openinf-commit-queue[bot] merged 1 commit into
livefrom
fix/ec-download-rate-limit

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

#1834 failed CI having changed a Liquid template and an Eleventy global. The
task that failed was verify.validForEC:

==> build/tasks/verify/verify-valid-for-ec.mts
HttpError: API rate limit exceeded for 52.165.251.251.
FAILED: build/tasks/verify/verify-valid-for-ec.mts

Nothing about a copyright year can reach an EditorConfig checker. It was the
runner's address being rate limited.

Why it happens

editorconfig-checker on npm is a wrapper. The checker itself is a Go binary,
which the wrapper fetches from the GitHub API the first time it runs and caches
under node_modules. CI installs fresh every run, so it fetches every run.

Unauthenticated, that is 60 requests an hour for the whole IP, shared with
every other job leaving the same address. It works until it does not, and when
it does not the failure lands on whichever pull request happened to be next.

The fix

The wrapper reads GITHUB_TOKEN, confirmed in its bundle:

const us = new Octokit({ auth: process.env.GITHUB_TOKEN, ... });

The runner is handed a token already, so passing it makes the request
authenticated and the limit 5000.

On avoiding the download

It caches under node_modules, so locally it downloads once. There is no
maintained JavaScript equivalent to move to:

package last published
eclint 2018-10-23
editorconfig-tools 2015-03-04

Downloading a binary is what this package is for, and the alternative would be
caching node_modules between runs, which is more machinery than this needs.

Not done here

The wrapper also reads EC_VERSION, and without it the version resolves to
latest, so CI runs whatever was released most recently. Pinning it would make
the checks reproducible and would want a renovate annotation to keep the pin
watched, the way .devcontainer/post-create.sh already does. That is a
separate change and this one is the flake.

verify.validForEC fetches the editorconfig-checker binary from the
GitHub API the first time it runs, and node_modules is new on every run
here, so it fetches on every run. Unauthenticated that is 60 requests an
hour shared with everything else leaving the same address, and #1834
failed on it having changed nothing that could possibly be related.

The wrapper reads GITHUB_TOKEN and the runner is handed one, so the
request is now authenticated and the limit is 5000.

The binary is a Go program with no maintained JavaScript equivalent:
eclint was last published in 2018 and editorconfig-tools in 2015. The
npm package is the wrapper, and downloading is what it does.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@netlify

netlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit b24a30b
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a863d278d9af8000812bfa0
😎 Deploy Preview https://deploy-preview-1835--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@OpenINFbot OpenINFbot added the commit-queue Land this pull request when its checks pass label Aug 19, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit e325195 into live Aug 19, 2026
15 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the commit-queue Land this pull request when its checks pass label Aug 19, 2026
@OpenINFbot
OpenINFbot deleted the fix/ec-download-rate-limit branch August 19, 2026 23:54
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.

2 participants