Skip to content

bug: install-stats counts a smoke job that installed then failed as 0 CI installs #1455

Closed

Description

@Alan-Cha

Problem

docs/install-stats/ estimates real installs by subtracting the Linux release smoke test's installs from GitHub's checksums.txt download counts. The collector (scripts/collect-install-stats.sh) gets each run's install count by counting jobs that succeeded:

gh api "repos/${REPO}/actions/runs/${id}/jobs" \
  --jq '[.jobs[] | select(.conclusion == "success")] | length'

What adds to the download counts is a job that got as far as installing. The fresh install is the first thing the smoke script does (scripts/release_smoke_test_linux.sh, Fresh install:). The upgrade, no-op re-run and uninstall checks all come after it, so nearly any failure happens after an install that already counted. The collector records such a job as 0, and its install shows up on the page as a real person.

It has happened

Run 38583376563 (Oct 14, 14:45 UTC) installed v0.8.1. It then failed the upgrade step, because GitHub returned an HTTP 500 while downloading agentop_main-latest_linux_amd64.tar.gz. It is recorded as installs: 0 in every snapshot since. The page's 2026-10-15 row shows 21 installs, 12 CI and 9 people, when the true figures are 13 CI and 8 people.

This is the only failed run so far: of 157 smoke runs, 106 succeeded, 50 were skipped and 1 failed. Every failure from here on will add one install the same way.

Proposed fix

Count jobs whose Run the Linux release smoke test step started, whatever its conclusion, instead of jobs that succeeded. The jobs response already carries each step's conclusion. A skipped job has no steps, and a job that failed before that step shows it as skipped, so neither one counts.

Remaining error: a job that fails inside that step but before the fresh install (for example, while looking up release tags) would count as 1 without having installed. It hasn't happened. Making the count exact would mean splitting the fresh install into its own workflow step.

Counts already recorded are reused rather than queried again, so existing records need a way to be marked for one re-query. Otherwise the Oct 14 run stays at 0.

Related gap, not fixed here: late re-runs

"Re-run failed jobs" keeps the run's ID. A run re-run after the collector has saved its count is never queried again, so the re-run job's install would read as a person. This has not happened: no smoke run has ever had run_attempt > 1. A fix is possible at no extra request cost in the common case, because the run list the collector already fetches includes run_attempt. That would mean storing an attempt per run and querying again when it rises, with filter=all to see every attempt. That's more state than the case justifies today, so the fix PR documents it in a comment instead.

Found while reviewing the follow-ups to #1405.

Activity

  1. added
    bug
    on Oct 20, 2026
  2. added a commit that references this issue on Oct 20, 2026
    ee02af3
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

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions