Skip to content

pr-validator: a 504 fetching the pinned charly is classified as a partial release upload, so the wrong remedy is named #285

Open

Description

@aitrawog

Summary

The pr-validator gate's engine-pin classifier names the wrong cause when GitHub's release CDN returns a 5xx while fetching the pinned charly. Measured on opencharly/opencharly#939 (head 2ed65c49, run 42469774003, job 128697595050, 2026-11-08T10:03:48Z):

curl: (22) The requested URL returned error: 504
##[error]the pinned engine v2026.308.2259 cannot be obtained — the release is published but its assets could not be downloaded (a partial upload).

The release is not partially uploaded. Measured right after the run, gh release view v2026.308.2259 -R opencharly/charly reports 7 assets, every one uploaded, the two the gate fetches among them:

$ gh release view v2026.308.2259 -R opencharly/charly --json tagName,isDraft,isPrerelease,assets --jq '[.tagName,.isDraft,.isPrerelease,(.assets|length)]|@tsv'
v2026.308.2259	false	false	7

$ gh release view v2026.308.2259 -R opencharly/charly --json assets --jq '.assets[] | [.name,.size,.state]|@tsv'
charly-candy-charly.yml	23561	uploaded
charly-linux-amd64	37097634	uploaded
charly-linux-arm64	34275490	uploaded
charly-linux-armv7	34734242	uploaded
charly-plugins-linux-amd64.tar.gz	100391779	uploaded
charly-plugins-linux-arm64.tar.gz	90598433	uploaded
charly-plugins-linux-armv7.tar.gz	93556805	uploaded

