Skip to content

arxiv_refs: an arXiv API outage now turns the workflow red - #143

Merged
Jammy2211 merged 1 commit into
mainfrom
ccr-7e6b22c0-04av9i
Nov 3, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
ccr-7e6b22c0-04av9i

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Closes #142

Most of the fix was already on main in 0c3e2dc and 772d725: ArxivAPIError, the retry ladder, api_failed, and return 1. The bug still live was in the workflow. It piped the script through tee without pipefail, so the exit code was discarded and an outage still showed green.

Changes

  • arxiv_refs.yml:
    • set -o pipefail and the exit status is recorded.
    • On failure, the step summary gets a banner.
    • Validate and commit still run, so partial progress is kept.
    • A final step fails the job with ::error::.
  • arxiv_refs.py:
    • sleep can be injected into the ladder, so tests don't wait.
    • An unparseable body raises ArxivAPIError; it used to crash the run.
    • http.client.HTTPException counts as transient.
    • None is documented to mean only "arXiv answered, no unique match".
  • backfill_arxiv_refs.py: new unattempted stat and explicit ARXIV API FAILURE summary lines.
  • Tests: 9 new ones, including the witness: an injected HTTPError(429) is counted as api_failed, never as unmatched, and is never NOTE-marked. The witness fails on the pre-fix source.

Verification

  • pytest -q: 286 passed.
  • make validate: OK.
  • Git history shows nothing was NOTE-marked in the 2026-09-14..18 outage window.

Generated by Claude Code

The script already returned 1 on transport failure, but the workflow piped it
through tee without pipefail, so the job stayed green. Add pipefail, record the
exit status, keep partial progress, then fail the job. Injectable sleep for the
retry ladder, ParseError -> ArxivAPIError, unattempted stat, witness test
(HTTPError 429 is an API failure, never a non-match or a NOTE-mark).
Git history: nothing was NOTE-marked in the 2026-09-14..18 outage window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8REafSSE74S71P4set
@Jammy2211
Jammy2211 merged commit 1f22de7 into main Nov 3, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the ccr-7e6b22c0-04av9i branch November 3, 2026 19:24
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.

fix: arxiv_refs — an arXiv API outage must turn the workflow red

2 participants