Skip to content

ci: treat a too-early Context7 refresh as a skip - #65

Merged
cardmagic merged 2 commits into
mainfrom
fix/context7-refresh-too-early
Oct 8, 2026
Merged

cardmagic merged 2 commits into
mainfrom
fix/context7-refresh-too-early

Conversation

@cardmagic

Copy link
Copy Markdown
Owner

Why

The first run of the Context7 refresh workflow from #64 failed on main: curl timed out after 60 seconds with no response. Later calls returned HTTP 400 {"error":"too-early","message":"Too early to refresh the project. Last update was 0 days ago. Minimum 10 days required between updates."}. Context7 limits how often one library refreshes, so the workflow would fail on most pushes to main.

What changes

  • The request allows 180 seconds for a response and prints the body.
  • A too-early answer ends the job with a workflow notice instead of a failure.
  • Any other non-200 answer still fails the job.

Validation

  • actionlint and Prettier pass.
  • Against the live API, the old script exited 56 on the too-early answer. The new script, extracted from the workflow file, exits 0 with the notice.

The first run of the refresh workflow failed. curl timed out after 60
seconds with no response, and later calls returned HTTP 400
{"error":"too-early","message":"... Minimum 10 days required between
updates."}. Context7 limits how often one library refreshes, so the
workflow failed on most pushes to main.

Allow 180 seconds for the response, print the body, and end with a
workflow notice when Context7 answers too-early. Any other non-200
answer still fails the job. Against the live API, the old script
exited 56 on the too-early answer and the new script exits 0 with the
notice.
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Changes how the build system handles a third-party API call.

The PR appears safe to merge; the latest commit fixes the JSON spacing issue without weakening the error check.

What we checked:

  • Other errors still fail: The skip requires HTTP 400 and an error value of too-early. Other responses reach exit 1.

Summary

The workflow allows 180 seconds for the refresh request, prints the response, and skips HTTP 400 responses whose error is too-early.

  • The latest commit uses jq instead of matching raw text, fixing the previous spacing issue.
  • No new actionable issues or repository-rule violations were found.

Reviews (2) · Last reviewed commit: "ci: read the Context7 error field with j..." · Reviewed by Greptile

Comment thread .github/workflows/context7-refresh.yml Outdated
Review feedback on solid-objects-js#65. The too-early check matched
the exact string "error":"too-early", so valid JSON with other
spacing, such as {"error": "too-early"}, would fail the job instead
of skipping. Read the field with jq. On four sample bodies, grep
missed the spaced form and jq skipped it, and both still fail on
another error and on a body that is not JSON. Against the live API
the workflow script still exits 0 with the notice.
@cardmagic

Copy link
Copy Markdown
Owner Author

@greptileai Please review the latest commit 8362900. It reads the error field with jq, as suggested, so harmless JSON spacing no longer fails the job.

@cardmagic
cardmagic merged commit 4851b90 into main Oct 8, 2026
19 checks passed
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