RCA

  • Mechanism. Ensure charly fetches charly-linux-amd64 and charly-plugins-linux-amd64.tar.gz with curl -fsSL; the CDN answered HTTP 504 for the first (fetch_ok=0). The classifier then asks the release API, sees a published non-draft release, and maps "published but the fetch failed" to pin_class="the release is published but its assets could not be downloaded (a partial upload)". A transient 5xx and a genuinely incomplete release share one branch, so they get one message and one remedy.
  • Missed control. The classifier reads the release's state but never the fetch's own status: a 5xx (provider, transient, retry is the remedy) and a 404/empty asset (the release's own defect, an operator upload is the remedy) are different classes, and the diagnosis sends the reader to the wrong one.
  • Blast radius. Every PR whose review meets a CDN 5xx is told to "serve the pinned release" — an operator action that is already true — while the actual action (re-run once the CDN recovers) is not named. The run is EXCLUDED from AI_REVIEW_AUTO_CLOSE_AFTER, so no PR is closed on it, but the author cannot tell a dead release from a flaky one, and the mislabel invites an unnecessary pin move.
  • Root fix. Capture the HTTP status of each asset fetch (curl -sS -w '%{http_code}' / --fail-with-body), and classify: 5xx / connection error = provider-transient (remedy: re-run the same head once the CDN answers, and say so); 4xx / zero-byte asset / asset absent from the API = the release's own defect (remedy: publish or re-upload, the class #723 already owns). Keep both classes EXCLUDED from auto-close.

Evidence trail

Agent: answer (DeepSeek Harness, deepseek-v4.1-flash)

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

Activity

  1. aitrawog commented on Nov 8, 2026

    @aitrawog
    ContributorAuthor

    A second measurement that widens this issue: the failing hop is not the repository's release at all, it is GitHub's releases/download/ path for every repository.

    Measured from the author's host minutes after run 42469774003 (job 128698139746), 2026-11-08:

    $ curl -sSL -o /dev/null -w 'http=%{http_code} size=%{size_download}\n' --max-time 60 https://github.com/opencharly/charly/releases/download/v2026.308.2259/charly-candy-charly.yml
    http=504 size=92
    
    $ curl -sSL -o /dev/null -w 'http=%{http_code} size=%{size_download}\n' --max-time 60 https://github.com/cli/cli/releases/download/v2.0.0/gh_2.0.0_checksums.txt
    http=504 size=92
    

    The 92-byte body is GitHub's own gateway page (<html><body><h1>504 Gateway Time-out</h1>...), and cli/cli is unrelated to this org — so the classifier's "the release is published but its assets could not be downloaded (a partial upload)" names a repository defect during a platform outage. The same asset answers http=200 size=23561 over the API route:

    $ curl -sS -o /tmp/asset.bin -w 'http=%{http_code} size=%{size_download}\n' -L -H "Accept: application/octet-stream" https://api.github.com/repos/opencharly/charly/releases/assets/712842787
    http=200 size=23561
    

    This also means the class's remedy #2 ("move the pin") cannot help, because no tag's assets download while the path is down. The transient class needs to be named as such (and its remedy named as "re-run once the path answers"), so an author is not sent to move a pin or serve a release that is already served.

    Agent: answer (DeepSeek Harness, deepseek-v4.1-flash)

    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

  2. aitrawog commented on Nov 9, 2026

    @aitrawog
    ContributorAuthor

    CLAIM — the engine-pin ASSET class, in this issue's own scope.

    Scope. .github/workflows/pr-validator.yml (the Ensure charly fetch + the
    INCONCLUSIVE class that reports it), plus its coverage and the live harness. Branch
    feat/engine-pin-asset-probe off origin/main @ bd1e195, worktree
    .worktrees/dsh-engine-pin/dotgithub. Next update: on the PR.

    The root fix this issue names is what I am implementing: capture each asset fetch's
    own HTTP status and body, and split the class — a 5xx / transport failure / gateway page
    is the transient class (remedy: re-run once the path answers, and the pin is NOT the
    fault), while a 404 / an asset the release API does not list is the release's own
    defect (remedy: publish or re-upload, the class charly#723 owns). No fallback route and no
    in-job retry: the class must SAY why, not paper over it (R3).

    A measurement that widens the issue, added here (2026-11-09T07:50–07:53Z, this host).
    The 504 is per-OBJECT and intermittent, not per-tag and not size-related — and it is
    currently hitting the NEWEST release while the tag this issue blamed downloads fine:

    07:51:52Z [200 37097634]  .../v2026.308.2259/charly-linux-amd64
    07:51:52Z [504 92]        .../v2026.313.0209/charly-linux-amd64
    07:51:52Z [200 100391779] .../v2026.308.2259/charly-plugins-linux-amd64.tar.gz
    07:51:52Z [504 92]        .../v2026.313.0209/charly-plugins-linux-amd64.tar.gz
    07:52:32Z [200 1376]      https://github.com/cli/cli/releases/download/v2.0.0/gh_2.0.0_checksums.txt
    07:52:43Z [504 92]        .../v2026.308.2259/charly-candy-charly.yml
    07:52:54Z [200 23561]     .../v2026.313.0209/charly-candy-charly.yml
    

    The 92-byte body is GitHub's own gateway page (content-type: text/html,
    x-github-edge-region: fra): <html><body><h1>504 Gateway Time-out</h1>. Both releases
    report every asset state: uploaded with the right size over the API, so no API-only
    check can see this
    — only a real GET can. The same bytes answer 200 over the API asset
    route (GET /repos/opencharly/charly/releases/assets/726596638 with
    Accept: application/octet-stream) while the download path 504s, which confirms the
    release is intact and the download path is the failing hop.

    So the "move the pin" remedy is not merely wrong-looking — it is harmful: on
    2026-11-09T07:48Z the pin was moved from v2026.308.2259 to v2026.313.0209, which is
    exactly the release whose assets the download path is now refusing. The pin was never the
    defect, and moving it cannot help while the object fetch 504s.

    Assignee: not self-assigned — this session posts under the operator's account and holds no
    GitHub identity of its own; this CLAIM comment is the record.

    Agent: dsh-engine-pin

    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

  3. aitrawog commented on Nov 9, 2026

    @aitrawog
    ContributorAuthor

    STATUS — the fix is written, reviewed, and blocked on ONE operator action.

    PR #287 implements this issue's root fix ("capture the HTTP status of
    each asset fetch and classify 5xx/transport separately from 4xx/absent") and closes it. The
    gate's own review on head 0192f84b returned BLOCK, one block only: a T4
    maintainer-account sign-off, because the PR changes pr-validator.yml — the gate itself. The
    reviewer states the change "verifiably preserves the gate … so the only missing piece is the
    sign-off", and verified the rest of the diff in order.

    So this issue waits on the operator's sign-off on #287, not on any code. This session will not
    post one in its own name: the rule allows it only at the operator's explicit direction.

    What the widening measurement added to this issue (2026-11-09, 07:50–08:00Z): the 504 is
    per-OBJECT and intermittent, and it is currently hitting the NEWEST release while the tag this
    issue blamed downloads fine — v2026.313.0209/charly-plugins-linux-amd64.tar.gz 504'd three
    times (92-byte gateway page) while v2026.308.2259 served both assets at 200. A second harness
    run minutes later found objects of BOTH releases refusing. The same object answers 200 over the
    API asset route while the download path 504s, and both releases report every asset
    state: uploaded. So a pin move moves the failure; the remedy is a RE-RUN — which is exactly
    what the new class says, and what the old class ("a partial upload") could not.

    Agent: dsh-engine-pin

    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

  4. added
    category:governance
    type:fix
    on Nov 23, 2026
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

    category:governancetype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions