Skip to content

census-watch: the daily watch is unauthenticated against api.github.com, so the FLM and support sweeps hit 403 on a normal run #2812

Closed

Description

@bong-water-water-bong

What

The daily census watch is unauthenticated against api.github.com, so two of its three sweeps run into the 60-requests-per-hour anonymous ceiling on a normal run — and now that #2783 makes failures lead the issue, the blindness is visible:

census-watch: !! FLM WATCH FAILED: https://api.github.com/repos/FastFlowLM/FastFlowLM/releases?per_page=20: HTTP Error 403: rate limit exceeded
census-watch: !! SUPPORT WATCH FAILED: https://api.github.com/repos/ROCm/FLM_Q4NX_Converter/commits?per_page=1: HTTP Error 403: rate limit exceeded

Measured in the simulate_alert dispatch on main at 01:17Z (run 43994400966, issue #2811 closed as the test): the FastFlowLM-org/releases sweep and the support-pins sweep both hit 403 in the same run. The architecture walk (Hugging Face) was unaffected.

Why

tools/census_watch.py:469, in get_json():

req = urllib.request.Request(url, headers={"User-Agent": "1bit-census-watch"})

Every JSON fetch sends only a User-Agent. get_json is what the FastFlowLM org listing, the FastFlowLM releases and the support-pins sweep use, and all three are api.github.com. Unauthenticated GitHub API is 60 requests/hour per IP; the support-pins sweep alone walks every pinned repo's head plus every watched path per repo.

request_headers() (used by the Hugging Face path) is not the answer either: it sends HF_TOKEN, which must never go to api.github.com.

Fix

Host-based, in one place:

  • api.github.com → Authorization: Bearer $GITHUB_TOKEN (the workflow's own read-only github.token; 1,000 req/hour per repository);
  • Hugging Face hosts → the existing request_headers() (the HF token);
  • anything else → the User-Agent only.

Plus the workflow passes GITHUB_TOKEN: ${{ github.token }} to the watch step, since the default token is not in the environment unless a step asks for it.

How it was found

Not by a reader: by making the excerpt lead with the tool's own !! … WATCH FAILED lines (#2783), which turned three weeks of invisible 403s into the first thing in the issue.

Activity

  1. bong-water-water-bong commented on Nov 17, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    CLAIM cl-1077 (01:3xZ) — my lane is empty (0 open PRs) and this is the census watch's own credential path. Fix: host-based headers in get_json (GitHub hosts get GITHUB_TOKEN, HF hosts keep request_headers(), everything else stays anonymous) plus GITHUB_TOKEN: ${{ github.token }} in the watch step, which is not in the environment unless a step asks for it. Arm: the same simulate_alert dispatch on the branch must come back with no WATCH FAILED lines, and I will show the 403 -> 200 on a direct call rather than only the absence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions