A Context7 refresh already in progress is not a failure - #124
Merged
Conversation
The first real run of this job returned:
HTTP 400
{"error":"user-has-active-task","message":"You already have a
library being processed. Only one library can be processed at
a time."}
which turned the docs workflow red. The endpoint, the auth and the
libraryName shape were all correct -- Context7 simply allows one library
per account to be processing at a time.
That is not a failure to request a re-index. It means one is already
underway, which is the outcome this job exists to produce, so failing
would turn a docs deploy red for having asked twice -- and two pushes in
quick succession is exactly when it happens.
Matched on the error body rather than on 400 alone: a 400 for any other
reason is still a real failure and still fails.
Claude-Session: https://claude.ai/code/session_01Hpit6cxJxkbmRfNu6UJGr5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Context7 refresh job added in #122 turned the docs workflow red on its
first real run
(32650278549):
What that told us
The integration is correct. It authenticated, resolved
/navbytes/vee, and came back with a domain-level answer rather than atransport or auth error — which is the confirmation #122 said it could not give,
since there was no key to test with at the time.
Context7 allows one library per account to be processing at a time, and a
refresh was already underway when this fired.
What was wrong
The step treated every non-2xx as fatal.
user-has-active-taskis not a failureto request a re-index — it means one is already happening, which is the
outcome the job exists to produce.
Left as-is, a docs deploy goes red for having asked twice. Two pushes in quick
succession is exactly when that happens, so this would have been a recurring
false alarm on a job whose whole point is to be quietly reliable.
The fix
That one error is treated as success; everything else still fails. Matched on
the error body, not on 400 alone — a 400 for any other reason is a real
failure and still exits 1.
Verified against the four response shapes that matter:
{"status":"queued"}{"error":"user-has-active-task",…}{"error":"unauthorized"}{"error":"not-found"}The deploy job in that run succeeded; only this step failed, so the published
site was never affected.
https://claude.ai/code/session_01Hpit6cxJxkbmRfNu6UJGr5